From 4a15897b3fe5fbfbaedf86da2124403dee7b4d65 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 27 Oct 2016 11:59:50 +0200 Subject: [PATCH] fixes #11918 --- src/vs/workbench/parts/git/browser/gitServices.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/git/browser/gitServices.ts b/src/vs/workbench/parts/git/browser/gitServices.ts index af4d7df93aa..ffc3e9b8a20 100644 --- a/src/vs/workbench/parts/git/browser/gitServices.ts +++ b/src/vs/workbench/parts/git/browser/gitServices.ts @@ -410,7 +410,6 @@ export class GitService extends EventEmitter private reactiveStatusDelayer: PeriodThrottledDelayer; private autoFetcher: AutoFetcher; private isStatusPending = false; - private isFocused = true; private _allowHugeRepositories: boolean; get allowHugeRepositories(): boolean { return this._allowHugeRepositories; } @@ -518,15 +517,10 @@ export class GitService extends EventEmitter const focusEvent = domEvent(window, 'focus'); this.toDispose.push(focusEvent(() => { - this.isFocused = true; - if (this.isStatusPending) { this.triggerAutoStatus(); } })); - - const blurEvent = domEvent(window, 'blur'); - this.toDispose.push(blurEvent(() => this.isFocused = false)); } private onTextFileChange(e: TextFileModelChangeEvent): void { @@ -615,7 +609,7 @@ export class GitService extends EventEmitter private triggerAutoStatus(force = false): void { this.isStatusPending = true; - if (!this.isFocused && !force) { + if (!document.hasFocus() && !force) { return; }