Author: gadamopoulos Date: Fri Dec 24 12:11:10 2010 New Revision: 50121
URL: http://svn.reactos.org/svn/reactos?rev=50121&view=rev Log: [win32k] - Remove co_IntPostOrSendMessage and use co_IntSendMessageNoWait where possible
Modified: trunk/reactos/subsystems/win32/win32k/include/msgqueue.h trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c trunk/reactos/subsystems/win32/win32k/ntuser/focus.c trunk/reactos/subsystems/win32/win32k/ntuser/message.c
Modified: trunk/reactos/subsystems/win32/win32k/include/msgqueue.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/msgqueue.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/msgqueue.h [iso-8859-1] Fri Dec 24 12:11:10 2010 @@ -180,11 +180,6 @@ WPARAM wParam, LPARAM lParam); LRESULT FASTCALL -co_IntPostOrSendMessage(HWND hWnd, - UINT Msg, - WPARAM wParam, - LPARAM lParam); -LRESULT FASTCALL co_IntSendMessageTimeout(HWND hWnd, UINT Msg, WPARAM wParam,
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Fri Dec 24 12:11:10 2010 @@ -740,11 +740,7 @@
for (; *cursor; cursor++) { - DPRINT("Sending notify\n"); - co_IntPostOrSendMessage(*cursor, - MsgType, - Message, - lParam); + co_IntSendMessageNoWait(*cursor, MsgType, Message, lParam); }
ExFreePool(HwndList);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/focus.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/focus.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/focus.c [iso-8859-1] Fri Dec 24 12:11:10 2010 @@ -77,7 +77,7 @@ if (WindowPrev) UserRefObjectCo(WindowPrev, &RefPrev);
/* Send palette messages */ - if (co_IntPostOrSendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0)) + if (co_IntSendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0)) { UserPostMessage( HWND_BROADCAST, WM_PALETTEISCHANGING, @@ -166,7 +166,7 @@ if (hWndPrev) { IntNotifyWinEvent(EVENT_OBJECT_FOCUS, NULL, OBJID_CLIENT, CHILDID_SELF, 0); - co_IntPostOrSendMessage(hWndPrev, WM_KILLFOCUS, (WPARAM)hWnd, 0); + co_IntSendMessageNoWait(hWndPrev, WM_KILLFOCUS, (WPARAM)hWnd, 0); } }
@@ -177,7 +177,7 @@ { PWND pWnd = UserGetWindowObject(hWnd); IntNotifyWinEvent(EVENT_OBJECT_FOCUS, pWnd, OBJID_CLIENT, CHILDID_SELF, 0); - co_IntPostOrSendMessage(hWnd, WM_SETFOCUS, (WPARAM)hWndPrev, 0); + co_IntSendMessageNoWait(hWnd, WM_SETFOCUS, (WPARAM)hWndPrev, 0); } }
@@ -579,7 +579,7 @@ if (Window) IntNotifyWinEvent(EVENT_SYSTEM_CAPTURESTART, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
- co_IntPostOrSendMessage(hWndPrev, WM_CAPTURECHANGED, 0, (LPARAM)hWnd); + co_IntSendMessageNoWait(hWndPrev, WM_CAPTURECHANGED, 0, (LPARAM)hWnd); ThreadQueue->CaptureWindow = hWnd;
RETURN( hWndPrev);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Fri Dec 24 12:11:10 2010 @@ -1402,47 +1402,6 @@ CLEANUP: if (Window) UserDerefObjectCo(Window); END_CLEANUP; -} - -/* This function posts a message if the destination's message queue belongs to -another thread, otherwise it sends the message. It does not support broadcast -messages! */ -LRESULT FASTCALL -co_IntPostOrSendMessage( HWND hWnd, - UINT Msg, - WPARAM wParam, - LPARAM lParam ) -{ - ULONG_PTR Result; - PTHREADINFO pti; - PWND Window; - - if ( hWnd == HWND_BROADCAST ) - { - return 0; - } - - if(!(Window = UserGetWindowObject(hWnd))) - { - return 0; - } - - pti = PsGetCurrentThreadWin32Thread(); - - if ( Window->head.pti->MessageQueue != pti->MessageQueue && - FindMsgMemory(Msg) == 0 ) - { - Result = UserPostMessage(hWnd, Msg, wParam, lParam); - } - else - { - if ( !co_IntSendMessageTimeoutSingle(hWnd, Msg, wParam, lParam, SMTO_NORMAL, 0, &Result) ) - { - Result = 0; - } - } - - return (LRESULT)Result; }
LRESULT FASTCALL