[gnome-flashback/gnome-3-28] input-settings: apply settings to trackpoint
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/gnome-3-28] input-settings: apply settings to trackpoint
- Date: Sat, 1 Sep 2018 14:43:56 +0000 (UTC)
commit e44cfbd16155230fc5b6be58af80ab31fcdc1953
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Sep 1 10:11:54 2018 +0000
input-settings: apply settings to trackpoint
GDK_SOURCE_MOUSE is not exactly same as CLUTTER_POINTER_DEVICE. One
difference is that GDK has separate enum for trackpoint devices.
https://gitlab.gnome.org/GNOME/gnome-flashback/issues/4
(cherry picked from commit cbdae8e9f1e51c0b082ff94e4f8a85c5b06f6a79)
gnome-flashback/libinput-settings/gf-input-settings.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gnome-flashback/libinput-settings/gf-input-settings.c
b/gnome-flashback/libinput-settings/gf-input-settings.c
index 0e1dcb5..590cb93 100644
--- a/gnome-flashback/libinput-settings/gf-input-settings.c
+++ b/gnome-flashback/libinput-settings/gf-input-settings.c
@@ -635,7 +635,9 @@ update_mouse_speed (GfInputSettings *settings,
{
gdouble value;
- if (device && gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
+ if (device &&
+ gdk_device_get_source (device) != GDK_SOURCE_MOUSE &&
+ gdk_device_get_source (device) != GDK_SOURCE_TRACKPOINT)
return;
value = g_settings_get_double (settings->mouse, "speed");
@@ -647,6 +649,7 @@ update_mouse_speed (GfInputSettings *settings,
else
{
set_double_setting (settings, GDK_SOURCE_MOUSE, set_speed, value);
+ set_double_setting (settings, GDK_SOURCE_TRACKPOINT, set_speed, value);
}
}
@@ -656,7 +659,9 @@ update_mouse_natural_scroll (GfInputSettings *settings,
{
gboolean value;
- if (device && gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
+ if (device &&
+ gdk_device_get_source (device) != GDK_SOURCE_MOUSE &&
+ gdk_device_get_source (device) != GDK_SOURCE_TRACKPOINT)
return;
value = g_settings_get_boolean (settings->mouse, "natural-scroll");
@@ -669,6 +674,8 @@ update_mouse_natural_scroll (GfInputSettings *settings,
{
set_bool_setting (settings, GDK_SOURCE_MOUSE,
set_invert_scroll, value);
+ set_bool_setting (settings, GDK_SOURCE_TRACKPOINT,
+ set_invert_scroll, value);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]