feat: under-cursor window placement

With under-cursor placement, new top-level windows will be centered
under the cursor rather than centered on the active view.
This commit is contained in:
Andrew J. Hesford 2023-12-10 21:00:05 -05:00 committed by Johan Malm
parent ce3c5ab958
commit ef62d47ad1
8 changed files with 51 additions and 8 deletions

View file

@ -678,6 +678,17 @@ view_center(struct view *view, const struct wlr_box *ref)
}
}
void
view_place_initial(struct view *view)
{
if (rc.placement_policy == LAB_PLACE_CURSOR) {
view_move_to_cursor(view);
return;
}
view_center(view, NULL);
}
static void
view_apply_natural_geometry(struct view *view)
{