Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on a "new mail" notification (link or native "Activate") does not restore the window which was minimized to tray, but does focus the message. Causes confusion since message is marked as read. #200

Closed
dark-penguin opened this issue Sep 9, 2023 · 15 comments
Assignees

Comments

@dark-penguin
Copy link

Sometimes clicking the "New message" popup would restore Betterbird and focus the message in question. And sometimes it does focus the message, but does not restore the window. So far, I couldn't find any pattern to this, but it's "not working" more often than it's "working".

It is supposed to restore every time, isn't it? I suppose there's some complexity around restoring the window?

@Betterbird
Copy link
Owner

Please clarify with some screenshots. Where do you click "New message"? And which (existing?) "message in question" are you talking about when you're about to write a new one?

@dark-penguin
Copy link
Author

dark-penguin commented Sep 9, 2023

Screenshots are a bit tricky; I'll try to explain it "properly" first.

Expected behaviour:

  • A popup appears: "You received 1 new message: 'Hello!' from YourFriend"
  • I click the popup
  • Betterbird, which was minimized to tray, appears; and it has the just-arrived message highlighted: "YourFriend - Hello!"

Actual behaviour:

  • A popup appears: "You received 1 new message: 'Hello!' from YourFriend"
  • I click the popup
  • Nothing happens (to be more specific, the popup disappears, but that's all)
  • I wait two seconds (which is my "Mark as read after..." timeout), and after that the tray icon suddenly changes from "You have new mail" to "No new mail"
  • I restore Betterbird from tray, and see that the just-arrived message "YourFriend - Hello!" is focused (which is why it was marked as read after two seconds, which reverted the icon)

Please ask for screenshots again if this did not help. :)

@dark-penguin
Copy link
Author

But I remember that at some point, the behaviour was "as expected" a few times - no idea why.

@Betterbird
Copy link
Owner

Hmm, on Linux there are two different notifications, the TB/BB notification and the system notification. I assume you're talking about the TB/BB notification which is displayed with clickable links rising from the system tray.

So the complaint is that clicking the link should also restore the window since otherwise you end up in a mess. I'll try what happens on Windows. (Would have been good it you had summarised the issue correctly in the title.)

@Betterbird Betterbird changed the title Clicking the popup does not always restore the window (but does focus the message) Clicking a link a "new mail" notificaion does not restore the window which was minimised to try, but does focus the message. Causes confusion since message is marked as read. Sep 9, 2023
@Betterbird Betterbird changed the title Clicking a link a "new mail" notificaion does not restore the window which was minimised to try, but does focus the message. Causes confusion since message is marked as read. Clicking a link a "new mail" notification does not restore the window which was minimised to try, but does focus the message. Causes confusion since message is marked as read. Sep 9, 2023
@dark-penguin
Copy link
Author

I believe what I am getting is a system notification. Because it's provided by ayatana, and configurable via mate-notification-properties. There is no link, just... I can get a screenshot of it, here:
Screenshot at 2023-09-09 15-36-31

@Betterbird
Copy link
Owner

Whether you have system notifications can be set in the settings:

Native on Xfce:
Screenshot from 2023-09-09 13-52-20

TB/BB style containing links:
Screenshot from 2023-09-09 13-56-01

Anyway, both have the problem.

@Betterbird Betterbird changed the title Clicking a link a "new mail" notification does not restore the window which was minimised to try, but does focus the message. Causes confusion since message is marked as read. Clicking on a "new mail" notification (link or native "Activate") does not restore the window which was minimised to try, but does focus the message. Causes confusion since message is marked as read. Sep 9, 2023
@dark-penguin dark-penguin changed the title Clicking on a "new mail" notification (link or native "Activate") does not restore the window which was minimised to try, but does focus the message. Causes confusion since message is marked as read. Clicking on a "new mail" notification (link or native "Activate") does not restore the window which was minimized to tray, but does focus the message. Causes confusion since message is marked as read. Sep 9, 2023
@Betterbird
Copy link
Owner

I'll try what happens on Windows.

OK, on Windows, the "hidden" (minimised to tray) window is restored when the notification is clicked. We'll check how that's done and port it to Linux.

@Betterbird
Copy link
Owner

Betterbird commented Sep 9, 2023

Activation of the window was mostly not implemented, apologies for this oversight 😞. It's now implemented and will likely also change the activation behaviour on Gnome and KDE if the window wasn't minimised. @felixoi @Zahrun could you please give this a whirl:
https://www.betterbird.eu/downloads/115-Preview/betterbird-115.2.0-bb10-refresh-resize-native-activate.en-US.linux-x86_64.tar.bz2

Of course it also fixes the ticket here, so when BB is minimised and your click onto a new mail notification, either system or BB style, the window is now restored (as well as always, pending the complaints in Issue #202).

@felixoi
Copy link

felixoi commented Sep 9, 2023

Sadly this is not working for GNOME. I only see a "Betterbird is ready" notification and the window is not getting in front.

Also I encountered an issue where mail.biff.show_tray_icon_always=true but that's only the case after it's minimized for the first time. The tray icon is not added on startup. Seems to be unrelated to this issue tho.

@Betterbird
Copy link
Owner

Tested this myself now: On KDE the window is brought to the foreground. On Gnome that also happens on the first double-click, the next one shows a panel "Betterbird is ready" or some such. Also tested clicking on new mail notification while the window was minimised and it's restored as it should.

Sadly this is not working for GNOME. I only see a "Betterbird is ready" notification and the window is not getting in front.

Hmm, for me it works once.

I don't understand the second issue. I was running with mail.biff.show_tray_icon_always=true and the icon is there when BB starts. Or am I misunderstanding?

@dark-penguin
Copy link
Author

Clicking the popup now restores the window from tray (on MATE)! But usually either behind other windows, or if the last clicked "window" was the desktop, then in front but "unfocused".

The tray icon is not added on startup

This, however, I've never encountered yet.

@Betterbird
Copy link
Owner

Clicking the popup now restores the window from tray (on MATE)! But usually either behind other windows, or if the last clicked "window" was the desktop, then in front but "unfocused".

Issue #202.

The tray icon is not added on startup

This, however, I've never encountered yet.

@felixoi, this needs clarification: "that's only the case after it's minimized for the first time" doesn't seem to go well with "The tray icon is not added on startup".

@felixoi
Copy link

felixoi commented Sep 10, 2023

Peek.2023-09-10.17-34.mp4

Here is a screencast. As you can see I'm starting betterbird in the command line and there is no tray icon even if mail.biff.show_tray_icon_always=true is enabled. The icon is added the first time im minimizing Betterbird and after that always shown as configured. I'd expect it's added at startup already, but this may be intended.

@Betterbird
Copy link
Owner

Thanks for the video. You only know what mix of software you're using there. There seems to be a "task bar" like on Windows, which we don't have, and the indicators all live on the bottom right. You mentioned a combination of the "AppIndicator and KStatusNotifierItem Support" extension with https://extensions.gnome.org/extension/1160/dash-to-panel/ (see #111 (comment)). We're not using the latter.

We see this on start after setting the pref to true in a prior session:

image

We'll rest our case for a while. Some casual reading revealed that this not only depends on the desktop but also the window manager, so there are two moving parts which make it hard to win.

@felixoi
Copy link

felixoi commented Sep 10, 2023

I'm using the combination you mentioned. It's alright for me, not a huge bug. I just left it here because I observed it while testing the other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants