[gnome-flashback] input-settings: add set_scroll_button



commit 2de755653534cc671f1dc132475d7c2964fbb0de
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Jul 28 21:41:34 2016 +0300

    input-settings: add set_scroll_button

 .../libinput-settings/gf-input-settings.c          |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/gnome-flashback/libinput-settings/gf-input-settings.c 
b/gnome-flashback/libinput-settings/gf-input-settings.c
index ff5a97f..3a32b73 100644
--- a/gnome-flashback/libinput-settings/gf-input-settings.c
+++ b/gnome-flashback/libinput-settings/gf-input-settings.c
@@ -497,6 +497,15 @@ set_click_method (GfInputSettings             *settings,
   XFree (available);
 }
 
+static void
+set_scroll_button (GfInputSettings *settings,
+                   GdkDevice       *device,
+                   guint            button)
+{
+  change_property (settings, device, "libinput Button Scrolling Button",
+                   XA_INTEGER, 32, &button, 1);
+}
+
 static gboolean
 device_is_trackball (GdkDevice *device)
 {
@@ -803,8 +812,7 @@ update_trackball_scroll_button (GfInputSettings *settings,
 
   if (device)
     {
-      change_property (settings, device, "libinput Button Scrolling Button",
-                       XA_INTEGER, 32, &button, 1);
+      device_set_uint_setting (settings, device, set_scroll_button, button);
     }
   else
     {
@@ -820,8 +828,7 @@ update_trackball_scroll_button (GfInputSettings *settings,
           if (!device_is_trackball (device))
             continue;
 
-          change_property (settings, device, "libinput Button Scrolling Button",
-                           XA_INTEGER, 32, &button, 1);
+          device_set_uint_setting (settings, device, set_scroll_button, button);
         }
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]