mirror of
https://github.com/labwc/labwc.git
synced 2026-03-19 05:33:53 -04:00
view: rework saving/restoring geometry across layout changes
After several iterations, this is basically a complete re-work. The old implementation was difficult to follow and sometimes failed to restore fullscreen/maximized/tiled geometry correctly, since it was based entirely on natural (floating) geometry. The new implementation: - always saves the actual (pending) geometry at first layout change - explicitly tracks whether a view has moved between outputs - consolidates invalidating the saved geometry into one place, rather than having lots of invalidate() calls sprinkled everywhere
This commit is contained in:
parent
c1c156ef39
commit
20929c0484
3 changed files with 55 additions and 131 deletions
|
|
@ -92,9 +92,6 @@ interactive_begin(struct view *view, enum input_mode mode, enum lab_edge edges)
|
|||
|
||||
/* Store natural geometry at start of move */
|
||||
view_store_natural_geometry(view);
|
||||
if (view_is_floating(view)) {
|
||||
view_invalidate_last_layout_geometry(view);
|
||||
}
|
||||
|
||||
/* Prevent region snapping when just moving via A-Left mousebind */
|
||||
seat->region_prevent_snap = keyboard_get_all_modifiers(seat);
|
||||
|
|
@ -111,12 +108,6 @@ interactive_begin(struct view *view, enum input_mode mode, enum lab_edge edges)
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Resizing overrides any attempt to restore window
|
||||
* geometries altered by layout changes.
|
||||
*/
|
||||
view_invalidate_last_layout_geometry(view);
|
||||
|
||||
/*
|
||||
* If tiled or maximized in only one direction, reset
|
||||
* tiled state and un-maximize the relevant axes, but
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue