PadBlocker: Avoid blocking non-trackpad devices

Exposes a new field on mouse events named "device" that specifices what
type of device the event originates from. This is then used in
PadBlocker to ignore events that don't originate from trackpads.

This field should also be exposed to the public API in case any program
in userspace want to use it, as it may be useful for other purposes.

Fixes #19238 and #17821

Change-Id: Ic0f8c088cf5d2b0414a8e69498b48f2a3e370d73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8557
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Gustaf Alhäll
2024-11-18 16:45:04 +00:00
committed by waddlesplash
parent fd7bde29e9
commit b08fdcde6f
7 changed files with 47 additions and 5 deletions
+8
View File
@@ -25,6 +25,14 @@ enum input_device_type {
};
enum input_pointing_device_subtype {
B_UNKNOWN_DEVICE_SUBTYPE = 0,
B_MOUSE_DEVICE_SUBTYPE = 1,
B_TOUCHPAD_DEVICE_SUBTYPE = 2,
B_TABLET_DEVICE_SUBTYPE = 3
};
enum input_device_notification {
B_INPUT_DEVICE_ADDED = 0x0001,
B_INPUT_DEVICE_STARTED = 0x0002,