[PATCH] Don't discard key press / key release events if the keys are different. Otherwise, keystrokes get dropped if the user types too quickly.
Dima Ryazanov
dima at gmail.com
Tue Aug 16 17:25:32 PDT 2011
---
compositor/compositor-x11.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/compositor/compositor-x11.c b/compositor/compositor-x11.c
index 0e9fed7..b83dc76 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);
--
1.7.4.1
More information about the wayland-devel
mailing list