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

Left mouse click on tray icon on Linux shows context menu instead of showing the window #950

Closed
3 tasks done
dantalian-pv opened this issue Mar 18, 2019 · 16 comments
Closed
3 tasks done

Comments

@dantalian-pv
Copy link

I confirm (by marking "x" in the [ ] below: [x]):


Summary
In Mattermost Desktop 4.1.2 and previous versions left mouse click on the tray icon showed a main window, and starting from version 4.2.0 left and right mouse clicks have the same behavior and shows context menu, which is inconvenient in case I have to make two clicks now instead of one to open the window. Furthermore, when I had a message and clicked on the tray icon, it showed the main window and opened a dialog with a new message.

Environment

  • Operating System: Linux (4.12.14-lp150.12.48-default x64) openSUSE Leap 15.1 with KDE 5.12.5
  • Mattermost Desktop App version: 4.2.0
  • Mattermost Server version: 5.8.0

Steps to reproduce

  1. Run application with "Show icon in the notification area" and "Leave app running in notification area when application window is closed" setting on KDE.
  2. Close a main window
  3. Left mouse click on the tray icon.

Expected behavior
Left mouse click on tray icon should show the main windows with opened dialog where new massage is arrived.

Observed behavior
Left mouse click shows context menu as well as right mouse click on the tray icon.

@amyblais
Copy link
Member

Ticket for tracking: https://mattermost.atlassian.net/browse/MM-14674

@amyblais amyblais changed the title Left mouse click on tray icon on Linux shows context menu instead of showing the window [Help Wanted] Left mouse click on tray icon on Linux shows context menu instead of showing the window Jun 21, 2019
@amyblais amyblais added the Hacktoberfest null label Oct 7, 2019
@2019-05-10
Copy link

I experience it too and think it odd, that user have to complain about such a bug, instead of fixing it right away.
Basically any application providing a systray entry works the way expected by the OP -- why won't mm?

@hanzei hanzei changed the title [Help Wanted] Left mouse click on tray icon on Linux shows context menu instead of showing the window Left mouse click on tray icon on Linux shows context menu instead of showing the window Oct 22, 2019
@amyblais amyblais removed the Hacktoberfest null label Nov 4, 2019
@marcoesposito1988
Copy link

This seems to be due to a limitation of electron between versions 3 and 8. The click event is not handled on Linux for these versions.

I opened a PR for the same problem for Rambox here. In their case, the fix consists in simply bumping the electron version to 8 and properly handling the click event.

Please consider doing the same when you will reach that version of electron 😊

@jespino jespino added the Hacktoberfest null label Sep 21, 2020
@jespino jespino removed the Hacktoberfest null label Jan 14, 2021
@cpanato cpanato added the Hacktoberfest null label Oct 2, 2021
@devinbinnie
Copy link
Member

This is working correctly for me on Kubuntu 20.04 using KDE Plasma and Desktop App v5.0.2.
Closing unless this issue is still relevant.

@2019-05-10
Copy link

Debian/Sid, MM Desktop 5.0.2 and the original issue still persists.
Please reopen.

@marcoesposito1988
Copy link

Same here on Kubuntu 20.04 with Plasma (fully up to date as of today, Dec. 10th) and 5.0.2. The issue still persists. Already deleted ~/.config/Mattermost.

@devinbinnie devinbinnie reopened this Dec 10, 2021
@devinbinnie
Copy link
Member

@2019-05-10 @marcoesposito1988 How did you install Mattermost on your machines? I used the .deb and had no trouble.

@marcoesposito1988
Copy link

Thanks for reopening the issue @devinbinnie! I also used the deb. I already tried deleting the config, but if I can try something else (deleting some cache) or you need some logs or more information about my system, just please let me know.

In the weekend I may manage to test it in a fresh VM with a live Kubuntu

@devinbinnie
Copy link
Member

@marcoesposito1988 That's what I used, a fresh Kubuntu VM and it works fine for me. Let me know what your findings are :)

@marcoesposito1988
Copy link

The issue doesn't appear indeed in a fresh instance. I will try to find the root cause of the issue.

@2019-05-10
Copy link

Why has this been closed?
Unless the issue is solved for existing installations, it certainly cannot be considered solved.
The MS Windows way ("reinstall everything") is definitely not a solution.

@devinbinnie
Copy link
Member

Why has this been closed? Unless the issue is solved for existing installations, it certainly cannot be considered solved. The MS Windows way ("reinstall everything") is definitely not a solution.

This issue is not closed, we are awaiting investigation. @marcoesposito1988 Did you ever end up finding anything with your investigation?

@2019-05-10
Copy link

Uh, I apologize.
I got confused by the "Closed" label on the reference to #1937

@AKorezin
Copy link

Found another case for this problem.

If you close main window before actually configuring any server, then there's no way you can bring main window back again.

Steps to reproduce

from master branch

  1. clean all settings
  2. npm ci
  3. npm run watch
  4. don't configure servers
  5. go to settings
  6. enable Show icon in the notification area
  7. enable Leave app running in notification area when application window is closed
  8. close window without terminating app

Result

In tray there are no options to bring main window back again.

Workaround

  1. make app restart

@devinbinnie devinbinnie removed the Hacktoberfest null label Jul 7, 2022
@kevfocke
Copy link
Contributor

kevfocke commented Jan 20, 2023

I did not have this issue until I installed the libappindicator-gtk3 package from the Arch Linux repositories. After installing this, clicking on the system tray did not even register in the mattermost-desktop log in any way. Uninstalling it again fixed the problem.

EDIT: This problem was identified a long time ago, but never really fixed. Maybe one can opt-out of using the appindicator in all/most cases?

EDIT2: Did not read till the end, should be fixed in newer versions of electron: electron/electron#36333

@devinbinnie
Copy link
Member

This has been fixed in this PR: #2708 (actually probably earlier since it's an Electron issue).

Note for users still using libappindicator, this is not fixed and sounds like it won't be fixed upstream. But it should be working for most users.

Closing.

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

No branches or pull requests

10 participants