From e20e60783a915ae8af069f59fa59890175ebae7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 21 Feb 2017 16:55:04 +0800 Subject: [PATCH] tests: Make test backend inherit MetaBackendX11Nested The test backend must inherit the nested backend, as MetaBackendX11 is not complete. https://bugzilla.gnome.org/show_bug.cgi?id=779745 --- src/backends/x11/nested/meta-backend-x11-nested.c | 5 ----- src/backends/x11/nested/meta-backend-x11-nested.h | 9 +++++++-- src/tests/meta-backend-test.c | 4 ++-- src/tests/meta-backend-test.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/backends/x11/nested/meta-backend-x11-nested.c b/src/backends/x11/nested/meta-backend-x11-nested.c index 022599449..7930e3f2a 100644 --- a/src/backends/x11/nested/meta-backend-x11-nested.c +++ b/src/backends/x11/nested/meta-backend-x11-nested.c @@ -27,11 +27,6 @@ #include "wayland/meta-wayland.h" -struct _MetaBackendX11Nested -{ - MetaBackendX11 parent; -}; - G_DEFINE_TYPE (MetaBackendX11Nested, meta_backend_x11_nested, META_TYPE_BACKEND_X11) diff --git a/src/backends/x11/nested/meta-backend-x11-nested.h b/src/backends/x11/nested/meta-backend-x11-nested.h index 31ae96fa4..6f2c26576 100644 --- a/src/backends/x11/nested/meta-backend-x11-nested.h +++ b/src/backends/x11/nested/meta-backend-x11-nested.h @@ -25,7 +25,12 @@ #include "backends/x11/meta-backend-x11.h" #define META_TYPE_BACKEND_X11_NESTED (meta_backend_x11_nested_get_type ()) -G_DECLARE_FINAL_TYPE (MetaBackendX11Nested, meta_backend_x11_nested, - META, BACKEND_X11_NESTED, MetaBackendX11) +G_DECLARE_DERIVABLE_TYPE (MetaBackendX11Nested, meta_backend_x11_nested, + META, BACKEND_X11_NESTED, MetaBackendX11) + +struct _MetaBackendX11NestedClass +{ + MetaBackendX11Class parent_class; +}; #endif /* META_BACKEND_X11_NESTED_H */ diff --git a/src/tests/meta-backend-test.c b/src/tests/meta-backend-test.c index e516c8665..4abe0b739 100644 --- a/src/tests/meta-backend-test.c +++ b/src/tests/meta-backend-test.c @@ -25,10 +25,10 @@ struct _MetaBackendTest { - MetaBackendX11 parent; + MetaBackendX11Nested parent; }; -G_DEFINE_TYPE (MetaBackendTest, meta_backend_test, META_TYPE_BACKEND_X11) +G_DEFINE_TYPE (MetaBackendTest, meta_backend_test, META_TYPE_BACKEND_X11_NESTED) static void meta_backend_test_init (MetaBackendTest *backend_test) diff --git a/src/tests/meta-backend-test.h b/src/tests/meta-backend-test.h index e6662125f..4ac04e0f4 100644 --- a/src/tests/meta-backend-test.h +++ b/src/tests/meta-backend-test.h @@ -20,10 +20,10 @@ #ifndef META_BACKEND_TEST_H #define META_BACKEND_TEST_H -#include "backends/x11/meta-backend-x11.h" +#include "backends/x11/nested/meta-backend-x11-nested.h" #define META_TYPE_BACKEND_TEST (meta_backend_test_get_type ()) G_DECLARE_FINAL_TYPE (MetaBackendTest, meta_backend_test, - META, BACKEND_TEST, MetaBackendX11) + META, BACKEND_TEST, MetaBackendX11Nested) #endif /* META_BACKEND_TEST_H */