e.g.
../../../test/test-draglock.c:262:2: warning: Value stored to 'rc' is never read [deadcode.DeadStores]
262 | rc = draglock_init_from_string(&dl, "10");
../src/xf86libinput.c: In function ‘prop_draglock_set_pairs’:
../src/xf86libinput.c:5153:30: warning: comparison is always false due to limited range of data type [-Wtype-limits]
5153 | if (pairs[i] > MAX_BUTTONS)
MAX_BUTTONS is defined by the server so let's use a temporary local
variable to silence the compiler.
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/61>
This now warns on 64-bit machines:
../src/xf86libinput.c:542:61: warning: format ‘%lu’ expects argument
of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=]
Given they vastly outnumber 32-bit machines now, let's go back to the
old one that only warns on 32 bit until we fix the actual source types
to use uint32_t and similar.
This reverts commit a7d2994256.
Latest master moved the BUG_() macros out of os.h, and it's more appropriate
to use xf86IDrvMsg() in those cases (like we're already doing in other places)
anyways.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The driver encodes the serial in the device name but that's not reliable
enough. Expose both serial and tool id (optional) as a property so
clients can read them and adjust their behavior accordingly.
Fixes#16
Buttons 4-7 are out of bounds for hysterical historical reasons.
Previously this button fell through to the default statement and
resulted in 8 + BTN_STYLUS3 - BTN_SIDE == 65 which is rather obviously
wrong.
Instead, map it explicitly to what the fourth button would be mapped to
on other devices. This will now overlap with BTN_SIDE on devices that
both BTN_STYLUS3 *and* BTN_SIDE but those devices don't appear to exist
in the real world.
Fixes#50
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Adds new properties and xorg.conf entries for setting the scroll acceleration
function's points and step.
The new xorg.conf entries are AccelPointsScroll, AccelStepScroll.
Adds new properties and xorg.conf entries for setting the acceleration
function's points and step.
`AccelProfile` option can now accept `custom` value.
Add 4 new options which only apply when `AccelProfile` is `custom`:
- Add `AccelPointsFallback` option for setting the points of the
Fallback acceleration function. Points values are represented by a
space-separated list, e.g. "0.0 1.0 2.4 2.5".
- Add `AccelStepFallback` option for setting the step of the Fallback
acceleration function. When a step of 0.0 is provided,
libinput default Fallback acceleration function is used.
- Add `AccelPointsMotion` and `AccelStepMotion` options, which are
equivalent to `AccelPointsFallback` and `AccelStepFallback` options,
but apply to the Motion acceleration function.
See libinput documentation for a detailed explanation of custom
pointer acceleration.
Missing else condition in PKG_CHECK_MODULES caused configure to bail out
where 2.4 wasn't available.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
These don't change, iirc they exist because of some unixes having
different man pages but at this point really on Solaris is left and that
uses the same suffixes as everyone else.
And the __xservername__ is a leftover from the Xfree86 vs Xorg days - if
you're still running Xfree86, you're not using this driver.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86libinput.c:2457:89: warning: passing argument 1 of
‘libinput_event_pointer_get_axis_source’ from incompatible
pointer type [-Wincompatible-pointer-types]
No function changes due to the binary layout of libinput events but
let's not rely on that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86CheckStrOption returns the same value but doesn't mark it as used in
the server and, more importantly, doesn't spam the log with
(**) Option "_source" "server/udev"
messages.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Starting on libinput 1.19 pointer axis events have been deprecated in
favor of their scroll equivalents, including support for high-resolution
wheel scroll.
While it is recommended to handle the new events, some applications
and/or frameworks might not be ready at the moment.
Provide an option to discard high-resolution wheel scroll events.
Fix#41
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Where libinput supports high-resolution scroll events, the scroll source
is encoded in the event type.
Get the scroll source in xf86libinput_handle_event to facilitate the
migration.
Refactor, no functional changes.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>