-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
After minimizing, unable to restore window with Alt-Tab #13589
Comments
I have same issue I tried change preview to stable version but it didn't change anything, still happening this bug. |
Yes, it happen on administrator mod I didn't even notice the administrator mod. |
Sorry, I forgot to mention this in my OP, but it was NOT running as admin at the time. And, if it matters, I had about four or five tabs open, with a mix of PS and cmd. |
Alright, I'm deduping here, this will be the master tracking thread.
There's also MSFT:40530963 tracking internally. |
Ah, and there it is. Kinda surprised I didn't think to try this, but yeah, if I minimize this way, it happens every time, with a non-admin window. Doesn't get stuck though, just have to click the taskbar button again. |
@zadjii-msft I narrowed it down to 6b936d9. Commenting out this line fixes the issue:
I tried various ways to debug this further and fix the issue, but failed at it so far. 😥 |
I wonder if it's because that results in a xproc call (sending a message to OpenConsole.exe via a pipe) on the main thread. I wonder if user32 doesn't like us doing that... A resume_background right before that would be an interesting experiment |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Same problem here, windows 10, elevated terminal.
|
Notes (ongoing)
|
// BODGY
//
// GH#13158 - At least temporarily, only allow the PTY to HIDE the terminal
// window. There seem to be many issues with this so far, and the quickest
// route to mitigate them seems to be limiting the interaction here to
// allowing ConPTY to minimize the terminal only. This will still allow
// applications to hide the Terminal via GetConsoleWindow(), but should
// broadly prevent any other impact of this feature.
//
// Should we need to restore this functionality in the future, we should
// only do so with great caution. Oh hey look, that came back to bite 😠 |
@zadjii-msft If you're stuck in this state, you should be able to hover the icon in the taskbar till you get a preview of the window, and then you can right click -> "Restore" the window that way
|
@satyapramodh Your screenshot only shows you hovering over the thumbnail. Did you actually right-click on the thumbnail and select restore from the menu that pops up? Granted, I'm on W10, but that does work for me and others, and it looks like zadjii is on Win11, like you, so it seems it should work for you as well. |
…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
Ok - restoring the window does actually work, but is quite annoying. Shouldn't have updated the terminal at all, the old version was working quite fine. 😅 |
Just to chime in that it happens on Win11 22H2, too The "right-click on the thumbnail and select restore" trick, which may be the only thing I hadn't tried, does get it back, but it's almost impossible to remember not to minimize it from the taskbar, so it keeps happening. |
@zadjii-msft said: No need to wait for preview of the window, for this "hover thing", simply shift-rightclick on the Terminal taskbar button and |
🎉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: |
Those "handy" links are 404. They're missing the ".0" on the end. |
Yup, both links are very "handy". One misses .0 and another points to the store where they still keep older buggy version (200). 😁 |
The Store just got 1.14.2282.0. |
thanks for letting us know |
This is not an option on Windows 10 :( |
it works for Win10, also see the same workaround here #13592 (comment) |
…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
Windows Terminal version
1.14.1962.0
Windows build number
Version 21H2 (OS Build 19044.1826)
Other Software
No response
Steps to reproduce
Open and minimize terminal
Press Alt+Tab to switch back to it
Previous app loses focus, but Terminal doesn't show and remains minimized
NB: When this happened, I tested it multiple times, and it happened every time. I then restored the window and Alt+Tab worked normally, then minimized it and it didn't. However, now it's working fine, so I'm not sure if it was some weird Windows issue (W10 continues, to this day, to be extremely broken WRT focus issues, constantly leaving windows I click on behind other windows and requiring me to click on the foreground, unfocused window then click back in the other one to force it to come to the front). Still, I'm reporting just in case it is actually an issue, and maybe somebody else can reproduce it or will have it happen to them to confirm.
Expected Behavior
No response
Actual Behavior
See above
The text was updated successfully, but these errors were encountered: