X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fwin32ss%2Fuser%2Fntuser%2Fmsgqueue.c;h=fda7e8a920496f3306140a5559a2a14a73113aca;hp=32c1253d3d226e51df2b42f7fa7dd68a6d6fa374;hb=910e2d7dc7cd280aaa34364922f4caaec0ee299c;hpb=1bfbbb69c26f57d9c9b4d6bf31a9d0cb21de5b91;ds=inline diff --git a/reactos/win32ss/user/ntuser/msgqueue.c b/reactos/win32ss/user/ntuser/msgqueue.c index 32c1253d3d2..fda7e8a9204 100644 --- a/reactos/win32ss/user/ntuser/msgqueue.c +++ b/reactos/win32ss/user/ntuser/msgqueue.c @@ -2080,7 +2080,6 @@ HungAppSysTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) BOOLEAN FASTCALL MsqInitializeMessageQueue(PTHREADINFO pti, PUSER_MESSAGE_QUEUE MessageQueue) { - MessageQueue->CaretInfo = (PTHRDCARETINFO)(MessageQueue + 1); InitializeListHead(&MessageQueue->HardwareMessagesListHead); // Keep here! MessageQueue->spwndFocus = NULL; MessageQueue->iCursorLevel = 0; @@ -2269,16 +2268,16 @@ MsqCreateMessageQueue(PTHREADINFO pti) { PUSER_MESSAGE_QUEUE MessageQueue; - MessageQueue = (PUSER_MESSAGE_QUEUE)ExAllocatePoolWithTag(NonPagedPool, - sizeof(USER_MESSAGE_QUEUE) + sizeof(THRDCARETINFO), - USERTAG_Q); + MessageQueue = ExAllocatePoolWithTag(NonPagedPool, + sizeof(*MessageQueue), + USERTAG_Q); if (!MessageQueue) { return NULL; } - RtlZeroMemory(MessageQueue, sizeof(USER_MESSAGE_QUEUE) + sizeof(THRDCARETINFO)); + RtlZeroMemory(MessageQueue, sizeof(*MessageQueue)); /* hold at least one reference until it'll be destroyed */ IntReferenceMessageQueue(MessageQueue); /* initialize the queue */ @@ -2406,9 +2405,8 @@ MsqSetStateWindow(PTHREADINFO pti, ULONG Type, HWND hWnd) MessageQueue->MoveSize = hWnd; return Prev; case MSQ_STATE_CARET: - ASSERT(MessageQueue->CaretInfo); - Prev = MessageQueue->CaretInfo->hWnd; - MessageQueue->CaretInfo->hWnd = hWnd; + Prev = MessageQueue->CaretInfo.hWnd; + MessageQueue->CaretInfo.hWnd = hWnd; return Prev; }