[gnome-settings-daemon/wip/settings-relocation: 9/12] keyboard: Remove handling of keyboard repeat settings
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/settings-relocation: 9/12] keyboard: Remove handling of keyboard repeat settings
- Date: Thu, 15 Jan 2015 19:16:26 +0000 (UTC)
commit 9626ffd5c7d2e1598366f16b0088f810a9b79c17
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Dec 17 15:06:58 2014 +0100
keyboard: Remove handling of keyboard repeat settings
With patches from bug #739397 applied. This is managed by mutter on X11
too, so no need to do it here again.
https://bugzilla.gnome.org/show_bug.cgi?id=742593
plugins/keyboard/gsd-keyboard-manager.c | 51 -------------------------------
1 files changed, 0 insertions(+), 51 deletions(-)
---
diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
index e7b79dd..96c03c4 100644
--- a/plugins/keyboard/gsd-keyboard-manager.c
+++ b/plugins/keyboard/gsd-keyboard-manager.c
@@ -50,10 +50,7 @@
#define GSD_KEYBOARD_DIR "org.gnome.settings-daemon.peripherals.keyboard"
-#define KEY_REPEAT "repeat"
#define KEY_CLICK "click"
-#define KEY_INTERVAL "repeat-interval"
-#define KEY_DELAY "delay"
#define KEY_CLICK_VOLUME "click-volume"
#define KEY_REMEMBER_NUMLOCK_STATE "remember-numlock-state"
#define KEY_NUMLOCK_STATE "numlock-state"
@@ -154,15 +151,6 @@ schema_is_installed (const char *schema)
}
static gboolean
-xkb_set_keyboard_autorepeat_rate (guint delay, guint interval)
-{
- return XkbSetAutoRepeatRate (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
- XkbUseCoreKbd,
- delay,
- interval);
-}
-
-static gboolean
check_xkb_extension (GsdKeyboardManager *manager)
{
Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
@@ -340,42 +328,8 @@ apply_numlock (GsdKeyboardManager *manager)
}
static void
-apply_repeat (GsdKeyboardManager *manager)
-{
- GSettings *settings;
- gboolean repeat;
- guint interval;
- guint delay;
-
- g_debug ("Applying the repeat settings");
- settings = manager->priv->settings;
- repeat = g_settings_get_boolean (settings, KEY_REPEAT);
- interval = g_settings_get_uint (settings, KEY_INTERVAL);
- delay = g_settings_get_uint (settings, KEY_DELAY);
-
- gdk_error_trap_push ();
- if (repeat) {
- gboolean rate_set = FALSE;
-
- XAutoRepeatOn (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
- /* Use XKB in preference */
- rate_set = xkb_set_keyboard_autorepeat_rate (delay, interval);
-
- if (!rate_set)
- 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 ()));
- }
-
- XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
- gdk_error_trap_pop_ignored ();
-}
-
-static void
apply_all_settings (GsdKeyboardManager *manager)
{
- apply_repeat (manager);
apply_bell (manager);
apply_numlock (manager);
}
@@ -397,11 +351,6 @@ settings_changed (GSettings *settings,
apply_numlock (manager);
} else if (g_strcmp0 (key, KEY_NUMLOCK_STATE) == 0) {
g_debug ("Num-Lock state '%s' changed, will apply at next startup", key);
- } else if (g_strcmp0 (key, KEY_REPEAT) == 0 ||
- g_strcmp0 (key, KEY_INTERVAL) == 0 ||
- g_strcmp0 (key, KEY_DELAY) == 0) {
- g_debug ("Key repeat setting '%s' changed, applying key repeat settings", key);
- apply_repeat (manager);
} else if (g_strcmp0 (key, KEY_BELL_CUSTOM_FILE) == 0){
g_debug ("Ignoring '%s' setting change", KEY_BELL_CUSTOM_FILE);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]