summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wayland/meta-wayland-surface.c20
-rw-r--r--src/wayland/meta-wayland-surface.h3
2 files changed, 23 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 31ffff1c5..7beb0ab60 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -115,6 +115,11 @@ static void
meta_wayland_surface_role_assigned (MetaWaylandSurfaceRole *surface_role);
static void
+meta_wayland_surface_role_commit_state (MetaWaylandSurfaceRole *surface_role,
+ MetaWaylandTransaction *transaction,
+ MetaWaylandSurfaceState *pending);
+
+static void
meta_wayland_surface_role_pre_apply_state (MetaWaylandSurfaceRole *surface_role,
MetaWaylandSurfaceState *pending);
@@ -1023,6 +1028,9 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface)
else
transaction = meta_wayland_transaction_new (surface->compositor);
+ if (surface->role)
+ meta_wayland_surface_role_commit_state (surface->role, transaction, pending);
+
meta_wayland_transaction_merge_pending_state (transaction, surface);
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->protocol_state,
@@ -1953,6 +1961,18 @@ meta_wayland_surface_role_assigned (MetaWaylandSurfaceRole *surface_role)
}
static void
+meta_wayland_surface_role_commit_state (MetaWaylandSurfaceRole *surface_role,
+ MetaWaylandTransaction *transaction,
+ MetaWaylandSurfaceState *pending)
+{
+ MetaWaylandSurfaceRoleClass *klass;
+
+ klass = META_WAYLAND_SURFACE_ROLE_GET_CLASS (surface_role);
+ if (klass->commit_state)
+ klass->commit_state (surface_role, transaction, pending);
+}
+
+static void
meta_wayland_surface_role_pre_apply_state (MetaWaylandSurfaceRole *surface_role,
MetaWaylandSurfaceState *pending)
{
diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h
index 072d7f8eb..307038a2c 100644
--- a/src/wayland/meta-wayland-surface.h
+++ b/src/wayland/meta-wayland-surface.h
@@ -54,6 +54,9 @@ struct _MetaWaylandSurfaceRoleClass
GObjectClass parent_class;
void (*assigned) (MetaWaylandSurfaceRole *surface_role);
+ void (*commit_state) (MetaWaylandSurfaceRole *surface_role,
+ MetaWaylandTransaction *transaction,
+ MetaWaylandSurfaceState *pending);
void (*pre_apply_state) (MetaWaylandSurfaceRole *surface_role,
MetaWaylandSurfaceState *pending);
void (*apply_state) (MetaWaylandSurfaceRole *surface_role,