[PATCH xserver 2/4 v3] xwayland: add a server sync before repeating keys

Olivier Fourdan ofourdan at redhat.com
Mon May 23 16:09:45 UTC 2016


Hi

----- Original Message -----
> > On 9 March 2016 at 09:31, Olivier Fourdan <ofourdan at redhat.com> wrote:
> > > @@ -748,6 +783,9 @@ seat_handle_capabilities(void *data, struct wl_seat
> > > *seat,
> > >              ActivateDevice(xwl_seat->keyboard, TRUE);
> > >          }
> > >          EnableDevice(xwl_seat->keyboard, TRUE);
> > > +        master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD);
> > > +        if (master)
> > > +            master->key->xkbInfo->checkRepeat = keyboard_check_repeat;
> > 
> > This needs to be done on xwl_seat->keyboard as well: both devices
> > generate events. You can see this with 'xinput test'.
> 
> keyboard_check_repeat() operates on the xwl_seat itself, so I reckon it works
> for both devices.
> 
> If I explicitely set the callback function for both devices as you suggest,
> key repeat becomes completely erratic as both devices share the same
> xwl_seat, so doing it on the master device alone seems to work better.

Sorry for the delay...

My problem was that each device is attached to an xwl_seat, bit xwl_seats do have multiple devices, including multiple keyboards.

With your example, both "xwayland-keyboard" and "Virtual core XTEST keyboard" belong to the same xwl_seat, so using the same bool flag for both would obviously not work with my previous implementation, so it needed a bit more surgery^W rework...

The "public.devicePrivate" is used to point to the xwl_seat so we cannot use that to store the "pending sync" flag. The idea is to add a list of devices with pending sync to the wl_seat, and check if a given device is among that list, and remove it once we receive the callback notification for that device.

I will be sending an updated series (4 patches, so it will be easier to review at once) with this implementation in a second.

Cheers,
Olivier


More information about the xorg-devel mailing list