[OS/2] Bug 506997: optimize repainting after window moves, r=dragtext

This commit is contained in:
Peter Weilbacher 2009-08-02 14:06:02 +03:00
parent c1896376f6
commit 859be8c297

View File

@ -103,9 +103,6 @@ static const char *sScreenManagerContractID = "@mozilla.org/gfx/screenmanager;1"
// NS2PM methods for conversion of points & rectangles; position is a bit
// different in that it's the *parent* window whose height must be used.
//
// Deferred window positioning is emulated using WinSetMultWindowPos in
// the hopes that there was a good reason for adding it to nsIWidget.
//
// SetColorSpace() is not implemented on purpose. So there.
//
// John Fairhurst 17-09-98 first version
@ -1354,9 +1351,12 @@ NS_METHOD nsWindow::Resize(PRInt32 aX,
ptl.y = WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN) - h - 1 - aY;
}
WinSetWindowPos(GetMainWindow(), 0, ptl.x, ptl.y, w, h, SWP_MOVE | SWP_SIZE);
if (aRepaint)
Invalidate(PR_FALSE);
if (!WinSetWindowPos(GetMainWindow(), 0, ptl.x, ptl.y, w, h,
SWP_MOVE | SWP_SIZE)) {
if (aRepaint) {
Invalidate(PR_FALSE);
}
}
#if DEBUG_sobotka
printf("+++++++++++Resized 0x%lx at %ld, %ld to %d x %d (%d,%d)\n",