From fdf3506544cc3400b4a5bae23cf661df214d6292 Mon Sep 17 00:00:00 2001 From: Drew Ronneberg Date: Wed, 19 Nov 2014 13:35:01 +0000 Subject: user32: Do not call SendMessage() to hide a window that is already hidden (try 3) --- dlls/user32/tests/msg.c | 1 - dlls/user32/winpos.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index dfba25d..9d448ae 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -4665,7 +4665,6 @@ static void test_messages(void) num_msgs++; } CloseHandle(thread); - todo_wine ok(num_msgs == 0, "got %u wakeups from MsgWaitForMultipleObjects\n", num_msgs); ok_sequence(WmEmptySeq, "ShowWindow(SW_HIDE):overlapped, invisible", FALSE); diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 5373733..12d3ffa 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1219,6 +1219,9 @@ BOOL WINAPI ShowWindow( HWND hwnd, INT cmd ) if ((full_handle = WIN_IsCurrentThread( hwnd ))) return show_window( full_handle, cmd ); + if ((cmd == SW_HIDE) && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE)) + return FALSE; + return SendMessageW( hwnd, WM_WINE_SHOWWINDOW, cmd, 0 ); } -- 2.1.3