Skip to content

Commit

Permalink
input/pointer: correctly handle bindings for synthetic events
Browse files Browse the repository at this point in the history
This commit addresses a regression introduced in 8fa74ad.

Fixes swaywm#5481.
  • Loading branch information
Xyene authored and emersion committed Jun 25, 2020
1 parent ba0232e commit c822427
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sway/input/seatop_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c822427

Please sign in to comment.