You can clone with
HTTPS or Subversion.
I create a application, the main window running in the background for watch code file changes . When some file be modified and code error, program will open a new window to notify the user, i set the open window "always-on-top" to true, because it need to be the top of other windows . I just want create a notifier like natively. The problem is, When i edit a file and produced an error, then program pop a notification window, it will auto focus the window, to continue to edit the file, i need focus the edit window again. This is not the desired effect, i just want to show the notification window. How can i do it?
I think the "always-on-top" subfield should just let the window display at the top, without auto focus.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hi @oklai Please take a look at the Window.blur method. In the popup window call this method will move the focus away.
I tried use Window.blur method, but it alse not work. When trigger blur event, the main window will be focus.
Here the demo code https://gist.github.com/oklai/5298706.
You can have a try. When program runing, you switch to other window, like web browser, after 3 seconds, it will open the test window, after another 3 seconds, test window show and blur, and the main window will be focus too.
I want keep focus on web browser.
Sorry for my misunderstanding. It seems that currently nw didn't have this ability, or maybe have but I don't know.
Duplicate of #424