From deb9266151e46e78df66bd8aad466415c6573088 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 13 Aug 2018 14:23:19 +0200 Subject: gs-grab-x11: replace deprecated gdk_error_trap_push/pop --- src/gs-grab-x11.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') 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) { -- cgit v1.2.1