summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-08-13 09:57:59 +0200
committerraveit65 <[email protected]>2018-08-15 17:53:48 +0200
commit8a3e0c1d84fe655a0ae2e0dbcd8164b8fb42e0a0 (patch)
tree966509360fa6e174f8564de769cf08f79c5ae725
parentc235b2a354955ba65e5821f47393d57587378f7e (diff)
downloadmate-power-manager-8a3e0c1d84fe655a0ae2e0dbcd8164b8fb42e0a0.tar.bz2
mate-power-manager-8a3e0c1d84fe655a0ae2e0dbcd8164b8fb42e0a0.tar.xz
gpm-button: replace deprecated Gdk functions
-rw-r--r--src/gpm-button.c8
1 files 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;