зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264193 - Add extra check for DPI changes during window drag, because we sometimes miss a WM_DPICHANGED message. r=emk
This commit is contained in:
Родитель
fbb1abf68d
Коммит
bad0b01695
|
@ -5373,6 +5373,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:
|
||||
|
@ -6924,6 +6934,7 @@ nsWindow::OnDPIChanged(int32_t x, int32_t y, int32_t width, int32_t height)
|
|||
Resize(x, y, width, height, true);
|
||||
}
|
||||
ChangedDPI();
|
||||
ResetLayout();
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
|
|
Загрузка…
Ссылка в новой задаче