[PR #16895] Add support for resizing panes with mouse #31037

Open
opened 2026-01-31 09:44:42 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16895

State: open
Merged: No


Summary of the Pull Request

Adds support for resizing panes by dragging with the mouse.

ManipulationDelta is the WinUI event we're using to determine if a pane border was dragged. ManipulationDelta is kinda a wacky event in WinUI, but so is the entire Pane structure we've built. The important things to know about this PR are:

  • Leaf panes are the only panes that actually have a Border.
  • We only handle ManipulationDelta events directly on leaf panes.
  • Parent panes, however, are the only ones that actually control the position of a split. So we use a special ManipulationRequested event to bubble the request from the leaf pane that was clicked on, to the ancestor pane that actually owns the border on the side of the pane.
  • We can't just add a ManipulationDelta event handler on the border itself - the event covers all drags in the entire bounding rect of the border. So we've got to use additional logic to make sure that drags originated on a border, not just on content within the border.

Closes #992

other PRs


todo from 06-04 bugbash

  • Pane resize does not snap to cell
  • Pane resize causes a crash(? not sure if this is from that build in general, or specific to this PR)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/16895 **State:** open **Merged:** No --- ## Summary of the Pull Request Adds support for resizing panes by dragging with the mouse. `ManipulationDelta` is the WinUI event we're using to determine if a pane border was dragged. `ManipulationDelta` is kinda a wacky event in WinUI, but so is the entire `Pane` structure we've built. The important things to know about this PR are: * Leaf panes are the only panes that actually have a `Border`. * We only handle `ManipulationDelta` events directly on leaf panes. * Parent panes, however, are the only ones that actually control the position of a split. So we use a special `ManipulationRequested` event to bubble the request from the leaf pane that was clicked on, to the ancestor pane that actually owns the border on the side of the pane. * We can't just add a `ManipulationDelta` event handler on the border itself - the event covers all drags in the entire bounding rect of the border. So we've got to use additional logic to make sure that drags originated on a border, not just on content within the border. Closes #992 ## other PRs * #16170 * #16171 * #16172 * #16895 <-- you are here * #16914 ---- todo from 06-04 bugbash * [ ] Pane resize does not snap to cell * [ ] Pane resize causes a crash(? not sure if this is from that build in general, or specific to this PR)
claunia added the pull-request label 2026-01-31 09:44:42 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31037