Skip to content

Commit b4ec59d

Browse files
committed
chore: new windows in electron becomes progressively smaller
1 parent be58ade commit b4ec59d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/document/DocumentCommandHandlers.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,8 +1748,10 @@ define(function (require, exports, module) {
17481748
}
17491749

17501750
function newPhoenixWindow(cliArgsArray = null, cwd=null) {
1751-
let width = window.innerWidth;
1752-
let height = window.innerHeight;
1751+
// Electron needs outerWidth/outerHeight (includes window chrome).
1752+
// Tauri needs innerWidth/innerHeight.
1753+
let width = window.__ELECTRON__ ? window.outerWidth : window.innerWidth;
1754+
let height = window.__ELECTRON__ ? window.outerHeight : window.innerHeight;
17531755
Phoenix.app.openNewPhoenixEditorWindow(width, height, cliArgsArray, cwd);
17541756
}
17551757

0 commit comments

Comments
 (0)