mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
user32: Return early on child windows in DrawMenuBar.
This commit is contained in:
parent
9d0f924d1b
commit
dcdf4dbf15
@ -4360,6 +4360,8 @@ BOOL WINAPI DrawMenuBar( HWND hWnd )
|
||||
|
||||
if (!IsWindow( hWnd ))
|
||||
return FALSE;
|
||||
if (!WIN_ALLOWED_MENU(GetWindowLongW( hWnd, GWL_STYLE )))
|
||||
return TRUE;
|
||||
|
||||
if ((hMenu = GetMenu( hWnd )) && (lppop = MENU_GetMenu( hMenu ))) {
|
||||
lppop->Height = 0; /* Make sure we call MENU_MenuBarCalcSize */
|
||||
|
@ -4871,6 +4871,18 @@ static void test_messages(void)
|
||||
flush_events();
|
||||
ok_sequence(WmDrawMenuBarSeq, "DrawMenuBar", FALSE);
|
||||
ok(SetCursorPos(pos.x, pos.y), "SetCursorPos failed\n");
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
|
||||
hwnd = CreateWindowExA(0, "TestDialogClass", NULL, WS_CHILD|WS_VISIBLE,
|
||||
0, 0, 100, 100, hparent, 0, GetModuleHandleA(0), NULL);
|
||||
ok(hwnd != 0, "Failed to create custom dialog window\n");
|
||||
flush_events();
|
||||
flush_sequence();
|
||||
ok(DrawMenuBar(hwnd), "DrawMenuBar failed: %d\n", GetLastError());
|
||||
flush_events();
|
||||
ok_sequence(WmEmptySeq, "DrawMenuBar for a child window", FALSE);
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
|
||||
flush_sequence();
|
||||
|
Loading…
Reference in New Issue
Block a user