When I click system tray applet of applications like KeePassX, ownCloud desktop client, etc. they open in background instead of foreground. Then I have to bring them to foreground by clicking their icon in the taskbar. This is an additional step that could be avoided. Reproducible: Always Steps to Reproduce: 1. Click KeePassX or ownCloud desktop client system tray icon in closed state. 2. 3. Actual Results: Apps open in background Expected Results: Apps should open in foreground
This looks like you need to adjust your focus settings, here is my settings http://imgur.com/lE7W3AS and it works perfectly fine for me
@Bhushan it did nothing for me.
Even KDE 4 apps are affected. Generally apps would open in foreground but then something happens and randomly all apps would open in background. KeePassX, ownCloud Clinet, etc. are prominent examples.
Bhushan is there a reason you are using Medium in Focus Stealing Prevention. System default is low which doesn't seem to work for me. If I set it to None then all apps open in foreground even things like Open Terminal from Dolphin toolbar which generally doesn't open in foreground.
properly reassign to KWin. I cannot reproduce. For me the applications open in foreground.
1. From *what* systemtray? Plasma-desktop 4 or 5? In case of 5, some 3rd party systray or do those applications support SNI in your installation? (KeePassX is atm. provided Qt4 only by my distro) 2. what has the focus instead?
oh yeah missed to add that one: I tested with SNI in a plasma 5 setup and good old xembed using wmsystemtray.
1. I have this issue with both KDE 4 and Plasma 5. I have the problem with default KDE system tray. I do have qt-sni installed on my system. 2. All KWin settings are system defaults. Focus is set to Low. I will take a quick screencast once I am back from travel.
Created attachment 90322 [details] Problem screencast As you can see in this video that when KeePassX and ownCloud client are activated from the default KDE 4 system tray they may or may not be made available in foreground. Transmission-qt is another application that misbehaves when activated from system tray. Although i am not able to replicate the problem with Transmission at the moment. I was using Plasma 5 when I filed the bug. I am back on KDE 4 and the problem seem to exist in both KDE 4 and Plasma 5.
it looks like the owncloud client messes around the focus. Can you reproduce this while leaving it out? (ie. kill the process) I tried keepassx and transmission-qt in plasma/4 and kwin 4/5 (we don't know about the systray in plasma/5, while transmission uses SNI here) w/o any problem. No owncloud on this box.
Same issue. Kmail icon in system tray only takes one click to open the program, Keepassxc, Qownnotes and nextcloud-client require 3 clicks.
I can confirm with keepassx 0.4.4 Qt4 on Arch Linux. Set focus stealing prevention to "None" solves the problem. Operating System: Arch Linux KDE Plasma Version: 5.15.4 KDE Frameworks Version: 5.57.0 Qt Version: 5.12.2
I also can reproduce with the following kde apps that can be minimized to systray: kmail kget ktorrent juk Open Kmail Open Kmail settings and check "Enable system tray icon" in "Appearance" section Apply the setting and close Kmail open systray settings, click "Entries" section, check "Always shows all entries" apply the setting close all windows open Dolphin maximize and minimize Dolphin window open Kmail and minimize it by clicking its icon in systray unminimize Dolphin by cliking its entry in the task manager click Kmail icon in the systray Result: Kmail entry shows up in the task manager but Kmail window is not focused. Dolphin is still in foreground. The same behavior can be reproduced replacing Kmail with any kde app mentioned above. kmail 5.10.3 kget 18.12.3 ktorrent 5.1.1 juk 18.12.3 Operating System: Arch Linux KDE Plasma Version: 5.15.4 KDE Frameworks Version: 5.57.0 Qt Version: 5.12.2
I can confirm this behaviour with applications opening from systray Some examples all Qt applications: - nextcloud - keepassxc - strawberry - tel.red sky (well, this one is proprietary and damn buggy, so we may ignore it) Set focus stealing prevention to Low. Behaviour may change depending on the application, since click on systray icon leads to different behaviour Example 1, with strawberry: - For example open firefox and dolphin. Give the focus to dolphin - the first time I click the strawberry systray icon, the application is opened, but it stay below dolphin, but above firefox. Does not get the focus. - second click on the icon, the window comes on top and get the focus - third click, the window is closed, focus is back on dolphin - fourth click, this time, strawberry opens directly on top, with focus (correct behaviour) - fifth click, it closes - sixth click is the same as the fourth, etc… But if I click again inside dolphin, I’m back to the initial behaviour Example 2 with sky: - For example open firefox and dolphin. Give the focus to dolphin - the first time I click the tel.red sky systray icon, the application is opened, but it stay below dolphin, but above firefox. Does not get the focus - second click close the window - third click open again, but this time on top and with focus (correct behaviour) - same as for strawberry, the behaviour is OK until I click on dolphin, in such case I’m back to the begining With nextcloud on keepassxc, It seems more random, or at least I did not get the clue. Sometime it behaves correctly, and sometime it opens without focus just behind the topmost window. If I disable the focus stealing prevention, all four apps behave correctly. But this is not a very good workaround as in such case, some popups get the focus when it’s not desirable. Currently using plasma/kwin 5.18.4.1 under Gentoo, but this was the same with 5.17 or below.
This bug was reported against an outdated version of KWin. We have made many changes since the. If the issue persists in newer versions can you reopen the bug report updating the version number.