aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-06-25 15:26:16 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2020-06-25 21:32:15 +0200
commitc8224270914909c02180e4892132fde3fa5cedb9 (patch)
tree6db0f715cda8468a9407d6062542560537bfdf96 /sway/input/seatop_default.c
parentUpdate version to 1.5-rc1 (diff)
downloadsway-c8224270914909c02180e4892132fde3fa5cedb9.tar.gz
sway-c8224270914909c02180e4892132fde3fa5cedb9.tar.zst
sway-c8224270914909c02180e4892132fde3fa5cedb9.zip
input/pointer: correctly handle bindings for synthetic events
This commit addresses a regression introduced in 8fa74ad. Fixes #5481.
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c5
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,
280 enum wlr_button_state state, uint32_t modifiers, 280 enum wlr_button_state state, uint32_t modifiers,
281 bool on_titlebar, bool on_border, bool on_contents, bool on_workspace) { 281 bool on_titlebar, bool on_border, bool on_contents, bool on_workspace) {
282 // We can reach this for non-pointer devices if we're currently emulating 282 // We can reach this for non-pointer devices if we're currently emulating
283 // pointer input for one. Emulated input should not trigger bindings. 283 // pointer input for one. Emulated input should not trigger bindings. The
284 if (device->type != WLR_INPUT_DEVICE_POINTER) { 284 // device can be NULL if this is synthetic (e.g. swaymsg-generated) input.
285 if (device && device->type != WLR_INPUT_DEVICE_POINTER) {
285 return false; 286 return false;
286 } 287 }
287 288