[mutter/gbsneto/cleanup-x11-from-window-actor: 4/10] window-actor: Select X11 or Wayland actor based on client type
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/cleanup-x11-from-window-actor: 4/10] window-actor: Select X11 or Wayland actor based on client type
- Date: Fri, 4 Jan 2019 11:35:06 +0000 (UTC)
commit ac2f8cad0c7fceff029d0d7a4415928433692882
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Dec 21 18:38:53 2018 -0200
window-actor: Select X11 or Wayland actor based on client type
X11 clients now have a MetaWindowActorX11 on the surface. Next
commits will move the X11-specific code to MetaWindowActorX11.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
src/compositor/meta-window-actor.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 78ad6ded7..5d9352419 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -27,6 +27,8 @@
#include "compositor/meta-surface-actor.h"
#include "compositor/meta-texture-rectangle.h"
#include "compositor/meta-window-actor-private.h"
+#include "compositor/meta-window-actor-wayland.h"
+#include "compositor/meta-window-actor-x11.h"
#include "compositor/region-utils.h"
#include "meta/display.h"
#include "meta/meta-enum-types.h"
@@ -1480,8 +1482,20 @@ meta_window_actor_new (MetaWindow *window)
MetaCompositor *compositor = display->compositor;
MetaWindowActor *self;
ClutterActor *window_group;
+ GType window_actor_type;
- self = g_object_new (META_TYPE_WINDOW_ACTOR,
+ switch (window->client_type)
+ {
+ case META_WINDOW_CLIENT_TYPE_X11:
+ window_actor_type = META_TYPE_WINDOW_ACTOR_X11;
+ break;
+
+ case META_WINDOW_CLIENT_TYPE_WAYLAND:
+ window_actor_type = META_TYPE_WINDOW_ACTOR_WAYLAND;
+ break;
+ }
+
+ self = g_object_new (window_actor_type,
"meta-window", window,
NULL);
priv = meta_window_actor_get_instance_private (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]