Bug 499368

Summary: plasma-submenus always appear to the right of an opened menu - instead of taking the available space into account and optionally change sides
Product: [Plasma] kwin Reporter: slartibart70
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, notmart
Priority: NOR    
Version First Reported In: git-stable-Plasma/6.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
URL: https://bugreports.qt.io/browse/QTBUG-99618
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: brave-menu with left-hand-submenu
dolphin with small submenu
dolphin with medium-size submenu
dolphin with large submenu

Description slartibart70 2025-01-31 20:38:49 UTC
I'm using two kinds of applications as an example: brave browser and dolphin (both having a hamburger-menu on the far right side of the application-window with additional submenu entries)

Setup: Place the right side of the applications exactly to the right side (edge) of the screen/monitor, so that there's no space left to the right.
Open the hamburger menu.

The popup-menu is rendered (see screenshots) so that the whole menu is visible, which means it is offset to the left to show all entries.
Position the mouse on a menu-item which has a submenu.
This submenu is always positioned to the rightmost monitor-edge.

- If this submenu has entries which are smaller than the parent-popup-menu, we can access the submenu entries and the parent menu entries with the mouse.
- if the submenu has entries similar in length as the parent, the submenu is opened similarly to an 'overlay' on the parent with nearly invisible borders. Problem: you cannot access any (downwards) parent-menu entries any more as they are covered by the submenu
- same for submenus larger then the parent

Compare this to the menu/submenu handling of brave:
Here, the submenu is rendered to the left side of the parent menu, if no space to the right side is available.

Long story short: make submenus appear to the opposite side of the parent menu, if the space available to the right to render the submenu is not sufficient.
Comment 1 slartibart70 2025-01-31 20:42:26 UTC
Created attachment 177861 [details]
brave-menu with left-hand-submenu
Comment 2 slartibart70 2025-01-31 20:43:08 UTC
Created attachment 177862 [details]
dolphin with small submenu
Comment 3 slartibart70 2025-01-31 20:43:36 UTC
Created attachment 177863 [details]
dolphin with medium-size submenu
Comment 4 slartibart70 2025-01-31 20:43:50 UTC
Created attachment 177864 [details]
dolphin with large submenu
Comment 5 slartibart70 2025-01-31 20:51:13 UTC
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.1
Kernel Version: 6.12.11-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 6 Vlad Zahorodnii 2025-02-03 14:49:11 UTC
It's an upstream bug
Comment 7 slartibart70 2025-02-03 19:02:25 UTC
ok, fine.
Anywhere to track this? (wayland/qt/others?)