[mutter/gbsneto/cleanup-x11-from-window-actor: 5/10] window-actor: Add set_surface() vfunc
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/cleanup-x11-from-window-actor: 5/10] window-actor: Add set_surface() vfunc
- Date: Sat, 22 Dec 2018 15:06:25 +0000 (UTC)
commit c03941bd5e489487591a2ccd8157e35e6d7bc0ca
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Dec 21 23:18:49 2018 -0200
window-actor: Add set_surface() vfunc
This will help moving the signal handler for
MetaSurfaceActor:repaint-scheduled to the X11
specific implementation.
src/compositor/meta-window-actor-private.h | 3 +++
src/compositor/meta-window-actor-wayland.c | 12 ++++++++++++
src/compositor/meta-window-actor-x11.c | 12 ++++++++++++
src/compositor/meta-window-actor.c | 12 +++++++++++-
4 files changed, 38 insertions(+), 1 deletion(-)
---
diff --git a/src/compositor/meta-window-actor-private.h b/src/compositor/meta-window-actor-private.h
index 7a0a1f5f9..1523f40c9 100644
--- a/src/compositor/meta-window-actor-private.h
+++ b/src/compositor/meta-window-actor-private.h
@@ -17,6 +17,9 @@ struct _MetaWindowActorClass
ClutterFrameInfo *frame_info,
gint64 presentation_time);
+ void (*set_surface) (MetaWindowActor *actor,
+ MetaSurfaceActor *surface);
+
void (*pre_paint) (MetaWindowActor *actor);
void (*post_paint) (MetaWindowActor *actor);
};
diff --git a/src/compositor/meta-window-actor-wayland.c b/src/compositor/meta-window-actor-wayland.c
index 2ff9e82e8..394099228 100644
--- a/src/compositor/meta-window-actor-wayland.c
+++ b/src/compositor/meta-window-actor-wayland.c
@@ -20,6 +20,7 @@
* Georges Basile Stavracas Neto <gbsneto gnome org>
*/
+#include "compositor/meta-surface-actor.h"
#include "compositor/meta-window-actor-wayland.h"
#include "meta/meta-window-actor.h"
@@ -37,6 +38,16 @@ meta_window_actor_wayland_frame_complete (MetaWindowActor *actor,
{
}
+static void
+meta_window_actor_wayland_set_surface (MetaWindowActor *actor,
+ MetaSurfaceActor *surface)
+{
+ MetaWindowActorClass *parent_class =
+ META_WINDOW_ACTOR_CLASS (meta_window_actor_wayland_parent_class);
+
+ parent_class->set_surface (actor, surface);
+}
+
static void
meta_window_actor_wayland_pre_paint (MetaWindowActor *actor)
{
@@ -53,6 +64,7 @@ meta_window_actor_wayland_class_init (MetaWindowActorWaylandClass *klass)
MetaWindowActorClass *window_actor_class = META_WINDOW_ACTOR_CLASS (klass);
window_actor_class->frame_complete = meta_window_actor_wayland_frame_complete;
+ window_actor_class->set_surface = meta_window_actor_wayland_set_surface;
window_actor_class->pre_paint = meta_window_actor_wayland_pre_paint;
window_actor_class->post_paint = meta_window_actor_wayland_post_paint;
}
diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c
index a28405248..31dd31f46 100644
--- a/src/compositor/meta-window-actor-x11.c
+++ b/src/compositor/meta-window-actor-x11.c
@@ -20,6 +20,7 @@
* Georges Basile Stavracas Neto <gbsneto gnome org>
*/
+#include "compositor/meta-surface-actor.h"
#include "compositor/meta-window-actor-x11.h"
#include "meta/meta-window-actor.h"
@@ -37,6 +38,16 @@ meta_window_actor_x11_frame_complete (MetaWindowActor *actor,
{
}
+static void
+meta_window_actor_x11_set_surface (MetaWindowActor *actor,
+ MetaSurfaceActor *surface)
+{
+ MetaWindowActorClass *parent_class =
+ META_WINDOW_ACTOR_CLASS (meta_window_actor_x11_parent_class);
+
+ parent_class->set_surface (actor, surface);
+}
+
static void
meta_window_actor_x11_pre_paint (MetaWindowActor *actor)
{
@@ -53,6 +64,7 @@ meta_window_actor_x11_class_init (MetaWindowActorX11Class *klass)
MetaWindowActorClass *window_actor_class = META_WINDOW_ACTOR_CLASS (klass);
window_actor_class->frame_complete = meta_window_actor_x11_frame_complete;
+ window_actor_class->set_surface = meta_window_actor_x11_set_surface;
window_actor_class->pre_paint = meta_window_actor_x11_pre_paint;
window_actor_class->post_paint = meta_window_actor_x11_post_paint;
}
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index b0c01dfc9..c66dc523c 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -175,7 +175,8 @@ static void meta_window_actor_paint (ClutterActor *actor);
static gboolean meta_window_actor_get_paint_volume (ClutterActor *actor,
ClutterPaintVolume *volume);
-
+static void set_surface (MetaWindowActor *actor,
+ MetaSurfaceActor *surface);
static gboolean meta_window_actor_has_shadow (MetaWindowActor *self);
@@ -204,6 +205,13 @@ frame_data_free (FrameData *frame)
g_slice_free (FrameData, frame);
}
+static void
+meta_window_actor_real_set_surface (MetaWindowActor *actor,
+ MetaSurfaceActor *surface)
+{
+ set_surface (actor, surface);
+}
+
static void
meta_window_actor_class_init (MetaWindowActorClass *klass)
{
@@ -220,6 +228,8 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
actor_class->paint = meta_window_actor_paint;
actor_class->get_paint_volume = meta_window_actor_get_paint_volume;
+ klass->set_surface = meta_window_actor_real_set_surface;
+
/**
* MetaWindowActor::first-frame:
* @actor: the #MetaWindowActor instance
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]