Alexandre Julliard : user32: Pass HWND_BOTTOM unmodified to the server in PeekMessage.

Alexandre Julliard julliard at winehq.org
Wed Mar 3 11:15:46 CST 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Mar  3 13:18:33 2010 +0100

user32: Pass HWND_BOTTOM unmodified to the server in PeekMessage.

---

 dlls/user32/message.c |    3 +--
 server/queue.c        |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index fedb917..498b521 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -2034,8 +2034,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
     if (!(buffer = HeapAlloc( GetProcessHeap(), 0, buffer_size ))) return FALSE;
 
     if (!first && !last) last = ~0;
-    if (hwnd == HWND_BROADCAST || hwnd == HWND_TOPMOST || hwnd == HWND_BOTTOM)
-        hwnd = (HWND)-1;
+    if (hwnd == HWND_BROADCAST) hwnd = HWND_TOPMOST;
 
     for (;;)
     {
diff --git a/server/queue.c b/server/queue.c
index cfe9818..938d7cf 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -636,7 +636,7 @@ static void reply_message( struct msg_queue *queue, lparam_t result,
 static int match_window( user_handle_t win, user_handle_t msg_win )
 {
     if (!win) return 1;
-    if (win == (user_handle_t)-1) return !msg_win;
+    if (win == -1 || win == 1) return !msg_win;
     if (msg_win == win) return 1;
     return is_child_window( win, msg_win );
 }




More information about the wine-cvs mailing list