From a77da353f33726b995ed91f8150128dc5d71cf5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20Krezovi=C4=87?= Date: Tue, 21 Mar 2017 15:32:35 +0100 Subject: [PATCH] input-settings: Set double click timeout from gsettings Clutter's evdev input backend has no support for setting double click timeout set by gnome-settings-daemon. This results in touchpad click events timing out on wayland, because the default timeout value wasn't enough. This patch moves timeout setting to mutter and removes X11 backend specific setting from clutter. https://bugzilla.gnome.org/show_bug.cgi?id=771576 --- clutter/clutter/x11/clutter-settings-x11.h | 1 - src/backends/meta-input-settings.c | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/x11/clutter-settings-x11.h b/clutter/clutter/x11/clutter-settings-x11.h index b06565bed..3e1033acd 100644 --- a/clutter/clutter/x11/clutter-settings-x11.h +++ b/clutter/clutter/x11/clutter-settings-x11.h @@ -6,7 +6,6 @@ static const struct { const char *xsetting_name; const char *settings_property; } _clutter_settings_map[] = { - { "Net/DoubleClickTime", "double-click-time" }, { "Net/DoubleClickDistance", "double-click-distance" }, { "Net/DndDragThreshold", "dnd-drag-threshold" }, { "Gtk/FontName", "font-name" }, diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c index 6d688588d..32512b4ea 100644 --- a/src/backends/meta-input-settings.c +++ b/src/backends/meta-input-settings.c @@ -68,6 +68,7 @@ struct _MetaInputSettingsPrivate GSettings *touchpad_settings; GSettings *trackball_settings; GSettings *keyboard_settings; + GSettings *gsd_settings; GHashTable *mappable_devices; @@ -129,6 +130,7 @@ meta_input_settings_dispose (GObject *object) g_clear_object (&priv->touchpad_settings); g_clear_object (&priv->trackball_settings); g_clear_object (&priv->keyboard_settings); + g_clear_object (&priv->gsd_settings); g_clear_pointer (&priv->mappable_devices, g_hash_table_unref); if (priv->monitors_changed_id && priv->monitor_manager) @@ -1451,6 +1453,12 @@ meta_input_settings_init (MetaInputSettings *settings) g_signal_connect (priv->keyboard_settings, "changed", G_CALLBACK (meta_input_settings_changed_cb), settings); + priv->gsd_settings = g_settings_new ("org.gnome.settings-daemon.peripherals.mouse"); + + g_settings_bind (priv->gsd_settings, "double-click", + clutter_settings_get_default(), "double-click-time", + G_SETTINGS_BIND_GET); + priv->mappable_devices = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) device_mapping_info_free);