[PATCH 4/6] comctl32: Don't touch the new child twice in PGM_SETCHILD.
Stefan Dösinger
stefan at codeweavers.com
Wed Apr 5 02:15:42 CDT 2017
This fixes switching the shape palette in Visio 2013. The extra
WM_WINDOWPOSCHANGING or WM_WINDOWPOSCHANGED message breaks Visio's
redraw logic.
---
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 e9fc2e7..f0361ec 100644
--- a/dlls/comctl32/tests/pager.c
+++ b/dlls/comctl32/tests/pager.c
@@ -277,7 +277,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);
--
2.10.2
More information about the wine-patches
mailing list