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
This commit is contained in:
Armin Krezović 2017-03-21 15:32:35 +01:00 committed by Carlos Garnacho
parent 70a4f59960
commit a77da353f3
2 changed files with 8 additions and 1 deletions

View File

@ -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" },

View File

@ -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);