user32: Pass HWND_BOTTOM unmodified to the server in PeekMessage.
authorAlexandre Julliard <julliard@winehq.org>
Wed, 3 Mar 2010 12:18:33 +0000 (13:18 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 3 Mar 2010 12:20:26 +0000 (13:20 +0100)
dlls/user32/message.c
server/queue.c

index fedb917dd5e2d78893a2a6826c615be9fb545cfb..498b52118748f2165b00b4a5d8481575c2668252 100644 (file)
@@ -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 (;;)
     {
index cfe981877da5ed3c49044e7756cc01dd190c6a76..938d7cff4a90f3d284a9cc536f79643e1aa35867 100644 (file)
@@ -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 );
 }