[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Mon, 27 Dec 2010 09:08:01 +0000 (09:08 +0000)
committerJames Tabor <james.tabor@reactos.org>
Mon, 27 Dec 2010 09:08:01 +0000 (09:08 +0000)
- Use SendNotifyMessage for broadcasting these messages and SendMessageNoWait when not broadcasting.

svn path=/trunk/; revision=50154

reactos/subsystems/win32/win32k/include/msgqueue.h
reactos/subsystems/win32/win32k/ntuser/clipboard.c
reactos/subsystems/win32/win32k/ntuser/focus.c
reactos/subsystems/win32/win32k/ntuser/ntstubs.c
reactos/subsystems/win32/win32k/ntuser/painting.c

index f153314..f359f60 100644 (file)
@@ -187,7 +187,7 @@ co_IntSendMessageTimeout(HWND hWnd,
                       UINT uFlags,
                       UINT uTimeout,
                       ULONG_PTR *uResult);
-
+BOOL FASTCALL UserSendNotifyMessage( HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam );
 LRESULT FASTCALL co_IntSendMessageNoWait(HWND hWnd,
                         UINT Msg,
                         WPARAM wParam,
index b75cb2d..121d7af 100644 (file)
@@ -601,7 +601,7 @@ NtUserEmptyClipboard(VOID)
     if (ret && ClipboardOwnerWindow)
     {
         DPRINT("Clipboard: WM_DESTROYCLIPBOARD to %p", ClipboardOwnerWindow->head.h);
-        co_IntSendMessage( ClipboardOwnerWindow->head.h, WM_DESTROYCLIPBOARD, 0, 0);
+        co_IntSendMessageNoWait( ClipboardOwnerWindow->head.h, WM_DESTROYCLIPBOARD, 0, 0);
     }
 
     UserLeave();
index 67273cc..6b1428c 100644 (file)
@@ -79,10 +79,10 @@ co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate)
       /* Send palette messages */
       if (co_IntSendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0))
       {
-         UserPostMessage( HWND_BROADCAST,
-                          WM_PALETTEISCHANGING,
-                         (WPARAM)hWnd,
-                          0);
+         UserSendNotifyMessage( HWND_BROADCAST,
+                                WM_PALETTEISCHANGING,
+                               (WPARAM)hWnd,
+                                0);
       }
 
       if (Window->spwndPrev != NULL)
index 445bdd5..5045718 100644 (file)
@@ -564,7 +564,7 @@ NtUserSetSysColors(
   }
   if (Ret)
   {
-     UserPostMessage(HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0);
+     UserSendNotifyMessage(HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0);
   }
   UserLeave();
   return Ret;
index e78a044..53f7b41 100644 (file)
@@ -1952,7 +1952,7 @@ UserRealizePalette(HDC hdc)
       hWnd = IntWindowFromDC(hdc);
       if (hWnd) // Send broadcast if dc is associated with a window.
       {  // FYI: Thread locked in CallOneParam.
-         co_IntSendMessage((HWND)HWND_BROADCAST, WM_PALETTECHANGED, (WPARAM)hWnd, 0);
+         UserSendNotifyMessage((HWND)HWND_BROADCAST, WM_PALETTECHANGED, (WPARAM)hWnd, 0);
       }
   }
   return Ret;