OSX - New BrowserWindow from a BrowserWindow that is fullscreen


My app runs a remote Angular web app inside of a BrowserWindow. Sometimes, such as when an external link is clicked, a new BrowserWindow is created that shows on top of the first one. In order to have more control over the second window I am overriding:

webContents.on('new-window', function(event, urlToOpen)

In here I create the new BrowserWindow like this:

var newWindow = new BrowserWindow({width: 800, height: 600, fullscreen: false, "node-integration": false});

This all works fine mostly. But when the user has the original window in full screen mode then the second window will also open up in full screen mode, which I don’t want. In full screen mode each window ends up on its own workspace which make sit less obvious that the two windows are even related.

Is there any way to prevent the second window from going into full screen? I just want it to stay as a smaller window on top of the first one.