Skip to content
Commit a822afaa authored by Derek Foreman's avatar Derek Foreman Committed by Marius Vlad
Browse files

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: default avatarDerek Foreman <derek.foreman@collabora.com>
parent 645df955
Loading
Loading
Loading
Pipeline #410625 passed with stages
in 2 minutes and 43 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment