Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2675

On GNOME Wayland the file chooser dialog is not transient to the main window

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • 3.0
    • 2.8.5
    • User Interface
    • GNOME/Wayland

      Often when I open the "Add files/directories" and then go do something else, I come back to find Picard frozen. Well, it's not really frozen, it's just that the file chooser dialog is (correctly) modal but it's not visible, it's behind Picard's main window. The dialog should be also transient to the main window, so that it's always on top of it.

          [PICARD-2675] On GNOME Wayland the file chooser dialog is not transient to the main window

          It does not seem to use this directly. This is all handled in https://github.com/qt/qtbase/blob/0f5fbe369b84c422003e24322abc90a1b09520d2/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp . Works as expected on X11.

          But I just checked, it's fixed in Qt6. So we will have this fixed in Picard 3.

          Philipp Wolfer added a comment - It does not seem to use this directly. This is all handled in https://github.com/qt/qtbase/blob/0f5fbe369b84c422003e24322abc90a1b09520d2/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp . Works as expected on X11. But I just checked, it's fixed in Qt6. So we will have this fixed in Picard 3.

          csaavedra added a comment -

          Is it transient as well as modal? In gtk you can do that with https://docs.gtk.org/gtk4/method.Window.set_transient_for.html .

          csaavedra added a comment - Is it transient as well as modal? In gtk you can do that with https://docs.gtk.org/gtk4/method.Window.set_transient_for.html .

          This is actually deeper and it is unclear whether this is fixable on Picard's side or where the issue actually resides.

          The dialog already is supposed to be application modal. It behaves correctly nearly everywhere except for GNOME / Wayland. It works correctly on GNOME / X11, KDE Plasma (both X11 and Wayland), Windows, macOS, Haiku.

          It also works on GNOME / Wayland for the folder picker if multi-dir selection is enabled in Options > User interface (which trigger the use of the Qt dialog instead of the system dialog).

          It seems to be a very specific issue for the GNOME file picker dialog under Wayland. Not clear whether the core issue is in GNOME or Qt.

          Philipp Wolfer added a comment - This is actually deeper and it is unclear whether this is fixable on Picard's side or where the issue actually resides. The dialog already is supposed to be application modal. It behaves correctly nearly everywhere except for GNOME / Wayland. It works correctly on GNOME / X11, KDE Plasma (both X11 and Wayland), Windows, macOS, Haiku. It also works on GNOME / Wayland for the folder picker if multi-dir selection is enabled in Options > User interface (which trigger the use of the Qt dialog instead of the system dialog). It seems to be a very specific issue for the GNOME file picker dialog under Wayland. Not clear whether the core issue is in GNOME or Qt.

          Thanks for the report. I set this to be targeted for Picard 2.9.1 for now so we don' forget this. It should be an easy fix, though, so we probably will get it into the 2.9 final release. But need to focus on more pressing issues first, and these window focus things have sometimes turned out to be more tricky then expected cross platform.

          Philipp Wolfer added a comment - Thanks for the report. I set this to be targeted for Picard 2.9.1 for now so we don' forget this. It should be an easy fix, though, so we probably will get it into the 2.9 final release. But need to focus on more pressing issues first, and these window focus things have sometimes turned out to be more tricky then expected cross platform.

            Unassigned Unassigned
            csaavedra csaavedra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package
                3.0