mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 11:00:06 +01:00
Use enum wl_pointer_button_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire, where that's still the call signature), use the new wl_pointer_button_state enum, and explicit comparisons. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
a6cd4965e9
commit
95b8738f31
2 changed files with 6 additions and 2 deletions
|
|
@ -444,7 +444,9 @@ process_key(struct touchpad_dispatch *touchpad,
|
|||
case BTN_BACK:
|
||||
case BTN_TASK:
|
||||
notify_button(&device->master->base.seat,
|
||||
time, e->code, e->value);
|
||||
time, e->code,
|
||||
e->value ? WL_POINTER_BUTTON_STATE_PRESSED :
|
||||
WL_POINTER_BUTTON_STATE_RELEASED);
|
||||
break;
|
||||
case BTN_TOOL_PEN:
|
||||
case BTN_TOOL_RUBBER:
|
||||
|
|
|
|||
|
|
@ -79,7 +79,9 @@ evdev_process_key(struct evdev_input_device *device,
|
|||
case BTN_BACK:
|
||||
case BTN_TASK:
|
||||
notify_button(&device->master->base.seat,
|
||||
time, e->code, e->value);
|
||||
time, e->code,
|
||||
e->value ? WL_POINTER_BUTTON_STATE_PRESSED :
|
||||
WL_POINTER_BUTTON_STATE_RELEASED);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue