From 4fd7a8075c41d75af4f57d19d6a2627506cc73cb Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Sat, 21 Sep 2024 15:51:37 +0200 Subject: [PATCH] view: expose view_apply_natural_geometry() Co-authored-by: tokyo4j --- include/view.h | 6 ++++++ src/view.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/view.h b/include/view.h index 9ab4a115..296b4845 100644 --- a/include/view.h +++ b/include/view.h @@ -462,6 +462,12 @@ bool view_compute_centered_position(struct view *view, void view_set_fallback_natural_geometry(struct view *view); void view_store_natural_geometry(struct view *view); +/** + * view_apply_natural_geometry - adjust view->natural_geometry if it doesn't + * intersect with view->output and then apply it + */ +void view_apply_natural_geometry(struct view *view); + /** * view_effective_height - effective height of view, with respect to shaded state * @view: view for which effective height is desired diff --git a/src/view.c b/src/view.c index aeb8e7fe..973b079f 100644 --- a/src/view.c +++ b/src/view.c @@ -1036,7 +1036,7 @@ view_constrain_size_to_that_of_usable_area(struct view *view) view_move_resize(view, box); } -static void +void view_apply_natural_geometry(struct view *view) { assert(view);