File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
packages/compass/src/main Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,12 @@ import type {
1111 BrowserWindowConstructorOptions ,
1212 FindInPageOptions ,
1313} from 'electron' ;
14- import { app as electronApp , shell , BrowserWindow } from 'electron' ;
14+ import {
15+ app as electronApp ,
16+ shell ,
17+ screen as electronScreen ,
18+ BrowserWindow ,
19+ } from 'electron' ;
1520import { enable } from '@electron/remote/main' ;
1621
1722import { createLogger , mongoLogId } from '@mongodb-js/compass-logging' ;
@@ -204,6 +209,20 @@ function showConnectWindow(
204209 } ,
205210 } ;
206211
212+ const primaryDisplay = electronScreen . getPrimaryDisplay ( ) ;
213+ log . info (
214+ mongoLogId ( 1_001_000_380 ) ,
215+ 'Window Manager' ,
216+ 'Creating new browser window' ,
217+ {
218+ options : windowOpts ,
219+ screenSize : {
220+ width : primaryDisplay . workAreaSize . width ,
221+ height : primaryDisplay . workAreaSize . height ,
222+ } ,
223+ }
224+ ) ;
225+
207226 debug ( 'creating new main window:' , windowOpts ) ;
208227 let window : BrowserWindow | null = new BrowserWindow ( windowOpts ) ;
209228 if ( mongodbUrl ) {
You can’t perform that action at this time.
0 commit comments