]> git.pld-linux.org Git - packages/libinput.git/blame - 0001-evdev-always-default-to-the-middle-button-for-button.patch
- rel 2; add fixes from FC
[packages/libinput.git] / 0001-evdev-always-default-to-the-middle-button-for-button.patch
CommitLineData
973d1925
AM
1From 5b940e6a3f066ff25034bcf5a83278b695ad6836 Mon Sep 17 00:00:00 2001
2From: Peter Hutterer <peter.hutterer@who-t.net>
3Date: Tue, 2 Jun 2015 16:32:41 +1000
4Subject: [PATCH libinput] evdev: always default to the middle button for
5 button-scrolling
6
7The current code only defaulted to the middle button for those devices that
8used button scrolling by default, requiring the user to enable button
9scrolling _and_ set the button before it is active. This causes some
10confusion.
11
12There is no real benefit to leaving the button at 0 when the scroll
13method isn't enabled anyway. So always default to the middle button (if
14available).
15
16https://bugzilla.redhat.com/show_bug.cgi?id=1227182
17
18Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
19Reviewed-by: Hans de Goede <hdegoede@redhat.com>
20---
21 src/evdev.c | 9 +--------
22 1 file changed, 1 insertion(+), 8 deletions(-)
23
24diff --git a/src/evdev.c b/src/evdev.c
25index ed1a9a3..8932b6c 100644
26--- a/src/evdev.c
27+++ b/src/evdev.c
28@@ -1112,14 +1112,7 @@ evdev_scroll_get_default_button(struct libinput_device *device)
29 {
30 struct evdev_device *evdev = (struct evdev_device *)device;
31
32- if (libevdev_has_property(evdev->evdev, INPUT_PROP_POINTING_STICK))
33- return BTN_MIDDLE;
34-
35- /* A device that defaults to button scrolling defaults
36- to BTN_MIDDLE */
37- if (evdev_scroll_get_default_method(device) ==
38- LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN &&
39- libevdev_has_event_code(evdev->evdev, EV_KEY, BTN_MIDDLE))
40+ if( libevdev_has_event_code(evdev->evdev, EV_KEY, BTN_MIDDLE))
41 return BTN_MIDDLE;
42
43 return 0;
44--
452.4.1
46
This page took 0.044236 seconds and 4 git commands to generate.