summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-08-22 16:17:52 +0200
committerraveit65 <[email protected]>2018-08-22 16:17:52 +0200
commitd68a31d4e5977154eb10d9822df59e4fb85fd28c (patch)
tree797b29917093c2137084b66acff20be304d2fbac
parent68df93b923ae1e2be3b9de0150e6cd47d9e66e8f (diff)
downloadmate-settings-daemon-d68a31d4e5977154eb10d9822df59e4fb85fd28c.tar.bz2
mate-settings-daemon-d68a31d4e5977154eb10d9822df59e4fb85fd28c.tar.xz
keyboard-manager: replace deprecated gdk_error_trap_push/pop
-rw-r--r--plugins/keyboard/msd-keyboard-manager.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/keyboard/msd-keyboard-manager.c b/plugins/keyboard/msd-keyboard-manager.c
index 048d648..4444c2f 100644
--- a/plugins/keyboard/msd-keyboard-manager.c
+++ b/plugins/keyboard/msd-keyboard-manager.c
@@ -242,6 +242,7 @@ apply_settings (GSettings *settings,
int bell_pitch;
int bell_duration;
char *volume_string;
+ GdkDisplay *display;
#ifdef HAVE_X11_EXTENSIONS_XKB_H
gboolean rnumlock;
#endif /* HAVE_X11_EXTENSIONS_XKB_H */
@@ -258,11 +259,12 @@ apply_settings (GSettings *settings,
bell_volume = (volume_string && !strcmp (volume_string, "on")) ? 50 : 0;
g_free (volume_string);
- gdk_error_trap_push ();
+ display = gdk_display_get_default ();
+ gdk_x11_display_error_trap_push (display);
if (repeat) {
gboolean rate_set = FALSE;
- XAutoRepeatOn (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()));
+ XAutoRepeatOn (GDK_DISPLAY_XDISPLAY (display));
/* Use XKB in preference */
#ifdef HAVE_X11_EXTENSIONS_XKB_H
rate_set = xkb_set_keyboard_autorepeat_rate (delay, rate);
@@ -275,7 +277,7 @@ apply_settings (GSettings *settings,
g_warning ("Neither XKeyboard not Xfree86's keyboard extensions are available,\n"
"no way to support keyboard autorepeat rate settings");
} else {
- XAutoRepeatOff (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()));
+ XAutoRepeatOff (GDK_DISPLAY_XDISPLAY (display));
}
/* as percentage from 0..100 inclusive */
@@ -302,8 +304,8 @@ apply_settings (GSettings *settings,
}
#endif /* HAVE_X11_EXTENSIONS_XKB_H */
- XSync (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), FALSE);
- gdk_error_trap_pop_ignored ();
+ XSync (GDK_DISPLAY_XDISPLAY (display), FALSE);
+ gdk_x11_display_error_trap_pop_ignored (display);
}
void