@@ -13,7 +13,7 @@ import { INotificationService, Severity } from 'vs/platform/notification/common/
1313import URI from 'vs/base/common/uri' ;
1414import { localize } from 'vs/nls' ;
1515import { onUnexpectedError } from 'vs/base/common/errors' ;
16- import { IWindowService } from 'vs/platform/windows/common/windows' ;
16+ import { IWindowService , IWindowsService } from 'vs/platform/windows/common/windows' ;
1717
1818export class TelemetryOptOut implements IWorkbenchContribution {
1919
@@ -24,13 +24,17 @@ export class TelemetryOptOut implements IWorkbenchContribution {
2424 @IOpenerService openerService : IOpenerService ,
2525 @INotificationService notificationService : INotificationService ,
2626 @IWindowService windowService : IWindowService ,
27+ @IWindowsService windowsService : IWindowsService ,
2728 @ITelemetryService telemetryService : ITelemetryService
2829 ) {
2930 if ( ! product . telemetryOptOutUrl || storageService . get ( TelemetryOptOut . TELEMETRY_OPT_OUT_SHOWN ) ) {
3031 return ;
3132 }
32- windowService . isFocused ( ) . then ( focused => {
33- if ( ! focused ) {
33+ Promise . all ( [
34+ windowService . isFocused ( ) ,
35+ windowsService . getWindowCount ( )
36+ ] ) . then ( ( [ focused , count ] ) => {
37+ if ( ! focused && count > 1 ) {
3438 return null ;
3539 }
3640 storageService . store ( TelemetryOptOut . TELEMETRY_OPT_OUT_SHOWN , true ) ;
0 commit comments