Correct DPI when multiple monitors are used

This commit is contained in:
Daniel Imms 2022-12-15 11:28:57 -08:00
parent 9687542e42
commit 6ec7f2675e
No known key found for this signature in database
GPG key ID: E5CF412B63651C69

View file

@ -279,6 +279,11 @@ export class IssueMainService implements IIssueMainService {
position = this.getWindowPosition(this.processExplorerParentWindow, 800, 500);
}
// Correct dimensions to take scale/dpr into account
const displayToUse = screen.getDisplayNearestPoint({ x: position.x!, y: position.y! });
position.width! /= displayToUse.scaleFactor;
position.height! /= displayToUse.scaleFactor;
this.processExplorerWindow = this.createBrowserWindow(position, processExplorerWindowConfigUrl, {
backgroundColor: data.styles.backgroundColor,
title: localize('processExplorer', "Process Explorer"),