question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NW.js icon on the taskbar when you open a tray menu

See original GitHub issue

NW.js Version: sdk-v0.34.1 Operating System: Windows 10 x64, Windows 7 x64

How to reproduce

You can use the code for create simple tray object and hide main window:

let menu = new nw.Menu();
let path = require("path");
// Test icon for tray object
let icon = path.resolve(path.dirname(process.execPath), "icon.png");
menu.append(new nw.MenuItem({ label: 'Item A' }));
menu.append(new nw.MenuItem({ label: 'Item B' }));
new nw.Tray({title: "Test title", icon, menu});
// Hide main window
nw.Window.get().hide();

After this, if you open tray context menu, nwjs icon show on thw windows taskbar: https://youtu.be/8CHHSMFjsGk

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
thuraucsycommented, Jun 14, 2019

Confirmed the issue and it is still happening in the latest version [nwjs-sdk-v0.39.0-win-x64]. As @TheJaredWilcurt said, in version 0.33.4 is okay!

1reaction
TheJaredWilcurtcommented, Nov 8, 2018

Confirmed that issue only occurs in 0.34.0-beta and above. Issue not present in 0.33.4 or below.

Reproduction package.nw folder attached:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tray - NW.js Documentation
Tray is an abstraction of different controls on different platforms, usually it's a small icon shown on the OS's notification area.
Read more >
NW.js Windows 10 Taskbar icon shows always default
I am using the latest (at the moment of writing) 0.51.1 version of nw.js and the taskbar icon always defaults doesn't matter what...
Read more >
Developers - nwjs icon on the taskbar when you open a tray menu -
nwjs icon on the taskbar when you open a tray menu. ... You can use the code for create simple tray object and...
Read more >
The Tray API – hide your application in plain sight | NW.js ...
In order to show the menu, you'll have to right-click on the icon... Unlock full access. Continue reading with a subscription.
Read more >
How To Add Taskbar Icon To Node Webkit Application
This lets you open NW.js, then immediately launch the Webkit Developer Tools, ... with the support of menus, clipboards, tray icons, and file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found