From: Johan Malm Date: Fri, 26 Sep 2025 18:15:29 +0000 (+0100) Subject: Privatize xwayland_surface_from_view() X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=950c634cea8251b4f4d6649281ee0481a3eece48;p=proto%2Flabwc.git Privatize xwayland_surface_from_view() --- diff --git a/include/xwayland.h b/include/xwayland.h index b5bd2623..5fa20e11 100644 --- a/include/xwayland.h +++ b/include/xwayland.h @@ -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); diff --git a/src/xwayland.c b/src/xwayland.c index 0604dcaf..0ab92f0d 100644 --- a/src/xwayland.c +++ b/src/xwayland.c @@ -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) {