SUMMARY Kwin-wayland is treating each window as separate when it comes to focus switching, instead of treating each application as a whole. This may be intentional, in which case a config option would be nice. It's different than the X11 behavior, however. STEPS TO REPRODUCE 1. Open two apps, e.g. kate and dolphin 2. Open a dialog in dolphin - Configure for example 3. Click on kate to focus that window 4. Click back on dolphin's Configure window to focus it 5. Close the Configure window OBSERVED RESULT Window focus goes back to kate EXPECTED RESULT Focus goes to dolphin's main window SOFTWARE/OS VERSIONS Linux/KDE Plasma: 6.0.3 KDE Plasma Version: KDE Frameworks Version: 6.0.0 Qt Version: 6.7.0
Can confirm, and I don't think this is intentional. It's quite strange for the Kate window to have focus despite not being the top-most window when using the default focus policy. Typically this is something you have to use a non-default focus policy to achieve.
Created attachment 171636 [details] modal dialog from Dolphin Yesterday I noticed this bug on my system while trying to copy data from some corrupted DVDs with Dolphin and browsing internet with Vivaldi browser running natively on Wayland. It makes focusing a previously used window by pressing alt+tab or clicking on its entry in the task manager to fail. 1. copy data with Dolphin 2. use Vivaldi while Dolphin copies data When a failure with data copy occurs, a modal dialog from Dolphin (please see the screenshot attached to this comment) steals focus. After clicking on a button from the modal dialog, Dolphin window is appearing in foreground, but it is not focused. Then If I try to focus Vivaldi by pressing alt+tab, Dolphin is selected in the alt+tab menu instead of Vivaldi. If I try to selected Vivaldi by clicking on its entry in the task manager once instead of by pressing alt+tab, nothing happens. If I click on the entry of Vivaldi in the task manager again, it is focused as expected. Operating System: Arch Linux KDE Plasma Version: 6.1.2 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.2 Kernel Version: 6.9.9-arch1-1 (64-bit) Graphics Platform: Wayland
I have the same issue, but I experience it in both Wayland and X11. Not sure if I should create separate report. *** After closing active window, wrong window focused. Also you can experience same issue after close plasma popup or when switching screens by hotkey. *** STEPS TO REPRODUCE 1. Open some windows, for exampe Dolphin, Kate and System Setting 2. Switch to Dolphin, then switch to Kate 3. Close Kate 4. System Settings window will be focused instead of Dolphin 4. If you not observe issue, then open more windows and try to focus/close windows again in random order Also you can reproduce it this way: 1. Enable checkbox "Separate screen focus" in "Windows Behavior" setting 2. Open some windows on different screens 3. Press hotkey for "Switch to Next Screen" or "Switch to Screen #" 4. Wrong window will be focused 5. If you not observe issue, then focus some other window and try to switch screens again OBSERVED RESULT Wrong window focused EXPECTED RESULT Topmost window focused SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.1.3 KDE Frameworks Version: 6.4.0 Qt Version: 6.7.2 ADDITIONAL INFORMATION I use default "Click to focus" window activation policy if that matter
I noticed a clear pattern that the focus always goes to the "last created window" instead of the "topmost window". This happens 100% of the time
*** Bug 470631 has been marked as a duplicate of this bug. ***