Created attachment 163963 [details] happy floating menu floats afloat SUMMARY After KWin task switching, the drop-down menu of System Settings opens up detached, and handles mouse events with wrong offset. STEPS TO REPRODUCE 1. Open System Settings and some other apps. 2. Click "Show Menu" once, and dismiss it. 3. Alt+Tab though the list of apps, and release Alt back at System Settings. 4. Click "Show Menu again. OBSERVED RESULT At step 4 the menu pops up in the middle of a screen, but event handling is offset as if the menu were at the intended location under its button. EXPECTED RESULT stability SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.90.0 KDE Frameworks Version: 5.246.0 Qt Version: 6.6.1 Kernel Version: 6.6.3-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 15.6 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
It seems like after cycling through the list of windows in task switcher and returning back to the original window _without_ letting go of the modifier key (Alt or Meta) in the process, the focus is not being fully returned to the window. For example, header colors remain those of "inactive" window until you really switch focus back and forth. This does not happen if the window switcher is closed via Escape key.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/systemsettings/-/merge_requests/274
In step 3, you're triggering Bug 477885. I can reproduce both that as well as this specific issue in System Settings.
Git commit eb012119806aae2777c0595a27eae26c9848a10a by David Edmundson, on behalf of ivan tkachenko. Committed on 07/12/2023 at 09:33. Pushed by davidedmundson into branch 'master'. Sidebar: Set menu's parent before opening it Without an explicit transient parent we rely on QtWayland guessing which can lead to a menu would open floating in the middle of the screen and have glitched pointer offset. M +2 -1 app/sidebar/SidebarMode.cpp https://invent.kde.org/plasma/systemsettings/-/commit/eb012119806aae2777c0595a27eae26c9848a10a