Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/backends/x11/libinputtouchpad.cpp
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include <stddef.h> | 24 | #include <stddef.h> | ||
25 | #include <limits.h> | 25 | #include <limits.h> | ||
26 | 26 | | |||
27 | #include <xserver-properties.h> | 27 | #include <xserver-properties.h> | ||
28 | #include <libinput-properties.h> | 28 | #include <libinput-properties.h> | ||
29 | #include "logging.h" | 29 | #include "logging.h" | ||
30 | 30 | | |||
31 | namespace { | | |||
32 | template<typename T> | | |||
33 | T valueLoaderPart(QVariant const &reply) { Q_UNUSED(reply); return T(); } | | |||
34 | | ||||
35 | template<> | | |||
36 | bool valueLoaderPart(QVariant const &reply) { return reply.toBool(); } | | |||
37 | | ||||
38 | template<> | | |||
39 | int valueLoaderPart(QVariant const &reply) { return reply.toInt(); } | | |||
40 | | ||||
41 | template<> | | |||
42 | quint32 valueLoaderPart(QVariant const &reply) { return reply.toInt(); } | | |||
43 | | ||||
44 | template<> | | |||
45 | qreal valueLoaderPart(QVariant const &reply) { return reply.toReal(); } | | |||
46 | | ||||
47 | template<> | | |||
48 | QString valueLoaderPart(QVariant const &reply) { return reply.toString(); } | | |||
49 | | ||||
50 | template<> | | |||
51 | Qt::MouseButtons valueLoaderPart(QVariant const &reply) { return static_cast<Qt::MouseButtons>(reply.toInt()); } | | |||
52 | } | | |||
53 | | ||||
54 | const struct Parameter libinputProperties[] = { | 31 | const struct Parameter libinputProperties[] = { | ||
55 | 32 | | |||
56 | /* libinput disable supports property */ | 33 | /* libinput disable supports property */ | ||
57 | {"SupportsDisableEvents", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_AVAILABLE, 8, 0}, | 34 | {"supportsDisableEvents", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_AVAILABLE, 8, 0}, | ||
58 | {"Enabled", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_ENABLED, 8, 0}, | 35 | {"enabled", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_ENABLED, 8, 0}, | ||
59 | {"EnabledDefault", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_ENABLED_DEFAULT, 8, 0}, | 36 | {"enabledDefault", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_ENABLED_DEFAULT, 8, 0}, | ||
60 | 37 | | |||
61 | /* LeftHandSupport */ | 38 | /* LeftHandSupport */ | ||
62 | {"LeftHandedEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_LEFT_HANDED_DEFAULT, 8, 0}, | 39 | {"leftHandedEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_LEFT_HANDED_DEFAULT, 8, 0}, | ||
63 | {"LeftHanded", PT_INT, 0, 1, LIBINPUT_PROP_LEFT_HANDED, 8, 0}, | 40 | {"leftHanded", PT_INT, 0, 1, LIBINPUT_PROP_LEFT_HANDED, 8, 0}, | ||
64 | 41 | | |||
65 | /* Disable on external mouse */ | 42 | /* Disable on external mouse */ | ||
66 | {"SupportsDisableEventsOnExternalMouse",PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_AVAILABLE, 8, 1}, | 43 | {"supportsDisableEventsOnExternalMouse",PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_AVAILABLE, 8, 1}, | ||
67 | {"DisableEventsOnExternalMouse", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_ENABLED, 8, 1}, | 44 | {"disableEventsOnExternalMouse", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_ENABLED, 8, 1}, | ||
68 | {"DisableEventsOnExternalMouseDefault", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_ENABLED_DEFAULT, 8, 1}, | 45 | {"disableEventsOnExternalMouseDefault", PT_INT, 0, 1, LIBINPUT_PROP_SENDEVENTS_ENABLED_DEFAULT, 8, 1}, | ||
69 | 46 | | |||
70 | /* Disable while typing */ | 47 | /* Disable while typing */ | ||
71 | {"DisableWhileTypingEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_DISABLE_WHILE_TYPING_DEFAULT, 8, 0}, | 48 | {"disableWhileTypingEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_DISABLE_WHILE_TYPING_DEFAULT, 8, 0}, | ||
72 | {"DisableWhileTyping", PT_INT, 0, 1, LIBINPUT_PROP_DISABLE_WHILE_TYPING, 8, 0}, | 49 | {"disableWhileTyping", PT_INT, 0, 1, LIBINPUT_PROP_DISABLE_WHILE_TYPING, 8, 0}, | ||
73 | 50 | | |||
74 | /* Middle Emulation */ | 51 | /* Middle Emulation */ | ||
75 | {"MiddleEmulationEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_MIDDLE_EMULATION_ENABLED_DEFAULT, 8, 0}, | 52 | {"middleEmulationEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_MIDDLE_EMULATION_ENABLED_DEFAULT, 8, 0}, | ||
76 | {"MiddleEmulation", PT_INT, 0, 1, LIBINPUT_PROP_MIDDLE_EMULATION_ENABLED, 8, 0}, | 53 | {"middleEmulation", PT_INT, 0, 1, LIBINPUT_PROP_MIDDLE_EMULATION_ENABLED, 8, 0}, | ||
77 | 54 | | |||
78 | /* This is a boolean for all three fingers, no per-finger config */ | 55 | /* This is a boolean for all three fingers, no per-finger config */ | ||
79 | {"Tapping", PT_INT, 0, 1, LIBINPUT_PROP_TAP, 8, 0}, | 56 | {"tapToClick", PT_INT, 0, 1, LIBINPUT_PROP_TAP, 8, 0}, | ||
80 | {"TapToClickEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DEFAULT, 8, 0}, | 57 | {"tapToClickEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DEFAULT, 8, 0}, | ||
81 | 58 | | |||
82 | /* LMR */ | 59 | /* LMR */ | ||
83 | {"LmrTapButtonMapEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_TAP_BUTTONMAP_DEFAULT, 8, 1}, | 60 | {"lmrTapButtonMapEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_TAP_BUTTONMAP_DEFAULT, 8, 1}, | ||
84 | {"LmrTapButtonMap", PT_INT, 0, 1, LIBINPUT_PROP_TAP_BUTTONMAP, 8, 1}, | 61 | {"lmrTapButtonMap", PT_INT, 0, 1, LIBINPUT_PROP_TAP_BUTTONMAP, 8, 1}, | ||
85 | 62 | | |||
86 | /* Tap and Drag Enabled */ | 63 | /* Tap and Drag Enabled */ | ||
87 | {"TapAndDragEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DRAG_DEFAULT, 8, 0}, | 64 | {"tapAndDragEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DRAG_DEFAULT, 8, 0}, | ||
88 | {"TapAndDrag", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DRAG, 8, 0}, | 65 | {"tapAndDrag", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DRAG, 8, 0}, | ||
89 | 66 | | |||
90 | /* Tap and Drag Lock Enabled */ | 67 | /* Tap and Drag Lock Enabled */ | ||
91 | {"TapDragLockEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DRAG_LOCK_DEFAULT, 8, 0}, | 68 | {"tapDragLockEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DRAG_LOCK_DEFAULT, 8, 0}, | ||
92 | {"TapDragLock", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DRAG_LOCK, 8, 0}, | 69 | {"tapDragLock", PT_INT, 0, 1, LIBINPUT_PROP_TAP_DRAG_LOCK, 8, 0}, | ||
93 | 70 | | |||
94 | /* libinput normalizes the accel to -1/1 */ | 71 | /* libinput normalizes the accel to -1/1 */ | ||
95 | {"DefaultPointerAcceleration", PT_DOUBLE, -1.0, 1.0, LIBINPUT_PROP_ACCEL_DEFAULT, 0 /*float */, 0}, | 72 | {"defaultPointerAcceleration", PT_DOUBLE, -1.0, 1.0, LIBINPUT_PROP_ACCEL_DEFAULT, 0 /*float */, 0}, | ||
96 | {"PointerAcceleration", PT_DOUBLE, -1.0, 1.0, LIBINPUT_PROP_ACCEL, 0 /*float */, 0}, | 73 | {"pointerAcceleration", PT_DOUBLE, -1.0, 1.0, LIBINPUT_PROP_ACCEL, 0 /*float */, 0}, | ||
97 | 74 | | |||
98 | /* Libinput Accel Profile */ | 75 | /* Libinput Accel Profile */ | ||
99 | {"SupportsPointerAccelerationProfileAdaptive", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILES_AVAILABLE, 8, 0}, | 76 | {"supportsPointerAccelerationProfileAdaptive", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILES_AVAILABLE, 8, 0}, | ||
100 | {"DefaultPointerAccelerationProfileAdaptive", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILE_ENABLED_DEFAULT, 8, 0}, | 77 | {"defaultPointerAccelerationProfileAdaptive", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILE_ENABLED_DEFAULT, 8, 0}, | ||
101 | {"PointerAccelerationProfileAdaptive", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILE_ENABLED, 8, 0}, | 78 | {"pointerAccelerationProfileAdaptive", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILE_ENABLED, 8, 0}, | ||
102 | {"SupportsPointerAccelerationProfileFlat", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILES_AVAILABLE, 8, 1}, | 79 | {"supportsPointerAccelerationProfileFlat", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILES_AVAILABLE, 8, 1}, | ||
103 | {"DefaultPointerAccelerationProfileFlat", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILE_ENABLED_DEFAULT, 8, 1}, | 80 | {"defaultPointerAccelerationProfileFlat", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILE_ENABLED_DEFAULT, 8, 1}, | ||
104 | {"PointerAccelerationProfileFlat", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILE_ENABLED, 8, 1}, | 81 | {"pointerAccelerationProfileFlat", PT_BOOL, 0, 1, LIBINPUT_PROP_ACCEL_PROFILE_ENABLED, 8, 1}, | ||
105 | 82 | | |||
106 | /* Natural Scrolling */ | 83 | /* Natural Scrolling */ | ||
107 | {"NaturalScrollEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_NATURAL_SCROLL_DEFAULT, 8, 0}, | 84 | {"naturalScrollEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_NATURAL_SCROLL_DEFAULT, 8, 0}, | ||
108 | {"NaturalScroll", PT_INT, 0, 1, LIBINPUT_PROP_NATURAL_SCROLL, 8, 0}, | 85 | {"naturalScroll", PT_INT, 0, 1, LIBINPUT_PROP_NATURAL_SCROLL, 8, 0}, | ||
86 | | ||||
87 | /* Horizontal scrolling */ | ||||
88 | {"horizontalScrolling", PT_INT, 0, 1, LIBINPUT_PROP_HORIZ_SCROLL_ENABLED, 8, 0}, | ||||
109 | 89 | | |||
110 | /* Two-Finger Scrolling */ | 90 | /* Two-Finger Scrolling */ | ||
111 | {"SupportsScrollTwoFinger", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE, 8, 0}, | 91 | {"supportsScrollTwoFinger", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE, 8, 0}, | ||
112 | {"ScrollTwoFingerEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT, 8, 0}, | 92 | {"scrollTwoFingerEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT, 8, 0}, | ||
113 | {"ScrollTwoFinger", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED, 8, 0}, | 93 | {"scrollTwoFinger", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED, 8, 0}, | ||
114 | 94 | | |||
115 | /* Edge Scrolling */ | 95 | /* Edge Scrolling */ | ||
116 | {"SupportsScrollEdge", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE, 8, 1}, | 96 | {"supportsScrollEdge", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE, 8, 1}, | ||
117 | {"ScrollEdgeEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT, 8, 1}, | 97 | {"scrollEdgeEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT, 8, 1}, | ||
118 | {"ScrollEdge", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED, 8, 1}, | 98 | {"scrollEdge", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED, 8, 1}, | ||
119 | 99 | | |||
120 | /* scroll on button */ | 100 | /* scroll on button */ | ||
121 | {"SupportsScrollOnButtonDown", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE, 8, 2}, | 101 | {"supportsScrollOnButtonDown", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE, 8, 2}, | ||
122 | {"ScrollOnButtonDownEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT, 8, 2}, | 102 | {"scrollOnButtonDownEnabledByDefault", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT, 8, 2}, | ||
123 | {"ScrollOnButtonDown", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED, 8, 2}, | 103 | {"scrollOnButtonDown", PT_INT, 0, 1, LIBINPUT_PROP_SCROLL_METHOD_ENABLED, 8, 2}, | ||
124 | 104 | | |||
125 | /* Scroll Button for scroll on button Down */ | 105 | /* Scroll Button for scroll on button Down */ | ||
126 | {"DefaultScrollButton", PT_INT, 0, INT_MAX, LIBINPUT_PROP_SCROLL_BUTTON_DEFAULT, 32, 0}, | 106 | {"defaultScrollButton", PT_INT, 0, INT_MAX, LIBINPUT_PROP_SCROLL_BUTTON_DEFAULT, 32, 0}, | ||
127 | {"ScrollButton", PT_INT, 0, INT_MAX, LIBINPUT_PROP_SCROLL_BUTTON, 32, 0}, | 107 | {"scrollButton", PT_INT, 0, INT_MAX, LIBINPUT_PROP_SCROLL_BUTTON, 32, 0}, | ||
128 | 108 | | |||
129 | /* Click Methods */ | 109 | /* Click Methods */ | ||
130 | {"SupportsClickMethodAreas", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHODS_AVAILABLE, 8, 0}, | 110 | {"supportsClickMethodAreas", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHODS_AVAILABLE, 8, 0}, | ||
131 | {"DefaultClickMethodAreas", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHOD_ENABLED_DEFAULT, 8, 0}, | 111 | {"defaultClickMethodAreas", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHOD_ENABLED_DEFAULT, 8, 0}, | ||
132 | {"ClickMethodAreas", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHOD_ENABLED, 8, 0}, | 112 | {"clickMethodAreas", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHOD_ENABLED, 8, 0}, | ||
133 | 113 | | |||
134 | {"SupportsClickMethodClickfinger", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHODS_AVAILABLE, 8, 1}, | 114 | {"supportsClickMethodClickfinger", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHODS_AVAILABLE, 8, 1}, | ||
135 | {"DefaultClickMethodClickfinger", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHOD_ENABLED_DEFAULT, 8, 1}, | 115 | {"defaultClickMethodClickfinger", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHOD_ENABLED_DEFAULT, 8, 1}, | ||
136 | {"ClickMethodClickfinger", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHOD_ENABLED, 8, 1}, | 116 | {"clickMethodClickfinger", PT_INT, 0, 1, LIBINPUT_PROP_CLICK_METHOD_ENABLED, 8, 1}, | ||
137 | 117 | | |||
138 | /* libinput doesn't have a separate toggle for horiz scrolling */ | 118 | /* libinput doesn't have a separate toggle for horiz scrolling */ | ||
139 | { NULL, PT_INT, 0, 0, 0, 0, 0 } | 119 | { NULL, PT_INT, 0, 0, 0, 0, 0 } | ||
140 | }; | 120 | }; | ||
141 | 121 | | |||
142 | Qt::MouseButtons maskBtns(Display *display, XIButtonClassInfo *buttonInfo) | 122 | Qt::MouseButtons maskBtns(Display *display, XIButtonClassInfo *buttonInfo) | ||
143 | { | 123 | { | ||
144 | Qt::MouseButtons buttons = Qt::NoButton; | 124 | Qt::MouseButtons buttons = Qt::NoButton; | ||
Show All 24 Lines | 125 | for (int i = 0; i < buttonInfo->num_buttons; ++i) { | |||
169 | if (reply == BTN_LABEL_PROP_BTN_TASK) { | 149 | if (reply == BTN_LABEL_PROP_BTN_TASK) { | ||
170 | buttons |= Qt::TaskButton; | 150 | buttons |= Qt::TaskButton; | ||
171 | } | 151 | } | ||
172 | } | 152 | } | ||
173 | return buttons; | 153 | return buttons; | ||
174 | } | 154 | } | ||
175 | 155 | | |||
176 | LibinputTouchpad::LibinputTouchpad(Display *display, int deviceId): | 156 | LibinputTouchpad::LibinputTouchpad(Display *display, int deviceId): | ||
177 | XlibTouchpad(nullptr, display, deviceId) | 157 | LibinputCommon(), | ||
158 | XlibTouchpad(display, deviceId) | ||||
178 | { | 159 | { | ||
179 | loadSupportedProperties(libinputProperties); | 160 | loadSupportedProperties(libinputProperties); | ||
180 | 161 | | |||
181 | int nDevices = 0; | 162 | int nDevices = 0; | ||
182 | XIDeviceInfo *deviceInfo = XIQueryDevice(m_display, m_deviceId, &nDevices); | 163 | XIDeviceInfo *deviceInfo = XIQueryDevice(m_display, m_deviceId, &nDevices); | ||
183 | m_name = deviceInfo->name; | 164 | m_name = deviceInfo->name; | ||
184 | 165 | | |||
185 | for (int i = 0; i < deviceInfo->num_classes; ++i) { | 166 | for (int i = 0; i < deviceInfo->num_classes; ++i) { | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 190 | { | |||
243 | success &= valueLoader(m_pointerAccelerationProfileFlat); | 224 | success &= valueLoader(m_pointerAccelerationProfileFlat); | ||
244 | success &= valueLoader(m_supportsPointerAccelerationProfileAdaptive); | 225 | success &= valueLoader(m_supportsPointerAccelerationProfileAdaptive); | ||
245 | success &= valueLoader(m_defaultPointerAccelerationProfileAdaptive); | 226 | success &= valueLoader(m_defaultPointerAccelerationProfileAdaptive); | ||
246 | success &= valueLoader(m_pointerAccelerationProfileAdaptive); | 227 | success &= valueLoader(m_pointerAccelerationProfileAdaptive); | ||
247 | 228 | | |||
248 | success &= valueLoader(m_naturalScrollEnabledByDefault); | 229 | success &= valueLoader(m_naturalScrollEnabledByDefault); | ||
249 | success &= valueLoader(m_naturalScroll); | 230 | success &= valueLoader(m_naturalScroll); | ||
250 | 231 | | |||
232 | success &= valueLoader(m_horizontalScrolling); | ||||
233 | | ||||
251 | success &= valueLoader(m_supportsScrollTwoFinger); | 234 | success &= valueLoader(m_supportsScrollTwoFinger); | ||
252 | success &= valueLoader(m_scrollTwoFingerEnabledByDefault); | 235 | success &= valueLoader(m_scrollTwoFingerEnabledByDefault); | ||
253 | success &= valueLoader(m_isScrollTwoFinger); | 236 | success &= valueLoader(m_isScrollTwoFinger); | ||
254 | 237 | | |||
255 | success &= valueLoader(m_supportsScrollEdge); | 238 | success &= valueLoader(m_supportsScrollEdge); | ||
256 | success &= valueLoader(m_scrollEdgeEnabledByDefault); | 239 | success &= valueLoader(m_scrollEdgeEnabledByDefault); | ||
257 | success &= valueLoader(m_isScrollEdge); | 240 | success &= valueLoader(m_isScrollEdge); | ||
258 | 241 | | |||
Show All 26 Lines | 264 | msgs << valueWriter(m_enabled) | |||
285 | << valueWriter(m_tapDragLock) | 268 | << valueWriter(m_tapDragLock) | ||
286 | << valueWriter(m_leftHanded) | 269 | << valueWriter(m_leftHanded) | ||
287 | << valueWriter(m_disableWhileTyping) | 270 | << valueWriter(m_disableWhileTyping) | ||
288 | << valueWriter(m_middleEmulation) | 271 | << valueWriter(m_middleEmulation) | ||
289 | << valueWriter(m_pointerAcceleration) | 272 | << valueWriter(m_pointerAcceleration) | ||
290 | << valueWriter(m_pointerAccelerationProfileFlat) | 273 | << valueWriter(m_pointerAccelerationProfileFlat) | ||
291 | << valueWriter(m_pointerAccelerationProfileAdaptive) | 274 | << valueWriter(m_pointerAccelerationProfileAdaptive) | ||
292 | << valueWriter(m_naturalScroll) | 275 | << valueWriter(m_naturalScroll) | ||
276 | << valueWriter(m_horizontalScrolling) | ||||
293 | << valueWriter(m_isScrollTwoFinger) | 277 | << valueWriter(m_isScrollTwoFinger) | ||
294 | << valueWriter(m_isScrollEdge) | 278 | << valueWriter(m_isScrollEdge) | ||
295 | << valueWriter(m_isScrollOnButtonDown) | 279 | << valueWriter(m_isScrollOnButtonDown) | ||
296 | << valueWriter(m_scrollButton) | 280 | << valueWriter(m_scrollButton) | ||
297 | << valueWriter(m_clickMethodAreas) | 281 | << valueWriter(m_clickMethodAreas) | ||
298 | << valueWriter(m_clickMethodClickfinger); | 282 | << valueWriter(m_clickMethodClickfinger); | ||
299 | 283 | | |||
300 | bool success = true; | 284 | bool success = true; | ||
Show All 28 Lines | 307 | { | |||
329 | m_leftHanded.set(m_leftHandedEnabledByDefault); | 313 | m_leftHanded.set(m_leftHandedEnabledByDefault); | ||
330 | m_disableEventsOnExternalMouse.set(m_disableEventsOnExternalMouseDefault); | 314 | m_disableEventsOnExternalMouse.set(m_disableEventsOnExternalMouseDefault); | ||
331 | m_disableWhileTyping.set(m_disableWhileTypingEnabledByDefault); | 315 | m_disableWhileTyping.set(m_disableWhileTypingEnabledByDefault); | ||
332 | m_middleEmulation.set(m_middleEmulationEnabledByDefault); | 316 | m_middleEmulation.set(m_middleEmulationEnabledByDefault); | ||
333 | m_pointerAcceleration.set(m_defaultPointerAcceleration); | 317 | m_pointerAcceleration.set(m_defaultPointerAcceleration); | ||
334 | m_pointerAccelerationProfileFlat.set(m_defaultPointerAccelerationProfileFlat); | 318 | m_pointerAccelerationProfileFlat.set(m_defaultPointerAccelerationProfileFlat); | ||
335 | m_pointerAccelerationProfileAdaptive.set(m_defaultPointerAccelerationProfileAdaptive); | 319 | m_pointerAccelerationProfileAdaptive.set(m_defaultPointerAccelerationProfileAdaptive); | ||
336 | m_naturalScroll.set(m_naturalScrollEnabledByDefault); | 320 | m_naturalScroll.set(m_naturalScrollEnabledByDefault); | ||
321 | m_horizontalScrolling.set(true); | ||||
337 | m_isScrollTwoFinger.set(m_scrollTwoFingerEnabledByDefault); | 322 | m_isScrollTwoFinger.set(m_scrollTwoFingerEnabledByDefault); | ||
338 | m_isScrollEdge.set(m_scrollEdgeEnabledByDefault); | 323 | m_isScrollEdge.set(m_scrollEdgeEnabledByDefault); | ||
339 | m_isScrollOnButtonDown.set(m_scrollOnButtonDownEnabledByDefault); | 324 | m_isScrollOnButtonDown.set(m_scrollOnButtonDownEnabledByDefault); | ||
340 | m_scrollButton.set(m_defaultScrollButton); | 325 | m_scrollButton.set(m_defaultScrollButton); | ||
341 | m_clickMethodAreas.set(m_defaultClickMethodAreas); | 326 | m_clickMethodAreas.set(m_defaultClickMethodAreas); | ||
342 | m_clickMethodClickfinger.set(m_defaultClickMethodClickfinger); | 327 | m_clickMethodClickfinger.set(m_defaultClickMethodClickfinger); | ||
343 | 328 | | |||
344 | return true; | 329 | return true; | ||
Show All 10 Lines | 335 | bool changed = m_enabled.changed() || | |||
355 | m_leftHanded.changed() || | 340 | m_leftHanded.changed() || | ||
356 | m_disableEventsOnExternalMouse.changed() || | 341 | m_disableEventsOnExternalMouse.changed() || | ||
357 | m_disableWhileTyping.changed() || | 342 | m_disableWhileTyping.changed() || | ||
358 | m_middleEmulation.changed() || | 343 | m_middleEmulation.changed() || | ||
359 | m_pointerAcceleration.changed() || | 344 | m_pointerAcceleration.changed() || | ||
360 | m_pointerAccelerationProfileFlat.changed() || | 345 | m_pointerAccelerationProfileFlat.changed() || | ||
361 | m_pointerAccelerationProfileAdaptive.changed() || | 346 | m_pointerAccelerationProfileAdaptive.changed() || | ||
362 | m_naturalScroll.changed() || | 347 | m_naturalScroll.changed() || | ||
348 | m_horizontalScrolling.changed() || | ||||
363 | m_isScrollTwoFinger.changed() || | 349 | m_isScrollTwoFinger.changed() || | ||
364 | m_isScrollEdge.changed() || | 350 | m_isScrollEdge.changed() || | ||
365 | m_isScrollOnButtonDown.changed() || | 351 | m_isScrollOnButtonDown.changed() || | ||
366 | m_scrollButton.changed() || | 352 | m_scrollButton.changed() || | ||
367 | m_clickMethodAreas.changed() || | 353 | m_clickMethodAreas.changed() || | ||
368 | m_clickMethodClickfinger.changed(); | 354 | m_clickMethodClickfinger.changed(); | ||
369 | 355 | | |||
370 | return changed; | 356 | return changed; | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |