diff options
author | Simon Ser <contact@emersion.fr> | 2021-01-08 10:46:12 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-01-12 11:25:34 +0100 |
commit | 5438cc158a1b9fa3bf76445a6dc986e30c5e78f6 (patch) | |
tree | 7feb4dce6441803e7ddd50b7747ebb6a46a2a485 /sway/desktop/render.c | |
parent | a7414885d2a1ed4ab09869492547e2eaa09b7beb (diff) |
Switch to wlr_xdg_surface_for_each_popup_surface
Instead of calling wlr_xdg_surface_for_each_popup and then
wlr_surface_for_each_surface, use the new for_each_popup_surface helper
introduced in [1] that does it in one go.
[1]: https://github.com/swaywm/wlroots/pull/2609
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 3a422293..acf503a4 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -265,24 +265,14 @@ static void render_view_toplevels(struct sway_view *view, render_surface_iterator, &data); } -static void render_popup_iterator(struct sway_output *output, struct sway_view *view, - struct wlr_surface *surface, struct wlr_box *box, float rotation, - void *data) { - // Render this popup's surface - render_surface_iterator(output, view, surface, box, rotation, data); - - // Render this popup's child toplevels - output_surface_for_each_surface(output, surface, box->x, box->y, - render_surface_iterator, data); -} - static void render_view_popups(struct sway_view *view, struct sway_output *output, pixman_region32_t *damage, float alpha) { struct render_data data = { .damage = damage, .alpha = alpha, }; - output_view_for_each_popup(output, view, render_popup_iterator, &data); + output_view_for_each_popup_surface(output, view, + render_surface_iterator, &data); } static void render_saved_view(struct sway_view *view, |