summarylogtreecommitdiffstats
path: root/resizable.patch
blob: 87740cc189e4df44c2078d98b9c926bab7531473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 1b9c595b86b122c51efc29c21cd2ca805c7503d1 Mon Sep 17 00:00:00 2001
From: morguldir <morguldir@protonmail.com>
Date: Sat, 2 Nov 2019 21:33:32 +0100
Subject: [PATCH 1/2] Set resizable to false again

It already is resizable by using the scale factor, and it messes
up my i3wm system because then it automatically changes the
size to fit with the other windows. It also doesn't actually resize.
I assume this is the reason it was put there in the first place.

I'm guessing this was put here to scale to a full
monitor, which should be further looked at.
---
 src/main.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.js b/src/main.js
index c5a5739..6a55ea5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -36,7 +36,7 @@ function createWindow() {
     'show': false,
     'transparent': true,
     'maximizable': false,
-    'resizable': true,
+    'resizable': false,
     'fullscreenable': false,
     'alwaysOnTop': true
   });

From cfde457957d149e7d230d29efd594d57ba54ecac Mon Sep 17 00:00:00 2001
From: morguldir <morguldir@protonmail.com>
Date: Mon, 4 Nov 2019 21:45:06 +0100
Subject: [PATCH 2/2] Use setContentSize() instead of setSize() when resizing

setContentSize() still works when resizable is false
---
 src/main.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.js b/src/main.js
index 6a55ea5..329c128 100644
--- a/src/main.js
+++ b/src/main.js
@@ -148,7 +148,7 @@ ipcMain.on("resize", function (ev, width, height) {
   let windowPosition = win.getPosition();
 
   // Set new window size
-  win.setSize(Math.round(width), Math.round(height));
+  win.setContentSize(Math.round(width), Math.round(height));
 
   // Apply previous position again to fix up- and downwards resize on some Linux distros
   if(os.platform() === "linux") {