Timo Aaltonen pushed to branch debian-unstable at X Strike Force / driver / xserver-xorg-input-libinput
Commits:
-
e52daf20
by Peter Hutterer at 2019-10-11T11:18:52+10:00
-
639b21d7
by Peter Hutterer at 2020-05-19T15:47:11+10:00
-
e8e5d1a6
by Peter Hutterer at 2020-05-19T15:58:13+10:00
-
583ed5ac
by Peter Hutterer at 2020-05-19T15:58:13+10:00
-
6e435354
by Timo Aaltonen at 2020-08-17T13:25:10+03:00
-
f5bb783e
by Timo Aaltonen at 2020-08-17T13:27:26+03:00
-
2c54c7bd
by Timo Aaltonen at 2020-08-17T13:28:36+03:00
-
448fb3cd
by Timo Aaltonen at 2020-08-17T13:30:19+03:00
-
3fe42260
by Timo Aaltonen at 2020-08-17T13:33:36+03:00
-
f1c7ee7b
by Timo Aaltonen at 2020-08-17T13:45:52+03:00
9 changed files:
- .gitlab-ci.yml
- configure.ac
- debian/changelog
- − debian/compat
- debian/control
- debian/rules
- include/libinput-properties.h
- man/libinput.man
- src/xf86libinput.c
Changes:
| 1 | 1 |
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:
|
| 2 | 2 |
|
| 3 | 3 |
include:
|
| 4 |
- - project: 'wayland/ci-templates'
|
|
| 5 |
- ref: 955e61e67cf29327cf907432f668df9eec4ca6a2 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
|
| 4 |
+ - project: 'freedesktop/ci-templates'
|
|
| 5 |
+ ref: 59de540b620c45739871d1a073d76d5521989d11 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
|
| 6 | 6 |
file: '/templates/fedora.yml'
|
| 7 | 7 |
|
| 8 | 8 |
|
| 9 | 9 |
variables:
|
| 10 |
- FEDORA_RPMS: 'git autoconf automake libtool make xorg-x11-server-devel libudev-devel libevdev-devel libinput-devel xorg-x11-util-macros'
|
|
| 11 |
- FEDORA_TAG: '2019-08-12.0'
|
|
| 12 |
- UPSTREAM_REPO: xorg/drivers/xf86-input-libinput
|
|
| 13 |
- BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest
|
|
| 14 |
- FEDORA_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$FEDORA_TAG
|
|
| 10 |
+ FDO_UPSTREAM_REPO: xorg/drivers/xf86-input-libinput
|
|
| 15 | 11 |
|
| 16 | 12 |
|
| 17 | 13 |
stages:
|
| 18 |
- - containers-build
|
|
| 14 |
+ - containers
|
|
| 19 | 15 |
- build
|
| 20 | 16 |
|
| 21 | 17 |
|
| 22 |
-container_build:
|
|
| 23 |
- extends: .fedora@container-ifnot-exists
|
|
| 24 |
- stage: containers-build
|
|
| 18 |
+.fedora:
|
|
| 25 | 19 |
variables:
|
| 26 |
- GIT_STRATEGY: none
|
|
| 27 |
- FEDORA_VERSION: 30
|
|
| 20 |
+ FDO_DISTRIBUTION_VERSION: 32
|
|
| 21 |
+ FDO_DISTRIBUTION_PACKAGES: 'git autoconf automake libtool make xorg-x11-server-devel libudev-devel libevdev-devel libinput-devel xorg-x11-util-macros'
|
|
| 22 |
+ FDO_DISTRIBUTION_TAG: '2020-05-19.0'
|
|
| 28 | 23 |
|
| 29 | 24 |
|
| 30 |
-.default_artifacts: &default_artifacts
|
|
| 31 |
- artifacts:
|
|
| 32 |
- name: "automake-logs-$CI_JOB_NAME"
|
|
| 33 |
- when: always
|
|
| 34 |
- expire_in: 1 week
|
|
| 35 |
- paths:
|
|
| 36 |
- - _builddir/config.log
|
|
| 25 |
+fedora@container_build:
|
|
| 26 |
+ extends:
|
|
| 27 |
+ - .fedora
|
|
| 28 |
+ - .fdo.container-build@fedora
|
|
| 29 |
+ stage: containers
|
|
| 30 |
+ variables:
|
|
| 31 |
+ GIT_STRATEGY: none
|
|
| 37 | 32 |
|
| 38 | 33 |
|
| 39 |
-.default_build: &default_build
|
|
| 34 |
+.default_build:
|
|
| 35 |
+ stage: build
|
|
| 40 | 36 |
script:
|
| 41 | 37 |
- mkdir _builddir _inst
|
| 42 | 38 |
- pushd _builddir > /dev/null
|
| ... | ... | @@ -44,21 +40,16 @@ container_build: |
| 44 | 40 |
- make && make check
|
| 45 | 41 |
- make install
|
| 46 | 42 |
- popd > /dev/null
|
| 43 |
+ artifacts:
|
|
| 44 |
+ name: "automake-logs-$CI_JOB_NAME"
|
|
| 45 |
+ when: always
|
|
| 46 |
+ expire_in: 1 week
|
|
| 47 |
+ paths:
|
|
| 48 |
+ - _builddir/config.log
|
|
| 47 | 49 |
|
| 48 | 50 |
|
| 49 |
-.build@template:
|
|
| 50 |
- stage: build
|
|
| 51 |
- <<: *default_artifacts
|
|
| 52 |
- <<: *default_build
|
|
| 53 |
- dependencies: []
|
|
| 54 |
- |
|
| 55 |
- |
|
| 56 |
-.fedora-build@template:
|
|
| 57 |
- extends: .build@template
|
|
| 58 |
- image: $FEDORA_CONTAINER_IMAGE
|
|
| 59 |
- |
|
| 60 |
- |
|
| 61 |
-fedora:30@default-build:
|
|
| 62 |
- extends: .fedora-build@template
|
|
| 63 |
- variables:
|
|
| 64 |
- FEDORA_VERSION: 30
|
|
| 51 |
+fedora:32@default-build:
|
|
| 52 |
+ extends:
|
|
| 53 |
+ - .fedora
|
|
| 54 |
+ - .fdo.distribution-image@fedora
|
|
| 55 |
+ - .default_build
|
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 |
# Initialize Autoconf
|
| 24 | 24 |
AC_PREREQ([2.60])
|
| 25 | 25 |
AC_INIT([xf86-input-libinput],
|
| 26 |
- [0.29.0],
|
|
| 26 |
+ [0.30.0],
|
|
| 27 | 27 |
[https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues],
|
| 28 | 28 |
[xf86-input-libinput])
|
| 29 | 29 |
AC_CONFIG_SRCDIR([Makefile.am])
|
| ... | ... | @@ -61,6 +61,17 @@ AC_LINK_IFELSE( |
| 61 | 61 |
[libinput_have_touch_count=yes]],
|
| 62 | 62 |
[AC_MSG_RESULT([no])
|
| 63 | 63 |
[libinput_have_touch_count=no]])
|
| 64 |
+ |
|
| 65 |
+AC_MSG_CHECKING([if libinput_device_config_scroll_get_button_lock is available])
|
|
| 66 |
+AC_LINK_IFELSE(
|
|
| 67 |
+ [AC_LANG_PROGRAM([[#include <libinput.h>]],
|
|
| 68 |
+ [[libinput_device_config_scroll_get_button_lock(NULL)]])],
|
|
| 69 |
+ [AC_MSG_RESULT([yes])
|
|
| 70 |
+ AC_DEFINE(HAVE_LIBINPUT_SCROLL_BUTTON_LOCK, [1],
|
|
| 71 |
+ [libinput_device_config_scroll_get_button_lock() is available])
|
|
| 72 |
+ [libinput_have_scroll_button_lock=yes]],
|
|
| 73 |
+ [AC_MSG_RESULT([no])
|
|
| 74 |
+ [libinput_have_scroll_button_lock=no]])
|
|
| 64 | 75 |
LIBS=$OLD_LIBS
|
| 65 | 76 |
CFLAGS=$OLD_CFLAGS
|
| 66 | 77 |
|
| 1 |
+xserver-xorg-input-libinput (0.30.0-1) unstable; urgency=medium
|
|
| 2 |
+ |
|
| 3 |
+ * New upstream release.
|
|
| 4 |
+ * rules: Use dh_missing.
|
|
| 5 |
+ * control: Migrate to debhelper-compat, bump to 12.
|
|
| 6 |
+ * control: Bump policy to 4.5.0.
|
|
| 7 |
+ |
|
| 8 |
+ -- Timo Aaltonen <tjaalton@debian.org> Mon, 17 Aug 2020 13:45:44 +0300
|
|
| 9 |
+ |
|
| 1 | 10 |
xserver-xorg-input-libinput (0.29.0-1) unstable; urgency=medium
|
| 2 | 11 |
|
| 3 | 12 |
* New upstream release.
|
| 1 |
-10
|
| ... | ... | @@ -4,7 +4,7 @@ Priority: optional |
| 4 | 4 |
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
|
| 5 | 5 |
Uploaders: Timo Aaltonen <tjaalton@debian.org>,
|
| 6 | 6 |
Build-Depends:
|
| 7 |
- debhelper (>= 10),
|
|
| 7 |
+ debhelper-compat (= 12),
|
|
| 8 | 8 |
libinput-dev (>= 1.4.901),
|
| 9 | 9 |
libudev-dev,
|
| 10 | 10 |
pkg-config,
|
| ... | ... | @@ -13,7 +13,7 @@ Build-Depends: |
| 13 | 13 |
x11proto-input-dev (>= 2.2),
|
| 14 | 14 |
xserver-xorg-dev (>= 2:1.15.99),
|
| 15 | 15 |
xutils-dev,
|
| 16 |
-Standards-Version: 4.3.0
|
|
| 16 |
+Standards-Version: 4.5.0
|
|
| 17 | 17 |
Homepage: https://www.x.org
|
| 18 | 18 |
Vcs-Git: https://salsa.debian.org/xorg-team/driver/xserver-xorg-input-libinput.git
|
| 19 | 19 |
Vcs-Browser: https://salsa.debian.org/xorg-team/driver/xserver-xorg-input-libinput
|
| ... | ... | @@ -7,7 +7,10 @@ override_dh_auto_configure: |
| 7 | 7 |
# Kill *.la files, and forget no-one:
|
| 8 | 8 |
override_dh_install:
|
| 9 | 9 |
find debian/tmp -name '*.la' -delete
|
| 10 |
- dh_install --fail-missing
|
|
| 10 |
+ dh_install
|
|
| 11 |
+ |
|
| 12 |
+override_dh_missing:
|
|
| 13 |
+ dh_missing --fail-missing
|
|
| 11 | 14 |
|
| 12 | 15 |
# That's a plugin, use appropriate warning level:
|
| 13 | 16 |
override_dh_shlibdeps:
|
| ... | ... | @@ -115,6 +115,12 @@ |
| 115 | 115 |
/* Scroll button for button scrolling: 32-bit int, 1 value, read-only */
|
| 116 | 116 |
#define LIBINPUT_PROP_SCROLL_BUTTON_DEFAULT "libinput Button Scrolling Button Default"
|
| 117 | 117 |
|
| 118 |
+/* Scroll button lock: BOOL, 1 value, TRUE for enabled, FALSE otherwise */
|
|
| 119 |
+#define LIBINPUT_PROP_SCROLL_BUTTON_LOCK "libinput Button Scrolling Button Lock Enabled"
|
|
| 120 |
+ |
|
| 121 |
+/* Scroll button lock: BOOL, 1 value, TRUE for enabled, FALSE otherwise, read-only*/
|
|
| 122 |
+#define LIBINPUT_PROP_SCROLL_BUTTON_LOCK_DEFAULT "libinput Button Scrolling Button Lock Enabled Default"
|
|
| 123 |
+ |
|
| 118 | 124 |
/* Click method: BOOL read-only, 2 values in order buttonareas, clickfinger
|
| 119 | 125 |
shows available click methods */
|
| 120 | 126 |
#define LIBINPUT_PROP_CLICK_METHODS_AVAILABLE "libinput Click Methods Available"
|
| ... | ... | @@ -139,9 +139,18 @@ Designates a button as scroll button. If the |
| 139 | 139 |
.BI ScrollMethod
|
| 140 | 140 |
is
|
| 141 | 141 |
.BI button
|
| 142 |
-and the button is logically held down, x/y axis movement is converted into
|
|
| 142 |
+and the button is logically down, x/y axis movement is converted into
|
|
| 143 | 143 |
scroll events.
|
| 144 | 144 |
.TP 7
|
| 145 |
+.BI "Option \*qScrollButtonLock\*q \*q" bool \*q
|
|
| 146 |
+Enables or disables the scroll button lock. If enabled, the
|
|
| 147 |
+.BI ScrollButton
|
|
| 148 |
+is considered logically down after the first click and remains down until
|
|
| 149 |
+the second click of that button. If disabled (the default), the
|
|
| 150 |
+.BI ScrollButton
|
|
| 151 |
+button is considered logically down while held down and up once physically
|
|
| 152 |
+released.
|
|
| 153 |
+.TP 7
|
|
| 145 | 154 |
.BI "Option \*qScrollMethod\*q \*q" string \*q
|
| 146 | 155 |
Enables a scroll method. Permitted values are
|
| 147 | 156 |
.BI none,
|
| ... | ... | @@ -219,6 +228,12 @@ Indicates which acceleration profile is currently enabled on this device. |
| 219 | 228 |
setting is independent of the scroll method, to enable button scrolling the
|
| 220 | 229 |
method must be set to button-scrolling and a valid button must be set.
|
| 221 | 230 |
.TP 7
|
| 231 |
+.BI "libinput Button Scrolling Button Lock Enabled"
|
|
| 232 |
+1 boolean value. If true, the scroll button lock is enabled. This
|
|
| 233 |
+setting is independent of the scroll method or the scroll button, to enable
|
|
| 234 |
+button scrolling the method must be set to button-scrolling and a valid
|
|
| 235 |
+button must be set.
|
|
| 236 |
+.TP 7
|
|
| 222 | 237 |
.BI "libinput Calibration Matrix"
|
| 223 | 238 |
9 32-bit float values, representing a 3x3 calibration matrix, order is row
|
| 224 | 239 |
1, row 2, row 3
|
| ... | ... | @@ -157,6 +157,7 @@ struct xf86libinput { |
| 157 | 157 |
BOOL disable_while_typing;
|
| 158 | 158 |
CARD32 sendevents;
|
| 159 | 159 |
CARD32 scroll_button; /* xorg button number */
|
| 160 |
+ BOOL scroll_buttonlock;
|
|
| 160 | 161 |
float speed;
|
| 161 | 162 |
float matrix[9];
|
| 162 | 163 |
enum libinput_config_scroll_method scroll_method;
|
| ... | ... | @@ -672,12 +673,27 @@ LibinputApplyConfigScrollMethod(DeviceIntPtr dev, |
| 672 | 673 |
|
| 673 | 674 |
if (libinput_device_config_scroll_get_methods(device) & LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) {
|
| 674 | 675 |
unsigned int scroll_button;
|
| 676 |
+#if HAVE_LIBINPUT_SCROLL_BUTTON_LOCK
|
|
| 677 |
+ enum libinput_config_scroll_button_lock_state buttonlock;
|
|
| 678 |
+ |
|
| 679 |
+ buttonlock = driver_data->options.scroll_buttonlock ?
|
|
| 680 |
+ LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED :
|
|
| 681 |
+ LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_DISABLED;
|
|
| 682 |
+ |
|
| 683 |
+ if (libinput_device_config_scroll_set_button_lock(device, buttonlock)
|
|
| 684 |
+ != LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
|
| 685 |
+ xf86IDrvMsg(pInfo, X_ERROR,
|
|
| 686 |
+ "Failed to %s ScrollButtonLock\n",
|
|
| 687 |
+ buttonlock ? "enable" : "disable");
|
|
| 688 |
+ }
|
|
| 689 |
+#endif
|
|
| 675 | 690 |
|
| 676 | 691 |
scroll_button = btn_xorg2linux(driver_data->options.scroll_button);
|
| 677 | 692 |
if (libinput_device_config_scroll_set_button(device, scroll_button) != LIBINPUT_CONFIG_STATUS_SUCCESS)
|
| 678 | 693 |
xf86IDrvMsg(pInfo, X_ERROR,
|
| 679 | 694 |
"Failed to set ScrollButton to %u\n",
|
| 680 | 695 |
driver_data->options.scroll_button);
|
| 696 |
+ |
|
| 681 | 697 |
}
|
| 682 | 698 |
}
|
| 683 | 699 |
|
| ... | ... | @@ -2826,6 +2842,32 @@ xf86libinput_parse_scrollbutton_option(InputInfoPtr pInfo, |
| 2826 | 2842 |
return scroll_button;
|
| 2827 | 2843 |
}
|
| 2828 | 2844 |
|
| 2845 |
+static inline BOOL
|
|
| 2846 |
+xf86libinput_parse_scrollbuttonlock_option(InputInfoPtr pInfo,
|
|
| 2847 |
+ struct libinput_device *device)
|
|
| 2848 |
+{
|
|
| 2849 |
+ bool dflt;
|
|
| 2850 |
+ BOOL buttonlock = FALSE;
|
|
| 2851 |
+ |
|
| 2852 |
+ if ((libinput_device_config_scroll_get_methods(device) &
|
|
| 2853 |
+ LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) == 0)
|
|
| 2854 |
+ return 0;
|
|
| 2855 |
+ |
|
| 2856 |
+#if HAVE_LIBINPUT_SCROLL_BUTTON_LOCK
|
|
| 2857 |
+ dflt = libinput_device_config_scroll_get_default_button_lock(device);
|
|
| 2858 |
+ buttonlock = xf86SetBoolOption(pInfo->options, "ScrollButtonLock", dflt);
|
|
| 2859 |
+ |
|
| 2860 |
+ if (libinput_device_config_scroll_set_button_lock(device, buttonlock)
|
|
| 2861 |
+ != LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
|
| 2862 |
+ xf86IDrvMsg(pInfo, X_ERROR,
|
|
| 2863 |
+ "Failed to %s ScrollButtonLock\n",
|
|
| 2864 |
+ buttonlock ? "enable" : "disable");
|
|
| 2865 |
+ buttonlock = libinput_device_config_scroll_get_button_lock(device);
|
|
| 2866 |
+ }
|
|
| 2867 |
+#endif
|
|
| 2868 |
+ return buttonlock;
|
|
| 2869 |
+}
|
|
| 2870 |
+ |
|
| 2829 | 2871 |
static inline unsigned int
|
| 2830 | 2872 |
xf86libinput_parse_clickmethod_option(InputInfoPtr pInfo,
|
| 2831 | 2873 |
struct libinput_device *device)
|
| ... | ... | @@ -3106,6 +3148,7 @@ xf86libinput_parse_options(InputInfoPtr pInfo, |
| 3106 | 3148 |
options->left_handed = xf86libinput_parse_lefthanded_option(pInfo, device);
|
| 3107 | 3149 |
options->scroll_method = xf86libinput_parse_scroll_option(pInfo, device);
|
| 3108 | 3150 |
options->scroll_button = xf86libinput_parse_scrollbutton_option(pInfo, device);
|
| 3151 |
+ options->scroll_buttonlock = xf86libinput_parse_scrollbuttonlock_option(pInfo, device);
|
|
| 3109 | 3152 |
options->click_method = xf86libinput_parse_clickmethod_option(pInfo, device);
|
| 3110 | 3153 |
options->middle_emulation = xf86libinput_parse_middleemulation_option(pInfo, device);
|
| 3111 | 3154 |
options->disable_while_typing = xf86libinput_parse_disablewhiletyping_option(pInfo, device);
|
| ... | ... | @@ -3570,6 +3613,8 @@ static Atom prop_scroll_method_enabled; |
| 3570 | 3613 |
static Atom prop_scroll_method_default;
|
| 3571 | 3614 |
static Atom prop_scroll_button;
|
| 3572 | 3615 |
static Atom prop_scroll_button_default;
|
| 3616 |
+static Atom prop_scroll_buttonlock;
|
|
| 3617 |
+static Atom prop_scroll_buttonlock_default;
|
|
| 3573 | 3618 |
static Atom prop_click_methods_available;
|
| 3574 | 3619 |
static Atom prop_click_method_enabled;
|
| 3575 | 3620 |
static Atom prop_click_method_default;
|
| ... | ... | @@ -4147,6 +4192,33 @@ LibinputSetPropertyScrollButton(DeviceIntPtr dev, |
| 4147 | 4192 |
return Success;
|
| 4148 | 4193 |
}
|
| 4149 | 4194 |
|
| 4195 |
+static inline int
|
|
| 4196 |
+LibinputSetPropertyScrollButtonLock(DeviceIntPtr dev,
|
|
| 4197 |
+ Atom atom,
|
|
| 4198 |
+ XIPropertyValuePtr val,
|
|
| 4199 |
+ BOOL checkonly)
|
|
| 4200 |
+{
|
|
| 4201 |
+ InputInfoPtr pInfo = dev->public.devicePrivate;
|
|
| 4202 |
+ struct xf86libinput *driver_data = pInfo->private;
|
|
| 4203 |
+ BOOL enabled;
|
|
| 4204 |
+ |
|
| 4205 |
+ if (val->format != 8 || val->type != XA_INTEGER || val->size != 1)
|
|
| 4206 |
+ return BadMatch;
|
|
| 4207 |
+ |
|
| 4208 |
+ enabled = *(BOOL*)val->data;
|
|
| 4209 |
+ if (checkonly) {
|
|
| 4210 |
+ if (enabled != 0 && enabled != 1)
|
|
| 4211 |
+ return BadValue;
|
|
| 4212 |
+ |
|
| 4213 |
+ if (!xf86libinput_check_device (dev, atom))
|
|
| 4214 |
+ return BadMatch;
|
|
| 4215 |
+ } else {
|
|
| 4216 |
+ driver_data->options.scroll_buttonlock = enabled;
|
|
| 4217 |
+ }
|
|
| 4218 |
+ |
|
| 4219 |
+ return Success;
|
|
| 4220 |
+}
|
|
| 4221 |
+ |
|
| 4150 | 4222 |
static inline int
|
| 4151 | 4223 |
LibinputSetPropertyClickMethod(DeviceIntPtr dev,
|
| 4152 | 4224 |
Atom atom,
|
| ... | ... | @@ -4521,6 +4593,8 @@ LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val, |
| 4521 | 4593 |
rc = LibinputSetPropertyScrollMethods(dev, atom, val, checkonly);
|
| 4522 | 4594 |
else if (atom == prop_scroll_button)
|
| 4523 | 4595 |
rc = LibinputSetPropertyScrollButton(dev, atom, val, checkonly);
|
| 4596 |
+ else if (atom == prop_scroll_buttonlock)
|
|
| 4597 |
+ rc = LibinputSetPropertyScrollButtonLock(dev, atom, val, checkonly);
|
|
| 4524 | 4598 |
else if (atom == prop_click_method_enabled)
|
| 4525 | 4599 |
rc = LibinputSetPropertyClickMethod(dev, atom, val, checkonly);
|
| 4526 | 4600 |
else if (atom == prop_middle_emulation)
|
| ... | ... | @@ -4561,6 +4635,7 @@ LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val, |
| 4561 | 4635 |
atom == prop_scroll_method_default ||
|
| 4562 | 4636 |
atom == prop_scroll_methods_available ||
|
| 4563 | 4637 |
atom == prop_scroll_button_default ||
|
| 4638 |
+ atom == prop_scroll_buttonlock_default ||
|
|
| 4564 | 4639 |
atom == prop_click_method_default ||
|
| 4565 | 4640 |
atom == prop_click_methods_available ||
|
| 4566 | 4641 |
atom == prop_middle_emulation_default ||
|
| ... | ... | @@ -5051,10 +5126,11 @@ LibinputInitScrollMethodsProperty(DeviceIntPtr dev, |
| 5051 | 5126 |
XA_INTEGER, 8,
|
| 5052 | 5127 |
ARRAY_SIZE(methods),
|
| 5053 | 5128 |
methods);
|
| 5054 |
- /* Scroll button */
|
|
| 5129 |
+ /* Scroll button and scroll button lock */
|
|
| 5055 | 5130 |
if (libinput_device_config_scroll_get_methods(device) &
|
| 5056 | 5131 |
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) {
|
| 5057 | 5132 |
CARD32 scroll_button = driver_data->options.scroll_button;
|
| 5133 |
+ BOOL lock_enabled = driver_data->options.scroll_buttonlock;
|
|
| 5058 | 5134 |
|
| 5059 | 5135 |
prop_scroll_button = LibinputMakeProperty(dev,
|
| 5060 | 5136 |
LIBINPUT_PROP_SCROLL_BUTTON,
|
| ... | ... | @@ -5063,12 +5139,26 @@ LibinputInitScrollMethodsProperty(DeviceIntPtr dev, |
| 5063 | 5139 |
if (!prop_scroll_button)
|
| 5064 | 5140 |
return;
|
| 5065 | 5141 |
|
| 5142 |
+#if HAVE_LIBINPUT_SCROLL_BUTTON_LOCK
|
|
| 5066 | 5143 |
scroll_button = libinput_device_config_scroll_get_default_button(device);
|
| 5067 | 5144 |
scroll_button = btn_linux2xorg(scroll_button);
|
| 5068 | 5145 |
prop_scroll_button_default = LibinputMakeProperty(dev,
|
| 5069 | 5146 |
LIBINPUT_PROP_SCROLL_BUTTON_DEFAULT,
|
| 5070 | 5147 |
XA_CARDINAL, 32,
|
| 5071 | 5148 |
1, &scroll_button);
|
| 5149 |
+ prop_scroll_buttonlock = LibinputMakeProperty(dev,
|
|
| 5150 |
+ LIBINPUT_PROP_SCROLL_BUTTON_LOCK,
|
|
| 5151 |
+ XA_INTEGER, 8,
|
|
| 5152 |
+ 1, &lock_enabled);
|
|
| 5153 |
+ if (!prop_scroll_buttonlock)
|
|
| 5154 |
+ return;
|
|
| 5155 |
+ |
|
| 5156 |
+ lock_enabled = libinput_device_config_scroll_get_default_button_lock(device);
|
|
| 5157 |
+ prop_scroll_buttonlock_default = LibinputMakeProperty(dev,
|
|
| 5158 |
+ LIBINPUT_PROP_SCROLL_BUTTON_LOCK_DEFAULT,
|
|
| 5159 |
+ XA_INTEGER, 8,
|
|
| 5160 |
+ 1, &lock_enabled);
|
|
| 5161 |
+#endif
|
|
| 5072 | 5162 |
}
|
| 5073 | 5163 |
}
|
| 5074 | 5164 |
|