From 655a6ed192bb1942b641f073b8f0db10c8692374 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 28 Mar 2018 14:55:51 +0200 Subject: fix(Windows): Hide title bar when in fullscreen --- src/stores/AppStore.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/stores/AppStore.js') diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 4ac8325d4..b3554f9d8 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -17,6 +17,8 @@ import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '.. const { app } = remote; +const mainWindow = remote.getCurrentWindow(); + const defaultLocale = DEFAULT_APP_SETTINGS.locale; const autoLauncher = new AutoLaunch({ name: 'Franz', @@ -48,6 +50,8 @@ export default class AppStore extends Store { @observable isClearingAllCache = false; + @observable isFullScreen = mainWindow.isFullScreen(); + constructor(...args) { super(...args); @@ -80,6 +84,10 @@ export default class AppStore extends Store { window.addEventListener('online', () => { this.isOnline = true; }); window.addEventListener('offline', () => { this.isOnline = false; }); + mainWindow.on('enter-full-screen', () => { this.isFullScreen = true; }); + mainWindow.on('leave-full-screen', () => { this.isFullScreen = false; }); + + this.isOnline = navigator.onLine; // Check if Franz should launch on start @@ -170,8 +178,6 @@ export default class AppStore extends Store { this.actions.service.setActive({ serviceId }); - const mainWindow = remote.getCurrentWindow(); - if (isWindows) { mainWindow.restore(); } else if (isLinux) { -- cgit v1.2.3-70-g09d2