File tree Expand file tree Collapse file tree
src/vs/workbench/browser/parts/titlebar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -564,7 +564,7 @@ export class BrowserTitlebarPart extends Part implements ITitlebarPart {
564564 this . dragRegion = prepend ( this . rootContainer , $ ( 'div.titlebar-drag-region' ) ) ;
565565 if ( ( globalThis as any ) . __SIDEX_TAURI__ ) {
566566 this . dragRegion . style . setProperty ( '-webkit-app-region' , 'no-drag' ) ;
567- this . dragRegion . style . pointerEvents = 'none' ;
567+ // this.dragRegion.style.pointerEvents = 'none';
568568
569569 this . _register (
570570 addDisposableListener ( this . rootContainer , EventType . MOUSE_DOWN , e => {
@@ -577,6 +577,18 @@ export class BrowserTitlebarPart extends Part implements ITitlebarPart {
577577 }
578578 } )
579579 ) ;
580+
581+ this . _register (
582+ addDisposableListener ( this . rootContainer , EventType . DBLCLICK , e => {
583+ const target = e . target as HTMLElement ;
584+ if ( target === this . dragRegion || target === this . rootContainer ) {
585+ e . preventDefault ( ) ;
586+ import ( '@tauri-apps/api/window' ) . then ( ( { getCurrentWindow } ) => {
587+ getCurrentWindow ( ) . toggleMaximize ( ) ;
588+ } ) ;
589+ }
590+ } )
591+ ) ;
580592 }
581593
582594 // Menubar: install a custom menu bar depending on configuration
You can’t perform that action at this time.
0 commit comments