-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Implement support for application status indicators (tray icons). #80211
Conversation
Great work 🙂 I suppose this will need the ability to define native menus for the tray, similar to the global menu implementation on macOS. Supporting a list of options to choose from is probably sufficient for an initial implementation.
Could separate middle/right-click/mouse wheel actions be supported on tray icons? I believe this is only possible on Windows and Linux though. For instance, some music players allow middle-clicking their tray icon to play/pause the current track (or using the mouse wheel on the tray icon to change volume). |
Is this pr still going on? |
Currently, it's only detecting clicks, and passing display coordinates to the callback function, which can be used to show Godot menu (if window embedding is disabled) or any other window. But I guess native menu support might be necessary (at least for Linux implementation), but probably as a separate PR, since it might be useful for context menus in general.
It is detecting left/middle/right (but not scroll wheel or other buttons), button index is passed to the same callback. |
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 good to me. Sounds like a nice feature to have for non-game apps, or specific game needs.
Thanks! |
Partially implements godotengine/godot-proposals#2349
Adds support for tray icons and handling click events on it.
Linux (Interface seems to be tied to specific GUI kit menus and external icon resources, so will keep it Windows/macOS only for now.org.freedesktop.StatusNotifierItem
/org.kde.StatusNotifierItem
on D-BUS)