aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-07-31 15:18:54 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2019-07-31 22:32:13 +0300
commit75de31d36e0d7293a9fdaf0be39668c962c031fd (patch)
tree1fa8966965a052a83cfb6f334a56c12a48170711
parentinput/libinput: fix typo in set_middle_emulation (diff)
downloadsway-75de31d36e0d7293a9fdaf0be39668c962c031fd.tar.gz
sway-75de31d36e0d7293a9fdaf0be39668c962c031fd.tar.zst
sway-75de31d36e0d7293a9fdaf0be39668c962c031fd.zip
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
-rw-r--r--sway/input/libinput.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/libinput.c b/sway/input/libinput.c
index d8847a23..ef51e998 100644
--- a/sway/input/libinput.c
+++ b/sway/input/libinput.c
@@ -15,7 +15,7 @@ static void log_status(enum libinput_config_status status) {
15} 15}
16 16
17static bool set_send_events(struct libinput_device *device, uint32_t mode) { 17static bool set_send_events(struct libinput_device *device, uint32_t mode) {
18 if ((libinput_device_config_send_events_get_mode(device) & mode) == 0) { 18 if (libinput_device_config_send_events_get_mode(device) == mode) {
19 return false; 19 return false;
20 } 20 }
21 sway_log(SWAY_DEBUG, "send_events_set_mode(%d)", mode); 21 sway_log(SWAY_DEBUG, "send_events_set_mode(%d)", mode);