You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request]: Target a Display when fullscreen-ing a BrowserWindow #30249
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Problem Description
Right now, the win.setFullScreen() method will fullscreen the window on its current display. There is no way to target a different display when fullscreening.
Proposed Solution
Add an optional second "display" argument to the setFullScreen() method:
win.setFullScreen(flag,display)
This would identify the target Display for fullscreening. When win.setFullScreen(false) is called, the BrowserWindow would return to it's original location on its original Display.
Alternatives Considered
The current method for doing this is clunky.
functionfullScreenOnDisplay(win,disp){constcurrentDisplay=screen.getDisplayMatching(win.getBounds())if(currentDisplay===disp){// we're already on the right screen, no need to move}else{// we need to move the window to the correct screen before fullscreening// ensure that the window isn't already fullscreenedwin.setFullScreen(false)win.setPosition(disp.workArea.x,disp.workArea.y)// --- unnecessary window repaint happens here with non-fullscreen window on target display ---}win.setFullScreen(true)}
However, when win.setFullScreen(false) is called, the window will end up on the target display and not in its original location.
Additional Information
A few of the other BrowserWindow instance methods could be multi-screen aware as well.
win.maximize() win.center()
and/or possbly a new method of: win.moveToDisplay(display)
Hi, while we appreciate this enhancement request it's not something that our team will be able to implement in the near future, and since we use our issues tab as the team's backlog, we prefer to only retain issues that are on our immediate roadmap. If you'd like to make a PR for this request we would welcome that but in the meantime I'm going to go ahead and close this.
Activity
codebytere commentedon May 28, 2025
Hi, while we appreciate this enhancement request it's not something that our team will be able to implement in the near future, and since we use our issues tab as the team's backlog, we prefer to only retain issues that are on our immediate roadmap. If you'd like to make a PR for this request we would welcome that but in the meantime I'm going to go ahead and close this.