Add support for system window menu popup #110688
Open
+79
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The system window popup menu has been implemented. For applications with custom title bars this can be especially useful, to act similarly to real system bars.
To use, simply execute
DisplayServer.window_show_system_menu()
.On Windows, it uses
GetSystemMenu
. On Linux on Wayland, it uses libdecor's implementation, orxdg_toplevel
's. On X11 it sends a_GTK_SHOW_WINDOW_MENU
event, although no GTK is used under the hood.(excuse the train wallpapers)
Linux (Wayland)
Screencast_20250919_022019.webm
Linux (X11 via XWayland)
Screencast_20250919_021843.webm
Windows
2025-09-19_02-36-16.mp4