After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707128 - Support application menu for wayland clients
Support application menu for wayland clients
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
wayland
Depends on:
Blocks:
 
 
Reported: 2013-08-30 14:10 UTC by Giovanni Campagna
Modified: 2013-09-05 11:52 UTC
See Also:
GNOME target: 3.10
GNOME version: ---


Attachments
wayland: generalize ShellSurface to SurfaceExtension (7.95 KB, patch)
2013-08-30 14:10 UTC, Giovanni Campagna
accepted-commit_now Details | Review
Add a private gtk-mutter protocol (5.11 KB, patch)
2013-08-30 14:10 UTC, Giovanni Campagna
none Details | Review
wayland: add support for window properties on wayland clients (16.92 KB, patch)
2013-08-30 14:10 UTC, Giovanni Campagna
none Details | Review
wayland: support window title and class (2.11 KB, patch)
2013-08-30 14:11 UTC, Giovanni Campagna
none Details | Review
wayland: gtk-shell: implement set dbus properties (1.85 KB, patch)
2013-08-30 14:11 UTC, Giovanni Campagna
none Details | Review
wayland: split headers and distribute structure definitions (21.05 KB, patch)
2013-09-03 09:41 UTC, Giovanni Campagna
accepted-commit_now Details | Review
Move surface state tracking and surface interface to a separate file (61.21 KB, patch)
2013-09-03 09:41 UTC, Giovanni Campagna
accepted-commit_now Details | Review
Add support for GTK application menus (15.25 KB, patch)
2013-09-03 09:42 UTC, Giovanni Campagna
reviewed Details | Review

Description Giovanni Campagna 2013-08-30 14:10:46 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.
Comment 1 Giovanni Campagna 2013-08-30 14:10:49 UTC
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.
Comment 2 Giovanni Campagna 2013-08-30 14:10:52 UTC
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
Comment 3 Giovanni Campagna 2013-08-30 14:10:56 UTC
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)
Comment 4 Giovanni Campagna 2013-08-30 14:11:00 UTC
Created attachment 253617 [details] [review]
wayland: support window title and class

Redirect this to the property system for _NET_WM_NAME and WM_CLASS.
Comment 5 Giovanni Campagna 2013-08-30 14:11:03 UTC
Created attachment 253618 [details] [review]
wayland: gtk-shell: implement set dbus properties

Allow GTK wayland clients to have an application menu.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-08-30 14:24:44 UTC
Review of attachment 253614 [details] [review]:

OK.
Comment 7 Giovanni Campagna 2013-09-03 09:41:09 UTC
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.
Comment 8 Giovanni Campagna 2013-09-03 09:41:17 UTC
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
Comment 9 Giovanni Campagna 2013-09-03 09:42:35 UTC
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.
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-09-03 12:58:21 UTC
Review of attachment 253936 [details] [review]:

Yeah, I've wanted this for a while as well.
Comment 11 Jasper St. Pierre (not reading bugmail) 2013-09-03 12:59:00 UTC
Review of attachment 253935 [details] [review]:

Yeah, this one as well.
Comment 12 Jasper St. Pierre (not reading bugmail) 2013-09-03 13:15:30 UTC
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
Comment 13 Giovanni Campagna 2013-09-05 11:52:34 UTC
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.