Skip to content

Commit

Permalink
Restore dpiAwareness
Browse files Browse the repository at this point in the history
Fixes regression from #304
Fixes #1462, possibly others.
  • Loading branch information
mipedja committed Jan 8, 2022
1 parent 433126e commit 00a57ea
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/newsfragments/restore-dpiawareness.bugfix
@@ -0,0 +1 @@
Fixed a regression in 2.4.0 that caused Barrier to not support scaling other than 100% (https://github.com/debauchee/barrier/issues/1462).
4 changes: 3 additions & 1 deletion src/cmd/barrierc/CMakeLists.txt
Expand Up @@ -21,7 +21,9 @@ set(sources
if (WIN32)
file(GLOB arch_headers "MSWindows*.h")
file(GLOB arch_sources "MSWindows*.cpp")
list(APPEND sources barrierc.rc)
list(APPEND sources
barrierc.rc
barrierc.exe.manifest)
elseif (APPLE)
file(GLOB arch_headers "OSX*.h")
file(GLOB arch_sources "OSX*.cpp")
Expand Down
16 changes: 16 additions & 0 deletions src/cmd/barrierc/barrierc.exe.manifest
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>
4 changes: 3 additions & 1 deletion src/cmd/barriers/CMakeLists.txt
Expand Up @@ -21,7 +21,9 @@ set(sources
if (WIN32)
file(GLOB arch_headers "MSWindows*.h")
file(GLOB arch_sources "MSWindows*.cpp")
list(APPEND sources barriers.rc)
list(APPEND sources
barriers.rc
barriers.exe.manifest)
elseif (APPLE)
file(GLOB arch_headers "OSX*.h")
file(GLOB arch_sources "OSX*.cpp")
Expand Down
16 changes: 16 additions & 0 deletions src/cmd/barriers/barriers.exe.manifest
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

0 comments on commit 00a57ea

Please sign in to comment.