[Xfce4-commits] [xfce/thunar] 02/02: Segfault in XInternAtom when clicking or typing when using wayland ( Part II ) (Bug #14461)

noreply at xfce.org noreply at xfce.org
Thu Jun 21 21:01:09 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   l   e   x       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit 660d9ceb8509ef82fe3a4a0287014010286bf12c
Author: Alexander Schwinn <acs82 at gmx.de>
Date:   Thu Jun 21 09:34:55 2018 +0200

    Segfault in XInternAtom when clicking or typing when using wayland
    ( Part II ) (Bug #14461)
---
 plugins/thunar-wallpaper/twp-provider.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/plugins/thunar-wallpaper/twp-provider.c b/plugins/thunar-wallpaper/twp-provider.c
index 66c761e..92d09cd 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)))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list