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

nw2: Window icon cannot be set #7222

Closed
Luzzifus opened this issue Nov 19, 2019 · 2 comments
Closed

nw2: Window icon cannot be set #7222

Luzzifus opened this issue Nov 19, 2019 · 2 comments
Labels

Comments

@Luzzifus
Copy link

Luzzifus commented Nov 19, 2019

NWJS Version : 0.42.5
Operating System : Win10 (1903)

Expected behavior

When specifying the window subfield "icon", the taskbar icon of the window should display that icon.

Actual behavior

The taskbar icon shows a default document icon.

icon_error

How to reproduce

Only happens in NW2 mode, works as expected with "chromium-args": "--disable-features=nw2".

nw.Window.open('html/index.html', {
  show: false,
  frame: false,
  icon: 'html/icon/icon128.png',
  title: 'Whatever',
  width: 850,
  height: 600,
  position: 'center'
});

#7230

@rogerwang
Copy link
Member

This was fixed in #7236

@akshay-joshi
Copy link

I am still facing this issue while developing my application.

Scenario: My application launches multiple new windows depending on the condition set by the users. I used "window.open(url, '_blank');" which is an existing logic that I can't change. 

To set the common height, width and icon for all windows I used the below logic:

currWin.on('new-win-policy', function(frame, url, policy) {
policy.setNewWindowManifest({
'icon': '../assets/app.png',
'frame': true,
'width': 1300,     
'height': 900,     
'position': 'center',
});
});

The above is working fine on OSX, but when runs on Windows 10 I am still getting a red icon for the newly open window. Please refer to the below screenshot.
Screenshot 2020-12-03 at 6 17 36 PM

When I use --disable-features=nw2 it works.

Using: nw.js v0.50.1
Screenshot 2020-12-03 at 6 17 16 PM

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

No branches or pull requests

3 participants