-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(windows): skip DPI awareness API call when already set via manifest #4811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a pre-check to skip setting DPI awareness if already configured (e.g., via app manifest) and exposes GetProcessDpiAwareness bindings to query current DPI awareness from shcore.dll, preventing "Access is denied" errors when DPI is pre-set. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
d216776 to
c835cd0
Compare
Check current DPI awareness before calling SetProcessDpiAwarenessContext. Windows only allows setting DPI awareness once per process - either via manifest or API, not both. If already set (e.g., via application manifest in built binaries), skip the API call to avoid "Access is denied" errors. Fixes #4803 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
c835cd0 to
9d82164
Compare
|
|



Summary
SetProcessDpiAwarenessContextProblem
When using
wails3 devor running built binaries, users see the error:This happens because:
setupDPIAwareness()tries to callSetProcessDpiAwarenessContextSolution
Added
GetProcessDpiAwareness()to query the current DPI awareness level before attempting to set it. If awareness is already configured (notPROCESS_DPI_UNAWARE), the API call is skipped.Test plan
wails3 buildand verify no DPI error appearsgo runand verify DPI awareness is correctly set via APIFixes #4803
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.