summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Ryazanov <dima@gmail.com>2011-08-16 17:25:32 -0700
committerKristian Høgsberg <krh@bitplanet.net>2011-08-16 21:32:54 -0400
commitc224748665251abde2a89724d40f138baa5fcdd6 (patch)
treea5dbffa3c728b197a7fd17f7426cfb6fa8f5e252
parent6bded3fd957f13f74e9ad1599eecaae851907d67 (diff)
Don't discard key press / key release events if the keys are different
Keystrokes get dropped if the user types too quickly.
-rw-r--r--compositor/compositor-x11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compositor/compositor-x11.c b/compositor/compositor-x11.c
index 9b255a40..0825f1a1 100644
--- a/compositor/compositor-x11.c
+++ b/compositor/compositor-x11.c
@@ -468,7 +468,8 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
key_release = (xcb_key_press_event_t *) prev;
key_press = (xcb_key_press_event_t *) event;
if ((event->response_type & ~0x80) == XCB_KEY_PRESS &&
- key_release->time == key_press->time) {
+ key_release->time == key_press->time &&
+ key_release->detail == key_press->detail) {
/* Don't deliver the held key release
* event or the new key press event. */
free(event);