File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,11 @@ xorg_lock_smasher_set_active (GSGrab *grab,
101101 gboolean active )
102102{
103103 int status , event , error ;
104+ GdkDisplay * display ;
105+
106+ display = gdk_display_get_default ();
104107
105- if (!XF86MiscQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default () ), & event , & error ))
108+ if (!XF86MiscQueryExtension (GDK_DISPLAY_XDISPLAY (display ), & event , & error ))
106109 {
107110 gs_debug ("No XFree86-Misc extension present" );
108111 return ;
@@ -117,12 +120,12 @@ xorg_lock_smasher_set_active (GSGrab *grab,
117120 gs_debug ("Disabling the x.org grab smasher" );
118121 }
119122
120- gdk_error_trap_push ( );
123+ gdk_x11_display_error_trap_push ( display );
121124
122- status = XF86MiscSetGrabKeysState (GDK_DISPLAY_XDISPLAY (gdk_display_get_default () ), active );
125+ status = XF86MiscSetGrabKeysState (GDK_DISPLAY_XDISPLAY (display ), active );
123126
124- gdk_display_sync (gdk_display_get_default () );
125- error = gdk_error_trap_pop ( );
127+ gdk_display_sync (display );
128+ error = gdk_x11_display_error_trap_pop ( display );
126129
127130 if (active && status == MiscExtGrabStateAlready )
128131 {
You can’t perform that action at this time.
0 commit comments