{"id":20148379,"url":"https://github.com/nwutils/faux-tray-menu","last_synced_at":"2026-03-07T01:02:43.298Z","repository":{"id":149265765,"uuid":"309695569","full_name":"nwutils/faux-tray-menu","owner":"nwutils","description":"(WIP) Example of a custom right-click menu on a tray icon using a frameless window","archived":false,"fork":false,"pushed_at":"2021-08-20T12:16:47.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-03T00:25:56.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nwutils.io","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwutils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-03T13:30:52.000Z","updated_at":"2021-08-20T12:16:49.000Z","dependencies_parsed_at":"2023-09-03T09:53:13.602Z","dependency_job_id":null,"html_url":"https://github.com/nwutils/faux-tray-menu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nwutils/faux-tray-menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Ffaux-tray-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Ffaux-tray-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Ffaux-tray-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Ffaux-tray-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwutils","download_url":"https://codeload.github.com/nwutils/faux-tray-menu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Ffaux-tray-menu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30204452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T22:37:25.076Z","updated_at":"2026-03-07T01:02:43.246Z","avatar_url":"https://github.com/nwutils.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# faux-tray-menu\n\nExample of a custom right-click menu on a tray icon using a frameless window.\n\nThis is a placeholder repo for an idea.\n\n\n## The problem\n\nIn NW.js v0.34.0-beta a bug was introduced that causes the taskbar to display NW.js when you open a context menu on a tray app.\n\n![Gif of the bug](https://user-images.githubusercontent.com/4629794/97620291-bfc66980-19f7-11eb-823c-2a39f32c7100.gif)\n\n**UPDATE:** This bug was fixed in NW.js v0.48.0!\n\n\n## The idea\n\nThe `tray` feature only supports a native menu on right-click (which causes this bug) and a `click` event on left-click. \n\n```js\ntray.on('click', function (evt) {\n  nw.Window.get().showDevTools();\n  console.log(evt.x);\n  console.log(evt.y);\n});\n```\n\nUsing the x,y coords, you could spawn a custom frameless window that simulates a menu at that location. Frameless windows would have `show_in_taskbar: false`. This approach would also allow for much greater control over the rendering and interactivity of the menu.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Ffaux-tray-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwutils%2Ffaux-tray-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Ffaux-tray-menu/lists"}