aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2023-02-01 20:24:40 +0100
committerLibravatar Kirill Primak <vyivel@eclair.cafe>2023-02-02 14:53:15 +0300
commit9959e6b8dc9b7fbfcccd516e38bc50681f38e275 (patch)
tree8a59226530bc87f2299ee9934f99618ab089af81 /sway/input/cursor.c
parentroot: free non_desktop_outputs list on root_destroy (diff)
downloadsway-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.c9
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
55static bool surface_is_xdg_popup(struct wlr_surface *surface) { 55static 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
64static struct wlr_surface *layer_surface_popup_at(struct sway_output *output, 61static struct wlr_surface *layer_surface_popup_at(struct sway_output *output,