Skip to content

Commit bc17f18

Browse files
committed
fix: windows os > file>new window size jumps
1 parent 99ddaf0 commit bc17f18

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/phoenix/shell.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,15 @@ Phoenix.app = {
892892
if(window.__TAURI__) {
893893
const currentWindow = window.__TAURI__.window.getCurrent();
894894
const outerSize = await currentWindow.outerSize();
895+
const innerSize = await currentWindow.innerSize();
896+
let size = outerSize;
897+
if(Phoenix.platform !== 'mac'){
898+
size = innerSize;
899+
}
895900
const scaleFactor = await currentWindow.scaleFactor();
896901
return {
897-
width: Math.round(outerSize.width / scaleFactor),
898-
height: Math.round(outerSize.height / scaleFactor)
902+
width: Math.round(size.width / scaleFactor),
903+
height: Math.round(size.height / scaleFactor)
899904
};
900905
}
901906
if(window.__ELECTRON__) {

0 commit comments

Comments
 (0)