[PATCH] Don't discard key press / key release events if the keys are different. Otherwise, keystrokes get dropped if the user types too quickly.

Kristian Høgsberg krh at bitplanet.net
Tue Aug 16 18:31:38 PDT 2011


Ah, thanks, applied.  I've seen this too, but I thought the problem
was in the Xorg on Wayland code and I hadn't had the time to take a
look.

Kristian

On Tue, Aug 16, 2011 at 8:25 PM, Dima Ryazanov <dima at gmail.com> wrote:
> ---
>  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
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


More information about the wayland-devel mailing list