=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: comctl32: Don' t touch the new child twice in PGM_SETCHILD.

Alexandre Julliard julliard at winehq.org
Mon Apr 10 15:37:18 CDT 2017


Module: wine
Branch: master
Commit: 692656467729c5548c45244aa05ca946620afa72
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=692656467729c5548c45244aa05ca946620afa72

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Fri Apr  7 16:02:04 2017 +0200

comctl32: Don't touch the new child twice in PGM_SETCHILD.

Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/pager.c       | 15 ++++-----------
 dlls/comctl32/tests/pager.c |  2 +-
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c
index a10d3bb..ae759fb 100644
--- a/dlls/comctl32/pager.c
+++ b/dlls/comctl32/pager.c
@@ -248,10 +248,9 @@ PAGER_PositionChildWnd(PAGER_INFO* infoPtr)
             TRACE("[%p] SWP %dx%d at (%d,%d)\n", infoPtr->hwndSelf,
                          infoPtr->nWidth, infoPtr->nHeight,
                          -nPos, 0);
-            SetWindowPos(infoPtr->hwndChild, 0,
+            SetWindowPos(infoPtr->hwndChild, HWND_TOP,
                          -nPos, 0,
-                         infoPtr->nWidth, infoPtr->nHeight,
-                         SWP_NOZORDER);
+                         infoPtr->nWidth, infoPtr->nHeight, 0);
         }
         else
         {
@@ -262,10 +261,9 @@ PAGER_PositionChildWnd(PAGER_INFO* infoPtr)
             TRACE("[%p] SWP %dx%d at (%d,%d)\n", infoPtr->hwndSelf,
                          infoPtr->nWidth, infoPtr->nHeight,
                          0, -nPos);
-            SetWindowPos(infoPtr->hwndChild, 0,
+            SetWindowPos(infoPtr->hwndChild, HWND_TOP,
                          0, -nPos,
-                         infoPtr->nWidth, infoPtr->nHeight,
-                         SWP_NOZORDER);
+                         infoPtr->nWidth, infoPtr->nHeight, 0);
         }
 
         InvalidateRect(infoPtr->hwndChild, NULL, TRUE);
@@ -481,11 +479,6 @@ PAGER_SetChild (PAGER_INFO* infoPtr, HWND hwndChild)
         SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
                      SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
 
-        /* position child within the page scroller */
-        SetWindowPos(infoPtr->hwndChild, HWND_TOP,
-                     0,0,0,0,
-                     SWP_SHOWWINDOW | SWP_NOSIZE);  /* native is 0 */
-
         infoPtr->nPos = -1;
         PAGER_SetPos(infoPtr, 0, FALSE);
     }
diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c
index e7ce748..7a9cdbb 100644
--- a/dlls/comctl32/tests/pager.c
+++ b/dlls/comctl32/tests/pager.c
@@ -283,7 +283,7 @@ static void test_pager(void)
     GetWindowRect(pager, &rect);
     ok(rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
         "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top);
-    todo_wine ok(!IsWindowVisible(child2_wnd), "Child window 2 is visible\n");
+    ok(!IsWindowVisible(child2_wnd), "Child window 2 is visible\n");
 
     flush_sequences(sequences, NUM_MSG_SEQUENCES);
     SendMessageA(pager, PGM_SETCHILD, 0, (LPARAM)child1_wnd);




More information about the wine-cvs mailing list