summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland-surface.h
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2015-12-14 17:13:35 +0800
committerJonas Ådahl <jadahl@gmail.com>2016-02-16 19:02:48 +0800
commite2efc85b08d30a648fc5021e38380928a779540d (patch)
tree2d26b48f6cf4a7f47cd03d6e58e3eccda9213632 /src/wayland/meta-wayland-surface.h
parent020ae58fe4f890a9a9ebbc8545d4b34e22aff906 (diff)
downloadmutter-e2efc85b08d30a648fc5021e38380928a779540d.tar.gz
wayland: Make the pending surface state a GObject
Making the pending state an GObject makes it easier to extend it with additional optional state without putting everything inside one big struct. https://bugzilla.gnome.org/show_bug.cgi?id=744104
Diffstat (limited to 'src/wayland/meta-wayland-surface.h')
-rw-r--r--src/wayland/meta-wayland-surface.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h
index 6f3c1e853..3105eec27 100644
--- a/src/wayland/meta-wayland-surface.h
+++ b/src/wayland/meta-wayland-surface.h
@@ -44,6 +44,12 @@ G_DECLARE_FINAL_TYPE (MetaWaylandSurface,
G_DECLARE_DERIVABLE_TYPE (MetaWaylandSurfaceRole, meta_wayland_surface_role,
META, WAYLAND_SURFACE_ROLE, GObject);
+#define META_TYPE_WAYLAND_PENDING_STATE (meta_wayland_pending_state_get_type ())
+G_DECLARE_FINAL_TYPE (MetaWaylandPendingState,
+ meta_wayland_pending_state,
+ META, WAYLAND_PENDING_STATE,
+ GObject);
+
struct _MetaWaylandSurfaceRoleClass
{
GObjectClass parent_class;
@@ -92,6 +98,8 @@ G_DECLARE_FINAL_TYPE (MetaWaylandSurfaceRoleDND,
struct _MetaWaylandPendingState
{
+ GObject parent;
+
/* wl_surface.attach */
gboolean newly_attached;
MetaWaylandBuffer *buffer;
@@ -161,7 +169,7 @@ struct _MetaWaylandSurface
} dnd;
/* All the pending state that wl_surface.commit will apply. */
- MetaWaylandPendingState pending;
+ MetaWaylandPendingState *pending;
/* Extension resources. */
struct wl_resource *xdg_surface;
@@ -202,7 +210,7 @@ struct _MetaWaylandSurface
* state here.
*/
gboolean synchronous;
- MetaWaylandPendingState pending;
+ MetaWaylandPendingState *pending;
int32_t pending_x;
int32_t pending_y;