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
Keyboard focus does not pass on Windows 11. #1206
Comments
Windows 11 behaves just weirdly when I start standard pbrush.exe from mintty: pbrush.exe starts in the background but mintty also loses focus. Wow. |
Where is the source of this ftgamma and can it be compiled with cygwin tools? |
I suppose you mean running the program from a command line. |
Paint Brush (pbrush.exe) comes standard with any Windows version since Windows 95. If you can start that from a mintty command line without any focus surprises on Windows 11 then so be it. Close this as "invalid" or "works for me", or help me find where to file this bug report.. |
There is no pbrush.exe in my Windows 10 installation. |
I start the programs by typing "pbrush.exe" from the command line. I use Git for Windows which is rather minimalist installation of MSYS2 with mintty, bash, vim, and git. I compile FreeType (hence, ftgamma too) using an msbuild alias (without MSVC IDE, mind you). This works perfectly for me and as a rather light weight development environment. Recently, I switched to Windows 11 and my shenanigans with freetype-demos for testing freetype began. Those tools are meant to be used from command line but show windows. |
Yes pbrush and mspaint are probably the same. I guess Windows 11 resurrected the old name. |
It seems to be a problem only on Windows 11 which I don't have so I cannot analyse it. |
Are you on Windows "fast release track"? Can you downgrade and retest? Or just wait until the fix... |
This is regular Windows 11 22H2 on the brand new Dell. The diagnostic shows that explorer.exe interjects twice and steals the focus. Besides mspaint.exe/pbrush.exe, calc.exe reliably starts out of focus for me. The calculator taskbar icon blinks too to indicate that it could not get focus.. Weird... I uninstalled McAfee, which did not help, but left a bunch of Dell software on for now. |
Under |
Please educate me why this is necessary. Or, why cannot Also, |
Which diagnostic actually? Is there any unusual message sending towards mintty that could be handled as a workaround? |
Video posted. |
I have this issue on Windows 11 22H2 (OS Build 22621.1992), on Windows 10 it is working fine. |
Thanks, I am glad that I am not alone. I don't know how calc or mspaint designed. My programs CreateWindow and ShowWindow from a child thread expecting the active keyboard focus there. This may or may not be an important reason why the main thread started by mintty mistakenly keeps the focus. |
I have now tested this with Windows 11 and I do not reproduce the issue. |
I am not sure if it matters, but I guess that you tested a current msys2 installation with bash. I would like to try your setup before squarely blaming Git-for-Windows. |
I run cygwin. I can hardly imagine this should make a difference but who knows. |
Current version is actually 3.4.8.
Just to make sure there is no escape sequence that would explicitly trigger this behaviour. |
By $PS1 do you mean to use Windows PowerShell or PowerShell passed through mintty? Sorry, I'm not well versed in terminals. So far I'm testing using git from Windows PowerShell and here focus behave correctly. |
No, PS1 is a Unix/Linux/Cygwin shell variable to configure the prompt string. No PowerShell involved. |
I filed with msys2-runtime as a point of departure from cygwin. |
Did you cross-check on Windows 11/cygwin? |
Yes, I can confirm that cygwin passes focus. msys2 does not. |
I do not reproduce that. Just installed MSYS2 and Git for Windows on Windows 11 and it works for me. |
Version of windows I have:
|
|
I just updated my Git for Windows (2.39.2 - mintty 3.6.3) and I can reproduce this too, never on Cygwin. So it seems to be a bug with msys2.
(I'm actually on 22H3 despite that the output above might hint at me being 22H2. I downloaded the package and installed manually). |
Those other issues are all related to multiple tabs, so I guess it's something different. |
Confirmed on vanilla msys2/msys2-runtime/issues/173. This bug was introduced then the tab focus work begun. It may be a coincidence. |
Launching ftgamma from mintty opens its window in the background without passing the keyboard focus. Cmd, on the contrary, does it properly and passes the focus. This is observed with Git-for-Windows 2.40.0 based on MSYS2. Ftgamma is a simple Windows program with nothing beyond basic CreateWindow and GDI.
The text was updated successfully, but these errors were encountered: