summaryrefslogtreecommitdiff
path: root/src/gs-grab-x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gs-grab-x11.c')
-rw-r--r--src/gs-grab-x11.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gs-grab-x11.c b/src/gs-grab-x11.c
index 6e13b91..9fff12d 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_error_trap_push ();
+ 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)
{