From 1c690dd16cfa5038c4333c75a3880b79b0e1e08e Mon Sep 17 00:00:00 2001 From: hatharry Date: Wed, 30 Dec 2020 22:35:31 +1300 Subject: [PATCH 1/2] fix fullscreen on linux --- main.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index 2efd3738..64445e88 100644 --- a/main.js +++ b/main.js @@ -113,8 +113,10 @@ if (initialShowEventsComplete) { mainWindow.focus(); - mainWindow.resizable = false; - mainWindow.movable = false; + if (!require('is-linux')()) { + mainWindow.resizable = false; + mainWindow.movable = false; + } } } @@ -123,8 +125,10 @@ onWindowStateChanged('Normal'); if (initialShowEventsComplete) { - mainWindow.resizable = true; - mainWindow.movable = true; + if (!require('is-linux')()) { + mainWindow.resizable = true; + mainWindow.movable = true; + } } } @@ -918,7 +922,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; @@ -933,8 +937,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, From 39751e483d5add9d91f6f0690b98c8bae338beca Mon Sep 17 00:00:00 2001 From: hatharry Date: Wed, 30 Dec 2020 23:56:35 +1300 Subject: [PATCH 2/2] fix crash on exit --- main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.js b/main.js index 64445e88..f4996caf 100644 --- a/main.js +++ b/main.js @@ -815,7 +815,6 @@ require("fs").writeFileSync(windowStatePath, JSON.stringify(data)); } - sendJavascript('AppCloseHelper.onClosing();'); // Unregister all shortcuts. electron.globalShortcut.unregisterAll(); @@ -824,7 +823,6 @@ cecProcess.kill(); } - app.exit(); } function parseCommandLine() {