Skip to content
Permalink
Browse files

gs-grab-x11: replace deprecated gdk_error_trap_push/pop

  • Loading branch information...
raveit65 committed Aug 13, 2018
1 parent ba96676 commit deb9266151e46e78df66bd8aad466415c6573088
Showing with 8 additions and 5 deletions.
  1. +8 −5 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)
{

0 comments on commit deb9266

Please sign in to comment.
You can’t perform that action at this time.