diff options
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 4 | ||||
-rw-r--r-- | sway/desktop/render.c | 14 | ||||
-rw-r--r-- | sway/desktop/xdg_shell.c | 7 |
3 files changed, 8 insertions, 17 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 06acb868..7921d597 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -179,7 +179,7 @@ void output_view_for_each_surface(struct sway_output *output, view_for_each_surface(view, output_for_each_surface_iterator, &data); } -void output_view_for_each_popup(struct sway_output *output, +void output_view_for_each_popup_surface(struct sway_output *output, struct sway_view *view, sway_surface_iterator_func_t iterator, void *user_data) { struct surface_iterator_data data = { @@ -196,7 +196,7 @@ void output_view_for_each_popup(struct sway_output *output, .rotation = 0, // TODO }; - view_for_each_popup(view, output_for_each_surface_iterator, &data); + view_for_each_popup_surface(view, output_for_each_surface_iterator, &data); } void output_layer_for_each_surface(struct sway_output *output, 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, diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index fdac6171..667fb9e5 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -211,12 +211,13 @@ static void for_each_surface(struct sway_view *view, user_data); } -static void for_each_popup(struct sway_view *view, +static void for_each_popup_surface(struct sway_view *view, wlr_surface_iterator_func_t iterator, void *user_data) { if (xdg_shell_view_from_view(view) == NULL) { return; } - wlr_xdg_surface_for_each_popup(view->wlr_xdg_surface, iterator, user_data); + wlr_xdg_surface_for_each_popup_surface(view->wlr_xdg_surface, iterator, + user_data); } static bool is_transient_for(struct sway_view *child, @@ -271,7 +272,7 @@ static const struct sway_view_impl view_impl = { .set_resizing = set_resizing, .wants_floating = wants_floating, .for_each_surface = for_each_surface, - .for_each_popup = for_each_popup, + .for_each_popup_surface = for_each_popup_surface, .is_transient_for = is_transient_for, .close = _close, .close_popups = close_popups, |