SUMMARY Some windows like Dolphin or Gwenview have hamburger menus on the right side of the window. When the window is maximized, sub-menus appear on the left side of the menus as expected (because there's no space on the right), however, if the same window is unmaximized and close to the right edge of the display, the sub-menus appear on top of the menu, obstructing the buttons below. While I'm using hamburger menus as an example, this is NOT specific to hamburger menus, but it's harder to notice because menus in a toolbar usually aren't close to the edge of the screen. The following video illustrates the issue: https://www.youtube.com/watch?v=cHaSOQs_Cik STEPS TO REPRODUCE 1. Open Gwenview (with a hamburger menu to make it easier to reproduce) 2. Maximize, open the hamburger menu, and then hover over an item that opens a sub-menu. Notice how it opens to the left. 3. Now unmaximize, move the window to the right edge of the screen, and do the same. OBSERVED RESULT The submenu appears on top of the menu, obstructing the items below EXPECTED RESULT When there's space to the left and not on the right of the menu, open submenus on the left side instead of putting them on top of the menu, just the way it happens for maximized windows. SOFTWARE/OS VERSIONS Operating System: KDE neon 5.27 KDE Plasma Version: 5.27.7 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.10 Kernel Version: 6.2.0-26-generic (64-bit) Graphics Platform: Wayland Processors: 6 × Intel® Core™ i5-9400F CPU @ 2.90GHz Memory: 15,4 GiB of RAM Graphics Processor: AMD Radeon RX 570 Series
I tested on X11 and that doesn't happen there. I'm guessing this is a Kwin bug then.
In fact it's a Qt Wayland bug. It's fixed in Qt 6.
Oops, my mistake. Confirmed, and not fixed on Wayland.
See one of: https://bugreports.qt.io/browse/QTBUG-87303 https://bugreports.qt.io/browse/QTBUG-92200 https://bugreports.qt.io/browse/QTBUG-95637 https://bugreports.qt.io/browse/QTBUG-99618
I'll have to reopen. None of those bug reports are related to this one. All of them talk about the menus going off screen, however, that's not what's happening here. Here they don't go off screen, instead, they are placed on top of other menus when the window is not maximized. It's a different issue.
(In reply to guimarcalsilva from comment #5) > I'll have to reopen. None of those bug reports are related to this one. All > of them talk about the menus going off screen, however, that's not what's > happening here. Here they don't go off screen, instead, they are placed on > top of other menus when the window is not maximized. It's a different issue. They are. QtWayland doesn't set appropriate xdg_positioner flags to properly place popups. Popups are placed differently when a window is maximized because popup logic is built around the global coordinate space, and it just happens that when a window is maximized, that global coordinate space logic is more likely to work as expected because the window fills most of the screen area.