зеркало из 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);
|
||||
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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче