diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-01 20:24:40 +0100 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2023-02-02 14:53:15 +0300 |
commit | 9959e6b8dc9b7fbfcccd516e38bc50681f38e275 (patch) | |
tree | 8a59226530bc87f2299ee9934f99618ab089af81 /sway/tree/container.c | |
parent | root: free non_desktop_outputs list on root_destroy (diff) | |
download | sway-9959e6b8dc9b7fbfcccd516e38bc50681f38e275.tar.gz sway-9959e6b8dc9b7fbfcccd516e38bc50681f38e275.tar.zst sway-9959e6b8dc9b7fbfcccd516e38bc50681f38e275.zip |
Convert to *_try_from_wlr_surface()
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index c60c8f8f..dbe88028 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -387,16 +387,16 @@ struct sway_container *tiling_container_at(struct sway_node *parent, | |||
387 | } | 387 | } |
388 | 388 | ||
389 | static bool surface_is_popup(struct wlr_surface *surface) { | 389 | static bool surface_is_popup(struct wlr_surface *surface) { |
390 | while (!wlr_surface_is_xdg_surface(surface)) { | 390 | while (wlr_xdg_surface_try_from_wlr_surface(surface) == NULL) { |
391 | if (!wlr_surface_is_subsurface(surface)) { | 391 | struct wlr_subsurface *subsurface = |
392 | wlr_subsurface_try_from_wlr_surface(surface); | ||
393 | if (subsurface == NULL) { | ||
392 | return false; | 394 | return false; |
393 | } | 395 | } |
394 | struct wlr_subsurface *subsurface = | ||
395 | wlr_subsurface_from_wlr_surface(surface); | ||
396 | surface = subsurface->parent; | 396 | surface = subsurface->parent; |
397 | } | 397 | } |
398 | struct wlr_xdg_surface *xdg_surface = | 398 | struct wlr_xdg_surface *xdg_surface = |
399 | wlr_xdg_surface_from_wlr_surface(surface); | 399 | wlr_xdg_surface_try_from_wlr_surface(surface); |
400 | return xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP; | 400 | return xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP; |
401 | } | 401 | } |
402 | 402 | ||