Re: [PATCH] compositor-wayland: Ignore pointer enter on destroyed surface

2018-03-09 Thread Pekka Paalanen
On Fri, 9 Mar 2018 14:14:11 + Daniel Stone wrote: > Hi, > > On 9 March 2018 at 14:08, Pekka Paalanen wrote: > > On Fri, 9 Mar 2018 10:08:37 + > > Daniel Stone wrote: > >> + if (!surface) { > >> + input->output = NULL; > >> + input->has_focus = false; > >>

Re: [PATCH] compositor-wayland: Ignore pointer enter on destroyed surface

2018-03-09 Thread Daniel Stone
Hi, On 9 March 2018 at 14:08, Pekka Paalanen wrote: > On Fri, 9 Mar 2018 10:08:37 + > Daniel Stone wrote: >> + if (!surface) { >> + input->output = NULL; >> + input->has_focus = false; >> + notify_pointer_focus(&input->base, NULL, 0, 0); >> +

Re: [PATCH] compositor-wayland: Ignore pointer enter on destroyed surface

2018-03-09 Thread Pekka Paalanen
On Fri, 9 Mar 2018 10:08:37 + Daniel Stone wrote: > Due to race conditions, it is (vanishingly unlikely but) possible to > receive a wl_pointer.enter event referring to a wl_surface we have just > destroyed. If this happens, wl_surface will be NULL. Detect this, clear > out our focus, and re

[PATCH] compositor-wayland: Ignore pointer enter on destroyed surface

2018-03-09 Thread Daniel Stone
Due to race conditions, it is (vanishingly unlikely but) possible to receive a wl_pointer.enter event referring to a wl_surface we have just destroyed. If this happens, wl_surface will be NULL. Detect this, clear out our focus, and return. Other pointer and keyboard events are robust against destr