Removed several patches (accepted upstream).

This commit is contained in:
Sebastian Lackner
2014-11-21 17:00:52 +01:00
parent 3741c4fe33
commit cc1292a1ac
10 changed files with 4 additions and 563 deletions

View File

@@ -1,61 +0,0 @@
From fd9bbdd0376581345c88bd65f4bbac2de348c202 Mon Sep 17 00:00:00 2001
From: Drew Ronneberg <drew_ronneberg@yahoo.com>
Date: Wed, 19 Nov 2014 13:34:54 +0000
Subject: user32/tests: Add interthread tests for calling ShowWindow(SW_HIDE)
on a hidden window.
---
dlls/user32/tests/msg.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 9b7453f..dfba25d 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -4621,9 +4621,18 @@ static void test_MsgWaitForMultipleObjects(HWND hwnd)
ok(ret == WAIT_IO_COMPLETION, "MsgWaitForMultipleObjectsEx returned %x\n", ret);
}
+static DWORD CALLBACK show_window_thread(LPVOID arg)
+{
+ HWND hwnd = arg;
+ ShowWindow(hwnd, SW_HIDE);
+ return 0;
+}
+
/* test if we receive the right sequence of messages */
static void test_messages(void)
{
+ DWORD tid, num_msgs;
+ HANDLE thread;
HWND hwnd, hparent, hchild;
HWND hchild2, hbutton;
HMENU hmenu;
@@ -4642,6 +4651,24 @@ static void test_messages(void)
ok( ShowWindow(hwnd, SW_HIDE) == FALSE, "ShowWindow: window was visible\n" );
ok_sequence(WmEmptySeq, "ShowWindow(SW_HIDE):overlapped, invisible", FALSE);
+ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE))
+ DispatchMessageA(&msg);
+
+ /* test ShowWindow(SW_HIDE) on a hidden window from a different thread */
+ num_msgs = 0;
+ thread = CreateThread(NULL, 0, show_window_thread, hwnd, 0, &tid);
+ ok(thread != NULL, "CreateThread failed, error %d\n", GetLastError());
+ while (MsgWaitForMultipleObjects(1, &thread, FALSE, INFINITE, QS_SENDMESSAGE) != WAIT_OBJECT_0)
+ {
+ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE))
+ DispatchMessageA(&msg);
+ 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);
+
/* test WM_SETREDRAW on a not visible top level window */
test_WM_SETREDRAW(hwnd);
--
2.1.3

View File

@@ -1,40 +0,0 @@
From fdf3506544cc3400b4a5bae23cf661df214d6292 Mon Sep 17 00:00:00 2001
From: Drew Ronneberg <drew_ronneberg@yahoo.com>
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

View File

@@ -1 +0,0 @@
Fixes: [11582] ShowWindow should avoid interthread no-op messages