GNOME Bugzilla – Bug 792895
Directory GtkFileChooserButton inside GtkPopover does not show menu in Wayland
Last modified: 2018-03-21 22:33:14 UTC
I am working on an application called HydraPaper using Gtk+ and Python3. I am distributing this application via Flatpak mainly. A user reported an issue that turned out to be happening on Wayland only (here is the issue in my repo: https://github.com/GabMus/HydraPaper/issues/7). The widget configuration I have is a GtkFileChooserButton set to let the user choose a directory, and that inside of a GtkPopover. The user reported the following: > installed HydraPaper both from flatpak and was running it from source. I saw the dropdown, but clicking it did nothing. > I just realized that it works (opens the combo) if I open the GtkPopover [...], change focus to another window, then click the down arrow to open the dropdown, but if clicking the dropdown arrow after opening the popover without switching focus to another window it does not open the filepicker. The user reporting this issue uses Fedora 27 with GNOME Wayland. Running the following `GDK_BACKEND=x11 flatpak run org.gabmus.hydrapaper` results in the button working correctly. I will post a link to this issue in my repo so that the user can interact more directly here if he wants to.
I am the "user" reporting the issue, so we can interact here, I have added myself to the CC list.
Minimal reproducing test case that works outside of flatpak would be very helpful here.
As Robert said > installed HydraPaper both from flatpak **and was running it from source.** So there is a reproducing test case that works outside of flatpak.
(In reply to Gabriele Musco from comment #3) > As Robert said > > > installed HydraPaper both from flatpak **and was running it from source.** > > So there is a reproducing test case that works outside of flatpak. Not exactly "minimal" however. This is useful to ensure that no other part of the app causes this behavior as well as to quickly test potential fixes to this bug.
I will try to come up this weekend with a "minimal" testcase, meaning a simple app with headerbar (including a button opening a GtkPopover, which includes a GtkFileChooserButton).
Created attachment 367593 [details] Simple testcase Attached a simple vala testcase. compile with "valac --pkg gtk+-3.0 filechooser.vala". Steps to reproduce: 1. compile with "valac --pkg gtk+-3.0 filechooser.vala" 2. run the compiled filechooser application 3. click the About toggle button from the headerbar 4. click the filechooser button from the popover appearing expected: filechooser list/dropdown appears what happens: nothing 5. focus another window 6. click the filechooser from the unfocused window ( from the still visible popover), but without focusing the window before what happens: this time filechooser list/dropdown appears, select a folder this time on subsequent clicks of the filechooser it always works, it looks like the magic lies in the default selection of (None)
I wonder if this is related to FileChooserButton refiltering its ComboBox model while the menu is popping up, trampling all over the assumptions the CB makes about its model. There are a couple of ugly hacks to deal with other problems caused by that, but maybe this is further evidence that the whole thing needs to be avoided. See https://bugzilla.gnome.org/show_bug.cgi?id=786835#c12 for that, and I'd appreciate reviews there, as opposed to the silence it's met so far.
The attached test case is working fine for me in weston but not when using mutter.
@Daniel Boles: I tried to understand bug 786835, unfortunately I don't have enough knowledge of gtk+ to comment on that bug. As you said, this might be related, but I can't tell for sure. @Timm Bäder: Does this mean that this is not a gtk+ bug but a mutter bug?
(In reply to Robert Roth from comment #9) > @Timm Bäder: Does this mean that this is not a gtk+ bug but a mutter bug? I'd say so, yes. It's probably due to the modal popover taking a grab and then the combobox menu tries to take another one. I tried reassigning to mutter but the mutter bugtracker is on gitlab now so someone should open a new bug/issue there.
I've copied the recent comments here: https://gitlab.gnome.org/GNOME/mutter/issues/82