Commit 57410e2d authored by Alexander Schwinn's avatar Alexander Schwinn
Browse files

No startup notification in wayland to prevent crash (Issue #17)

Additional guard required to dont trigger the code without wayland
support
parent 1e46bc2c
Pipeline #4102 passed with stages
in 2 minutes and 19 seconds
...@@ -52,6 +52,10 @@ ...@@ -52,6 +52,10 @@
#undef HAVE_LIBSTARTUP_NOTIFICATION #undef HAVE_LIBSTARTUP_NOTIFICATION
#endif #endif
#ifdef GDK_WINDOWING_WAYLAND
#include <gdk/gdkwayland.h>
#endif
#ifdef HAVE_LIBSTARTUP_NOTIFICATION #ifdef HAVE_LIBSTARTUP_NOTIFICATION
#include <libsn/sn.h> #include <libsn/sn.h>
#endif #endif
...@@ -307,11 +311,14 @@ xfce_spawn_process (GdkScreen *screen, ...@@ -307,11 +311,14 @@ xfce_spawn_process (GdkScreen *screen,
g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
#ifdef GDK_WINDOWING_WAYLAND #ifdef GDK_WINDOWING_WAYLAND
if (startup_notify == TRUE) if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
{ {
/* 'sn_display_new' crashes when used via wayland, so no startup notification support here */ if (startup_notify == TRUE)
g_warning ("startup notification not supported for wayland sessions"); {
startup_notify = FALSE; /* 'sn_display_new' crashes when used via wayland, so no startup notification support here */
g_warning ("startup notification not supported for wayland sessions");
startup_notify = FALSE;
}
} }
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment