aboutsummaryrefslogtreecommitdiff
path: root/rootston/xdg_shell.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-02-25 14:59:57 +0100
committerDrew DeVault <sir@cmpwn.com>2019-03-02 09:37:05 -0700
commit62fd03a7beb18da6c4a5929e38739cf2199dfa79 (patch)
tree937fc28ed00480491f47ca75a94b1ba74cb97bab /rootston/xdg_shell.c
parent8efeca528f9aab16de673e5c9e19028667b1c7bb (diff)
rootston: refactor rendering
This implements rootston surface iterators to ease rendering, sending frame/presentation events and accumulating damage.
Diffstat (limited to 'rootston/xdg_shell.c')
-rw-r--r--rootston/xdg_shell.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rootston/xdg_shell.c b/rootston/xdg_shell.c
index 5686b3d7..de9830e6 100644
--- a/rootston/xdg_shell.c
+++ b/rootston/xdg_shell.c
@@ -256,6 +256,13 @@ static void close(struct roots_view *view) {
wlr_xdg_toplevel_send_close(xdg_surface);
}
+static void for_each_surface(struct roots_view *view,
+ wlr_surface_iterator_func_t iterator, void *user_data) {
+ struct wlr_xdg_surface *xdg_surface =
+ roots_xdg_surface_from_view(view)->xdg_surface;
+ wlr_xdg_surface_for_each_surface(xdg_surface, iterator, user_data);
+}
+
static void destroy(struct roots_view *view) {
struct roots_xdg_surface *roots_xdg_surface =
roots_xdg_surface_from_view(view);
@@ -281,6 +288,7 @@ static const struct roots_view_interface view_impl = {
.maximize = maximize,
.set_fullscreen = set_fullscreen,
.close = close,
+ .for_each_surface = for_each_surface,
.destroy = destroy,
};