electron / electron/electron

[Bug]: click event on Tray Icon is broken in Linux

Open
#37,112 27 comments 0 reactions 0 assignees View on GitHub
22-x-y 23-x-y bug :beetle: has-repro-repo platform/linux
Dominant language
C++
Stars
123k
Forks
17.5k
Avg merge
14h 28m
Merged PRs (30d)
870

Description

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

22.0.2

### What operating system are you using?

Ubuntu

### Operating System Version

Ubuntu 22.04.1 LTS

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

I created a tray icon, added the context menu, and registered for a click event. when we left-click the icon it should fire the click event when right click the icon it should show the context menu.

### Actual Behavior

I created a tray icon, added the context menu, and registered for a click event. when we click the icon it shows the context menu regardless of the type of click (right or left).

### Testcase Gist URL

_No response_

### Additional Information

Steps to reproduce:

- Clone the [srilakshmikanthanp/quicknote](https://github.com/srilakshmikanthanp/quicknote.git) repository
- run `npm install` to install packages
- run `npm run start`
- click the icon on the taskbar

On Windows:

- it is working perfectly on windows platforms

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.