mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
xdg-shell: convert to try_from
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
This commit is contained in:
parent
03412e9aab
commit
711a1a3ed4
6 changed files with 33 additions and 55 deletions
|
|
@ -480,19 +480,13 @@ struct wlr_surface *wlr_xdg_surface_popup_surface_at(
|
|||
struct wlr_xdg_surface *surface, double sx, double sy,
|
||||
double *sub_x, double *sub_y);
|
||||
|
||||
/**
|
||||
* Returns true if the surface has the xdg surface role.
|
||||
*/
|
||||
bool wlr_surface_is_xdg_surface(struct wlr_surface *surface);
|
||||
|
||||
/**
|
||||
* Get a struct wlr_xdg_surface from a struct wlr_surface.
|
||||
* Asserts that the surface has the xdg surface role.
|
||||
* May return NULL even if the surface has the xdg surface role if the
|
||||
* corresponding xdg surface has been destroyed.
|
||||
*
|
||||
* Returns NULL if the surface doesn't have the xdg_surface role or
|
||||
* if the xdg_surface has been destroyed.
|
||||
*/
|
||||
struct wlr_xdg_surface *wlr_xdg_surface_from_wlr_surface(
|
||||
struct wlr_surface *surface);
|
||||
struct wlr_xdg_surface *wlr_xdg_surface_try_from_wlr_surface(struct wlr_surface *surface);
|
||||
|
||||
/**
|
||||
* Get the surface geometry.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue