Skip to content

Conversation

FloofyPeachy
Copy link

@FloofyPeachy FloofyPeachy commented Sep 19, 2025

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, or xdg_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

@FloofyPeachy FloofyPeachy requested review from a team as code owners September 19, 2025 09:46
@AThousandShips AThousandShips changed the title Added support for the system window menu popup Add support for system window menu popup Sep 19, 2025
@AThousandShips AThousandShips added this to the 4.x milestone Sep 19, 2025
@AThousandShips

This comment was marked as resolved.

Implemented showing the titlebar menu

Added required methods in the ClassDB

Wayland support for show_titlebar_menu

Implemented showing the titlebar menu under Wayland
@FloofyPeachy FloofyPeachy force-pushed the show-menu-displayserver branch from 33607da to 3d3c006 Compare September 19, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for invoking the OS window popup menu
3 participants