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

17207: Alt+F4 to close a dialog should not activate the top menu #26147

Conversation

krasko78
Copy link
Contributor

Resolves: #17207

The main menu is activated on the release of the Alt key when m_needActivateHighlight is true. m_needActivateHighlight should become true only when the Alt key is previously pressed alone and not in any other case. On the other hand, it should be set to false as soon as a menu is highlighted, navigation started, another key is pressed and when the menu is closed.

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@krasko78
Copy link
Contributor Author

krasko78 commented Feb 3, 2025

@Eism @DmitryArefiev @zacjansheski I think this one can be tested?

@DmitryArefiev
Copy link
Contributor

Tested #17207 on Win10, LinuxUbuntu24.04.1 LTS.

All seems to be fine. I only found that Edit menu button is slightly highlighted but it's minor and probably not related to the current PR

bandicam.2025-02-05.19-28-29-247.mp4

@krasko78 Can you rebase please? (I want to recheck it with latest changes)

@krasko78 krasko78 force-pushed the 17207-AltF4-OnOpenDialog-ActivatesTopMenu branch from 8c0e09e to e3e61e5 Compare February 5, 2025 19:37
@krasko78
Copy link
Contributor Author

krasko78 commented Feb 5, 2025

@DmitryArefiev Rebased. I've seen this issue with the Edit menu highlight in other areas of MuseScore, e.g. in the official 4.4.4 release open the Parts dialog and press ESC. Or open the properties of a palette cell and press ESC (highlights the File menu instead). Might be a Qt bug.

@DmitryArefiev
Copy link
Contributor

@krasko78 Got it! Thank you!

Tested #17207 on Win10, LinuxUbuntu24.04.1 LTS - FIXED

@DmitryArefiev DmitryArefiev merged commit c84416e into musescore:master Feb 6, 2025
11 checks passed
@krasko78 krasko78 deleted the 17207-AltF4-OnOpenDialog-ActivatesTopMenu branch February 6, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When triggering Alt+F4 to close dialog window, it activates File/Top menu navigating (Windows)
3 participants