]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Privatize xwayland_surface_from_view()
authorJohan Malm <jgm323@gmail.com>
Fri, 26 Sep 2025 18:15:29 +0000 (19:15 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 29 Sep 2025 19:22:46 +0000 (20:22 +0100)
include/xwayland.h
src/xwayland.c

index b5bd26230c79960360d8cd82ddba727dd1d80112..5fa20e116e9a19ec0b2148548a2c384fcb297494 100644 (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);
index 0604dcafe99df94a0cdd5cf68784b1fab1f0028b..0ab92f0da506792c9b013ebc5076aebc26f6b708 100644 (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)
 {