[PR #9118] Add support for the windowingBehavior setting #27439

Closed
opened 2026-01-31 09:21:58 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


Adds support for the windowingBehavior global setting. This setting
controls how mutiple instances of wt behave in the absence of the -w
parameter. This setting has three values:

  • "useNew": (default) Multiple wt invocations (without the -w
    param) always create new windows.
  • "useAnyExisting": When starting a new wt, we'll instead default to
    any existing windows. wt -w -1 will still create new windows.
  • "useExisting": Similar to useAnyExisting, but limits to
    windows on the current desktop.

The IVirtualDesktopManager interface is very limited. Hence why we
have to track the HWNDs manually, and ask if they're on the current
desktop.

Validation Steps Performed

I've been playing with it for a week now.

References #5000
References projects/5
References #8898
Spec'd in #8135
Closes #2227
Closes https://github.com/microsoft/terminal/projects/5#card-51431448
Closes https://github.com/microsoft/terminal/projects/5#card-51431433

**Original Pull Request:** https://github.com/microsoft/terminal/pull/9118 **State:** closed **Merged:** Yes --- Adds support for the `windowingBehavior` global setting. This setting controls how mutiple instances of `wt` behave in the absence of the `-w` parameter. This setting has three values: * `"useNew"`: (default) Multiple `wt` invocations (without the `-w` param) always create new windows. * `"useAnyExisting"`: When starting a new `wt`, we'll instead default to any existing windows. `wt -w -1` will still create new windows. * `"useExisting"`: Similar to `useAnyExisting`, but limits to windows on the current desktop. The IVirtualDesktopManager interface is _very_ limited. Hence why we have to track the HWNDs manually, and ask if they're on the current desktop. ## Validation Steps Performed I've been playing with it for a week now. References #5000 References projects/5 References #8898 Spec'd in #8135 Closes #2227 Closes https://github.com/microsoft/terminal/projects/5#card-51431448 Closes https://github.com/microsoft/terminal/projects/5#card-51431433
claunia added the pull-request label 2026-01-31 09:21:58 +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#27439