From f5d2349e2b0382449581f3edc11433ffd16187ef Mon Sep 17 00:00:00 2001 From: Peter Weilbacher Date: Sun, 2 Aug 2009 14:06:02 +0300 Subject: [PATCH] [OS/2] Bug 506997: optimize repainting after window moves, r=dragtext --- widget/src/os2/nsWindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/widget/src/os2/nsWindow.cpp b/widget/src/os2/nsWindow.cpp index 5cd585b0f49..c1af77ad9de 100644 --- a/widget/src/os2/nsWindow.cpp +++ b/widget/src/os2/nsWindow.cpp @@ -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",