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

Focus all windows only on mouse clicks #46236

Closed
wants to merge 1 commit into from

Conversation

Riteo
Copy link
Contributor

@Riteo Riteo commented Feb 19, 2021

Fixes #40227.

Apparently all windows would get instantly focused on any input event, making it impossible to move from the OptionButton to its popup without refocusing its parent window and closing it.

I have no idea if that was intended behaviour, if it is, feel free to close this PR.

@Riteo Riteo requested a review from a team as a code owner February 19, 2021 22:58
@Calinou Calinou added this to the 4.0 milestone Feb 19, 2021
This makes OptionButtons usable again, as their window would otherwise get instantly focused by any input event, closing their popup.
@Riteo Riteo force-pushed the fix_window_focusing branch from 9eea99a to 065181a Compare February 21, 2021 01:08
@Riteo Riteo changed the title Focus all windows only on mouse clicks. Focus all windows only on mouse clicks Feb 21, 2021
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce the issues, and do not see any difference in behavior.

@Riteo
Copy link
Contributor Author

Riteo commented Feb 24, 2021

@bruvzg sorry, I should have specified it here too: this fixes an issue that happens only on single window mode.

@bruvzg
Copy link
Member

bruvzg commented Feb 24, 2021

I should have specified it here too: this fixes an issue that happens only on single window mode.

Reproducible in single window mode, but only with some option buttons. And fixed by this PR. But it's not entirely clear why it's happening and why it's affecting only some buttons.

Also, need to be tested to not break input on non embedded windows (it seems to work fine on macOS and Windows).

@Riteo
Copy link
Contributor Author

Riteo commented Feb 24, 2021

But it's not entirely clear why it's happening

According to my tests with gdb every single time I've reproduced this issue (although with only two OptionButtons, one of which is reportedly working, but not for me) the backtrace always pointed to a window focusing function. I can't give my usual very big and detailed messages because I'm not at my computer right now, but just know that according to my tests I'm pretty sure this is the cause.

@Riteo
Copy link
Contributor Author

Riteo commented Jun 7, 2021

Apparently this whole approach isn't the right solution, so I'm closing this PR.

@Riteo Riteo closed this Jun 7, 2021
@Riteo Riteo deleted the fix_window_focusing branch June 7, 2021 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OptionButton item cannot be selected due to immediate closing after mouse released
4 participants