-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Terminal window not receiving focus if started via right mouse button menu in taskbar #8720
Comments
Well that's weird. This was originally #179, which was tracked internally by MSFT:18715554. That bug (internally) is marked fixed, and that it should have shipped in 18934.1000.rs_prerelease.190702-1428. It also looks like this was cherry-picked back to 19H1. Hmmm. |
For the record, I also can't repro this locally, on 10.0.20279.1003. It's entirely possible that code is being actively worked on so it may have regressed in 19041, and then been fixed again by 20279. I've reached out to the dev who fixed the original bug, maybe he's got more insight. |
-Triage on Tracking-External bugs. |
I believe that I am seeing this on:
The terminal opens, the cursor blinks but nothing is actually sent into the shell. further: I THINK this causes another issue. Open a terminal (say Ubuntu) via right-click and start typing. You THINK you are typing into the shell but (I guess it depends on what you type..) you end up with multiple terminal windows being opened. Haven't found anyone else report this, so it may be just 'me' (or my poor search-fu)? |
I can reliably reproduce this issue (Windows Terminal 1.8.1521.0, Windows 10 21H1 19043.1083). This is especially annoying if you right-click to start an ssh session and then, after hitting Enter, you discover that you just entered your top-secret password "somewhere else". Note: This seems suspiciously similar to this msrdp issue. In particular, focus still seems to be in the task bar, since typing "space" or "enter" will open another Windows Terminal instance. |
I was able to reproduce this issue with Windows Terminal and other apps (Firefox Developer Edition & Visual Studio Code) Note: Highlighted category on the menu does not focus the window Windows TerminalFirefox Developer EditionVisual Studio Code |
It seem to happen with a lot of apps, including Google Chrome. Someone mentioned that Edge is causing it, and uninstalling it might fix it; but I am not interested in trying that, since I might need it for testing, and also, Windows Update will probably just forcefully re-install it against my will anyway. OS build: 19044.1415 Edit: just attempted the "uninstall Edge fix", and restarted the system, but that did not solve it for me. The fix is discussed here: https://www.tenforums.com/browsers-email/161873-browser-edge-firefox-loses-focus-when-opening-through-taskbar.html Edit 2: Manually updating to Windows 11 appears to solve the problem, but it totally breaks the taskbar functionality. No drag & drop, and no moving the taskbar to the left of the screen anymore — safe to say, Windows 11 got released on Desktop prematurely. |
You know, is this still happening on Terminal 1.18 and Windows 11/? There's been an enormous amount of changes in both those codebases in the last 2.5 years since this was filed. I'm still fairly confident that this was ultimately a bug in the Taskbar's code. There's also been a tremendous process model refactor for the Terminal since then too. There's also a similar thread (#13388) that seems like it mostly came down to some sort of 3p privilege management (namely, BeyondTrust) that would steal focus. That though shouldn't have started until 1.14 (long after this was filed). There's also (tracked elsewhere) the well-known bug that starting WSLg will steal focus initially. |
|
Hmmm. If I start "Windows PowerShell", then take the focus away from the window (click on desktop) and then start "AlmaLinux9", Alma comes up in a new window which does NOT have focus. |
Of course now we have a much worse issue; the task bar in Windows 11 is
severely nerfed. I seriously had to replace it with a patched / replaced
shell, ExplorerPatcher, just to be able to move the damn thing to the right
of the screen.
…On Tue, Aug 22, 2023 at 2:17 AM transentia ***@***.***> wrote:
Hmmm.
If I start "Windows PowerShell", then take the focus away from the window
(click on desktop) and then start "AlmaLinux9", Alma comes up in a new
window which does NOT have focus.
—
Reply to this email directly, view it on GitHub
<#8720 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHRXUI3OVAPPY2MH3EHCAWTXWP3DBANCNFSM4VZITXTQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
After trying it again, I can confirm transentia's observation: "Command Prompt" and "Powershell" keep focus, the behavior for WSL is... erratic: Yesterday, "Ubuntu" kept focus and my custom ssh profile lost focus, today it's the other way around. |
Okay, thanks for the follow-ups. That all sounds like the WSL focus thing (which itself is pretty erratic in my experience). We'll close this out on our side. I'm honestly not sure where the WSL thread is - I've looked for it for a while now but seemingly can't find the right one. |
update: I'm told it's
|
Environment
Microsoft Windows [Version 10.0.19041.685]
Windows Terminal Version1.4.3243.0
Steps to reproduce
Select a different type of shell from the taskbar icon's context menu (probably named Tasks in English):
Expected behavior
Windows Terminal window appears with the desired type of shell and immediately receives focus, just like when you simply left-click on the taskbar icon.
Actual behavior
The main window appears, but doesn't receive focus.
Thus, everything you type is lost unless you explicitely click into the window once more before starting to type, which is very inconvenient and annoying.
The text was updated successfully, but these errors were encountered: