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

nested menu is shown on top of its parent in wayland

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.13, 6.7.0
    • QPA: Wayland
    • None
    • Arch Linux, KDE Plasma 6.0.4
    • Linux/Wayland

    Description

      If there's no space available on the screen to the right from the parent menu, even if there's available space to the left, a nested menu gets placed on top of the parent menu in wayland, but not in X11 (xwayland).

      Move the window to the right edge of the screen so that the parent menu touches the right screen edge, open its submenu, observe it being shown on top of its parent, even though there's space to the left.

       

      Edit:

      The cause is a known QtWayland issue - https://wiki.qt.io/QtWayland_Remaining_Issues. It seems qtwayland currently has no way of getting information required for configuring xdg_positioner, anchor rect always has size 1x1, anchor top_right, gravity bottom_right, constraint adjustment slide_x | slide_y.

      I've made a patch that somewhat "fixes" this issue - just a hack to enable flip_x adjustment for popups that have xdg_popup parent.

      Attachments

        1. wlmenu.patch
          2 kB
        2. main-1.cpp
          0.5 kB
        3. wayland.png
          wayland.png
          14 kB
        4. x11.png
          x11.png
          22 kB

        Issue Links

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

          Activity

            People

              qt.team.graphics.and.multimedia Qt Graphics Team
              gmantroll Peter Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes