aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-27 06:06:29 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-27 06:06:29 -0500
commit5a18f62fee5f0a9c8abc1554222f3774179ff373 (patch)
tree3120760fa9afb25ff751e33510cbc70f39c701b3 /include/wlr
parent4d744aeb230f36d990c102a89314f95ff802ca75 (diff)
add role-committed hook
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_surface.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index c8e3761a..9f88d044 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -77,6 +77,10 @@ struct wlr_surface {
struct wl_listener compositor_listener;
void *compositor_data;
+ // surface commit callback for the role that runs before all others
+ void (*role_committed)(struct wlr_surface *surface, void *role_data);
+ void *role_data;
+
// subsurface properties
struct wlr_subsurface *subsurface;
struct wl_list subsurface_list; // wlr_subsurface::parent_link
@@ -146,4 +150,12 @@ void wlr_surface_send_leave(struct wlr_surface *surface,
void wlr_surface_send_frame_done(struct wlr_surface *surface,
const struct timespec *when);
+/**
+ * Set a callback for surface commit that runs before all the other callbacks.
+ * This is intended for use by the surface role.
+ */
+void wlr_surface_set_role_committed(struct wlr_surface *surface,
+ void (*role_committed)(struct wlr_surface *surface, void *role_data),
+ void *role_data);
+
#endif