mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Fix for different per-monitor scaling (#657)
* Use DPIAware::DEFAULT_DPI * Make runner DPI-unaware, since it doesn't need to use a Per Monitor V2 DPI. * Programmatically enable "Per Monitor V2 DPI" for the runner proccess and use a separate DPI-unaware thread for the corresponding API calls * Increase PCH memory limit for settings project * Address review issues * Draw zoneWindows properly scaled
This commit is contained in:
@@ -37,4 +37,8 @@ void DPIAware::Convert(HMONITOR monitor_handle, int &width, int &height) {
|
||||
width = width * dpi_x / DEFAULT_DPI;
|
||||
height = height * dpi_y / DEFAULT_DPI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DPIAware::EnableDPIAwarenessForThisProcess() {
|
||||
SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user