@@ -55,7 +55,12 @@ class WindowManager implements IWindowManager {
5555
5656 this . mainWindow . setBrowserView ( tab ) ;
5757 this . mainWindow . on ( 'resize' , this . onResize ) ;
58+ this . mainWindow . on ( 'maximize' , ( e : Event ) => setTimeout ( ( ) => this . onResize ( e ) , 100 ) ) ;
59+ this . mainWindow . on ( 'unmaximize' , ( e : Event ) => setTimeout ( ( ) => this . onResize ( e ) , 100 ) ) ;
60+ this . mainWindow . on ( 'close' , this . onWindowAllClosed ) ;
61+
5862 shortcuts ( ) ;
63+
5964 setTimeout ( ( ) => {
6065 this . setZoom ( 0.9 ) ;
6166 this . onResize ( ) ;
@@ -182,9 +187,16 @@ class WindowManager implements IWindowManager {
182187 window . setMenu ( null ) ;
183188 }
184189
185- private onResize = async ( ) => {
190+ private onResize = async ( event ?: Event ) => {
186191 const browserViews = E . BrowserView . getAllViews ( ) ;
187-
192+
193+ console . log ( 'onResize, event: ' , event && event ! . target ) ;
194+ console . log ( 'onResize, bounds: ' , {
195+ x : 0 ,
196+ y : parseInt ( ( 28 * await this . getZoom ( ) + '' ) . substr ( 0 , 4 ) ) ,
197+ width : this . mainWindow . getContentBounds ( ) . width ,
198+ height : this . mainWindow . getContentBounds ( ) . height - parseInt ( ( 28 * await this . getZoom ( ) + '' ) . substr ( 0 , 4 ) )
199+ } ) ;
188200 browserViews . forEach ( async bw => bw . setBounds ( {
189201 x : 0 ,
190202 y : parseInt ( ( 28 * await this . getZoom ( ) + '' ) . substr ( 0 , 4 ) ) ,
0 commit comments