compositor-wayland: Ignore pointer enter on destroyed surface
authorDaniel Stone <daniels@collabora.com>
Fri, 9 Mar 2018 10:08:37 +0000 (10:08 +0000)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 9 Mar 2018 14:17:47 +0000 (16:17 +0200)
commit3f83937414dd0d34bbbb43f55a3f4c08ccb7defb
tree95848e37a0cb20238e1da4ec41e2d35aa59a9758
parent72e183bd2b41b888a4d26e3c6b389948964df85c
compositor-wayland: Ignore pointer enter on destroyed surface

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 destroyed surfaces.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[Pekka: remove call to input_set_cursor()]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
libweston/compositor-wayland.c