From 689a05e1f190e27cca340a778ab276658866f46b Mon Sep 17 00:00:00 2001 From: Alexander Schwinn Date: Tue, 19 Jun 2018 21:21:57 +0200 Subject: [PATCH 1/2] Segfault in XInternAtom when clicking or typing (Bug #14461) --- plugins/thunar-wallpaper/twp-provider.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/thunar-wallpaper/twp-provider.c b/plugins/thunar-wallpaper/twp-provider.c index 0a91c1d6..66c761e1 100644 --- a/plugins/thunar-wallpaper/twp-provider.c +++ b/plugins/thunar-wallpaper/twp-provider.c @@ -23,6 +23,8 @@ #include #endif +#include + #include #include @@ -180,6 +182,12 @@ twp_provider_get_file_menu_items (ThunarxMenuProvider *menu_provider, } g_snprintf(selection_name, 100, XFDESKTOP_SELECTION_FMT, xscreen); + + if(g_strcmp0 (getenv("XDG_SESSION_TYPE"),"wayland") == 0) + { + return items; // wayland crashes on "gdk_x11_get_default_xdisplay" + } + xfce_selection_atom = XInternAtom (gdk_x11_get_default_xdisplay(), selection_name, False); if ((XGetSelectionOwner(gdk_x11_get_default_xdisplay(), xfce_selection_atom))) -- 2.11.0