Summary: | Cannot switch menu item when opened a menu item in global menu widget. | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | sekatol |
Component: | Global Menu widget | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arojas, dieautobahn, duha.bugs, ilusha0023, kde, lcg.public, mvourlakos, nate, oscar.armd, vlad.zahorodnii |
Priority: | NOR | Keywords: | regression |
Version First Reported In: | 6.2.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/d5a123f997a06bacafcc2e0b68c43c75ef90f9a0 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Shows the bug. |
*** Bug 494750 has been marked as a duplicate of this bug. *** I have the same issue on my system but I wanted to add to the original report and make it explicit that it *only* happens with the global menu. When I turn the global menu off, the menu in the application windows behave as expected: when I click, e.g., the "File" menu, it opens, then when I move the cursor to the right, to the "Edit" menu, and hover over it, the "File" menu closes and the "Edit" one opens. Operating System: Fedora Linux 40 KDE Plasma Version: 6.2.0 KDE Frameworks Version: 6.7.0 Qt Version: 6.7.2 Kernel Version: 6.10.12-200.fc40.x86_64 (64-bit) Graphics Platform: Wayland Can confirm. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4943 Git commit b9161eeb246f2e30197af1ded659cda31cbc2172 by Vlad Zahorodnii. Committed on 28/11/2024 at 11:26. Pushed by vladz into branch 'master'. applets/appmenu: Workaround global menu getting dismissed unexpectedly Qt has a fallback code path to dismiss all popups when the application loses keyboard focus. The issue is that QGuiApplication::focusWindow() not always has reasonable values. For example, after calling widget->hide(), the QGuiApplication will think that the widget's window still has focus for a while. This can result in popups getting unexpectedly dismissed: - hover the File entry - the corresponding File popup will be shown - hover the Edit entry - the File popup will be hidden - the Edit popup will be shown - at this point, QGuiApplication::focusWindow() still reports that the File popup window has the keyboard focus - some time later, qtwayland will report a new focused window. It is racy, Qt can report either null or the Edit popup window. - if it's null, the Edit popup will be hidden M +9 -0 applets/appmenu/lib/appmenuapplet.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/b9161eeb246f2e30197af1ded659cda31cbc2172 Git commit d5a123f997a06bacafcc2e0b68c43c75ef90f9a0 by Vlad Zahorodnii. Committed on 28/11/2024 at 11:58. Pushed by vladz into branch 'Plasma/6.2'. applets/appmenu: Workaround global menu getting dismissed unexpectedly Qt has a fallback code path to dismiss all popups when the application loses keyboard focus. The issue is that QGuiApplication::focusWindow() not always has reasonable values. For example, after calling widget->hide(), the QGuiApplication will think that the widget's window still has focus for a while. This can result in popups getting unexpectedly dismissed: - hover the File entry - the corresponding File popup will be shown - hover the Edit entry - the File popup will be hidden - the Edit popup will be shown - at this point, QGuiApplication::focusWindow() still reports that the File popup window has the keyboard focus - some time later, qtwayland will report a new focused window. It is racy, Qt can report either null or the Edit popup window. - if it's null, the Edit popup will be hidden (cherry picked from commit b9161eeb246f2e30197af1ded659cda31cbc2172) Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> M +9 -0 applets/appmenu/lib/appmenuapplet.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/d5a123f997a06bacafcc2e0b68c43c75ef90f9a0 *** Bug 498034 has been marked as a duplicate of this bug. *** |
Created attachment 174759 [details] Shows the bug. SUMMARY In global menu widget, user cannot switch menu item when opened a menu item. STEPS TO REPRODUCE 1. Create a panel and add global menu to it. 2. Open dolphin for example. Click the "File" button on globalmenu. 3. Either move the cursor to the right "Edit" button or press the RIGHT key on the keyboard. 4. The Edit menu cannot be opened. OBSERVED RESULT The menu doesn't switch. Both are closed. EXPECTED RESULT It should switch to "Edit". SOFTWARE/OS VERSIONS Linux/KDE Plasma: Linux 6.11.3-arch1-1 KDE Plasma Version: 6.2.0 KDE Frameworks Version: 6.6.0 Qt Version: 6.7.3 Wayland session ADDITIONAL INFORMATION All programs supporting global menu have this problem.