Bug 303208 - window keeps status 'asking for attention' after gaining focus
Summary: window keeps status 'asking for attention' after gaining focus
Status: CLOSED DUPLICATE of bug 275835
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 4.8.4
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-08 20:27 UTC by rskdebugs2012
Modified: 2012-09-21 12:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot showing the bug (437.83 KB, image/png)
2012-07-08 20:29 UTC, rskdebugs2012
Details
output of xprop for single FF window on desktop with highlighted icon (5.68 KB, text/plain)
2012-07-10 19:47 UTC, rskdebugs2012
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rskdebugs2012 2012-07-08 20:27:28 UTC
At least since version 4.5.5 there is a bug with the highlighting of the icon in the Task Manager widget: the window may get the flag 'attention required' turned on but the flag is not dropped after the window gains focus. I use 'Focus follows mouse' (a.k.a. Sloppy focus) so the window may gain focus by entering it's display area with mouse cursor - without clicking. With this setting I can observe the problem not always but often (several times a day). Giving the focus to the window by clicking in it or it's icon usually clears the flag.

Window with this flag are highlighted in the Task Manager widget (the widget typically placed on the main panel). I've modified my system to highlight the window's icon in Task Manager with red color (the original theme does not make it very distinct) and I'll attach a screenshot with a single Firefox window opened on the desktop that has focus (as shown by blue decoration of the window), but still with red icon on the taskbar. The feature is useful for example when a iconified window with IM conversation receives a new message.

I suspect that there are more bugs related to handling of this flag because I often get the window's icon highlighted without an obvious reason, but I'm not able to pinpoint it.

Reproducible: Sometimes

Steps to Reproduce:
I'm not sure how much it is related to the bug but it's the only thing that I can think of and may have influence:
1. System settings-> Window Behaviour -> tab Focus -> combobox Policy is set to "Focus Follows Mouse'
Actual Results:  
The window's icon is displayed with 'requires attention' style even when the window has focus. 

Expected Results:  
When the window has focus or gains focus by any means, the 'requires attention' style should be cleared.

I did have a look on Task Manager widget source code and as far as I could see it is only passing the 'requires attention' flag around, but the flag value is actually generated by kwin.
Comment 1 rskdebugs2012 2012-07-08 20:29:05 UTC
Created attachment 72376 [details]
screenshot showing the bug

Screenshot with only window on the desktop that has a focus and still shows on Task Manager with red icon - indicating that it requires attention.
Comment 2 Thomas Lübking 2012-07-08 20:46:17 UTC
When it happens next time, can you please use konsole to issue
xprop | grep _NET_WM_STATE_DEMANDS_ATTENTION

the cursor will turn into a cross, click the affected window (the click is not passed) and you'll get some output - or not.

We'd need to know the result. Thanks.
Comment 3 rskdebugs2012 2012-07-09 09:34:45 UTC
That is going to be difficult because the screenshot where I show the bug was taken when I had one konsole window on one desktop and the FF window on another desktop. When switching desktops the highlighting of the FireFox icon was kept so I was able to start the ksnapshot from konsole, set it up to wait 2 seconds before taking the screenshot, switch the desktop to the one with the FF window and finally get the screenshot. I was considering to file the bug a long time ago but even acquiring a good screenshot was a problem.
Opening a new window on the same desktop causes change of focus, and the symptoms are gone. Starting xprop on another desktop will disallow changing the desktop with mouse. I can try to switch the desktop with keyboard or try precede the xprop with sleep, but it can be quite difficult to get the desired result.  
But I promise to try.
Comment 4 Thomas Lübking 2012-07-09 10:41:05 UTC
sleep 10; xprop | grep _NET_WM_STATE_DEMANDS_ATTENTION
Comment 5 rskdebugs2012 2012-07-10 19:47:36 UTC
Created attachment 72431 [details]
output of xprop for single FF window on desktop with highlighted icon

The _NET_WM_STATE_DEMANDS_ATTENTION is not present in the xprop output :-(
Does it mean that the icon in Task Manager is highlighted due some other reason rather than 'attention' flag?
Comment 6 Thomas Lübking 2012-07-10 20:28:41 UTC
There's ether a bug in the taskbar, or in libtaskbar, or:
... does this happen with anything but FF (or maybe Thunderbrid)?
Comment 7 rskdebugs2012 2012-07-10 20:59:55 UTC
It happens with all sorts of applications. Firefox, Eclipse, kopete, konsole, VirtualBox ....
Comment 8 Martin Sandsmark 2012-08-07 11:30:23 UTC
Should be fixed with gd3b3cd4.
Comment 9 Martin Sandsmark 2012-08-07 16:52:23 UTC

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