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

index efdcf3fdbe1c5ec213e45345cae4dc56aa8a9d24..45bf42d8d849f70aa4645166a233d00f5449f08a 100644 (file)
@@ -554,7 +554,6 @@ void view_move_to_output(struct view *view, struct output *output);
 
 void view_move_to_front(struct view *view);
 void view_move_to_back(struct view *view);
-struct view *view_get_root(struct view *view);
 void view_append_children(struct view *view, struct wl_array *children);
 
 /**
index e402b6263c9e565c33018b0fe861fe09dc4f5e6e..aa15ef92b195bfb70efedfd1071c18a72f2d70e1 100644 (file)
@@ -240,6 +240,16 @@ view_matches_query(struct view *view, struct view_query *query)
        return true;
 }
 
+static struct view *
+view_get_root(struct view *view)
+{
+       assert(view);
+       if (view->impl->get_root) {
+               return view->impl->get_root(view);
+       }
+       return view;
+}
+
 static bool
 matches_criteria(struct view *view, enum lab_view_criteria criteria)
 {
@@ -2327,16 +2337,6 @@ view_move_to_back(struct view *view)
        desktop_update_top_layer_visibility(view->server);
 }
 
-struct view *
-view_get_root(struct view *view)
-{
-       assert(view);
-       if (view->impl->get_root) {
-               return view->impl->get_root(view);
-       }
-       return view;
-}
-
 void
 view_append_children(struct view *view, struct wl_array *children)
 {