diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2020-06-25 15:26:16 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2020-06-25 15:26:16 -0400 |
| commit | 1c8121fcd1763749837ee42468901a9a565ae9d9 (patch) | |
| tree | 6db0f715cda8468a9407d6062542560537bfdf96 | |
| parent | 2ca8ff07968763804bd61b9dbf6a4d3b7c236e53 (diff) | |
input/pointer: correctly handle bindings for synthetic events
This commit addresses a regression introduced in bdbc411.
Fixes #5481.
| -rw-r--r-- | sway/input/seatop_default.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index a1b4aeb2..55c9159a 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c @@ -280,8 +280,9 @@ static bool trigger_pointer_button_binding(struct sway_seat *seat, enum wlr_button_state state, uint32_t modifiers, 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 - // pointer input for one. Emulated input should not trigger bindings. - if (device->type != WLR_INPUT_DEVICE_POINTER) { + // pointer input for one. Emulated input should not trigger bindings. The + // device can be NULL if this is synthetic (e.g. swaymsg-generated) input. + if (device && device->type != WLR_INPUT_DEVICE_POINTER) { return false; } |
