Skip to content

Code Quality: Replaced DllImport calls with CsWin32 generations for DPI calculation operations #17118

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

Merged
merged 2 commits into from
May 11, 2025

Conversation

Lamparter
Copy link
Contributor

Resolved / Related Issues

Steps used to test these changes

  1. Opened the app
  2. Tested components that reference the migrated AppModel.AppWindowDPI property

GetDpiForWindow is already being used in some places however the legacy method pointing to a DllImport call remains in the Win32 PInvoke helper.
This PR removes it from the helper and replaces the final reference to Win32PInvoke.GetDpiForWindow() with the appropriate method generated by CsWin32.

@Lamparter Lamparter force-pushed the cswin32/GetDpiForWindow branch from 8542c54 to f21227d Compare May 11, 2025 11:12
@yaira2 yaira2 added the changes requested Changes are needed for this pull request label May 11, 2025
@yaira2 yaira2 requested a review from 0x5bfa May 11, 2025 15:34
@0x5bfa
Copy link
Member

0x5bfa commented May 11, 2025

Looks fine to me.

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed changes requested Changes are needed for this pull request labels May 11, 2025
@yaira2 yaira2 merged commit 704c187 into files-community:main May 11, 2025
6 checks passed
@Lamparter Lamparter deleted the cswin32/GetDpiForWindow branch May 12, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants