- Fix the transfer of a global cursor while using ATI. See CORE-9436.

svn path=/trunk/; revision=66968
This commit is contained in:
James Tabor 2015-03-29 16:25:50 +00:00
parent da580bb909
commit 774095423b

View file

@ -523,8 +523,15 @@ UserAttachThreadInput(PTHREADINFO ptiFrom, PTHREADINFO ptiTo, BOOL fAttach)
MsqDestroyMessageQueue(ptiFrom); MsqDestroyMessageQueue(ptiFrom);
if (CurIcon)
{
// Could be global. Keep it above the water line!
UserReferenceObject(CurIcon);
}
if (CurIcon && UserObjectInDestroy(UserHMGetHandle(CurIcon))) if (CurIcon && UserObjectInDestroy(UserHMGetHandle(CurIcon)))
{ {
UserDereferenceObject(CurIcon);
CurIcon = NULL; CurIcon = NULL;
} }
@ -533,8 +540,8 @@ UserAttachThreadInput(PTHREADINFO ptiFrom, PTHREADINFO ptiTo, BOOL fAttach)
// Pass cursor From if To is null. Pass test_SetCursor parent_id == current pti ID. // Pass cursor From if To is null. Pass test_SetCursor parent_id == current pti ID.
if (CurIcon && ptiTo->MessageQueue->CursorObject == NULL) if (CurIcon && ptiTo->MessageQueue->CursorObject == NULL)
{ {
ERR("ptiTo receiving ptiFrom Cursor\n");
ptiTo->MessageQueue->CursorObject = CurIcon; ptiTo->MessageQueue->CursorObject = CurIcon;
UserReferenceObject(CurIcon);
} }
ptiFrom->MessageQueue->cThreads++; ptiFrom->MessageQueue->cThreads++;