[mutter] backends/x11: Make the X11 backend derivable
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends/x11: Make the X11 backend derivable
- Date: Wed, 25 Jan 2017 08:32:48 +0000 (UTC)
commit d188949101b4b6328741645d15ebdd3274b1570d
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Dec 5 18:33:19 2016 +0800
backends/x11: Make the X11 backend derivable
Make the X11 backend derivable so that we can base a nested test backend
on it.
https://bugzilla.gnome.org/show_bug.cgi?id=777732
src/backends/meta-monitor-manager-private.h | 2 ++
src/backends/x11/meta-backend-x11.c | 5 -----
src/backends/x11/meta-backend-x11.h | 9 +++++++--
3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager-private.h b/src/backends/meta-monitor-manager-private.h
index 7e61d0e..3328870 100644
--- a/src/backends/meta-monitor-manager-private.h
+++ b/src/backends/meta-monitor-manager-private.h
@@ -278,6 +278,8 @@ struct _MetaOutputInfo {
#define META_IS_MONITOR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_MONITOR_MANAGER))
#define META_MONITOR_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_MONITOR_MANAGER,
MetaMonitorManagerClass))
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorManager, g_object_unref)
+
struct _MetaMonitorManager
{
MetaDBusDisplayConfigSkeleton parent_instance;
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
index a545859..9237f27 100644
--- a/src/backends/x11/meta-backend-x11.c
+++ b/src/backends/x11/meta-backend-x11.c
@@ -55,11 +55,6 @@
#include "display-private.h"
#include "compositor/compositor-private.h"
-struct _MetaBackendX11
-{
- MetaBackend parent;
-};
-
typedef enum {
/* We're a traditional CM running under the host. */
META_BACKEND_X11_MODE_COMPOSITOR,
diff --git a/src/backends/x11/meta-backend-x11.h b/src/backends/x11/meta-backend-x11.h
index b24e518..8bb3388 100644
--- a/src/backends/x11/meta-backend-x11.h
+++ b/src/backends/x11/meta-backend-x11.h
@@ -32,8 +32,13 @@
#include "backends/x11/meta-clutter-backend-x11.h"
#define META_TYPE_BACKEND_X11 (meta_backend_x11_get_type ())
-G_DECLARE_FINAL_TYPE (MetaBackendX11, meta_backend_x11,
- META, BACKEND_X11, MetaBackend)
+G_DECLARE_DERIVABLE_TYPE (MetaBackendX11, meta_backend_x11,
+ META, BACKEND_X11, MetaBackend)
+
+struct _MetaBackendX11Class
+{
+ MetaBackendClass parent_class;
+};
Display * meta_backend_x11_get_xdisplay (MetaBackendX11 *backend);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]