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

Popup menu can not response keyboard event when application has no foucs on Wayland

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.15.17
    • QPA: Wayland
    • None
    • Linux/Wayland

      When application only has one window(e.g. QWidget) and set the window flag contains Qt::WindowDoesNotAcceptFocus, then trigger a QMenu from the window by mouse clicking, user can not change the action selection with up/down key.

      Please check my attachment, the reason is that the function setGrabPopup() is not called in the construtor QWaylandXdgSurfaceV6::QWaylandXdgSurfaceV6(), this is because of the transientParent is null. The value of transientParent is from window->transientParent(), but since the application has no focus, the return value is null. So no shell surface is found and can not construct the popup.

      BTW, if uncomment my commtents of main.cpp to ensure the application at least have one window focus,the up/down key works for the popup menu.

      I have compared with Windows and X11, not have this problem.

        1. 1.png
          1.png
          179 kB
        2. 22.png
          22.png
          103 kB
        3. 33.png
          33.png
          86 kB
        4. 44.png
          44.png
          155 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.graphics.and.multimedia Qt Graphics Team
            shzhuang shzhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes