nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

win.isAlwaysOnTop should be true after win.setAlwaysOnTop(true) but is false

Open Risingson opened this issue 4 years ago • 2 comments

Thanks for reporting an issue! Spend 60 seconds reading this...

  1. Before reporting, try reproducing against the latest version of NWJS.
  2. Issue tracker is only for bugs and feature requests, in English only.

Anything else? Use our mailing list for questions: https://groups.google.com/forum/#!forum/nwjs-general

======== TEMPLATE BUG FORM ========

NWJS Version : 0.44.3 Operating System : WIN 10

Expected behavior

win.isAlwaysOnTop should be true after win.setAlwaysOnTop(true)

Actual behavior

win.isAlwaysOnTop is false after win.setAlwaysOnTop(true)

How to reproduce

see above image

Risingson avatar Mar 05 '20 21:03 Risingson

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 10:01 stale[bot]

Seems to be a bug in the Chrome extension chrome.windows.get api.

chrome.windows.get(nwWindow.cWindow.id, {populate: true}, 
   win => {
     console.log(win.alwaysOnTop); // always false !
});

I tested with NWJS v0.62.0 on MacOS.

Luckily setting the property via chrome.windows.update works fine.

So my conclusion is that your app logic has to record the alwaysOnTop state itself. I guess there is nothing much NWJS can do except an expensive workaround by managing a list of window states itself.

Preferably one should file a bug report with Google.

semmel avatar Mar 10 '22 20:03 semmel