output: Add output_nearest_to()

Reimplement output_from_cursor_coords() as output_nearest_to_cursor().
This commit is contained in:
John Lindgren 2023-02-03 15:22:54 -05:00 committed by Consolatis
parent 84294c9cfb
commit 976136299d
5 changed files with 25 additions and 22 deletions

View file

@ -440,8 +440,7 @@ set_initial_position(struct view *view,
/* Just make sure the view is on-screen */
view_adjust_for_layout_change(view);
} else {
view_center(view, output_from_cursor_coords(view->server),
NULL);
view_center(view, output_nearest_to_cursor(view->server), NULL);
}
}