diff options
author | 2018-03-28 14:55:51 +0200 | |
---|---|---|
committer | 2018-03-28 14:55:51 +0200 | |
commit | 655a6ed192bb1942b641f073b8f0db10c8692374 (patch) | |
tree | 8e46af69b02e2f26683789a80fafddc500e1d015 /src/stores | |
parent | http is dead, long live https (diff) | |
download | ferdium-app-655a6ed192bb1942b641f073b8f0db10c8692374.tar.gz ferdium-app-655a6ed192bb1942b641f073b8f0db10c8692374.tar.zst ferdium-app-655a6ed192bb1942b641f073b8f0db10c8692374.zip |
fix(Windows): Hide title bar when in fullscreen
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 10 |
1 files changed, 8 insertions, 2 deletions
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 '.. | |||
17 | 17 | ||
18 | const { app } = remote; | 18 | const { app } = remote; |
19 | 19 | ||
20 | const mainWindow = remote.getCurrentWindow(); | ||
21 | |||
20 | const defaultLocale = DEFAULT_APP_SETTINGS.locale; | 22 | const defaultLocale = DEFAULT_APP_SETTINGS.locale; |
21 | const autoLauncher = new AutoLaunch({ | 23 | const autoLauncher = new AutoLaunch({ |
22 | name: 'Franz', | 24 | name: 'Franz', |
@@ -48,6 +50,8 @@ export default class AppStore extends Store { | |||
48 | 50 | ||
49 | @observable isClearingAllCache = false; | 51 | @observable isClearingAllCache = false; |
50 | 52 | ||
53 | @observable isFullScreen = mainWindow.isFullScreen(); | ||
54 | |||
51 | constructor(...args) { | 55 | constructor(...args) { |
52 | super(...args); | 56 | super(...args); |
53 | 57 | ||
@@ -80,6 +84,10 @@ export default class AppStore extends Store { | |||
80 | window.addEventListener('online', () => { this.isOnline = true; }); | 84 | window.addEventListener('online', () => { this.isOnline = true; }); |
81 | window.addEventListener('offline', () => { this.isOnline = false; }); | 85 | window.addEventListener('offline', () => { this.isOnline = false; }); |
82 | 86 | ||
87 | mainWindow.on('enter-full-screen', () => { this.isFullScreen = true; }); | ||
88 | mainWindow.on('leave-full-screen', () => { this.isFullScreen = false; }); | ||
89 | |||
90 | |||
83 | this.isOnline = navigator.onLine; | 91 | this.isOnline = navigator.onLine; |
84 | 92 | ||
85 | // Check if Franz should launch on start | 93 | // Check if Franz should launch on start |
@@ -170,8 +178,6 @@ export default class AppStore extends Store { | |||
170 | 178 | ||
171 | this.actions.service.setActive({ serviceId }); | 179 | this.actions.service.setActive({ serviceId }); |
172 | 180 | ||
173 | const mainWindow = remote.getCurrentWindow(); | ||
174 | |||
175 | if (isWindows) { | 181 | if (isWindows) { |
176 | mainWindow.restore(); | 182 | mainWindow.restore(); |
177 | } else if (isLinux) { | 183 | } else if (isLinux) { |