Skip to content
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

Broken window focus #4360

Open
apodtele opened this issue Mar 23, 2023 · 19 comments
Open

Broken window focus #4360

apodtele opened this issue Mar 23, 2023 · 19 comments

Comments

@apodtele
Copy link

When I launch a program, e.g. ftgamma which opens a window, the focus stays on the mintty window. It used to switch to the launched window as it should normally, as it does from cmd. Something broke in 2.40.0.I know that it is not git but I have no idea which component either.

@xiezhipeng-git
Copy link

xiezhipeng-git commented Mar 23, 2023

install git 64 windows on windows11 .then open git bash.This will cause all programs to lose focus on windows11. You can only turn off gitbash.
filename Git-2.40.0-64-bit.exe and Git-2.39.2-64-bit.exe
This is an extremely serious bug. Please repair it as soon as possible
@rimrul
@dscho @bbolli @shiftkey

@rimrul
Copy link
Member

rimrul commented Mar 23, 2023

I can't reproduce this issue.

@xiezhipeng-git
Copy link

xiezhipeng-git commented Mar 23, 2023

I can't reproduce this issue.

from github release download git.then install Git-2.40.0-64-bit.exe and Git-2.39.2-64-bit.exe and Git-2.38.1-64-bit.exe all defualt.then open gitbash.then move other programs (two programs .the second and later.) all programs to lose focus on windows11 lastversion
if install with cmd.it is not has this problem

@dscho
Copy link
Member

dscho commented Mar 23, 2023

I can't reproduce this issue.

Neither can I.

@xiezhipeng-git
Copy link

xiezhipeng-git commented Mar 23, 2023

I can't reproduce this issue.

Neither can I.

I am using a simplified Chinese language pack. Is there any possibility of this being relevant?
And I have install Ubuntu 22.04.2 LTS

@apodtele
Copy link
Author

@rimrul

Please try ftgamma, which is a simple program with nothing beyond CreateWindow and some basic GDI, or you can try something else. I just confirmed that it used to work and grab the keyboard focus under Windows 10. The most recent version under Windows 11 does not.

Notepad is not a good example to try. I re-filed this issue with mintty.

@apodtele
Copy link
Author

@xiezhipeng-git

You issue is irrelevant to my bug report. It is not nice to hijack other bug reports for your needs. It only confuses the developers. File your own issue "This will cause all programs to lose focus on windows11," whatever this means.

My issue is about not passing the focus to a very simple and very fast window executable.

@xiezhipeng-git
Copy link

xiezhipeng-git commented Mar 23, 2023

@xiezhipeng-git

You issue is irrelevant to my bug report. It is not nice to hijack other bug reports for your needs. It only confuses the developers. File your own issue "This will cause all programs to lose focus on windows11," whatever this means.

My issue is about not passing the focus to a very simple and very fast window executable.

Sorry, I couldn't understand your description, even after translation. Just seeing the focus lost. Thought it was the same question as me.And my problem also is not passing the focus.in all can move window program

@apodtele
Copy link
Author

pbrush.exe also starts in the back without focus, but mintty also loses focus while staying raised. This is Windows 11 fully updated on the brand new Dell desktop. I have a feeling that this has something to do with popup/notification features.

@mintty
Copy link

mintty commented Mar 23, 2023

@apodtele
Copy link
Author

To narrow it down, this seems to be a problem on Windows 11 only. To reproduce, see if you can start pbrush.exe (aka mspaint.exe) from the command line normally. For me it starts behind the mintty window with the focus lost completely for either window.

@ga394 ga394 mentioned this issue Mar 23, 2023
@rimrul
Copy link
Member

rimrul commented Mar 24, 2023

pbrush.exe starts in front of the Git Bash Window for me and has the keyboard focus (pressing Ctrl+O opens the expected file open dialog).

@mintty
Copy link

mintty commented Mar 24, 2023

@rimrul, is that on Windows 11?

@rimrul
Copy link
Member

rimrul commented Mar 24, 2023

Yes.

Windows 11 Pro 22H2 Build 22621.1105

@apodtele
Copy link
Author

apodtele commented Aug 1, 2023

Windows 11 calc is another example: mintty holds the input focus while calc blinks pink in the Taskbar.

@mintty
Copy link

mintty commented Aug 1, 2023

Thanks for the calc test case which, again, gets the focus for me on Windows 10.

@apodtele
Copy link
Author

apodtele commented Aug 2, 2023

Perhaps I will post a video.

Recording.2023-08-01.202307.mp4

@tmssngr
Copy link

tmssngr commented Sep 18, 2023

I can reproduce this for calc, fasmw (flat assembler editor) or notepad++.

@mintty
Copy link

mintty commented Sep 18, 2023

I had meanwhile tested this on Windows 11. Running calc from a cygwin shell in mintty transfers focus to calc for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants