33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6- import { Disposable , DisposableStore } from 'vs/base/common/lifecycle' ;
6+ import { Disposable } from 'vs/base/common/lifecycle' ;
77import { assign } from 'vs/base/common/objects' ;
88import { URI } from 'vs/base/common/uri' ;
99import { IWindowsService , OpenContext } from 'vs/platform/windows/common/windows' ;
@@ -23,10 +23,6 @@ export class LegacyWindowsMainService extends Disposable implements IWindowsServ
2323
2424 _serviceBrand : undefined ;
2525
26- private readonly disposables = this . _register ( new DisposableStore ( ) ) ;
27-
28- private _activeWindowId : number | undefined ;
29-
3026 readonly onWindowOpen : Event < number > = Event . filter ( Event . fromNodeEventEmitter ( app , 'browser-window-created' , ( _ , w : BrowserWindow ) => w . id ) , id => ! ! this . windowsMainService . getWindowById ( id ) ) ;
3127 readonly onWindowBlur : Event < number > = Event . filter ( Event . fromNodeEventEmitter ( app , 'browser-window-blur' , ( _ , w : BrowserWindow ) => w . id ) , id => ! ! this . windowsMainService . getWindowById ( id ) ) ;
3228 readonly onWindowMaximize : Event < number > = Event . filter ( Event . fromNodeEventEmitter ( app , 'browser-window-maximize' , ( _ , w : BrowserWindow ) => w . id ) , id => ! ! this . windowsMainService . getWindowById ( id ) ) ;
@@ -48,10 +44,6 @@ export class LegacyWindowsMainService extends Disposable implements IWindowsServ
4844 super ( ) ;
4945
5046 urlService . registerHandler ( this ) ;
51-
52- // remember last active window id
53- Event . latch ( Event . any ( this . onWindowOpen , this . onWindowFocus ) )
54- ( id => this . _activeWindowId = id , null , this . disposables ) ;
5547 }
5648
5749 async addRecentlyOpened ( recents : IRecent [ ] ) : Promise < void > {
@@ -96,10 +88,6 @@ export class LegacyWindowsMainService extends Disposable implements IWindowsServ
9688 }
9789 }
9890
99- async getActiveWindowId ( ) : Promise < number | undefined > {
100- return this . _activeWindowId ;
101- }
102-
10391 async handleURL ( uri : URI ) : Promise < boolean > {
10492
10593 // Catch file URLs
0 commit comments