mirror of
https://github.com/labwc/labwc.git
synced 2026-04-26 06:47:19 -04:00
interactive: allow resize on fully maximized views
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Modifier+right-drag resize was silently ignored on fully maximized views because of an early-return guard in interactive_begin(). The axis-specific un-maximization logic introduced in #3043 already handles partial maximization correctly; extend that to the VIEW_AXIS_BOTH case so both axes are cleared while keeping the current geometry as the starting point of the resize. Move already permits dragging maximized views, so this also removes an asymmetry between the move and resize paths. Fixes: #3524
This commit is contained in:
parent
5c582bda09
commit
5f668a82ee
1 changed files with 8 additions and 7 deletions
|
|
@ -123,11 +123,12 @@ interactive_begin(struct view *view, enum input_mode mode, enum lab_edge edges)
|
||||||
cursor_shape = LAB_CURSOR_GRAB;
|
cursor_shape = LAB_CURSOR_GRAB;
|
||||||
break;
|
break;
|
||||||
case LAB_INPUT_STATE_RESIZE: {
|
case LAB_INPUT_STATE_RESIZE: {
|
||||||
if (view->shaded || view->fullscreen ||
|
if (view->shaded || view->fullscreen) {
|
||||||
view->maximized == VIEW_AXIS_BOTH) {
|
|
||||||
/*
|
/*
|
||||||
* We don't allow resizing while shaded,
|
* We don't allow resizing while shaded or fullscreen.
|
||||||
* fullscreen or maximized in both directions.
|
* Maximized views are handled below by un-maximizing
|
||||||
|
* the axes being resized while keeping the current
|
||||||
|
* geometry as the starting point.
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -141,9 +142,9 @@ interactive_begin(struct view *view, enum input_mode mode, enum lab_edge edges)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If tiled or maximized in only one direction, reset
|
* If tiled or maximized, reset tiled state and un-maximize
|
||||||
* tiled state and un-maximize the relevant axes, but
|
* the axes that are being resized, but keep the same
|
||||||
* keep the same geometry as the starting point.
|
* geometry as the starting point.
|
||||||
*/
|
*/
|
||||||
enum view_axis maximized = view->maximized;
|
enum view_axis maximized = view->maximized;
|
||||||
if (server.resize_edges & LAB_EDGES_LEFT_RIGHT) {
|
if (server.resize_edges & LAB_EDGES_LEFT_RIGHT) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue