Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
Pipeline #4102 passed
......@@ -52,6 +52,10 @@
#undef HAVE_LIBSTARTUP_NOTIFICATION
#endif
#ifdef GDK_WINDOWING_WAYLAND
#include <gdk/gdkwayland.h>
#endif
#ifdef HAVE_LIBSTARTUP_NOTIFICATION
#include <libsn/sn.h>
#endif
......@@ -307,11 +311,14 @@ xfce_spawn_process (GdkScreen *screen,
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
#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 */
g_warning ("startup notification not supported for wayland sessions");
startup_notify = FALSE;
if (startup_notify == TRUE)
{
/* '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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment