michaelwasserman/window-placement-demo

Window Placement In Electron

Opened this issue · 2 comments

jjeff commented

I was doing some testing to see if this API will work yet in Electron. I created an Electron Fiddle project which opens your page to test. Unfortunately, all requestFullscreen()s seem to target the primary display.

I realize that Electron is probably outside of your scope, but I'd really like to see this support get into Electron as soon as possible. Do you have any thoughts about what might be happening? When enabling experimentalFeatures for the BrowserWindow, window.getScreens() works, and your demo seems to show things correctly. It's just the actual requestFullscreen({screen: someScreen}) part that seems to be failing.

Anyway, I thought I'd check in here before filing an issue for Electron.

Sorry, I don't know offhand why Electron wouldn't respect cross-display fullscreen; please link the Electron issue you file here.
You mention that it always targets "the primary display", but I'm guessing you meant "the window's current display"?
FWIW, the current Chromium impl moves the window to the target display and then requests fullscreen.

I tried this on Mac with your fiddle and Electron v15.0.0-beta.6 and had the same result.
Interestingly, cross-screen window.open() bounds seem to work as intended.