Bug 226650 - Applications out of focus when restoring from system tray
Summary: Applications out of focus when restoring from system tray
Status: RESOLVED DUPLICATE of bug 240649
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: 4.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 241444 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-13 12:05 UTC by Kristjan Ugrin
Modified: 2010-06-19 14:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to bug #226650 (731 bytes, patch)
2010-06-12 12:34 UTC, Igor Poboiko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kristjan Ugrin 2010-02-13 12:05:44 UTC
Version:            (using KDE 4.4.0)
OS:                Linux
Installed from:    openSUSE RPMs

There is a problem with applications that uses system tray for hiding main window - when restoring them, they
are sometimes out of focus and you need to additionally press alt+tab or click them.
This was tested under clean profile with low and medium focus stealing prevention.

For this test I'm using dolphin and konversation, it seems to be the most reliable way to reproduce it.

Prerequisites:
- set up konversation to use system tray and minimize it into system tray
- dolphin installed
- all windows closed and konversation minimized into systray

Steps:
- open dolphin file manager
- click inside main area with icons (you can click blank area or select an icon, doesn't matter, just don't start any program with that action)
- click konversation icon in system tray

at this point konversation will show up in front of dolphin, but unfortunately it will be out of focus.

I'm not sure if this happens with other applications, since I don't minimize other into systray, so this should be also tested.
Comment 1 Christoph Feck 2010-02-13 12:43:17 UTC
Let me add that I am seeing this behavior with Konversation, but not with Kontact, or Amarok.
Comment 2 Kristjan Ugrin 2010-02-13 12:53:06 UTC
Yes, now I was testing some other apps and konversation seems to be the only one affected.
However on IRC konversation developers claimed it's not konv. problem. Kwin is also probably not the root of problem...
Not really sure.
Comment 3 Jonathan Thomas 2010-02-13 13:46:08 UTC
It's an issue common to all apps using KStatusNotifierItem.
Comment 4 Jonathan Thomas 2010-06-11 17:26:27 UTC
*** Bug 241444 has been marked as a duplicate of this bug. ***
Comment 5 Igor Poboiko 2010-06-12 12:34:15 UTC
Created attachment 47940 [details]
Patch to bug #226650

Looks like KWin (or something else) ignores KWindowSystem::activateWindow(), so we must call KWindowSystem::forceActiveWindow() to activate the window.
After applying patch to kdelibs-4.4.85 in my case all works fine.
Comment 6 Igor Poboiko 2010-06-12 13:50:40 UTC
This bug is duplicate of fixed bug 240649 :)
Comment 7 Christoph Feck 2010-06-19 14:14:59 UTC

*** This bug has been marked as a duplicate of bug 240649 ***