mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
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.
This commit is contained in:
parent
377668aaf6
commit
843b874f22
2 changed files with 2 additions and 1 deletions
|
|
@ -302,7 +302,7 @@ void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
|
|||
return;
|
||||
}
|
||||
|
||||
double min_x = 0, min_y = 0, min_distance = DBL_MAX;
|
||||
double min_x = lx, min_y = ly, min_distance = DBL_MAX;
|
||||
struct wlr_output_layout_output *l_output;
|
||||
wl_list_for_each(l_output, &layout->outputs, link) {
|
||||
if (reference != NULL && reference != l_output->output) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue