mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
input/pointer: correctly handle bindings for synthetic events
This commit addresses a regression introduced in 8fa74ad
.
Fixes #5481.
This commit is contained in:
parent
ba0232e6f0
commit
c822427091
1 changed files with 3 additions and 2 deletions
|
@ -280,8 +280,9 @@ static bool trigger_pointer_button_binding(struct sway_seat *seat,
|
||||||
enum wlr_button_state state, uint32_t modifiers,
|
enum wlr_button_state state, uint32_t modifiers,
|
||||||
bool on_titlebar, bool on_border, bool on_contents, bool on_workspace) {
|
bool on_titlebar, bool on_border, bool on_contents, bool on_workspace) {
|
||||||
// We can reach this for non-pointer devices if we're currently emulating
|
// We can reach this for non-pointer devices if we're currently emulating
|
||||||
// pointer input for one. Emulated input should not trigger bindings.
|
// pointer input for one. Emulated input should not trigger bindings. The
|
||||||
if (device->type != WLR_INPUT_DEVICE_POINTER) {
|
// device can be NULL if this is synthetic (e.g. swaymsg-generated) input.
|
||||||
|
if (device && device->type != WLR_INPUT_DEVICE_POINTER) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue