-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring back ShowWindow functionality #13248
Comments
Do you have a specific need for this, and can you explain it? That would help us prioritize it... |
Yes, I got a node application using https://github.com/felixhao28/node-systray and https://github.com/hetrodoo/hetrodo-node-hide-console-window-napi which is intended to be hidden to tray by default but which can be un-hidden to allow watching status information. While this works very well with windows console host set as default terminal application, it does not with windows terminal. https://github.com/flybywiresim/simbridge Windows Console Hostsimbridge.windows.console.host.mp4Windows Terminal Previewsimbridge.windows.terminal.preview.mp4 |
Out of curiosity - how do you expect your app to work in a multi-tab, multi-pane scenario? We don't have a lot of folks even attempting this in the wild, so any and all feedback is appreciated
|
I've got a couple others:
|
(I'm not asking to discourage you, I'm asking because these are the kinds of things that Terminal forces us to think about. Since it's an upending of the Console infrastructure that has existed on Windows for a few decades, we have to get these things right.) |
I would expect it to switch the tab to the previously inactive one and focus on it.
I'd expect it to focus on the pane which is tied to the call
It should maximize the Terminal, focus on the tab which is tied to the call and if applicable, focus the specific pane.
Given my previous answers, this would not behave exactly as described, but at least it would provide some basic functionality. In my case, it might be sufficient as an itermediate solution, tho it would probably not work with hiding it to tray in future either.
I'd expect it to ask for confirmation to hide the entire window, same for tabs. I can't really think of a scenario where one would want to temporarily hide one pane as in that case tabs or multiple windows would be more suitable.
Always on top should be affected in the same way as a minimize call does now, as I expect show and hide calls to be user-desired. Else an option to disable this functionality entirely could be considered. The Quake-style window should be hidden when ShowWindow is being set to false, and restored when ShowWindow is being set to true. |
…ing with taskbar Curiously, at least on Windows 10 (and rarely on Windows 11), if you minimize the Terminal by clicking on the taskbar, then alt-tab to try and restore the window, the Taskbar will decide to call `SwitchToWindow` on the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get a `WM_SIZE(SIZE_RESTORED, lParam=0)`. The main window will NOT get a `SwitchToWindow` called. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden. * Refer to #13158 where we disabled this. * Closes #13589 * **TODO** Does this also address #13248 * Tested manually on a Windows 10 VM. * Confirmed that opening tabs while maximized/snapped doesn't restore down. * `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works
…ing with taskbar (#13624) Curiously, at least on Windows 10 (and rarely on Windows 11), if you minimize the Terminal by clicking on the taskbar, then alt-tab to try and restore the window, the Taskbar will decide to call `SwitchToWindow` on the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get a `WM_SIZE(SIZE_RESTORED, lParam=0)`. The main window will NOT get a `SwitchToWindow` called. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden. * Refer to #13158 where we disabled this. * Closes #13589 * Closes #13248 * Tested manually on a Windows 10 VM. * Confirmed that opening tabs while maximized/snapped doesn't restore down. * `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works
…ing with taskbar (#13624) Curiously, at least on Windows 10 (and rarely on Windows 11), if you minimize the Terminal by clicking on the taskbar, then alt-tab to try and restore the window, the Taskbar will decide to call `SwitchToWindow` on the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get a `WM_SIZE(SIZE_RESTORED, lParam=0)`. The main window will NOT get a `SwitchToWindow` called. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden. * Refer to #13158 where we disabled this. * Closes #13589 * Closes #13248 * Tested manually on a Windows 10 VM. * Confirmed that opening tabs while maximized/snapped doesn't restore down. * `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works (cherry picked from commit d1fc112) Service-Card-Id: 84673887 Service-Version: 1.15
🎉This issue was addressed in #13624, which has now been successfully released as Handy links: |
🎉This issue was addressed in #13624, which has now been successfully released as Handy links: |
…ing with taskbar (microsoft#13624) Curiously, at least on Windows 10 (and rarely on Windows 11), if you minimize the Terminal by clicking on the taskbar, then alt-tab to try and restore the window, the Taskbar will decide to call `SwitchToWindow` on the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get a `WM_SIZE(SIZE_RESTORED, lParam=0)`. The main window will NOT get a `SwitchToWindow` called. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden. * Refer to microsoft#13158 where we disabled this. * Closes microsoft#13589 * Closes microsoft#13248 * Tested manually on a Windows 10 VM. * Confirmed that opening tabs while maximized/snapped doesn't restore down. * `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works (cherry picked from commit d1fc112) Service-Card-Id: 84673887 Service-Version: 1.15 (cherry picked from commit b670800) Service-Card-Id: 84673886 Service-Version: 1.14
Description of the new feature/enhancement
Bring back ShowWindow functionality as after #13164 only hiding the window works.
Proposed technical implementation details (optional)
The text was updated successfully, but these errors were encountered: