mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
view: restore initially-maximized window position after unplug/plug
`update_last_layout_geometry()` stores `view->natural_geometry` in `view->last_layout_geometry`, but it's empty for initially-maximized windows, so their positions were not restored after outputs are unplugged and plugged (also when VT switching in wlroots 0.19.0). This commit sets the fallback natural geometry (at the center of the output) so that initially-maximized windows reappears in the same output.
This commit is contained in:
parent
e6b5d91b63
commit
72a5df16ea
1 changed files with 5 additions and 1 deletions
|
|
@ -1806,8 +1806,12 @@ update_last_layout_geometry(struct view *view)
|
|||
|
||||
if (view_is_floating(view)) {
|
||||
view->last_layout_geometry = view->pending;
|
||||
} else {
|
||||
} else if (!wlr_box_empty(&view->natural_geometry)) {
|
||||
view->last_layout_geometry = view->natural_geometry;
|
||||
} else {
|
||||
/* e.g. initially-maximized window */
|
||||
view->last_layout_geometry =
|
||||
view_get_fallback_natural_geometry(view);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue