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

If Signal is open in the background and the tray icon is clicked, focus Signal instead of closing it #6429

Open
2 tasks done
cmeeren opened this issue May 23, 2023 · 5 comments · May be fixed by #7048
Open
2 tasks done
Labels

Comments

@cmeeren
Copy link

cmeeren commented May 23, 2023

  • I have searched open and closed issues for duplicates
  • I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.

Bug Description

If the Signal window is open but not in the foreground (for example, minimized or behind other apps), and I click the systray icon (for example when I receive a new message and it gets a red badge, indicating "clickability"), I expect that Signal comes to the foreground. Instead, it currently closes the app, requiring me to click yet another time to open it.

For all such systray apps, I only ever click the tray icon to open apps, never to minimize them to the tray (I do that using Alt+F4 or similar). I have never had this problem with any other such app.

Steps to Reproduce

  1. Open the Signal window
  2. Minimize it to the taskbar (not systray) or place it behind another window
  3. Click the Signal systray icon

Actual Result:

The app is minimized to the systray.

Expected Result:

The app is activated / brought to the foreground.

Platform Info

Signal Version:

6.18.1

Operating System:

Win11 10.0.22621 Build 22621

Linked Device Version:

Not relevant

Link to Debug Log

Hopefully this is trivially reproducible and does not require a log. Let me know if this is not the case.

@Johann-Tree
Copy link

Same here with Signal 6.18.1 on Ubuntu Linux 20.04.6 LTS

@RichAyotte
Copy link

This is also problematic on Linux using a tiling WM such as Hyprland. If the window is already open, clicking the tray icon should simply give that window focus.

@major-mayer
Copy link

major-mayer commented Oct 23, 2023

At least on Manjaro Gnome/ Wayland this doesn't seem to be an issue.
It comes with the Gnome Shell Extension Appindicator pre-installed.
When I click the tray icon, Signal gets not minimized, nor put into the foreground, but just the drop-down menu opens.

grafik

@Sajito
Copy link

Sajito commented Oct 12, 2024

Same issue here on KDE Plasma. This is because the isVisible api in electron is kind of flaky.
It should report false, if the window is minimized or occluded, but it does not work reliably on all OS'es.

A fix would be quite simple, since there are only two placed where isVisible should be replaced by isFocused, which would fix this behavior and make the UX better.
The two places being:

...(browserWindow?.isVisible()

if (browserWindow.isVisible()) {

I'd open a pull request for this change, if it's acceptable without signing the CLA.

major-mayer added a commit to major-mayer/Signal-Desktop that referenced this issue Oct 14, 2024
@major-mayer
Copy link

Thanks for the suggestion @Sajito, I created a PR to tackle this issue.
It would be nice if you could test this on other platforms apart from KDE Plasma as well, to prevent any unwanted regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6 participants