mirror of
https://github.com/labwc/labwc.git
synced 2025-11-01 22:58:47 -04:00
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:
parent
ce3c5ab958
commit
ef62d47ad1
8 changed files with 51 additions and 8 deletions
11
src/view.c
11
src/view.c
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue