summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2018-05-17 14:05:53 +0100
committerEmīls Piņķis <emils@mullvad.net>2018-05-18 11:03:03 +0100
commitc85dbb5d2faaa368dc07c1c2d6a61066d3362bef (patch)
tree55eba72f31411238d8ab65fdb24af2d507b11a75
parentd892395b5469c4fe71514adf2862e67291c8b6bb (diff)
downloadmullvadvpn-c85dbb5d2faaa368dc07c1c2d6a61066d3362bef.tar.xz
mullvadvpn-c85dbb5d2faaa368dc07c1c2d6a61066d3362bef.zip
Ignore a single tray dimension when updating window position depending
on task bar placement.
-rw-r--r--app/main.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/main.js b/app/main.js
index 5824a23222..313315e37a 100644
--- a/app/main.js
+++ b/app/main.js
@@ -444,21 +444,21 @@ const appDelegate = {
switch(placement) {
case 'top':
x = trayBounds.x + (trayBounds.width - windowBounds.width) * 0.5;
- y = trayBounds.y + trayBounds.height;
+ y = workArea.y;
break;
case 'bottom':
x = trayBounds.x + (trayBounds.width - windowBounds.width) * 0.5;
- y = trayBounds.y - windowBounds.height;
+ y = workArea.y + workArea.height - windowBounds.height;
break;
case 'left':
- x = trayBounds.x + trayBounds.width;
+ x = workArea.x;
y = trayBounds.y + (trayBounds.height - windowBounds.height) * 0.5;
break;
case 'right':
- x = trayBounds.x - windowBounds.width;
+ x = workArea.width - windowBounds.width;
y = trayBounds.y + (trayBounds.height - windowBounds.height) * 0.5;
break;