Implementing show_window_menu in Weston

Dima Ryazanov dima at
Wed Nov 9 23:21:30 UTC 2016


I'd like to take a shot at implementing window menus (from xdg-shell) in
Weston - but I don't have a good understanding of how the compositor,
shell, etc. interact, so wanted to ask about it first.

Looks like the entry point for it would be the "show_window_menu" member of
"shell_desktop_api" in desktop-shell/shell.c. Now, this may be a stupid
question, but should the menu be implemented in the compositor or in the
shell client?

I feel like it's the compositor's job, but I can't find any examples of
drawing things or handling input in the compositor itself. If I do it in
the desktop shell, then I could use the existing popup menu code in
clients/window.c - but would have to add a bunch of requests to the desktop
shell protocol just to display the menu and handle the menu items. What's
the correct approach?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wayland-devel mailing list