input: fix keyboard focus crash
If two or more clients were running and the one that was focused when weston itself lost keyboard focus was killed, weston would crash. This is because commit 85d55540 changed the way we handle saved keyboard focus when we lose focus, and did so in such a way that the saved keyboard focus listener could be removed from the surface destroy signal list during the emit of the surface destroy signal. This corrupted the list and led to a NULL pointer dereference. Fix this by using a boolean flag to determine whether we should obey the saved keyboard focus. We can set this safely in cases where removing the listener would cause a crash. Fixes #138 Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
parent
645df955
Loading
Loading
Pipeline
#410625
passed
with stages
in
2 minutes and 43 seconds
Loading
Please register or sign in to comment