mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
Relinquish the focus when unmapped while owning it
Bug 1547 - when an actor is unmapped while owning the focus, it should release it When an actor is unmapped while owning the focus, the should release it. Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
125bded814
commit
51f4e9680b
@ -869,6 +869,20 @@ clutter_actor_real_unmap (ClutterActor *self)
|
|||||||
*/
|
*/
|
||||||
g_object_notify (G_OBJECT (self), "mapped");
|
g_object_notify (G_OBJECT (self), "mapped");
|
||||||
|
|
||||||
|
/* relinquish keyboard focus if we were unmapped while owning it */
|
||||||
|
if (!(CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IS_TOPLEVEL))
|
||||||
|
{
|
||||||
|
ClutterActor *stage;
|
||||||
|
|
||||||
|
stage = clutter_actor_get_stage (self);
|
||||||
|
|
||||||
|
if (stage &&
|
||||||
|
clutter_stage_get_key_focus (CLUTTER_STAGE (stage)) == self)
|
||||||
|
{
|
||||||
|
clutter_stage_set_key_focus (CLUTTER_STAGE (stage), NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
clutter_actor_queue_redraw (self);
|
clutter_actor_queue_redraw (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user