Skip to content

Commit

Permalink
Fix: Fullscreen error
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm authored Apr 28, 2024
1 parent 9cda79e commit d72813a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/opencomic.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ window.onerror = function(msg, url, linenumber) {
}*/

function fullScreen(force = null)
function fullScreen(force = null, win = false)
{
if(force === null)
{
if(win === false)
win = electronRemote.getCurrentWindow();

if(force === null)
force = !win.isFullScreen();
}

titleBar.setFullScreen(force);

Expand All @@ -33,7 +33,7 @@ document.addEventListener("keydown", event => {

if(isFullScreen)
{
fullScreen(false);
fullScreen(false, win);
}
else
{
Expand Down Expand Up @@ -524,7 +524,7 @@ async function startApp()
let isFullScreen = win.isFullScreen();

if(!isFullScreen)
fullScreen(true);
fullScreen(true, win);
}

$('body .app').css('display', 'block');
Expand Down

0 comments on commit d72813a

Please sign in to comment.