Re: [PATCH xserver] xwayland: Do not assume we have a seat

2017-02-28 Thread Peter Hutterer
On Tue, Feb 28, 2017 at 03:46:55AM -0500, Olivier Fourdan wrote: > Hi Peter, > > > what device is this called for? quick skim of the xwayland sources indicates > > that a device is only created if we have a seat, so I wonder if the repeat > > is > > called for the wrong device here? > > The

Re: [PATCH xserver] xwayland: Do not assume we have a seat

2017-02-28 Thread Olivier Fourdan
Hi Peter, > what device is this called for? quick skim of the xwayland sources indicates > that a device is only created if we have a seat, so I wonder if the repeat is > called for the wrong device here? The keyboard_check_repeat() handler is called directly from AccessXRepeatKeyExpire() [1].

Re: [PATCH xserver] xwayland: Do not assume we have a seat

2017-02-27 Thread Peter Hutterer
On Mon, Feb 27, 2017 at 03:19:53PM +0100, Olivier Fourdan wrote: > If a key event is sent programmatically, we may not have an Xwayland > seat associated with it, in which case we end up crashing in > keyboard_check_repeat(). > > This is the case with "antimicro" which sends key events based on

[PATCH xserver] xwayland: Do not assume we have a seat

2017-02-27 Thread Olivier Fourdan
If a key event is sent programmatically, we may not have an Xwayland seat associated with it, in which case we end up crashing in keyboard_check_repeat(). This is the case with "antimicro" which sends key events based on the joystick buttons. Avoid the NULL pointer dereference by first checking