Version: (using KDE 4.2.2) OS: Linux Installed from: Unlisted Binary Package I noticed this behaviour of KWin after using KMess, which uses plasma notifications to inform you about certain events. On some occasions, some of those plasma notifications have clickable buttons. An Example: If a contact comes online, you can select to open a chat window with him directly from the plasma notification, by clicking on "Start Chat". KWin will then open a window and bring it to the front, but it will not "focus" it, so that you first have to focus the window yourself by click on it, before you can actually start "using" that window. If I use the Plasma desktop with fluxbox as Window Manager, it works as expected. Experienced here with KDE 4.2.2 and Qt 4.5 on Arch Linux Thank you
you know that you can change the focus stealing prevention. Perhaps it is set to some different value. For me so far I have not yet noticed any problem with the plasma notifications and focus.
Ok, If I change the Focus stealing prevention to "none" it works as expected. The problem is, I'd like to let this option to be on "low", as I don't want every window to automatically get the focus. It might be a good idea, to automatically focus windows, that are opened "manually" from the plasma notifications. thanks :)
I just tested with "focus stealing prevention low" and application quassel. After clicking on the notification button focus was given to quassel as expected. I will observe the behaviour the next few days with quassel and kopete (the only apps I use that provide actions on notifications).
oh and are you using focus follows mouse? That could change everything.
No, I have set it to "click to focus" :-) I might also try to do some testing with other apps then KMess. Thanks!
Quassel bypasses KWin's focus stealing prevention by setting the user time of the window to be the current time before attempting to display the window. It works but I don't think the application should be the one to do this but rather the notification itself.
Yes, we do consider that a workaround what we do in Quassel :) KNotification is supposed to focus the application at some point, the necessary flags exist, but the code is still a TODO. Note though that this is a general problem not only for KNotification stuff. We can build Quassel without KDE support, and it still needs to come to front when clicking on the systray. Qt does not have any way to force an application to the front. That said, KSystemTrayIcon has a method to force a window to the front. Could be interesting to see if that, too, fails with focus stealing prevention in KWin; haven't tested it yet.
When I have Focus Stealing Prevention to "Low", which I believe is the default, Plasma/KWin does not bring any of the windows that it launches into the foreground. So far I have seen this problem with Quassel and the New Device Notifier. Whenever either of them opens a new window, it blinks in the taskbar but launches minimized.
Confirm. Messengers (pidgin, sim, skype, psi) didn't get focus. When I click on tray icon to bring roster up, it also didn't get focus, and I have to click window on taskbar. I have Focus Stealing Prevention to "Low".
I've done a couple of tests using kopete: when I open the message window from the notification, the focus is correctly set on the message window. Is kopete the only program not affected or has the bug been fixed in KDE 4.5? (Tested with KDE 4.5.2)
No ideae whether this is still an issue, but reasigning to plasma SNI should use KWindowSystem::forceActiveWindow() or somehow fix up window classes - we cannot fix this from kwin since the window with the focus (sni) and the upshowing window are completely unrelated from the WMs POV
No reports since 4.5.2, closing.