aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-08 23:11:13 +0200
committeruser <user@clank>2026-08-08 23:11:13 +0200
commit7b8537a0f9f4d3d27183a3cbf5febc89ca570efd (patch)
tree34858eb5ba0e58bb0996a7dc94ccdfc331a525f7 /default-plugins
parentsl0p: optionally hide the 'Pane #N' placeholder title (diff)
downloadsl0ppij-7b8537a0f9f4d3d27183a3cbf5febc89ca570efd.tar.gz
sl0ppij-7b8537a0f9f4d3d27183a3cbf5febc89ca570efd.tar.xz
sl0ppij-7b8537a0f9f4d3d27183a3cbf5febc89ca570efd.zip
sl0p: rearrange tiled panes by dragging their title bar
Dragging a tiled pane by its title bar and dropping it on another pane swaps the two. Previously the only way to rearrange panes was MOVE mode. The underlying operation already existed: the directional move_pane_* functions are all the same geometry swap, differing only in how they pick the other pane. Extracted as TiledPanes::swap_panes(a, b) so a pane can be swapped with an arbitrary target - the one a drag was dropped onto - which also de-duplicates what was four copies of the same swap. Gesture: the title row EXCLUDING its corners. Corners stay resize handles, so two-axis resize from the top is preserved. Plain top-edge resize is gone and costs nothing: every boundary is shared, so the boundary above a pane is the bottom edge of the pane above and can be dragged from there. A pane at the top of the viewport has the screen edge above it, which was never resizable. Ordering in determine_mouse_action matters three ways: - an in-progress drag is checked FIRST, so motion cannot be reinterpreted as text selection or a resize; - the drag check sits AFTER the double-click check, so the second click of a rename is not swallowed; - and BEFORE the resize branch, which would otherwise claim the title row. Two behaviours had to be preserved deliberately: - Dropping a pane on itself is a no-op, which is what keeps a plain click and a double-click working on the title bar. - Starting a drag focuses the pane. Pressing a title used to start a resize, which focused it as a side effect; without this a plain click on the title would do nothing at all. Stacked panes are excluded from the handle. Their title row is the affordance for focusing/expanding a stack member, and intercepting it broke focus_stacked_pane_under_flexible_pane_with_the_mouse - caught by the suite, not by hand. Baselines held: zellij-server 1440/30 (the 30 are pre-existing).
Diffstat (limited to 'default-plugins')
0 files changed, 0 insertions, 0 deletions