-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Toggle window visibility on tray icon click #5276
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be rebased against the latest development
. Unfortunately, this file was deleted, so I think you'll need to make the change here:
Signal-Desktop/app/SystemTrayService.ts
Lines 184 to 186 in 1032249
if (!browserWindow.isVisible()) { | |
browserWindow.show(); | |
} |
I suspect this is what you'll do, but I haven't tested it:
if (browserWindow.isVisible()) {
browserWindow.hide();
} else {
browserWindow.show();
}
8fa8e7a
to
2bcc677
Compare
@EvanHahn-Signal from my quick test it does seem to work, thanks! |
2bcc677
to
3779147
Compare
@EvanHahn-Signal let me know if there's something else I should do before you can merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that we want to do?
On Windows, clicking the Discord tray icon doesn't toggle the app—it always shows it. Is this a common pattern on Linux or elsewhere?
If we're gonna use examples, here are the (very unrepresentative) apps I use (on Linux) and that have a system tray icon. These ones are minimized when I click on the tray icon:
These ones are focused if on another workspace (i3 workspace, but I guess it's the same with Gnome etc.), minimized if already in focus when I click the tray icon:
So they all exhibit the behavior of this PR. I don't know about Discord as I only use it from time to time in the browser. But maybe you would prefer the second behavior, meaning:
I think there's little drawback in adopting this new behavior: either people don't use it and will not even know about it, or they do and benefit from it. In terms of impact, I can ask people from the issue to chime in. I've counted 5 users in the issue. Since it's also not such a big bother, I guess there are not that many people who voiced their preference, compared with If you're still not convinced, I can open a thread on the forum. The "bug" label on the issue led me to think this was something to be fixed, but maybe it's not? |
Just wanted to ask if it's possible to distinguish between a single mouse-click and a double-click? Yeah I know that's more of a PEBCAK problem, but I've seen many people doing this, so it might be good to be mindful of that. |
@Mansarde don't you think they'd just get used to it, and end up doing a single-click eventually? As of now, one click is already enough to open it, right? So you can already see the window when you're doing your second click, if your computer is fast enough. |
@hiqua I think so too, yes. Didn't mean to say we shouldn't have it because of that. Just wanted to give that perspective which I've watched happen a lot of times, even after they've learned that you usually don't need to double-click. Personally I don't see a problem with it and am actually for it. :) |
For me on Linux toggling would be the natural thing I would expect, as many other apps do it this way, e.g. Linux Mint's Update Notification, KeePassXC, CopyQ, and many Cinnamon extensions (e.g. notifications). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This will be merged with the next beta release. Thank you!
Fixes #3045.
Contributor checklist:
development
branchyarn ready
run passes successfully (more about tests here)Description
Currently, (left) clicking the tray icon shows the window, but clicking again does not hide it. This change allows users to click again to hide the window.