-
-
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
base: v3-alpha
Are you sure you want to change the base?
Conversation
|
Warning Rate limit exceeded@leaanthony has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 22 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughThis PR fixes an "Access is denied" error in SetProcessDpiAwarenessContext by adding a pre-check to determine if DPI awareness is already set via application manifest. If detected, the setup returns early, preventing redundant configuration. The fix includes new Windows API bindings for GetProcessDpiAwareness. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 <[email protected]>
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.