mirror of
https://github.com/labwc/labwc.git
synced 2026-06-13 14:33:18 -04:00
Merge 922c4bba2b into f4b9bdab65
This commit is contained in:
commit
bf8a9e3857
4 changed files with 5 additions and 5 deletions
|
|
@ -579,7 +579,7 @@ void view_toggle_fullscreen(struct view *view);
|
|||
*/
|
||||
void view_save_last_placement(struct view *view);
|
||||
/* Restores and adjusts the view's position from the view->last_placement */
|
||||
void view_adjust_for_layout_change(struct view *view);
|
||||
void view_adjust_for_layout_change(struct view *view, bool force);
|
||||
|
||||
void view_move_to_edge(struct view *view, enum lab_edge direction, bool snap_to_windows);
|
||||
void view_grow_to_edge(struct view *view, enum lab_edge direction);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ desktop_arrange_all_views(void)
|
|||
struct view *view;
|
||||
wl_list_for_each(view, &server.views, link) {
|
||||
if (!wlr_box_empty(&view->pending)) {
|
||||
view_adjust_for_layout_change(view);
|
||||
view_adjust_for_layout_change(view, /* force */ false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1754,10 +1754,10 @@ clear_last_placement(struct view *view)
|
|||
}
|
||||
|
||||
void
|
||||
view_adjust_for_layout_change(struct view *view)
|
||||
view_adjust_for_layout_change(struct view *view, bool force)
|
||||
{
|
||||
assert(view);
|
||||
if (wlr_box_empty(&view->last_placement.layout_geo)) {
|
||||
if (wlr_box_empty(&view->last_placement.layout_geo) && !force) {
|
||||
/* Not using assert() just in case */
|
||||
wlr_log(WLR_ERROR, "view has no last placement info");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ handle_map(struct wl_listener *listener, void *data)
|
|||
* layout changes that could have occurred between
|
||||
* ensure_initial_geometry_and_output() and map.
|
||||
*/
|
||||
view_adjust_for_layout_change(view);
|
||||
view_adjust_for_layout_change(view, /* force */ true);
|
||||
/*
|
||||
* When mapping the view for the first time, visual
|
||||
* artifacts are reduced if we display it immediately at
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue