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
Starting in fullscreen then toggling to windowed mode results in black screen (1.2.x) #6036
If you start an browser window in fullscreen and then attempt to toggle to windowed mode, the window will just black out and become unresponsive. Attempting to toggle back again still results in a black screen.
However, if you start the window in windowed mode and then toggle to fullscreen, it works as expected.
This maybe related to the fixes made to the fullscreen API in 1.2.x. It only occurs on Windows. It does not happen on 1.1.3.
This is pretty much happening for us as well. With a windowed application if we minimise it to task-bar and then click the icon, results in the black screen. Once we alt-tab it, works fine.
@kevinsawicki thanks you and sorry about the duplicate.
to narrow down the bug, it seem to occur when fullscreen is called before the window is shown, as I mentioned I was able to start in full screen if I set it to true after win.show()
Note that if I don't pass in {fullscreenable: true} then window.setFullScreen(true) has no effect even though the docs say {fullscreenable: true} is the default
I just submitted PR #9645 that hopefully fixes this issue. After it's merged you won't need any of the above workarounds and can just use { fullscreen: true } and avoid the two step startup animation of normal->fullscreen. i.e. It should be possible to render straight to fullscreen and still have a responsive window after leaving the fullscreen state.
FYI: The WS_VISIBLE flag wasn't being set for the GWL_STYLE on return to the ui::SHOW_STATE_NORMAL window state, thus the window couldn't receive any OS events and appeared unresponsive.
Reacted by Maher Fa, Randy Damron and Dale Harders
Hi, @dharders , I also encounter this same question, the version of electron is 2.0.10.
I have two browserWindows, jump from A browserWindow to B browserWindow. Full screen the B browserWindow, and then click the x icon(close B window), my logic is to hide the B browserWindow, and show A browserWindow.
But at this time, I find the B BrowserWindow is black, and the A browserWindow shows normal.
Activity
jeremyrajan commentedon Aug 11, 2016
This is pretty much happening for us as well. With a windowed application if we minimise it to task-bar and then click the icon, results in the black screen. Once we alt-tab it, works fine.
Electron: 1.2.5
OS: Windows
CharlieHess commentedon Aug 11, 2016
Probably the same as #6033?
kevinsawicki commentedon Aug 11, 2016
I don't think so, this issue is only reproducible on Windows and the window becomes completely unusable.
MaherFa commentedon Oct 25, 2016
@kevinsawicki thanks you and sorry about the duplicate.
to narrow down the bug, it seem to occur when fullscreen is called before the window is shown, as I mentioned I was able to start in full screen if I set it to true after
win.show()greggman commentedon Nov 27, 2016
This is happening for me as well in 1.4.5
greggman commentedon Nov 27, 2016
BTW: I wasn't calling
win.setFullScreen(true)I was just passing in{fullscreen: true}as an option tonew BrowserWindowMy workaround ATM is to instead pass on
{fullscreenable: true}and then use something likeNote that if I don't pass in
{fullscreenable: true}thenwindow.setFullScreen(true)has no effect even though the docs say{fullscreenable: true}is the defaultjeremyrajan commentedon Nov 28, 2016
I didn't try this one. Will give it a shot and see if helps us :)
Thank you 👍
MaherFa commentedon Mar 15, 2017
@George35mk you mean maximize?
KoenLav commentedon Mar 22, 2017
Same issue here.
I can confirm that setting the window to fullscreen after the domready event solves the issue. For meteor-desktop as follows:
🏁 Fix electron#6036. Ensure window is visible after fullscreen toggle
✅ Add test for Windows fullscreen state toggle. Fix electron#6036
dharders commentedon Jun 1, 2017
I just submitted PR #9645 that hopefully fixes this issue. After it's merged you won't need any of the above workarounds and can just use
{ fullscreen: true }and avoid the two step startup animation of normal->fullscreen. i.e. It should be possible to render straight to fullscreen and still have a responsive window after leaving the fullscreen state.FYI: The
WS_VISIBLEflag wasn't being set for theGWL_STYLEon return to theui::SHOW_STATE_NORMALwindow state, thus the window couldn't receive any OS events and appeared unresponsive.✅ Add test for Windows fullscreen state toggle. Fix electron#6036
✅ Add test for Windows fullscreen state toggle. Fix electron#6036
dharders commentedon Jun 29, 2017
Fix: upgrade your electron dependency, fix now released in
"electron": "1.7.4 beta"lishoulong commentedon Jan 15, 2019
Hi, @dharders , I also encounter this same question, the version of electron is 2.0.10.
I have two browserWindows, jump from A browserWindow to B browserWindow. Full screen the B browserWindow, and then click the x icon(close B window), my logic is to hide the B browserWindow, and show A browserWindow.
But at this time, I find the B BrowserWindow is black, and the A browserWindow shows normal.
Looking for your help!
lishoulong commentedon Jan 15, 2019
I solved this question using isFullScreen method, mentioned in this issue #6033.
meetDeveloper commentedon Aug 14, 2019
If I construct a browser window with window options as,
and then do window.show(), window does not go to full screen mode. @dharders