* view_place_initial - apply initial placement strategy to view
* @view: view to be placed
*/
-void view_place_initial(struct view *view);
+void view_place_initial(struct view *view, bool allow_cursor);
void view_constrain_size_to_that_of_usable_area(struct view *view);
void view_restore_to(struct view *view, struct wlr_box geometry);
}
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) {
}
/* All other views are placed according to a configured strategy */
- view_place_initial(view);
+ view_place_initial(view, /* allow_cursor */ true);
}
static const char *
view_constrain_size_to_that_of_usable_area(view);
if (view_is_floating(view)) {
- view_place_initial(view);
+ view_place_initial(view, /* allow_cursor */ true);
} else {
/*
* View is maximized/fullscreen. Center the