mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter/actor: Don't emit focus signals during destruction
We rightfully unset the stage focus when the focus actor is destroyed, which in turns results in the ClutterActor::-key-focus-out signal being emitted on an actor that is no longer fully valid. Avoid that emission, so consumers don't have to deal with half-disposed actors in their handler. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4324 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1884>
This commit is contained in:
parent
ea626a5059
commit
dce3aa5c01
@ -14584,6 +14584,9 @@ _clutter_actor_set_has_key_focus (ClutterActor *self,
|
||||
{
|
||||
priv->has_key_focus = has_key_focus;
|
||||
|
||||
if (CLUTTER_ACTOR_IN_DESTRUCTION (self))
|
||||
return;
|
||||
|
||||
if (has_key_focus)
|
||||
g_signal_emit (self, actor_signals[KEY_FOCUS_IN], 0);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user