[PATCH xwayland] xwayland: implement repeat_info event

Pekka Paalanen ppaalanen at gmail.com
Mon Aug 17 04:00:20 PDT 2015


On Mon, 17 Aug 2015 11:37:37 +0200
Marek Chalupa <mchqwerty at gmail.com> wrote:

> xwayland windows ignored any key repeating settings
> advertised by a compositor
> 
> Signed-off-by: Marek Chalupa <mchqwerty at gmail.com>
> ---
>  hw/xwayland/xwayland-input.c | 34 ++++++++++++++++++++++++++++++++--
>  1 file changed, 32 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index a961e30..d6abf93 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -441,12 +441,42 @@ keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard,
>      }
>  }
>  
> +static void
> +keyboard_handle_repeat_info (void *data, struct wl_keyboard *keyboard,
> +                             int32_t rate, int32_t delay)
> +{

...

> +}
> +
>  static const struct wl_keyboard_listener keyboard_listener = {
>      keyboard_handle_keymap,
>      keyboard_handle_enter,
>      keyboard_handle_leave,
>      keyboard_handle_key,
>      keyboard_handle_modifiers,
> +    keyboard_handle_repeat_info,
>  };
>  
>  static DeviceIntPtr
> @@ -548,7 +578,7 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id)
>      xorg_list_add(&xwl_seat->link, &xwl_screen->seat_list);
>  
>      xwl_seat->seat =
> -        wl_registry_bind(xwl_screen->registry, id, &wl_seat_interface, 3);
> +        wl_registry_bind(xwl_screen->registry, id, &wl_seat_interface, 4);
>      xwl_seat->id = id;
>  
>      xwl_seat->cursor = wl_compositor_create_surface(xwl_screen->compositor);
> @@ -573,7 +603,7 @@ input_handler(void *data, struct wl_registry *registry, uint32_t id,
>  {
>      struct xwl_screen *xwl_screen = data;
>  
> -    if (strcmp(interface, "wl_seat") == 0 && version >= 3) {
> +    if (strcmp(interface, "wl_seat") == 0 && version >= 4) {
>          create_input_device(xwl_screen, id);
>          xwl_screen->expecting_event++;
>      }

Hi,

is there a reason to reject compositors that implement only version 3
of wl_seat and wl_keyboard?

I suppose versions below 3 are rejected because they don't have the
release request, but I'm not sure the repeat info is important enough
to refuse to work without it.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150817/40eb735a/attachment.sig>


More information about the xorg-devel mailing list