[mutter/wip/ssd-black-borders-fix: 15/22] compositor: make set_frozen a vfunc
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/ssd-black-borders-fix: 15/22] compositor: make set_frozen a vfunc
- Date: Thu, 29 Mar 2018 14:38:04 +0000 (UTC)
commit 80562bbb102fa40a411d8a204567d036473aec57
Author: Ray Strode <rstrode redhat com>
Date: Mon Mar 19 11:22:48 2018 -0400
compositor: make set_frozen a vfunc
MetaSurfaceActor can be made "frozen" via it's set_frozen method.
That method could be useful as virtual function, so that the wayland
subclass can tie into it and freeze the underlying surface.
This commit does the prerequiste work of making set_frozen a vfunc.
A future commit will change the wayland subclass code to leverage
the vfunc.
src/compositor/meta-surface-actor.c | 12 ++++++++++++
src/compositor/meta-surface-actor.h | 3 +++
2 files changed, 15 insertions(+)
---
diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
index bf8c76f39..64491ac8c 100644
--- a/src/compositor/meta-surface-actor.c
+++ b/src/compositor/meta-surface-actor.c
@@ -31,6 +31,9 @@ struct _MetaSurfaceActorPrivate
static void cullable_iface_init (MetaCullableInterface *iface);
+void meta_surface_actor_real_set_frozen (MetaSurfaceActor *self,
+ gboolean frozen);
+
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (MetaSurfaceActor, meta_surface_actor, CLUTTER_TYPE_ACTOR,
G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
@@ -121,6 +124,8 @@ meta_surface_actor_class_init (MetaSurfaceActorClass *klass)
object_class->dispose = meta_surface_actor_dispose;
actor_class->pick = meta_surface_actor_pick;
+ klass->set_frozen = meta_surface_actor_real_set_frozen;
+
signals[REPAINT_SCHEDULED] = g_signal_new ("repaint-scheduled",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -331,6 +336,13 @@ meta_surface_actor_is_visible (MetaSurfaceActor *self)
void
meta_surface_actor_set_frozen (MetaSurfaceActor *self,
gboolean frozen)
+{
+ return META_SURFACE_ACTOR_GET_CLASS (self)->set_frozen (self, frozen);
+}
+
+void
+meta_surface_actor_real_set_frozen (MetaSurfaceActor *self,
+ gboolean frozen)
{
MetaSurfaceActorPrivate *priv = self->priv;
diff --git a/src/compositor/meta-surface-actor.h b/src/compositor/meta-surface-actor.h
index 8c6dda253..f60cbb64f 100644
--- a/src/compositor/meta-surface-actor.h
+++ b/src/compositor/meta-surface-actor.h
@@ -36,6 +36,9 @@ struct _MetaSurfaceActorClass
gboolean unredirected);
gboolean (* is_unredirected) (MetaSurfaceActor *actor);
+ void (* set_frozen) (MetaSurfaceActor *actor,
+ gboolean is_frozen);
+
MetaWindow *(* get_window) (MetaSurfaceActor *actor);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]