From 843b874f22b87140a04bfc279852e025967c055e Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Sat, 21 Jan 2023 14:02:27 +0300 Subject: output-layout: improve closest point for no outputs case Without outputs, all points are equally invalid anyway, but for e.g. cursor warping it makes more sense to preserve the original position. --- include/wlr/types/wlr_output_layout.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h index 7d567579..bb73958e 100644 --- a/include/wlr/types/wlr_output_layout.h +++ b/include/wlr/types/wlr_output_layout.h @@ -120,6 +120,7 @@ bool wlr_output_layout_intersects(struct wlr_output_layout *layout, /** * Get the closest point on this layout from the given point from the reference * output. If reference is NULL, gets the closest point from the entire layout. + * If the layout is empty, the result is the given point itself. */ void wlr_output_layout_closest_point(struct wlr_output_layout *layout, struct wlr_output *reference, double lx, double ly, -- cgit v1.2.3