mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
wip! stage: add new api for making the stage not paint children
We want to darken the stage before dpms, so this commit adds a way to do that. Note this probably doesn't work since we have no-clear hint set on the stage.
This commit is contained in:
parent
86d8c3954f
commit
87b11cc409
@ -41,6 +41,7 @@ typedef struct {
|
||||
struct _MetaStagePrivate {
|
||||
MetaOverlay cursor_overlay;
|
||||
gboolean is_active;
|
||||
gboolean is_black;
|
||||
};
|
||||
typedef struct _MetaStagePrivate MetaStagePrivate;
|
||||
|
||||
@ -121,6 +122,9 @@ meta_stage_paint (ClutterActor *actor)
|
||||
MetaStage *stage = META_STAGE (actor);
|
||||
MetaStagePrivate *priv = meta_stage_get_instance_private (stage);
|
||||
|
||||
if (priv->is_black)
|
||||
return;
|
||||
|
||||
CLUTTER_ACTOR_CLASS (meta_stage_parent_class)->paint (actor);
|
||||
|
||||
meta_overlay_paint (&priv->cursor_overlay);
|
||||
@ -261,3 +265,16 @@ meta_stage_set_active (MetaStage *stage,
|
||||
*/
|
||||
clutter_stage_event (CLUTTER_STAGE (stage), &event);
|
||||
}
|
||||
|
||||
void
|
||||
meta_stage_set_black (MetaStage *stage,
|
||||
gboolean is_black)
|
||||
{
|
||||
MetaStagePrivate *priv = meta_stage_get_instance_private (stage);
|
||||
|
||||
if (priv->is_black != is_black)
|
||||
{
|
||||
priv->is_black = is_black;
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
|
||||
}
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ void meta_stage_set_cursor (MetaStage *stage,
|
||||
|
||||
void meta_stage_set_active (MetaStage *stage,
|
||||
gboolean is_active);
|
||||
void meta_stage_set_black (MetaStage *stage,
|
||||
gboolean is_black);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* META_STAGE_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user