Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/System.Windows.Forms/System/Windows/Forms/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11564,6 +11564,7 @@ private void WmDpiChangedBeforeParent(ref Message m)
DefWndProc(ref m);

OriginalDeviceDpiInternal = DeviceDpiInternal;
int oldDeviceDpi = DeviceDpiInternal;

// In order to support tests, will be querying Dpi from the message first.
int newDeviceDpi = (short)m.WParamInternal.LOWORD;
Expand All @@ -11582,6 +11583,7 @@ private void WmDpiChangedBeforeParent(ref Message m)

Font localFont = GetCurrentFontAndDpi(out int fontDpi);
DeviceDpiInternal = newDeviceDpi;
OriginalDeviceDpiInternal = oldDeviceDpi;

if (fontDpi == DeviceDpiInternal)
{
Expand Down