Commit d8bbcb2f authored by Alexandre Julliard's avatar Alexandre Julliard

Implemented GetWindowTask16 on top of GetWindowThreadProcessId.

Removed no longer used hmemTaskQ field in WND structure.
parent 1298eb40
......@@ -672,7 +672,6 @@ init UserClientDllInitialize
@ stdcall DestroyIcon32(long long) DestroyIcon32
@ stdcall DialogBoxIndirectParam16(long long long long long) DialogBoxIndirectParam16
@ stdcall GetDriverModuleHandle16(long) GetDriverModuleHandle16
@ stdcall InitThreadInput16(long long) InitThreadInput16
@ stdcall OpenDriver16(str str long) OpenDriver16
@ stdcall PostAppMessage16(long long long long) PostAppMessage16
@ stdcall SendDriverMessage16(long long long long) SendDriverMessage16
......
......@@ -1026,6 +1026,16 @@ INT16 WINAPI DlgDirListComboBox16( HWND16 hDlg, LPSTR spec, INT16 idCBox,
}
/***********************************************************************
* GetWindowTask (USER.224)
*/
HTASK16 WINAPI GetWindowTask16( HWND16 hwnd )
{
DWORD tid = GetWindowThreadProcessId( HWND_32(hwnd), NULL );
if (!tid) return 0;
return HTASK_16(tid);
}
/**********************************************************************
* EnumTaskWindows (USER.225)
*/
......
......@@ -70,7 +70,6 @@ static DWORD CALLBACK desktop_thread( LPVOID driver_data )
/* patch the desktop window queue to point to our queue */
win = WIN_GetPtr( hwnd );
win->tid = GetCurrentThreadId();
win->hmemTaskQ = InitThreadInput16( 0, 0 );
X11DRV_register_window( display, hwnd, win->pDriverData );
WIN_ReleasePtr( win );
......
......@@ -35,7 +35,6 @@ struct received_message_info;
typedef struct tagMESSAGEQUEUE
{
HQUEUE16 self; /* Handle to self (was: reserved) */
TEB* teb; /* Thread owning queue */
HANDLE server_queue; /* Handle to server-side queue */
DWORD recursion_count; /* Counter to prevent infinite SendMessage recursion */
struct received_message_info *receive_info; /* Info about message being currently received */
......
......@@ -52,7 +52,6 @@ typedef struct tagWND
void *pVScroll; /* Vertical scroll-bar info */
void *pHScroll; /* Horizontal scroll-bar info */
struct tagDCE *dce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
HGLOBAL16 hmemTaskQ; /* Task queue global memory handle */
HRGN hrgnUpdate; /* Update region */
HRGN hrgnWnd; /* window's region */
DWORD dwStyle; /* Window style (from CreateWindow) */
......
......@@ -192,28 +192,6 @@ void QUEUE_DeleteMsgQueue(void)
/***********************************************************************
* GetWindowTask (USER.224)
*/
HTASK16 WINAPI GetWindowTask16( HWND16 hwnd )
{
HTASK16 retvalue;
MESSAGEQUEUE *queue;
WND *wndPtr = WIN_FindWndPtr16( hwnd );
if (!wndPtr) return 0;
queue = QUEUE_Lock( wndPtr->hmemTaskQ );
WIN_ReleaseWndPtr(wndPtr);
if (!queue) return 0;
retvalue = queue->teb->htask16;
QUEUE_Unlock( queue );
return retvalue;
}
/***********************************************************************
* InitThreadInput (USER.409)
*/
HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags )
......@@ -232,7 +210,6 @@ HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags )
/* Link new queue into list */
queuePtr = QUEUE_Lock( hQueue );
queuePtr->teb = NtCurrentTeb();
HeapLock( GetProcessHeap() ); /* FIXME: a bit overkill */
SetThreadQueue16( 0, hQueue );
......
......@@ -684,7 +684,6 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
TIMER_RemoveWindowTimers( hwnd );
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
wndPtr->hmemTaskQ = 0;
if (!(wndPtr->dwStyle & WS_CHILD))
{
......@@ -761,7 +760,6 @@ BOOL WIN_CreateDesktopWindow(void)
pWndDesktop->owner = 0;
pWndDesktop->class = class;
pWndDesktop->text = NULL;
pWndDesktop->hmemTaskQ = 0;
pWndDesktop->hrgnUpdate = 0;
pWndDesktop->clsStyle = clsStyle;
pWndDesktop->dce = NULL;
......@@ -1100,7 +1098,6 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
wndPtr->winproc = winproc;
wndPtr->hInstance = cs->hInstance;
wndPtr->text = NULL;
wndPtr->hmemTaskQ = InitThreadInput16( 0, 0 );
wndPtr->hrgnUpdate = 0;
wndPtr->hrgnWnd = 0;
wndPtr->dwStyle = cs->style & ~WS_VISIBLE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment