Privatize xwayland_surface_from_view()

This commit is contained in:
Johan Malm 2025-09-26 19:15:29 +01:00 committed by Johan Malm
parent 286005e121
commit 950c634cea
2 changed files with 15 additions and 17 deletions

View file

@ -65,8 +65,6 @@ void xwayland_unmanaged_create(struct server *server,
void xwayland_view_create(struct server *server,
struct wlr_xwayland_surface *xsurface, bool mapped);
struct wlr_xwayland_surface *xwayland_surface_from_view(struct view *view);
void xwayland_server_init(struct server *server,
struct wlr_compositor *compositor);
void xwayland_server_finish(struct server *server);

View file

@ -40,6 +40,21 @@ static xcb_atom_t atoms[ATOM_COUNT] = {0};
static void xwayland_view_unmap(struct view *view, bool client_request);
static struct xwayland_view *
xwayland_view_from_view(struct view *view)
{
assert(view->type == LAB_XWAYLAND_VIEW);
return (struct xwayland_view *)view;
}
static struct wlr_xwayland_surface *
xwayland_surface_from_view(struct view *view)
{
struct xwayland_view *xwayland_view = xwayland_view_from_view(view);
assert(xwayland_view->xwayland_surface);
return xwayland_view->xwayland_surface;
}
static bool
xwayland_view_contains_window_type(struct view *view,
enum lab_window_type window_type)
@ -186,21 +201,6 @@ top_parent_of(struct view *view)
return s;
}
static struct xwayland_view *
xwayland_view_from_view(struct view *view)
{
assert(view->type == LAB_XWAYLAND_VIEW);
return (struct xwayland_view *)view;
}
struct wlr_xwayland_surface *
xwayland_surface_from_view(struct view *view)
{
struct xwayland_view *xwayland_view = xwayland_view_from_view(view);
assert(xwayland_view->xwayland_surface);
return xwayland_view->xwayland_surface;
}
static void
ensure_initial_geometry_and_output(struct view *view)
{