Make DrawMenuBar and SetMenu tests pass under Wine

Dmitry Timoshkov dmitry at baikal.ru
Sat Sep 24 10:10:03 CDT 2005


Hello,

going through my old e-mails marked for different reasons as unread
I've found my old patch which adds DrawMenuBar tests and asserts
that it doesn't pass under Wine. Since big WM rewrite is (almost)
complete I decided to reinvestigate the problem and see if it's
possible to make the test pass with current code.

It appears that adding 2 lines of code makes not only DrawMenuBar test
pass, but also 2 tests for SetMenu now pass as well.

It's a bit awkward to run message tests with current CVS, DDE test
fails and doesn't allow the tests to continue, so I had to run it
manually. I haven't investigated the source of the failure, but symptoms
are that IsWindowUnicode now returns TRUE when it shouldn't, and that
reminds me old reports that uxtheme makes windows appear unicode
when they are not. Time to go to test.winehq.org and find the time of
the breakage.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Make DrawMenuBar and SetMenu tests pass under Wine.

diff -up cvs/hq/wine/dlls/user/tests/msg.c wine/dlls/user/tests/msg.c
--- cvs/hq/wine/dlls/user/tests/msg.c	2005-09-14 13:48:11.000000000 +0900
+++ wine/dlls/user/tests/msg.c	2005-09-24 23:39:11.000000000 +0900
@@ -3221,12 +3221,12 @@ static void test_messages(void)
     ShowWindow(hwnd, SW_SHOW);
     flush_sequence();
     ok (SetMenu(hwnd, 0), "SetMenu\n");
-    ok_sequence(WmSetMenuVisibleNoSizeChangeSeq, "SetMenu:VisibleNoSizeChange", TRUE);
+    ok_sequence(WmSetMenuVisibleNoSizeChangeSeq, "SetMenu:VisibleNoSizeChange", FALSE);
     ok (SetMenu(hwnd, hmenu), "SetMenu\n");
-    ok_sequence(WmSetMenuVisibleSizeChangeSeq, "SetMenu:VisibleSizeChange", TRUE);
+    ok_sequence(WmSetMenuVisibleSizeChangeSeq, "SetMenu:VisibleSizeChange", FALSE);
 
     ok(DrawMenuBar(hwnd), "DrawMenuBar\n");
-    ok_sequence(WmDrawMenuBarSeq, "DrawMenuBar", TRUE);
+    ok_sequence(WmDrawMenuBarSeq, "DrawMenuBar", FALSE);
 
     DestroyWindow(hwnd);
     flush_sequence();
diff -up cvs/hq/wine/dlls/x11drv/winpos.c wine/dlls/x11drv/winpos.c
--- cvs/hq/wine/dlls/x11drv/winpos.c	2005-09-20 12:52:44.000000000 +0900
+++ wine/dlls/x11drv/winpos.c	2005-09-24 23:47:45.000000000 +0900
@@ -670,6 +670,8 @@ BOOL X11DRV_set_window_pos( HWND hwnd, H
         }
     }
     WIN_ReleasePtr( win );
+    if ( ret && (old_style & WS_VISIBLE) && (new_style & WS_VISIBLE) && (swp_flags & SWP_FRAMECHANGED) )
+        RedrawWindow( hwnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_ERASENOW );
     return ret;
 }
 






More information about the wine-patches mailing list