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

QWidget::focusInEvent and QWidget::focusOutEvent don't get called when application loses key focus to OS X Notifications text input

    XMLWordPrintable

Details

    • macOS
    • 5ec108eb7a41b818dc49752e7a5c1d3c4f7f3877

    Description

      Background:
      On OS X 10.9 and later, when a Messages notification arrives, the notification patch has a 'Reply' button that allows you to reply right in the notification patch. The current application remains active (windowDidResignMain: is NOT called) but the key window loses key (windowDidResignKey: IS called) because the notification patch has a text input to type your response in. A native Cocoa application correctly notifies it's key NSWindow with windowDidResignKey: and calls windowDidBecomeKey: when the Messages patch is dismissed.

      Description:
      When the Messages notification patch 'Reply' button is clicked and the notification text input becomes key, a Qt 5.4.1 application QMainWindow that has had setFocusPolicy(Qt::StrongFocus) set on it will NOT have focusOutEvent() called on it.

      Attachments

        1. qtbug49925_osxfocusbug.zip
          3 kB
          Ted Middleton
        2. qtbug49925_osxfocusbug_xcode.zip
          73 kB
          Ted Middleton
        3. Screenshot 2015-12-11 09.48.01.png
          165 kB
          Ted Middleton
        4. Screenshot 2015-12-11 09.48.18.png
          165 kB
          Ted Middleton
        5. Screenshot 2015-12-11 09.52.15.png
          87 kB
          Ted Middleton
        6. Screenshot 2015-12-11 09.52.46.png
          145 kB
          Ted Middleton
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            tedmiddleton Ted Middleton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes