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/input/cursor.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/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index efd67a76..ad69e7c3 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -53,12 +53,9 @@ static struct wlr_surface *layer_surface_at(struct sway_output *output, | |||
53 | } | 53 | } |
54 | 54 | ||
55 | static bool surface_is_xdg_popup(struct wlr_surface *surface) { | 55 | static bool surface_is_xdg_popup(struct wlr_surface *surface) { |
56 | if (wlr_surface_is_xdg_surface(surface)) { | 56 | struct wlr_xdg_surface *xdg_surface = |
57 | struct wlr_xdg_surface *xdg_surface = | 57 | wlr_xdg_surface_try_from_wlr_surface(surface); |
58 | wlr_xdg_surface_from_wlr_surface(surface); | 58 | return xdg_surface != NULL && xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP; |
59 | return xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP; | ||
60 | } | ||
61 | return false; | ||
62 | } | 59 | } |
63 | 60 | ||
64 | static struct wlr_surface *layer_surface_popup_at(struct sway_output *output, | 61 | static struct wlr_surface *layer_surface_popup_at(struct sway_output *output, |