feat(wm): the neighbours follow the drag

While the user drags an edge of a tiled window, the tiles next to it follow, and
not only once it is let go.

KWin reports every step of a resize with the frame the pointer asks for. The
bridge passes one on every 16 ms at most, the newest, with a single-shot timer
for the last one of a burst, and the window manager keeps at most one step
waiting, since each says where the edge is now. ResizeStart keeps the layout as
it is when the user takes hold (LiveResize), and every step and the end are
worked out from it: a drag ends the same with its steps as without them, and one
that is taken back puts the neighbors back. The dragged window is the user's
until they let go, so Window::set_position leaves the windows being resized
alone, whatever tiles the workspace.

vm-live-resize holds the edge part way and all the way and reads the neighbors
while the button is down. With the neighbors following, KWin's window snapping
pulled a dragged edge 9 pixels past the pointer in vm-drag-resize, since the gap
between two tiles is inside its default zone, so both drag suites turn snapping
off; PLATFORM.md and drag-resize.md say so. Like vm-drag-resize, it drags
against the daemon the module starts with the session, and reads the drags that
daemon has handled from the unit's journal.

vm-live-resize waits for the panel's room (Kde.wait_for_panel_room) before it
opens the windows. The daemon learned of the room while the pointer was down in
a first case that had begun without it, and the retile that came with it moved
the neighbor, not the pointer.
This commit is contained in:
LGUG2Z committed 2026-10-28 07:20:57 -07:00
1 parent af560f47d7
commit c03e5d2970
21 files changed
+1026 -32

No files matched your search

+8 -6
View File
@@ -45,12 +45,14 @@ the tile is smaller than that already: a resize that would is carried out as far
Take hold of an edge or a corner of a tiled window with the pointer, drag it, and let go: the
edges of the window's tile move by as much as the pointer moved them, the neighbors give up or
take the room, and the window is put on its tile. A corner moves two edges. The rules are those
of `resize-edge`: an edge with no tile on the other side of it does not move, and the window goes
back to its tile; no tile is made smaller than a tenth of the work area, so a long drag goes as
far as it can. The window of a stack has the tile of the stack. A floating window and the window
of a monocle have no tile: they are left as the user made them. [Resizing a tile by dragging its
edge](../drag-resize.md) says how a drag is measured.
take the room, and the window is put on its tile. The neighbors follow the edge while it is
dragged, and go back if it is dragged back to where it began, without the animation of
[`animation`](animation.md): the effect leaves a user's resize alone. A corner moves two edges. The rules
are those of `resize-edge`: an edge with no tile on the other side of it does not move, and the
window goes back to its tile; no tile is made smaller than a tenth of the work area, so a long
drag goes as far as it can. The window of a stack has the tile of the stack. A floating window and
the window of a monocle have no tile: they are left as the user made them. [Resizing a tile by
dragging its edge](../drag-resize.md) says how a drag is measured.
## Back to the layout