Skip to content

Commit af87ab9

Browse files
authored
windows - for now show OS context menu in title (workaround microsoft#250626) (microsoft#250631)
1 parent a532c95 commit af87ab9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/vs/platform/windows/electron-main/windowImpl.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,14 @@ export abstract class BaseWindow extends Disposable implements IBaseWindow {
180180
const cx = Math.floor(cursorPos.x) - x;
181181
const cy = Math.floor(cursorPos.y) - y;
182182

183-
if (cx > 35 /* Cursor is beyond app icon in title bar */) {
184-
e.event.preventDefault();
183+
// TODO@bpasero TODO@deepak1556 workaround for https://github.com/microsoft/vscode/issues/250626
184+
// where showing the custom menu seems broken on Windows
185+
if (isLinux) {
186+
if (cx > 35 /* Cursor is beyond app icon in title bar */) {
187+
e.event.preventDefault();
185188

186-
this._onDidTriggerSystemContextMenu.fire({ x: cx, y: cy });
189+
this._onDidTriggerSystemContextMenu.fire({ x: cx, y: cy });
190+
}
187191
}
188192
}));
189193
}

0 commit comments

Comments
 (0)