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

Losing focus issue of QtWayland application on EGLFS platform

    XMLWordPrintable

Details

    • Linux/Wayland

    Description

      Key event sent from remote PC by QApplication::postEvent() can never be delivered to QtWayland application on client PC because the receiver (a QQuickWindow or Window) cannot have focus whatsoever. activeFocusItem() always returns 0, and even contentItem()->setFocus(true) cannot get focus set correctly. It's happening to EGLFS but not XCB platform.

      It is speculated that the reason may have something to do with QQuickWindowPrivate::setFocusInScope method in which the following lines exist:

      if (!(options & DontChangeFocusProperty)) {
      if (item != contentItem || windowHasFocus(q)
      #ifdef Q_OS_WEBOS
      // Allow focused if there is only one window in the screen where it belongs.
      // Temporary fix for webOS until multi-seat is implemented see QTBUG-85272

      singleWindowOnScreen(q)
      #endif
      ) { itemPrivate->focus = true; changed << item; }

      }

      windowHasFocus(q) is always false on EGLFS platform.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes