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:
Jonathan Kew 2016-04-15 19:54:31 +01:00
Родитель fbb1abf68d
Коммит bad0b01695
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -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();
}
/**************************************************************