Skip to content

Commit

Permalink
Merge pull request #103 from hatharry/master
Browse files Browse the repository at this point in the history
fix fullscreen on linux
  • Loading branch information
LukePulverenti authored Dec 30, 2020
2 parents 403cd87 + 39751e4 commit fef5544
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@

if (initialShowEventsComplete) {
mainWindow.focus();
mainWindow.resizable = false;
mainWindow.movable = false;
if (!require('is-linux')()) {
mainWindow.resizable = false;
mainWindow.movable = false;
}
}
}

Expand All @@ -123,8 +125,10 @@
onWindowStateChanged('Normal');

if (initialShowEventsComplete) {
mainWindow.resizable = true;
mainWindow.movable = true;
if (!require('is-linux')()) {
mainWindow.resizable = true;
mainWindow.movable = true;
}
}
}

Expand Down Expand Up @@ -811,7 +815,6 @@
require("fs").writeFileSync(windowStatePath, JSON.stringify(data));
}

sendJavascript('AppCloseHelper.onClosing();');

// Unregister all shortcuts.
electron.globalShortcut.unregisterAll();
Expand All @@ -820,7 +823,6 @@
cecProcess.kill();
}

app.exit();
}

function parseCommandLine() {
Expand Down Expand Up @@ -918,7 +920,7 @@
// initialization and is ready to create browser windows.
app.on('ready', function () {

var isWindows = require('is-windows');
var islinux = require('is-linux')();
var windowStatePath = getWindowStateDataPath();

var previousWindowInfo;
Expand All @@ -933,8 +935,8 @@
var windowOptions = {
transparent: true, //supportsTransparency,
frame: false,
resizable: !isfullscreen,
movable: !isfullscreen,
resizable: !isfullscreen || islinux,
movable: !isfullscreen || islinux,
title: 'Emby Theater',
minWidth: 720,
minHeight: 480,
Expand Down

0 comments on commit fef5544

Please sign in to comment.