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 792895 - Directory GtkFileChooserButton inside GtkPopover does not show menu in Wayland
Directory GtkFileChooserButton inside GtkPopover does not show menu in Wayland
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
https://gitlab.gnome.org/GNOME/mutter...
Depends on:
Blocks:
 
 
Reported: 2018-01-25 12:13 UTC by Gabriele Musco
Modified: 2018-03-21 22:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple testcase (1.39 KB, text/plain)
2018-01-29 19:02 UTC, Robert Roth
Details

Description Gabriele Musco 2018-01-25 12:13:26 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.
Comment 1 Robert Roth 2018-01-25 12:16:20 UTC
I am the "user" reporting the issue, so we can interact here, I have added myself to the CC list.
Comment 2 Timm Bäder 2018-01-25 18:06:59 UTC
Minimal reproducing test case that works outside of flatpak would be very helpful here.
Comment 3 Gabriele Musco 2018-01-25 19:04:48 UTC
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.
Comment 4 Timm Bäder 2018-01-25 19:30:14 UTC
(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.
Comment 5 Robert Roth 2018-01-25 23:16:59 UTC
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).
Comment 6 Robert Roth 2018-01-29 19:02:14 UTC
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)
Comment 7 Daniel Boles 2018-01-29 19:18:12 UTC
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.
Comment 8 Timm Bäder 2018-02-05 10:01:09 UTC
The attached test case is working fine for me in weston but not when using mutter.
Comment 9 Robert Roth 2018-02-05 10:26:16 UTC
@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?
Comment 10 Timm Bäder 2018-02-05 10:30:51 UTC
(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.
Comment 11 Daniel Boles 2018-03-21 22:33:14 UTC
I've copied the recent comments here:
https://gitlab.gnome.org/GNOME/mutter/issues/82