summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-08-13 09:57:59 +0200
committerraveit65 <[email protected]>2018-08-13 09:57:59 +0200
commitd5d6e8cd07bf2b15defb01d355d48702c16d23f1 (patch)
tree290a1bc45276beb9102f7b35fe634c86b6e6e394 /src
parentc569240f040f7b4394336569c803f58bd85f6b01 (diff)
downloadmate-power-manager-d5d6e8cd07bf2b15defb01d355d48702c16d23f1.tar.bz2
mate-power-manager-d5d6e8cd07bf2b15defb01d355d48702c16d23f1.tar.xz
gpm-button: replace deprecated Gdk functions
Diffstat (limited to 'src')
-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;