-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Move global_menu_*
methods to a separate NativeMenu
class.
#87452
Conversation
4eaef59
to
e4fe4df
Compare
Since we change the API we should mark it as breaking compat, even if we have compatibility methods. But it's a very much welcome change! |
@@ -156,6 +156,7 @@ class DisplayServerX11 : public DisplayServer { | |||
#ifdef SPEECHD_ENABLED | |||
TTS_Linux *tts = nullptr; | |||
#endif | |||
NativeMenu *native_menu = nullptr; |
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.
What's the point of this? Can't we just add the variable and check later, if we ever add proper native menu support?
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.
Some dummy instance should exist, since it can be accessed in any platform. Also, even if we won't have global menu support we might implement native popup menu at some point (can be useful for the tray indicator menus, and I think the only way tray indicators can be done on X11).
The existing methods in DisplayServer should be marked as deprecated, shouldn't they? I don't see this being done in the current PR. |
6678dd3
to
7778d37
Compare
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.
Docs are decent. They could be worded better but that's outside the scope of the PR, since the descriptions are all copy-pasted. What matters more is that the DisplayServer's methods are deprecated properly.
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.
Looks really good to me!
Thanks! |
NativeMenu
class and change API to use RIDs instead of string identifiers.Implements godotengine/godot-proposals#8685