Subsequent wt.exe /min to an existing window restores a minimized window #22419

Open
opened 2026-01-31 08:12:46 +00:00 by claunia · 1 comment
Owner

Originally created by @YO4 on GitHub (Oct 18, 2024).

Windows Terminal version

1.22.2702.0

Windows build number

10.0.19045.4894

Other Software

No response

Steps to reproduce

new console creating wt.exe respects /min
start /min wt.exe -w exam -> new wt, single tab, minimized
start /min wt.exe -w exam sp -> new wt, single tab, minimized, two panes

Expected Behavior

start /min wt.exe -w exam && ^
(echo "sleep 1.0" && ping -n 2 localhost) > NUL && ^
start /min wt.exe -w exam sp

-> minimized wt, single tab, two panes

Actual Behavior

start /min wt.exe -w exam && ^
(echo "sleep 1.0" && ping -n 2 localhost) > NUL && ^
start /min wt.exe -w exam sp

-> visible wt, single tab, two panes

Originally created by @YO4 on GitHub (Oct 18, 2024). ### Windows Terminal version 1.22.2702.0 ### Windows build number 10.0.19045.4894 ### Other Software _No response_ ### Steps to reproduce new console creating wt.exe respects ```/min``` ```start /min wt.exe -w exam``` -> new wt, single tab, minimized ```start /min wt.exe -w exam sp``` -> new wt, single tab, minimized, two panes ### Expected Behavior ``` start /min wt.exe -w exam && ^ (echo "sleep 1.0" && ping -n 2 localhost) > NUL && ^ start /min wt.exe -w exam sp ``` -> minimized wt, single tab, two panes ### Actual Behavior ``` start /min wt.exe -w exam && ^ (echo "sleep 1.0" && ping -n 2 localhost) > NUL && ^ start /min wt.exe -w exam sp ``` -> visible wt, single tab, two panes
claunia added the Help WantedIssue-BugProduct-TerminalArea-RemotingArea-Windowing labels 2026-01-31 08:12:46 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Oct 21, 2024):

Hmm. Seems that when the second commandline is tossed at the original window, we summon it, always.

I bet there's a way to not summon it if the commandline had a /min on it.

This is where we're getting the visibility of the request:
3a06826915/src/cascadia/WindowsTerminal/WindowEmperor.cpp (L93-L95)

Good catch here, thanks!


oneliner

start /min wt.exe -w exam && (echo "sleep 1.0" && ping -n 2 localhost) > NUL && start /min wt.exe -w exam sp
@zadjii-msft commented on GitHub (Oct 21, 2024): Hmm. Seems that when the second commandline is tossed at the original window, we summon it, always. I bet there's a way to not summon it if the commandline had a `/min` on it. This is where we're getting the visibility of the request: https://github.com/microsoft/terminal/blob/3a06826915d11ee2124de9b35e42300e1c3f68d5/src/cascadia/WindowsTerminal/WindowEmperor.cpp#L93-L95 Good catch here, thanks! ---- oneliner ``` start /min wt.exe -w exam && (echo "sleep 1.0" && ping -n 2 localhost) > NUL && start /min wt.exe -w exam sp ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22419