Cannot access GTK3 application menus on Wayland
Hello! Even though this feature [has been deprecated since GNOME 3.34](https://wiki.gnome.org/HowDoI/ApplicationMenu), GTK3 applications can still set up an “application menu” which, by default, will be shown as a button on the left of the application's title bar (when using Wayland) or as an extra “Application” menu in the application's menu bar (when using Xorg). Below is a screenshot of `gtk3-demo-application` (which is part of the `gtk-3-examples` package) showing such an application menu, with the button in the title bar; the screenshot was taken on a up-to-date, vanilla Debian 11 (bullseye) running the GNOME desktop environment: ![Screenshot of the application menu of gtk3-demo-application in Debian 11](/uploads/6424c769dbc91fa6f3470ae780f70c70/appmenu_debian-11.png "Screenshot of the application menu of gtk3-demo-application in Debian 11") However, since the switch to Wayland, this application menu is not accessible anymore, as can be seen in the following screenshot of the same application running on Tails 5.8: ![Screenshot of gtk3-demo-application in Tails 5.8](/uploads/bea1bc4cebd4f047bdec5960a725d5a6/appmenu_tails-5.8.png "Screenshot of gtk3-demo-application in Tails 5.8") In order to reproduce: 1. Boot Tails 5.8. 2. Install any application which has an application menu (such as the `gtk3-demo-application` from the `gtk-3-examples` package). 3. Start this application: the application menu is nowhere to be seen and cannot be accessed. 4. Compare with running the same application * on Debian 11: the button for the application menu will appear in the title bar of the application; or * on Tails 5.7: an extra “Application” menu appears in the menu bar, an it contains the application menu. This seems to be due to the fact that the `appmenu` title-bar button has been disabled in Tails since 133e6bf1 (which was a fix for #11270). Indeed, the default value for the `/org/gnome/desktop/wm/preferences/button-layout` setting is `'appmenu:close'`, according to the [corresponding GSettings schema](https://github.com/GNOME/gsettings-desktop-schemas/blob/gnome-3-38/schemas/org.gnome.desktop.wm.preferences.gschema.xml.in#L27-L40), but, in order to add the “minimize” and “maximize” title-bar buttons, 133e6bf1 set this setting to `':minimize,maximize,close'`, which thus disabled the `appmenu` button. This went unnoticed until then, as Tails still used the Xorg backend (which made the application menu appear as the extra “Application” menu in the menu bar). However, with the switch to Wayland, a few GTK3 applications are now missing their application menu. As far as I could find, this doesn't concern officially Tails-supported applications, but it still impacts other applications which can be installed through the official Debian repositories (such as [Gobby](https://packages.debian.org/bullseye/gobby), for instance). From what I could test, it seems that setting `/org/gnome/desktop/wm/preferences/button-layout` to `'appmenu:minimize,maximize,close'` (using either `dconf` or `gsettings`) fixes the problem and restores the application menu button in the title bar. Furthermore, I could check on an up-to-date, freshly installed Debian 11 that using `gnome-tweaks` to enable the “minimize” and “maximize” title-bar buttons would set this setting to the same value. I'll try and submit a simple fix along these lines. Thank you very much! snip
issue