summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-08-13 14:23:19 +0200
committerraveit65 <[email protected]>2018-08-22 15:10:21 +0200
commitdeb9266151e46e78df66bd8aad466415c6573088 (patch)
tree0156864d5d5ffd54b5f7f6b43cef96191e055659
parentba96676d13e442cb585925c5e19b39bcebe88d5a (diff)
downloadmate-screensaver-deb9266151e46e78df66bd8aad466415c6573088.tar.bz2
mate-screensaver-deb9266151e46e78df66bd8aad466415c6573088.tar.xz
gs-grab-x11: replace deprecated gdk_error_trap_push/pop
-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)
{