Skip to content

Commit

Permalink
fix hygiene
Browse files Browse the repository at this point in the history
  • Loading branch information
sbatten committed Jul 18, 2022
1 parent 4ceffc0 commit 7e8aef2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/vs/workbench/electron-sandbox/parts/titlebar/titlebarPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ export class TitlebarPart extends BrowserTitleBarPart {
// Window System Context Menu
// See https://github.com/electron/electron/issues/24893
if (isWindows && getTitleBarStyle(this.configurationService) === 'custom') {
this._register(this.nativeHostService.onDidTriggerSystemContextMenu(({ windowId, x, y }) => {
if (this.nativeHostService.windowId !== windowId) {
return;
}

const zoomFactor = getZoomFactor();
this.onContextMenu(new MouseEvent('mouseup', { clientX: x / zoomFactor, clientY: y / zoomFactor }), MenuId.TitleBarContext);
}));
this._register(this.nativeHostService.onDidTriggerSystemContextMenu(({ windowId, x, y }) => {
if (this.nativeHostService.windowId !== windowId) {
return;
}

const zoomFactor = getZoomFactor();
this.onContextMenu(new MouseEvent('mouseup', { clientX: x / zoomFactor, clientY: y / zoomFactor }), MenuId.TitleBarContext);
}));
}

return ret;
Expand Down

0 comments on commit 7e8aef2

Please sign in to comment.