summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAlexander Schwinn <acs82@gmx.de>2018-06-21 09:34:55 +0200
committerAlexander Schwinn <acs82@gmx.de>2018-06-21 20:59:16 +0200
commit660d9ceb8509ef82fe3a4a0287014010286bf12c (patch)
tree712517fbc714534f92062f56ec37795c6af57db6 /plugins
parent897f06efea7b177b471caa4698895e35ca06b4a1 (diff)
downloadthunar-660d9ceb8509ef82fe3a4a0287014010286bf12c.tar.gz
Segfault in XInternAtom when clicking or typing when using wayland
( Part II ) (Bug #14461)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/thunar-wallpaper/twp-provider.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/thunar-wallpaper/twp-provider.c b/plugins/thunar-wallpaper/twp-provider.c
index 66c761e1..92d09cd2 100644
--- a/plugins/thunar-wallpaper/twp-provider.c
+++ b/plugins/thunar-wallpaper/twp-provider.c
@@ -23,8 +23,6 @@
#include <config.h>
#endif
-#include <stdlib.h>
-
#include <gio/gio.h>
#include <gdk/gdkx.h>
@@ -142,6 +140,11 @@ twp_provider_get_file_menu_items (ThunarxMenuProvider *menu_provider,
GdkScreen *gdk_screen = gdk_screen_get_default();
gint xscreen = gdk_x11_screen_get_screen_number(gdk_screen);
+ if(g_strcmp0 (g_getenv ("XDG_SESSION_TYPE"), "wayland") == 0)
+ {
+ return items; // wayland crashes on "gdk_x11_get_default_xdisplay"
+ }
+
main_window = window;
desktop_type = DESKTOP_TYPE_NONE;
@@ -182,12 +185,6 @@ 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)))