[mutter/gbsneto/cleanup-x11-from-window-actor: 14/21] Add MetaWindowActorX11 and MetaWindowActorWayland
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/cleanup-x11-from-window-actor: 14/21] Add MetaWindowActorX11 and MetaWindowActorWayland
- Date: Thu, 3 Jan 2019 18:20:12 +0000 (UTC)
commit 10f3ab290e1e986d8de4d27cf3602fa1b63d98bb
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Dec 21 18:35:18 2018 -0200
Add MetaWindowActorX11 and MetaWindowActorWayland
Those are stub specialized classes for MetaWindowActor. This will
help ensuring that we do not execute X11-specific code paths on
pure Wayland clients.
The relationship between the window actor and the surface is the
following:
* Wayland: MetaWindowActorWayland + MetaSurfaceActorWayland
* X11: MetaWindowActorX11 + MetaSurfaceActorX11
* Xwayland: MetaWindowActorX11 + MetaSurfaceActorWayland
It is not possible to have MetaWindowActorWayland backed by a
MetaSurfaceActorX11 surface.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
src/compositor/meta-window-actor-wayland.c | 41 ++++++++++++++++++++++++++++++
src/compositor/meta-window-actor-wayland.h | 34 +++++++++++++++++++++++++
src/compositor/meta-window-actor-x11.c | 41 ++++++++++++++++++++++++++++++
src/compositor/meta-window-actor-x11.h | 34 +++++++++++++++++++++++++
src/meson.build | 4 +++
5 files changed, 154 insertions(+)
---
diff --git a/src/compositor/meta-window-actor-wayland.c b/src/compositor/meta-window-actor-wayland.c
new file mode 100644
index 000000000..851b413a2
--- /dev/null
+++ b/src/compositor/meta-window-actor-wayland.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2018 Endless, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Written by:
+ * Georges Basile Stavracas Neto <gbsneto gnome org>
+ */
+
+#include "compositor/meta-window-actor-wayland.h"
+#include "meta/meta-window-actor.h"
+
+struct _MetaWindowActorWayland
+{
+ MetaWindowActor parent;
+};
+
+G_DEFINE_TYPE (MetaWindowActorWayland, meta_window_actor_wayland, META_TYPE_WINDOW_ACTOR)
+
+static void
+meta_window_actor_wayland_class_init (MetaWindowActorWaylandClass *klass)
+{
+}
+
+static void
+meta_window_actor_wayland_init (MetaWindowActorWayland *self)
+{
+}
diff --git a/src/compositor/meta-window-actor-wayland.h b/src/compositor/meta-window-actor-wayland.h
new file mode 100644
index 000000000..560800693
--- /dev/null
+++ b/src/compositor/meta-window-actor-wayland.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2018 Endless, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Written by:
+ * Georges Basile Stavracas Neto <gbsneto gnome org>
+ */
+
+#ifndef META_WINDOW_ACTOR_WAYLAND_H
+#define META_WINDOW_ACTOR_WAYLAND_H
+
+#include "compositor/meta-window-actor-private.h"
+
+#define META_TYPE_WINDOW_ACTOR_WAYLAND (meta_window_actor_wayland_get_type())
+G_DECLARE_FINAL_TYPE (MetaWindowActorWayland,
+ meta_window_actor_wayland,
+ META, WINDOW_ACTOR_WAYLAND,
+ MetaWindowActor)
+
+#endif /*META_WINDOW_ACTOR_WAYLAND_H */
diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c
new file mode 100644
index 000000000..fe41e81f0
--- /dev/null
+++ b/src/compositor/meta-window-actor-x11.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2018 Endless, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Written by:
+ * Georges Basile Stavracas Neto <gbsneto gnome org>
+ */
+
+#include "compositor/meta-window-actor-x11.h"
+#include "meta/meta-window-actor.h"
+
+struct _MetaWindowActorX11
+{
+ MetaWindowActor parent;
+};
+
+G_DEFINE_TYPE (MetaWindowActorX11, meta_window_actor_x11, META_TYPE_WINDOW_ACTOR)
+
+static void
+meta_window_actor_x11_class_init (MetaWindowActorX11Class *klass)
+{
+}
+
+static void
+meta_window_actor_x11_init (MetaWindowActorX11 *self)
+{
+}
diff --git a/src/compositor/meta-window-actor-x11.h b/src/compositor/meta-window-actor-x11.h
new file mode 100644
index 000000000..5f20fc028
--- /dev/null
+++ b/src/compositor/meta-window-actor-x11.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2018 Endless, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Written by:
+ * Georges Basile Stavracas Neto <gbsneto gnome org>
+ */
+
+#ifndef META_WINDOW_ACTOR_X11_H
+#define META_WINDOW_ACTOR_X11_H
+
+#include "compositor/meta-window-actor-private.h"
+
+#define META_TYPE_WINDOW_ACTOR_X11 (meta_window_actor_x11_get_type())
+G_DECLARE_FINAL_TYPE (MetaWindowActorX11,
+ meta_window_actor_x11,
+ META, WINDOW_ACTOR_X11,
+ MetaWindowActor)
+
+#endif /* META_WINDOW_ACTOR_X11_H */
diff --git a/src/meson.build b/src/meson.build
index 04f1dbe6a..ca08e25da 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -293,6 +293,10 @@ mutter_sources = [
'compositor/meta-texture-tower.h',
'compositor/meta-window-actor.c',
'compositor/meta-window-actor-private.h',
+ 'compositor/meta-window-actor-wayland.c',
+ 'compositor/meta-window-actor-wayland.h',
+ 'compositor/meta-window-actor-x11.c',
+ 'compositor/meta-window-actor-x11.h',
'compositor/meta-window-group.c',
'compositor/meta-window-group-private.h',
'compositor/meta-window-shape.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]