[Xfce4-commits] [apps/xfce4-screensaver] 392/425: Fix more GdkDisplay issues

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:53:59 CEST 2018


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

b   l   u   e   s   a   b   r   e       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 apps/xfce4-screensaver.

commit 078f23d20ad77e0c38e216f42a133cac67f1aac4
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Thu Oct 11 05:57:11 2018 -0400

    Fix more GdkDisplay issues
---
 src/gs-grab-x11.c  | 13 ++++++++-----
 src/gs-visual-gl.c |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/gs-grab-x11.c b/src/gs-grab-x11.c
index f090646..5c7b77b 100644
--- a/src/gs-grab-x11.c
+++ b/src/gs-grab-x11.c
@@ -101,8 +101,11 @@ xorg_lock_smasher_set_active (GSGrab  *grab,
                               gboolean active)
 {
 	int status, event, error;
+	GdkDisplay *display;
+
+	display = gdk_display_get_default();
 
-	if (!XF86MiscQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &event, &error))
+	if (!XF86MiscQueryExtension (GDK_DISPLAY_XDISPLAY (display), &event, &error))
 	{
 		gs_debug ("No XFree86-Misc extension present");
 		return;
@@ -117,12 +120,12 @@ xorg_lock_smasher_set_active (GSGrab  *grab,
 		gs_debug ("Disabling the x.org grab smasher");
 	}
 
-	gdk_x11_display_error_trap_push (gdk_display_get_default());;
+	gdk_x11_display_error_trap_push (display);
 
-	status = XF86MiscSetGrabKeysState (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), active);
+	status = XF86MiscSetGrabKeysState (GDK_DISPLAY_XDISPLAY (display), active);
 
-	gdk_display_sync (gdk_display_get_default ());
-	error = gdk_error_trap_pop ();
+	gdk_display_sync (display);
+	error = gdk_x11_display_error_trap_pop (display);
 
 	if (active && status == MiscExtGrabStateAlready)
 	{
diff --git a/src/gs-visual-gl.c b/src/gs-visual-gl.c
index dc9c176..2ba8fc3 100644
--- a/src/gs-visual-gl.c
+++ b/src/gs-visual-gl.c
@@ -79,7 +79,7 @@ gs_visual_gl_get_best_for_display (GdkDisplay *display)
 	screen = gdk_display_get_default_screen (display);
 	screen_num = GDK_SCREEN_XNUMBER (screen);
 
-	gdk_x11_display_error_trap_push (gdk_display_get_default());;
+	gdk_x11_display_error_trap_push (display);
 
 	visual = NULL;
 	for (i = 0; i < G_N_ELEMENTS (attrs); i++)
@@ -105,7 +105,7 @@ gs_visual_gl_get_best_for_display (GdkDisplay *display)
 		}
 	}
 
-	gdk_x11_display_error_trap_pop_ignored (gdk_display_get_default());;
+	gdk_x11_display_error_trap_pop_ignored (display);
 #else
 	visual = NULL;
 #endif /* HAVE_LIBGL */

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


More information about the Xfce4-commits mailing list