idkr-client / idkr

:video_game: idk, just a Krunker client
GNU Affero General Public License v3.0
56 stars 37 forks source link

Black bars on startup with maximized or fullscreen windows #65

Open Mixaz017 opened 2 years ago

Mixaz017 commented 2 years ago

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 commented 1 year ago

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