From eb41c6a3b02f064a8bee539de5fbf4a717200180 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Fri, 26 Sep 2025 19:17:27 +0100 Subject: [PATCH] Privatize view_contains_window_type() --- include/view.h | 1 - src/view.c | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/view.h b/include/view.h index 45bf42d8..0970bb02 100644 --- a/include/view.h +++ b/include/view.h @@ -425,7 +425,6 @@ void view_array_append(struct server *server, struct wl_array *views, enum lab_view_criteria criteria); enum view_wants_focus view_wants_focus(struct view *view); -bool view_contains_window_type(struct view *view, enum lab_window_type window_type); /* If view is NULL, the size of SSD is not considered */ struct wlr_box view_get_edge_snap_box(struct view *view, struct output *output, diff --git a/src/view.c b/src/view.c index aa15ef92..29736b80 100644 --- a/src/view.c +++ b/src/view.c @@ -120,6 +120,16 @@ query_str_match(const char *condition, const char *value) return value && match_glob(condition, value); } +static bool +view_contains_window_type(struct view *view, enum lab_window_type window_type) +{ + assert(view); + if (view->impl->contains_window_type) { + return view->impl->contains_window_type(view, window_type); + } + return false; +} + bool view_matches_query(struct view *view, struct view_query *query) { @@ -403,16 +413,6 @@ view_wants_focus(struct view *view) return VIEW_WANTS_FOCUS_ALWAYS; } -bool -view_contains_window_type(struct view *view, enum lab_window_type window_type) -{ - assert(view); - if (view->impl->contains_window_type) { - return view->impl->contains_window_type(view, window_type); - } - return false; -} - bool view_is_focusable(struct view *view) {