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

Fix mouse events interaction with ALT/F10 on Windows. #997

Merged
merged 1 commit into from
May 31, 2020

Conversation

xStrom
Copy link
Member

@xStrom xStrom commented May 30, 2020

This issue was reported by @Azorlogh in zulip.

KeyWeeArcticduck-small

When pressing (just once, not holding) the ALT key or F10 key, the window stops receiving mouse events. This can be reproduced with e.g. the timer example.

The reason is that ALT/F10 are system hotkeys that focus the menu. However when there is no menu these hotkeys aren't useful. This PR fixes the issue by suppressing the system handling of these keys when the window has no menu.

I've made a table to help test the changes in this PR.

. The multiwin example The timer example
master Pressing ALT focuses the menu and hovering over the buttons doesn't change their appearance. Pressing ALT stops mouse events so the box won't turn red due to mouse movement.
This PR Pressing ALT focuses the menu and hovering over the buttons doesn't change their appearance. Pressing ALT does nothing.

@xStrom xStrom added shell/win concerns the Windows backend S-needs-review waits for review labels May 30, 2020
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

looks like a reasonable fix!

@xStrom xStrom removed the S-needs-review waits for review label May 31, 2020
@xStrom xStrom merged commit cc014e1 into linebender:master May 31, 2020
@xStrom xStrom deleted the win-alt-mouse branch May 31, 2020 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell/win concerns the Windows backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants