GNOME Bugzilla – Bug 643595
Does not show urgency hint
Last modified: 2018-11-14 13:43:44 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
Is there any chance this bug is going to be fixed before 3.2?
(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.)
It affects a lot more applications, not just X-Chat. For example pidgin, that doesn't support libnotify popups for IRC highlights.
Filed a bug in pidgin so that they would implement libnotify notifications for IRC highlights (as a workaround): http://developer.pidgin.im/ticket/13643
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?
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.
(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.
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.
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?
*** Bug 648899 has been marked as a duplicate of this bug. ***
MR was merged: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/155