Open luleyleo opened 4 years ago
From https://github.com/xi-editor/druid/pull/599
menus: I think we're going to have to draw these ourselves for X11 (???). There may be some other way to do it by requesting the window manager to do it for you, but I didn't dig too deep into it yet. Suggestions welcome here.
Nope, you have to implement menus yourself in X11. Menus are windows with their override-redirect
property set to true
. This means that the window manager completely ignores these windows. Additionally, one usually grabs all input with a GrabPointer
request, but I am not actually completely sure.
(File dialog support #936 falls in a similar category: BYOFD - bring your own file dialog)
Another thing to consider:
Menus should be hidden when there is a global app menu like on mac or gnome-hud, unity, etc... on Linux.
The wayland backend will need menus as well.
the wasm backend also needs a menus solution.
I'm not sure if X11 provides us anything, but as mentioned in #860 we will likely have to implement menus our selves.