зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1320531 - Check whether DPI appears to have changed before calling ChangedDPI + ResetLayout while dragging windows. r=emk
This commit is contained in:
Родитель
b003a7de36
Коммит
3728df26c1
|
@ -5653,13 +5653,16 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||||
FinishLiveResizing(MOVING);
|
FinishLiveResizing(MOVING);
|
||||||
if (WinUtils::IsPerMonitorDPIAware()) {
|
if (WinUtils::IsPerMonitorDPIAware()) {
|
||||||
// Sometimes, we appear to miss a WM_DPICHANGED message while moving
|
// Sometimes, we appear to miss a WM_DPICHANGED message while moving
|
||||||
// a window around. Therefore, call ChangedDPI and ResetLayout here,
|
// a window around. Therefore, call ChangedDPI and ResetLayout here
|
||||||
// which causes the prescontext and appshell window management code to
|
// 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
|
// check the appUnitsPerDevPixel value and current widget size, and
|
||||||
// refresh them if necessary. If nothing has changed, these calls will
|
// refresh them if necessary. If nothing has changed, these calls will
|
||||||
// return without actually triggering any extra reflow or painting.
|
// return without actually triggering any extra reflow or painting.
|
||||||
ChangedDPI();
|
if (WinUtils::LogToPhysFactor(mWnd) != mDefaultScale) {
|
||||||
ResetLayout();
|
ChangedDPI();
|
||||||
|
ResetLayout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче