mirror of
https://github.com/swaywm/sway.git
synced 2026-04-18 06:46:56 -04:00
Convert to *_try_from_wlr_surface()
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
This commit is contained in:
parent
b31e97e55d
commit
9959e6b8dc
5 changed files with 23 additions and 40 deletions
|
|
@ -53,12 +53,9 @@ static struct wlr_surface *layer_surface_at(struct sway_output *output,
|
|||
}
|
||||
|
||||
static bool surface_is_xdg_popup(struct wlr_surface *surface) {
|
||||
if (wlr_surface_is_xdg_surface(surface)) {
|
||||
struct wlr_xdg_surface *xdg_surface =
|
||||
wlr_xdg_surface_from_wlr_surface(surface);
|
||||
return xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP;
|
||||
}
|
||||
return false;
|
||||
struct wlr_xdg_surface *xdg_surface =
|
||||
wlr_xdg_surface_try_from_wlr_surface(surface);
|
||||
return xdg_surface != NULL && xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP;
|
||||
}
|
||||
|
||||
static struct wlr_surface *layer_surface_popup_at(struct sway_output *output,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue