[PATCH weston 1/2] input: Update keyboard serial on press and release

Olivier Fourdan ofourdan at redhat.com
Thu Sep 1 09:52:23 UTC 2016


Hi

> > +	keyboard->grab_serial = wl_display_get_serial(compositor->wl_display);
> >  	if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
> > -		keyboard->grab_serial =
> > -			wl_display_get_serial(compositor->wl_display);
> >  		keyboard->grab_time = time;
> >  		keyboard->grab_key = key;
> >  	}
> >
> 
> I’m ok with that, but why not updating all three "grab_*" members?

While I think the key itself would be OK, I suspect updating the grab_time on all states (ie like key release) might have additional side effects.

So I took the most conservative approach which was to update the serial only, as this one is compared against the popup serial.

Cheers,
Olivier


More information about the wayland-devel mailing list