Bug 1320531 - Check whether DPI appears to have changed before calling ChangedDPI + ResetLayout while dragging windows. r=emk

This commit is contained in:
Jonathan Kew 2017-01-31 20:54:23 +00:00
Родитель b003a7de36
Коммит 3728df26c1
1 изменённых файлов: 7 добавлений и 4 удалений

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

@ -5653,13 +5653,16 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
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
// a window around. Therefore, call ChangedDPI and ResetLayout here
// if it appears that the window's scaling is not what we expect.
// This 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();
if (WinUtils::LogToPhysFactor(mWnd) != mDefaultScale) {
ChangedDPI();
ResetLayout();
}
}
break;