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 776881 - Clicking on a notification does not raise Geary window
Clicking on a notification does not raise Geary window
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: notifications
master
Other Linux
: Normal normal
: 0.12.2
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-04 21:25 UTC by Evan Langlois
Modified: 2018-04-11 02:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Evan Langlois 2017-01-04 21:25:34 UTC
This may be personal preference, but when a window is opening in the background you get a notification saying that the window is ready.  If I get a notification of new mail, and then click that notification (telling the system that I want to read it), then I think the second notification ("Geary is ready") is redundant, requiring me to click a second notification.  It feels clumsy.

Is there some way to not show the "Geary is ready" notification if the window is being opened because I clicked a new mail notification?
Comment 1 Michael Gratton 2017-11-14 00:09:29 UTC
Hey Evan, thanks for reporting this bug. I believe this is a gnome-shell issue, since we're just using the standard means of handling notifications and window raising, but it seems to be complicated - see Bug 767701, Bug 771618 and Bug 731101 for example.

Are you running under X11 or Wayland?
Comment 2 Michael Gratton 2017-11-14 03:52:37 UTC
One other note, there is a small chance that the fix I just pushed to master as commit da15ebe for Bug 790103 may have improved this a bit. If you can, can you try compiling geary from git and see if it does help?
Comment 3 Federico Bruni 2017-12-07 12:00:40 UTC
IMO the title "Double Click required to answer mail notification" is not reflecting the subject of the discussion.
There's also probably some differences in ubuntu vs other distros; or the ways gnome-shell used to behave and the way it behaves since some recent versions (I would say at least since 3.24 release, more or less).
Anyway, since Ubuntu is switching back from Unity to GNOME, we should be on the same page.

Before 3.24 (just a guess) if you clicked on a notification you were directed to the relevant application. But this does not happen anymore. I'm currently using Gnome 3.26.2 on Fedora 27: I've tried single-click and double-click and nothing happens, except for the notification to be marked as read.

I think that the new GNOME design is displaying some buttons within the notification if you want to launch the application and perform some kind of action. This is for example what happens when gnome-software finds some packages to upgrade.

The design is explained here:
https://wiki.gnome.org/Design/OS/Notifications

"Clicking or pressing a banner performs the default action (this typically dismisses the notification and opens the notification source)."

I guess that we should add action buttons for the notification, like "Read", "Mark as read", etc.
Comment 4 Federico Bruni 2017-12-07 12:05:47 UTC
see also bug #766133 (port to GNotification)
Comment 5 Federico Bruni 2017-12-09 08:50:18 UTC
With regard to my comment #3, I'm confused by how clicking on notifications causes different behaviour depending on the apps.

For example, for gnome-software notifications:

- a single click opens the application
- if I click on one of the two buttons (Cancel or Upgrade), that action is performed

I guess this is how notification should work.

This is not what happens with gnome-terminal. Try launching a command, like `find . -name *.pdf`, then switch focus to another window and wait for notification of completed job. If you click on it, nothing happens, i.e. you don't get the focus on the terminal.

I've just tried again and here's what happens in Geary:

- send an email from a browser to an account I have in Geary
- keep the focus on the browser until you see the notification
- click on it (single or double-click doesn't seem to make a difference)

What happens? The focus remains on the browser, but that click did something, because when I switch to Geary I see that it changed from Inbox>Account folder to Account>Inbox folder (see Bug #714736 - select Inboxes branch inbox if available from notification) and the email is marked as read.
Comment 6 Michael Gratton 2017-12-11 08:05:43 UTC
Federico, this occurs when clicking on a Geary system notification in gnome-shell. Instead of Geary's window being raised, another system notification pops up saying "Geary is ready", which is generated by gnome-shell, and that needs to be clicked on for Geary's window to actually be raised to the front.

Per comment #1, I'm 95% sure this is not a Geary bug, rather a gnome-shell bug but it's hard to reproduce for me, since raising windows doesn't seem to be working at all under Wayland due to Bug 766284.
Comment 7 Federico Bruni 2017-12-11 17:14:46 UTC
I cannot see the second popup saying "Geary is ready". Perhaps it's too fast.
I noticed that when I receive more than one notification, any other notification disappears as soon as I click on one of them.
Comment 8 Daniel Boles 2017-12-12 09:41:12 UTC
Isn't this a dupe of https://bugzilla.gnome.org/show_bug.cgi?id=623395 ?
Comment 9 Michael Gratton 2017-12-12 10:55:20 UTC
(In reply to Daniel Boles from comment #8)
> Isn't this a dupe of https://bugzilla.gnome.org/show_bug.cgi?id=623395 ?

Not really - clicking on a notification for an app should launch and/or present the app. It's not focus stealing if the user intended it.
Comment 10 Michael Gratton 2018-02-07 04:18:25 UTC
I just pushed commit e333794f that uses the present_with_time() workaround from Bug 766284 and this seems to have fixed the issue under both X11 and Wayland.
Comment 11 Federico Bruni 2018-02-07 05:40:30 UTC
I confirm the issue is fixed under Wayland. Thanks!
Comment 12 Michael Gratton 2018-04-11 02:34:31 UTC
Followup patch just pushed to master as cfaee5cb for Bug 794264. I've just cherry picked this to geary-0.12 as commit 287fb888 so this should make it into 0.12.2 as well.