linebender / druid

A data-first Rust-native UI design toolkit.
https://linebender.org/druid/
Apache License 2.0
9.54k stars 569 forks source link

X11 shell lacks menu support. #933

Open luleyleo opened 4 years ago

luleyleo commented 4 years ago

I'm not sure if X11 provides us anything, but as mentioned in #860 we will likely have to implement menus our selves.

psychon commented 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)

fxdave commented 3 years ago

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.

richard-uk1 commented 3 years ago

The wayland backend will need menus as well.

cmyr commented 3 years ago

the wasm backend also needs a menus solution.