summaryrefslogtreecommitdiffhomepage
path: root/gui/src/main
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2019-04-25 13:41:45 +0200
committerAndrej Mihajlov <and@mullvad.net>2019-04-26 12:26:53 +0200
commit6f4ee7faebaf3999f06c8b0e86c63f4b836ba074 (patch)
tree2e80cb1537f0c7d5d2d937e1aa96da933237579c /gui/src/main
parent6e4e42e8cf58a99c40a08e6ece94556a6596dc73 (diff)
downloadmullvadvpn-6f4ee7faebaf3999f06c8b0e86c63f4b836ba074.tar.xz
mullvadvpn-6f4ee7faebaf3999f06c8b0e86c63f4b836ba074.zip
Add window chrome on Linux
Diffstat (limited to 'gui/src/main')
-rw-r--r--gui/src/main/index.ts16
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();
}