mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
stage: Do not create the default stage on stage.is_default()
Use the stage manager to see if a default stage was effectively set, otherwise we end up creating a default stage when destroying a non-default one.
This commit is contained in:
parent
ca092477c2
commit
4ab8a3f0c1
@ -2783,18 +2783,20 @@ clutter_stage_queue_redraw (ClutterStage *stage)
|
|||||||
gboolean
|
gboolean
|
||||||
clutter_stage_is_default (ClutterStage *stage)
|
clutter_stage_is_default (ClutterStage *stage)
|
||||||
{
|
{
|
||||||
|
ClutterStageManager *stage_manager;
|
||||||
ClutterStageWindow *impl;
|
ClutterStageWindow *impl;
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR (stage) == clutter_stage_get_default ())
|
stage_manager = clutter_stage_manager_get_default ();
|
||||||
return TRUE;
|
if (stage != clutter_stage_manager_get_default_stage (stage_manager))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
impl = _clutter_stage_get_window (stage);
|
impl = _clutter_stage_get_window (stage);
|
||||||
if (impl == _clutter_stage_get_default_window ())
|
if (impl != _clutter_stage_get_default_window ())
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user