mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
interactive: Refactor natural_geometry/tiled state handling
Currently, snapping to a screen edge and then snapping to maximize results in both the natural_geometry and tiled state of the view getting messed up. After unmaximize, the view ends up in a weird state (tiled location but natural/untiled size). There are also a couple of sketchy things going on in the code: - interactive_begin() pokes its own values into view->natural_geometry to force view_maximize() to set a particular geometry. - interactive_end() "fixes" view->natural_geometry after calling view_maximize() to save the original geometry from the start of the interactive move/resize. To fix all this: - Adjust/expand the API of view.c so that the interactive.c can avoid this "back door" of overwriting view->natural_geometry directly. - Save the natural geometry and the tiled state of the view in interactive_begin() when starting to move the view. When done, interactive_end() will update the tiled state if appropriate but *not* overwrite the natural geometry.
This commit is contained in:
parent
636b38561b
commit
9021020f6e
7 changed files with 192 additions and 120 deletions
|
|
@ -848,7 +848,7 @@ cursor_button_release(struct seat *seat, struct wlr_pointer_button_event *event)
|
|||
|
||||
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
|
||||
/* Exit interactive move/resize mode */
|
||||
interactive_end(server->grabbed_view);
|
||||
interactive_finish(server->grabbed_view);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue