diff --git a/package.json b/package.json index c8a31d3..111c723 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Gitpod", "description": "Gitpod Support", "publisher": "gitpod", - "version": "0.0.168", + "version": "0.0.169", "license": "MIT", "icon": "resources/gitpod.png", "repository": { diff --git a/src/heartbeat.ts b/src/heartbeat.ts index 7ce9314..bec107a 100644 --- a/src/heartbeat.ts +++ b/src/heartbeat.ts @@ -76,8 +76,10 @@ export class HeartbeatManager extends Disposable { this._register(vscode.window.onDidCloseTerminal(() => this.updateLastActivity('onDidCloseTerminal'))); this._register(vscode.window.onDidChangeTerminalState(() => this.updateLastActivity('onDidChangeTerminalState'))); this._register(vscode.window.onDidChangeWindowState((e) => { - this.focused = e.focused; - this.updateLastActivity('onDidChangeWindowState'); + if (e.focused !== this.focused) { + this.focused = e.focused; + this.updateLastActivity('onDidChangeWindowState'); + } })); this._register(vscode.window.onDidChangeActiveColorTheme(() => this.updateLastActivity('onDidChangeActiveColorTheme'))); this._register(vscode.authentication.onDidChangeSessions(() => this.updateLastActivity('onDidChangeSessions')));