diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-04-25 13:41:45 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-04-26 12:26:53 +0200 |
| commit | 6f4ee7faebaf3999f06c8b0e86c63f4b836ba074 (patch) | |
| tree | 2e80cb1537f0c7d5d2d937e1aa96da933237579c /gui/src/main | |
| parent | 6e4e42e8cf58a99c40a08e6ece94556a6596dc73 (diff) | |
| download | mullvadvpn-6f4ee7faebaf3999f06c8b0e86c63f4b836ba074.tar.xz mullvadvpn-6f4ee7faebaf3999f06c8b0e86c63f4b836ba074.zip | |
Add window chrome on Linux
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index b3139362d8..585b2528f6 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -967,7 +967,7 @@ class ApplicationMain { // the size of transparent area around arrow on macOS const headerBarArrowHeight = 12; - const options = { + const options: Electron.BrowserWindowConstructorOptions = { width: 320, minWidth: 320, height: contentHeight, @@ -1003,8 +1003,16 @@ class ApplicationMain { skipTaskbar: true, }); - default: - return new BrowserWindow(options); + default: { + const appWindow = new BrowserWindow({ + ...options, + frame: true, + }); + + appWindow.setMenuBarVisibility(false); + + return appWindow; + } } } @@ -1129,7 +1137,7 @@ class ApplicationMain { private installLinuxWindowCloseHandler(windowController: WindowController) { windowController.window.on('close', (closeEvent: Event) => { - if (process.platform === 'linux' && this.quitStage !== AppQuitStage.ready) { + if (this.quitStage !== AppQuitStage.ready) { closeEvent.preventDefault(); windowController.hide(); } |
