Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85574

No focus on window after showing and hiding a modal dialog

    XMLWordPrintable

Details

    • macOS
    • 911c97f2b59945093e9e87130d687c6a2a9423ac (qt/qtbase/dev) 4adea123aca2c22d7d9a6991782a6785aeb5378a (qt/qtbase/6.2) a3489a3bc315387b5f3fa9b88a40f4686c2722f6 (qt/tqtc-qtbase/5.15)

    Description

      For our application we have a modal dialog which is shown while opening a file. When we are done reading the file we hide the dialog and create a new window to show the content of the file.

      This used to work in 5.6.0, but after upgrading to 5.12.6, the newly created window doesn't get the focus any more (it's not the keyWindow in cocoa language). This issue still exists in 5.15.0.

      In attachment, you can find a minimal example. (although it doesn't reproduce the issue always, 9 out of 10 times the problem is visible)
      After some research I found this issue was introduced by https://codereview.qt-project.org/c/qt/qtbase/+/182773
      The currentModalSession() call was performing more checks than just checking whether cocoaModalSessionStack is empty.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dorisverria Doris Verria
            dbutijn David Butijn
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes