Created attachment 129241 [details] Short video showing bug. SUMMARY When using media keys (e.g. volume and brightness) the OSD which indicates the change in the particular item briefly seizes focus from the widow which had focus immediately prior to the key being pressed. This causes the window from whom fucus has been grabbed to "flash" briefly. STEPS TO REPRODUCE 1. Open any window 2. Press a key which activates the OSD (for brightness or volume for example) 3. The window briefly loses focus and flashes. OBSERVED RESULT OSD activation causes active window to lose focus. EXPECTED RESULT OSD should not grab focus from active window, even if the amount of time it is grabbed in small. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 20.04 (available in About System) KDE Plasma Version: 5.18.14 KDE Frameworks Version: 5.68.0 Qt Version: 5.12.8 ADDITIONAL INFORMATION Short video attached to show specific issue.
Present in: KDE Plasma Version: 5.18.15 KDE Frameworks Version: 5.68.0 Qt Version: 5.12.8
Cannot reproduce with git master version of KWin.
Hi! Can confirm that I'm seeing this in: Operating System: Gentoo Linux KDE Plasma Version: 5.23.4 KDE Frameworks Version: 5.88.0 Qt Version: 5.15.2 Kernel Version: 5.10.76-gentoo-r1 (64-bit) Graphics Platform: Wayland Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics Memory: 7.3 GiB of RAM Graphics Processor: AMD RENOIR It is especially a problem when switching keyboard layout, since the window I'm typing in will lose focus to the osd, and have to wait for it to dissapear before resuming typing.
Also, this was not there before the update to 5.23 (i.e. 5.22).
Another point, it does not happen if running plasma in an X11 session, only in Wayland, same versions of everything.
(Last comment, I promise - can't find a way to edit previous ones). The OSD also popups on the middle of the display, instead of the lower bottom of the screen, which might indicate that plasma/kwin is handling it as a window.
Might be duplicate of https://bugs.kde.org/show_bug.cgi?id=428859
It's not just Wayland, I'm having the same issue on X11. Plasma 5.23.4 with Framework 5.88.0 on Arch, and didn't have the problem before 5.23 iirc.
The OSD pops up in the right place for me though.
The underlying problem is that plasma uses xdg-toplevel surfaces for OSDs. However, plasma gives OSDs their role too late, which creates this corner case. This bug will be fixed once plasma is fully ported to the layer-shell protocol. With that, kwin will be able to determine whether to give focus correctly.
Do we have a "Port Plasma to layer-shell" bug report or GitLab Issue?
(In reply to Nate Graham from comment #11) > Do we have a "Port Plasma to layer-shell" bug report or GitLab Issue? I don't think so.
OK, I filed one and marked it as a blocker for this. That way the issue reported here won't get forgotten about once we do port to layer_shell.