sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit c8224270914909c02180e4892132fde3fa5cedb9
parent ba0232e6f056fb7a6832aac21a6bd6230df9ab69
Author: Tudor Brindus <me@tbrindus.ca>
Date:   Thu, 25 Jun 2020 15:26:16 -0400

input/pointer: correctly handle bindings for synthetic events

This commit addresses a regression introduced in 8fa74ad.

Fixes #5481.

Diffstat:
Msway/input/seatop_default.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 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; }