mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-21 06:45:22 -06:00
Merge 9b57c5b227 into 653e4badeb
This commit is contained in:
commit
c042a0881c
2 changed files with 6 additions and 0 deletions
2
doc/newsfragments/fix-windows-high-dpi.bugfix
Normal file
2
doc/newsfragments/fix-windows-high-dpi.bugfix
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Fix running on a windows monitor with Scale set to more than 100%.
|
||||
(https://github.com/debauchee/barrier/issues/94, https://github.com/debauchee/barrier/issues/273, https://github.com/debauchee/barrier/issues/1363, https://github.com/debauchee/barrier/issues/1405, https://github.com/debauchee/barrier/issues/1462)
|
||||
|
|
@ -138,6 +138,10 @@ AppUtilWindows::run(int argc, char** argv)
|
|||
throw std::runtime_error("Barrier only supports Windows XP SP3 and above.");
|
||||
}
|
||||
|
||||
// This changes the behavior of future calls to GetSystemMetrics()
|
||||
// so that the size or position in raw pixels is returned instead of a scaled value
|
||||
// (when a windows display has a Scale of > 100% set).
|
||||
SetProcessDPIAware();
|
||||
// record window instance for tray icon, etc
|
||||
ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue