Created attachment 148654 [details] screenshot STEPS TO REPRODUCE 1. use Wayland session 2. open Dolphin and maximize it 3. open Kate and do not maximize it 4. while Kate is focused, right-click on any item in the Places panel of Dolphin OBSERVED RESULT as we can see in the atached screenshot, context menu opens in the middle of the screen with window decoration EXPECTED RESULT context menu opens in the correct position without window decoration SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.24.80 KDE Frameworks Version: 5.94.0 Qt Version: 5.15.3 Graphics Platform: Wayland
*** Bug 459416 has been marked as a duplicate of this bug. ***
I cannot reproduce this issue with Dolphin, though I can reproduce a similar issue with kate. I opened a different bug report about it here: #460983
Still can replicate in Okular 22.08.2
Seems to be similar to the one I'm experiencing in Okular, I can also replicate this bug in 22.08.2
*** Bug 462079 has been marked as a duplicate of this bug. ***
*** Bug 463220 has been marked as a duplicate of this bug. ***
Correction: I *can* reproduce this issue with Dolphin, and also with Gwenview, K3b - so it isn't a Dolphin issue. The problem appears to be with kio's KFilePlacesView (https://invent.kde.org/frameworks/kio/-/blob/master/src/filewidgets/kfileplacesview.cpp#L1077) that creates the places context menu without a proper parent (possibly other filewidgets suffer from the same issue - I think K3b uses a widget that isn't KFilePlacesView). I tried to fix this locally in Dolphin by setting the parent widget in the `contextMenuAboutToShow` signal handler, but I didn't get much success with that (I either can't find a valid parent, I'm doing something wrong or at this point it is too late anyway). BTW: for repro, you don't need a maximized window - it is easy to repro with any app that uses a KIO file widget: after opening the app and making sure the tested file widget is showing, activate another app that does not overlap the tested area, then right click the tested widget. Because the right-clicked app does not have an active window, and the menu has no parent, Qt fails to associate the menu correctly and it displays as a top level window. I have found a tangentially related old Qt bug that discusses some of the issue - https://bugreports.qt.io/browse/QTBUG-60932 - that specific use case was fixed in Qt 5.9, but as noted in that reports' comments - there's a more general issue that wasn't fixed in Qt.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1091
Git commit 2676d7b0a0c37115dd6df236cddcdddd674d50bb by Kai Uwe Broulik. Committed on 10/01/2023 at 13:49. Pushed by broulik into branch 'master'. KFilePlacesView: Set transientParent on context menu Without a parent widget, Qt cannot figure out what's the transient parent if the window has no focus, resulting in the menu opening as a standalone window. M +5 -0 src/filewidgets/kfileplacesview.cpp https://invent.kde.org/frameworks/kio/commit/2676d7b0a0c37115dd6df236cddcdddd674d50bb
Git commit aaab1e4482845bee3c35c0fb618c37889acfdfa7 by Kai Uwe Broulik. Committed on 10/01/2023 at 14:35. Pushed by broulik into branch 'kf5'. KFilePlacesView: Set transientParent on context menu Without a parent widget, Qt cannot figure out what's the transient parent if the window has no focus, resulting in the menu opening as a standalone window. (cherry picked from commit 2676d7b0a0c37115dd6df236cddcdddd674d50bb) M +5 -0 src/filewidgets/kfileplacesview.cpp https://invent.kde.org/frameworks/kio/commit/aaab1e4482845bee3c35c0fb618c37889acfdfa7