libinput: fix set_send_events

This just fixes the check in set_send_events for whether the mode has
changed. LIBINPUT_CONFIG_SEND_EVENTS_ENABLED is 0 so the bitmask check
cannot be fixed, but Sway doesn't allow multiple modes to be set anyway
(not really sure why you would need to) so a basic equality check works
master
Brian Ashworth 5 years ago committed by Simon Ser
parent fc955716d4
commit 75de31d36e

@ -15,7 +15,7 @@ static void log_status(enum libinput_config_status status) {
} }
static bool set_send_events(struct libinput_device *device, uint32_t mode) { static bool set_send_events(struct libinput_device *device, uint32_t mode) {
if ((libinput_device_config_send_events_get_mode(device) & mode) == 0) { if (libinput_device_config_send_events_get_mode(device) == mode) {
return false; return false;
} }
sway_log(SWAY_DEBUG, "send_events_set_mode(%d)", mode); sway_log(SWAY_DEBUG, "send_events_set_mode(%d)", mode);

Loading…
Cancel
Save