mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1264193 - Add extra check for DPI changes during window drag, because we sometimes miss a WM_DPICHANGED message. r=emk a=ritu
This commit is contained in:
parent
b33894510c
commit
e9820b4ca2
@ -5371,6 +5371,16 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
|
||||
case WM_MOVING:
|
||||
FinishLiveResizing(MOVING);
|
||||
if (WinUtils::IsPerMonitorDPIAware()) {
|
||||
// Sometimes, we appear to miss a WM_DPICHANGED message while moving
|
||||
// a window around. Therefore, call ChangedDPI and ResetLayout here,
|
||||
// which causes the prescontext and appshell window management code to
|
||||
// check the appUnitsPerDevPixel value and current widget size, and
|
||||
// refresh them if necessary. If nothing has changed, these calls will
|
||||
// return without actually triggering any extra reflow or painting.
|
||||
ChangedDPI();
|
||||
ResetLayout();
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_ENTERSIZEMOVE:
|
||||
@ -6927,6 +6937,7 @@ nsWindow::OnDPIChanged(int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
Resize(x, y, width, height, true);
|
||||
}
|
||||
ChangedDPI();
|
||||
ResetLayout();
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user