The title says it all, black bars on certain windows.
This is most likely related to the timings of maximize() or setFullscreen(true), I experimented a bit on adjusting timings of these code but I couldn't figure out the perfect timing. If I initialize the BrowserWindow with fullscreen property set to true, this issue does not occur; however I don't think there is a way to do this with maximized windows.
We probably need to call these code earlier than where we do now, but the problem is that in order to tell if maximizing/fullscreen should be applied or not, idkr needs to know what type of window is the current window, which depends on webContents.getURL(), which, only work after at least did-finish-load event (I tested did-start-loading but getURL() didn't return the URL). But even if I call maximize/fullscreen code right after did-finish-load, it still has the black bars issue.
The title says it all, black bars on certain windows.
This is most likely related to the timings of
maximize()
orsetFullscreen(true)
, I experimented a bit on adjusting timings of these code but I couldn't figure out the perfect timing. If I initialize theBrowserWindow
withfullscreen
property set to true, this issue does not occur; however I don't think there is a way to do this with maximized windows.We probably need to call these code earlier than where we do now, but the problem is that in order to tell if maximizing/fullscreen should be applied or not, idkr needs to know what type of window is the current window, which depends on![screenshot of related code](https://user-images.githubusercontent.com/31244102/175539078-dcede046-848b-478f-b364-21c2dcba1e48.png)
webContents.getURL()
, which, only work after at leastdid-finish-load
event (I testeddid-start-loading
butgetURL()
didn't return the URL). But even if I call maximize/fullscreen code right afterdid-finish-load
, it still has the black bars issue.