Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Black bars on startup with maximized or fullscreen windows #65

Open
Mixaz017 opened this issue Jun 24, 2022 · 1 comment
Open

Black bars on startup with maximized or fullscreen windows #65

Mixaz017 opened this issue Jun 24, 2022 · 1 comment

Comments

@Mixaz017
Copy link
Collaborator

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.
screenshot of related code

@prljav
Copy link

prljav commented Sep 4, 2022

Same issue on Debian, although it does fix itself a few seconds later

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants