After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643595 - Does not show urgency hint
Does not show urgency hint
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
triaged
: 648899 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-03-01 15:05 UTC by Guillaume Desmottes
Modified: 2018-11-14 13:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Desmottes 2011-03-01 15:05:19 UTC
The Shell doesn't show any visual indication when the urgency hint is set on a window.
According to the spec [1], applications cat set this hint to indicate that some important events happened and that user should look at it shortly.

This is a big issue for me with xchat-gnome which set this hints when I'm highlighted on IRC. I tend to miss all these highlights when using the Shell. But I'm sure this problem affect lots of other apps as well.

[1] http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#URGENCY
Comment 1 Elad Alfassa 2011-03-28 11:55:48 UTC
Is there any chance this bug is going to be fixed before 3.2?
Comment 2 Owen Taylor 2011-03-28 14:06:33 UTC
(In reply to comment #1)
> Is there any chance this bug is going to be fixed before 3.2?

Since it's a new feature that requires new design for behavior the first opportunity to fix it is 3.2... we would not generally expect to add new features and behaviors in 3.0.x.

I'm not sure X-Chat provides a good inspiration for design in this area, since we would expect X-Chat to be configured with notifications on; the "highlight" would be shown by the presence of an X-Chat icon in the message tray, and an urgent hint doesn't seem necesary.

(X-Chat is difficult, since it can be configured in different ways, some of which work better with GNOME 3, some of which work worse.)
Comment 3 Elad Alfassa 2011-03-28 14:14:58 UTC
It affects a lot more applications, not just X-Chat. For example pidgin, that doesn't support libnotify popups for IRC highlights.
Comment 4 Elad Alfassa 2011-03-30 08:38:39 UTC
Filed a bug in pidgin so that they would implement libnotify notifications for IRC highlights (as a workaround):
http://developer.pidgin.im/ticket/13643
Comment 5 Elad Alfassa 2011-03-30 18:53:11 UTC
Suggested workaround (won't require major design changes or much code):

When a window set urgency hint, show a notification 
something like "Foo requires your attention" with the application icon. clicking on that notification (or a button in it) will bring the window to the front and to focus.

What do you think?
Comment 6 Faidon Liambotis 2012-04-19 22:57:10 UTC
So, it seems mutter is generating events for both _NET_WM_STATE_DEMANDS_ATTENTION and the urgent flag in WM_HINTS, but the shell seems to deliberately chose to raise notifications for the first case, but not for the second. I'm unaware why.

Unfortunately, most applications out there, including popular terminal clients (rxvt, terminator etc.) raise the urgent hint and don't have an option to switch to the "demand attention" API.

Since raising the urgent hint from a bell, which in turn gets raised by applications such as irssi & mutt (even over a remote SSH session) was quite important for me,  I implemented a simple GNOME Shell extension that subclasses the code for the demand attention behavior and replicates it for the urgent hint:
https://extensions.gnome.org/extension/274/urgent-hint-notification/

I chose to keep the same UI message ("application foo is ready") for simplicity and localization purposes, but that can easily change.

Getting this behavior merged into the shell itself is a trivial change (1-liner for the same message, 4-liner + l10n for a different message), hence I presume this has something to do with a delibarate action from the maintainers, rather than being bug. If so, I'd very interested to learn the background behind this decision, since it was a major setback for my usage pattern.
Comment 7 drago01 2013-03-04 09:18:25 UTC
(In reply to comment #6)
> So, it seems mutter is generating events for both
> _NET_WM_STATE_DEMANDS_ATTENTION and the urgent flag in WM_HINTS, but the shell
> seems to deliberately chose to raise notifications for the first case, but not
> for the second. I'm unaware why.
> 
> Unfortunately, most applications out there, including popular terminal clients
> (rxvt, terminator etc.) raise the urgent hint and don't have an option to
> switch to the "demand attention" API.
> 
> Since raising the urgent hint from a bell, which in turn gets raised by
> applications such as irssi & mutt (even over a remote SSH session) was quite
> important for me,  I implemented a simple GNOME Shell extension that subclasses
> the code for the demand attention behavior and replicates it for the urgent
> hint:
> https://extensions.gnome.org/extension/274/urgent-hint-notification/
> 
> I chose to keep the same UI message ("application foo is ready") for simplicity
> and localization purposes, but that can easily change.
> 
> Getting this behavior merged into the shell itself is a trivial change (1-liner
> for the same message, 4-liner + l10n for a different message), hence I presume
> this has something to do with a delibarate action from the maintainers, rather
> than being bug. If so, I'd very interested to learn the background behind this
> decision, since it was a major setback for my usage pattern.

How about attaching your patch?
As for the reasons why we only look for "demands attention" there is none really. When I wrote that code I wrongly assumed that the urgency hint is not really used.
Comment 8 Allan Day 2014-08-07 10:10:39 UTC
One option might be to show the urgency hint as a notification. eg. "Firefox wants attention". I'm not sure how annoying that would be though - in general, applications should produce their own notifications rather than using the urgency hint.
Comment 9 Elad Alfassa 2014-08-07 10:19:25 UTC
One issue with this workaround is what happens if an app sets the urgency hint AND sends a notification. Will the user get two notifications?
Comment 10 Florian Müllner 2018-07-13 16:23:22 UTC
*** Bug 648899 has been marked as a duplicate of this bug. ***
Comment 11 Jonas Ådahl 2018-11-14 13:43:44 UTC
MR was merged: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/155