-
Notifications
You must be signed in to change notification settings - Fork 9
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
WinUXTheme: Override menu visibility #9
Conversation
This is the WinUXTheme counter-part of gnustep/libs-gui#307. Together with #5 (which got merged, thanks), this fixes menu visibility on Windows. |
@fredkiefer You suggested in gnustep/libs-gui#304 (comment) to use Therefore, I'd suggest we always return Should someone find this to be a performance concern, they could always come back and update this code? Would you be OK with this approach? |
876302d
to
cf86046
Compare
There is a slight misunderstanding here. I suggested to use |
Thanks @fredkiefer. Yes, gave that approach try. Like you suggested (gnustep/libs-gui#304 (comment)), I could:
That still leaves the issue that there are a fair amount of As I understand it, the check for |
@fredkiefer Can you let me know whether there's anything else you need from me on this PR? We've tested this with our application and this fixes the bug we've observed (which was that menus were disabled). We don't see a performance impact and could follow up with a separate PR should there be performance constraints. If I don't hear back from you, I'll go ahead and merge this next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from that, feel free to merge.
The default implementation of `[NSMenu _isVisible]` will use the `_aWindow` and `_bWindow` windows. However, WinUXTheme does not use these windows, and the value of `_isVisible` will be incorrect. Override the value by implementing `proposedVisibility: forMenu`, and always return `TRUE`.
cf86046
to
a202859
Compare
The default implementation of
[NSMenu _isVisible]
will use the_aWindow
and_bWindow
windows. However, WinUXTheme does not use these windows, and the value of_isVisible
will be incorrect. Override the value by implementingproposedVisibility: forMenu
, and always returnTRUE
.