summaryrefslogtreecommitdiff
path: root/src/libinput-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libinput-device.c')
-rw-r--r--src/libinput-device.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libinput-device.c b/src/libinput-device.c
index 5c5b9b90..567e5ea9 100644
--- a/src/libinput-device.c
+++ b/src/libinput-device.c
@@ -59,6 +59,17 @@ handle_keyboard_key(struct libinput_device *libinput_device,
{
struct evdev_device *device =
libinput_device_get_user_data(libinput_device);
+ int key_state =
+ libinput_event_keyboard_get_key_state(keyboard_event);
+ int seat_key_count =
+ libinput_event_keyboard_get_seat_key_count(keyboard_event);
+
+ /* Ignore key events that are not seat wide state changes. */
+ if ((key_state == LIBINPUT_KEY_STATE_PRESSED &&
+ seat_key_count != 1) ||
+ (key_state == LIBINPUT_KEY_STATE_RELEASED &&
+ seat_key_count != 0))
+ return;
notify_key(device->seat,
libinput_event_keyboard_get_time(keyboard_event),