From: Jens Peters Date: Sat, 21 Sep 2024 13:51:37 +0000 (+0200) Subject: view: expose view_apply_natural_geometry() X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=4fd7a8075c41d75af4f57d19d6a2627506cc73cb;p=proto%2Flabwc.git view: expose view_apply_natural_geometry() Co-authored-by: tokyo4j --- 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);