GNOME Bugzilla – Bug 707128
Support application menu for wayland clients
Last modified: 2013-09-05 11:52:34 UTC
We need a private protocol, and we need a way to have client state that is normally stored in the MetaWindow before the window is itself created.
Created attachment 253614 [details] [review] wayland: generalize ShellSurface to SurfaceExtension We want to implement new shells and new extension interfaces for wl_surface, so generalize the book-keeping structures.
Created attachment 253615 [details] [review] Add a private gtk-mutter protocol Add a new interface, gtk_shell, than can be used by gtk to retrieve a surface extension called gtk_surface, which will be used to communicate with mutter all the GTK extensions to EWMH
Created attachment 253616 [details] [review] wayland: add support for window properties on wayland clients For MetaWindows that refer to X clients, instead of asking the X server and eating the error, redirect the window properties to an internal property system. The main advantage of this is that core code for handling window properties is kept together, and that clients can call property setters before the window is mapped (which is especially important for window properties such as wm_class, which are checked by gnome-shell when the window is managed)
Created attachment 253617 [details] [review] wayland: support window title and class Redirect this to the property system for _NET_WM_NAME and WM_CLASS.
Created attachment 253618 [details] [review] wayland: gtk-shell: implement set dbus properties Allow GTK wayland clients to have an application menu.
Review of attachment 253614 [details] [review]: OK.
Created attachment 253935 [details] [review] wayland: split headers and distribute structure definitions Instead of having all structures in one huge headers, move them in the appropriate place, and create one header for surface state.
Created attachment 253936 [details] [review] Move surface state tracking and surface interface to a separate file Move everything surface related from meta-wayland.c to meta-wayland-surface.c
Created attachment 253937 [details] [review] Add support for GTK application menus To do so, we need to be able to set surface state before creating the MetaWindow, so we introduce MetaWaylandSurfaceInitialState as a staging area. The gtk-shell-surface implementation would either write to the initial state, or directly to the window. At the same, implement set_title and set_class too, because it's easy enough. The rebase proved a little difficult, because of the movement, hence I merged title+class and gtk dbus stuff, but really, meta-wayland.c was too long to be maintenable.
Review of attachment 253936 [details] [review]: Yeah, I've wanted this for a while as well.
Review of attachment 253935 [details] [review]: Yeah, this one as well.
Review of attachment 253937 [details] [review]: Wait, this doesn't depend on anything, and in this patch, gtk-shell.xml already exists. Bad rebase, or is it introduced somewhere else? ::: protocol/gtk-shell.xml @@ +22,3 @@ <arg name="app_menu_path" type="string" allow-null="true"/> <arg name="menubar_path" type="string" allow-null="true"/> + <arg name="window_object_path" type="string" allow-null="true"/> can't find the diff here
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.