From 8a3e0c1d84fe655a0ae2e0dbcd8164b8fb42e0a0 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 13 Aug 2018 09:57:59 +0200 Subject: gpm-button: replace deprecated Gdk functions --- src/gpm-button.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gpm-button.c b/src/gpm-button.c index 05a9eee..80a97bf 100644 --- a/src/gpm-button.c +++ b/src/gpm-button.c @@ -141,13 +141,15 @@ gpm_button_grab_keystring (GpmButton *button, guint64 keycode) { guint modmask = AnyModifier; Display *display; + GdkDisplay *gdkdisplay; gint ret; /* get the current X Display */ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default()); /* don't abort on error */ - gdk_error_trap_push (); + gdkdisplay = gdk_display_get_default (); + gdk_x11_display_error_trap_push (gdkdisplay); /* grab the key if possible */ ret = XGrabKey (display, keycode, modmask, @@ -170,8 +172,8 @@ gpm_button_grab_keystring (GpmButton *button, guint64 keycode) } /* we are not processing the error */ - gdk_flush (); - gdk_error_trap_pop_ignored (); + gdk_display_flush (gdkdisplay); + gdk_x11_display_error_trap_pop_ignored (gdkdisplay); egg_debug ("Grabbed modmask=%x, keycode=%li", modmask, (long int) keycode); return TRUE; -- cgit v1.2.1