Clinton Stimpson : user32: Also test parent messages when hiding child window.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 30 08:56:01 CDT 2007


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

Author: Clinton Stimpson <cjstimpson at utwire.net>
Date:   Thu Jul 26 19:27:53 2007 -0600

user32: Also test parent messages when hiding child window.

---

 dlls/user32/tests/msg.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 799c891..04dca3f 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -727,6 +727,15 @@ static const struct message WmHideChildSeq[] = {
     { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
     { 0 }
 };
+/* ShowWindow(SW_HIDE) for a visible child window checking all parent events*/
+static const struct message WmHideChildSeq2[] = {
+    { WM_SHOWWINDOW, sent|wparam, 0 },
+    { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
+    { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
+    { WM_ERASEBKGND, sent|parent },
+    { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
+    { 0 }
+};
 /* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE)
  * for a not visible child window
  */
@@ -3982,6 +3991,15 @@ static void test_messages(void)
     ShowWindow(hchild, SW_SHOW);
     ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW):child", FALSE);
 
+    /* check parent messages too */
+    log_all_parent_messages++;
+    ShowWindow(hchild, SW_HIDE);
+    ok_sequence(WmHideChildSeq2, "ShowWindow(SW_HIDE):child", TRUE);
+    log_all_parent_messages--;
+
+    ShowWindow(hchild, SW_SHOW);
+    ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW):child", FALSE);
+
     ShowWindow(hchild, SW_HIDE);
     ok_sequence(WmHideChildSeq, "ShowWindow(SW_HIDE):child", FALSE);
 




More information about the wine-cvs mailing list