[ros-diffs] [rharabien] 54051: [WIN32K] - Do not call UserSetCursor in MsqCleanupMessageQueue because it uses current thread queue instead of queue in cleanup (they can be different). See issue #6530 for more ...

rharabien at svn.reactos.org rharabien at svn.reactos.org
Fri Oct 7 20:23:24 UTC 2011


Author: rharabien
Date: Fri Oct  7 20:23:24 2011
New Revision: 54051

URL: http://svn.reactos.org/svn/reactos?rev=54051&view=rev
Log:
[WIN32K]
- Do not call UserSetCursor in MsqCleanupMessageQueue because it uses current thread queue instead of queue in cleanup (they can be different).
See issue #6530 for more details.

Modified:
    trunk/reactos/subsystems/win32/win32k/main/dllmain.c
    trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c

Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/main/dllmain.c?rev=54051&r1=54050&r2=54051&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Fri Oct  7 20:23:24 2011
@@ -399,8 +399,6 @@
         /* Do now some process cleanup that requires a valid win32 thread */
         if(ptiCurrent->ppi->cThreads == 0)
         {
-            UserSetCursor(NULL, TRUE);
-
             /* Check if we have registered the user api hook */
             if(ptiCurrent->ppi == ppiUahServer)
             {

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c?rev=54051&r1=54050&r2=54051&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Fri Oct  7 20:23:24 2011
@@ -2094,9 +2094,19 @@
    {
        PCURICON_OBJECT pCursor = MessageQueue->CursorObject;
 
-       /* Change to another cursor if we going to dereference current one */
+       /* Change to another cursor if we going to dereference current one
+          Note: we can't use UserSetCursor because it uses current thread
+                message queue instead of queue given for cleanup */
        if (IntGetSysCursorInfo()->CurrentCursorObject == pCursor)
-           UserSetCursor(NULL, TRUE);
+       {
+           HDC hdcScreen;
+
+           /* Get the screen DC */
+           hdcScreen = IntGetScreenDC();
+           if (hdcScreen)
+               GreMovePointer(hdcScreen, -1, -1);
+           IntGetSysCursorInfo()->CurrentCursorObject = NULL;
+       }
 
        UserDereferenceObject(pCursor);
    }




More information about the Ros-diffs mailing list