aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2021-01-08 10:46:12 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2021-01-12 11:25:34 +0100
commit5438cc158a1b9fa3bf76445a6dc986e30c5e78f6 (patch)
tree7feb4dce6441803e7ddd50b7747ebb6a46a2a485 /sway/desktop/xdg_shell.c
parentFix #5940 (diff)
downloadsway-5438cc158a1b9fa3bf76445a6dc986e30c5e78f6.tar.gz
sway-5438cc158a1b9fa3bf76445a6dc986e30c5e78f6.tar.zst
sway-5438cc158a1b9fa3bf76445a6dc986e30c5e78f6.zip
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/xdg_shell.c')
-rw-r--r--sway/desktop/xdg_shell.c7
1 files changed, 4 insertions, 3 deletions
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,
211 user_data); 211 user_data);
212} 212}
213 213
214static void for_each_popup(struct sway_view *view, 214static void for_each_popup_surface(struct sway_view *view,
215 wlr_surface_iterator_func_t iterator, void *user_data) { 215 wlr_surface_iterator_func_t iterator, void *user_data) {
216 if (xdg_shell_view_from_view(view) == NULL) { 216 if (xdg_shell_view_from_view(view) == NULL) {
217 return; 217 return;
218 } 218 }
219 wlr_xdg_surface_for_each_popup(view->wlr_xdg_surface, iterator, user_data); 219 wlr_xdg_surface_for_each_popup_surface(view->wlr_xdg_surface, iterator,
220 user_data);
220} 221}
221 222
222static bool is_transient_for(struct sway_view *child, 223static bool is_transient_for(struct sway_view *child,
@@ -271,7 +272,7 @@ static const struct sway_view_impl view_impl = {
271 .set_resizing = set_resizing, 272 .set_resizing = set_resizing,
272 .wants_floating = wants_floating, 273 .wants_floating = wants_floating,
273 .for_each_surface = for_each_surface, 274 .for_each_surface = for_each_surface,
274 .for_each_popup = for_each_popup, 275 .for_each_popup_surface = for_each_popup_surface,
275 .is_transient_for = is_transient_for, 276 .is_transient_for = is_transient_for,
276 .close = _close, 277 .close = _close,
277 .close_popups = close_popups, 278 .close_popups = close_popups,