view: allow overriding of cursor placement policy

This commit is contained in:
Jens Peters 2024-01-21 23:25:01 +01:00 committed by Johan Malm
parent 8517254705
commit 099929cf46
4 changed files with 5 additions and 5 deletions

View file

@ -728,9 +728,9 @@ view_center(struct view *view, const struct wlr_box *ref)
}
void
view_place_initial(struct view *view)
view_place_initial(struct view *view, bool allow_cursor)
{
if (rc.placement_policy == LAB_PLACE_CURSOR) {
if (allow_cursor && rc.placement_policy == LAB_PLACE_CURSOR) {
view_move_to_cursor(view);
return;
} else if (rc.placement_policy == LAB_PLACE_AUTOMATIC) {