Author: gadamopoulos
Date: Wed Oct 31 14:55:23 2012
New Revision: 57657
URL:
http://svn.reactos.org/svn/reactos?rev=57657&view=rev
Log:
[win32k]
- Use ONEPARAM_ROUTINE_GETCURSORPOS instead of ONEPARAM_ROUTINE_GETCURSORPOSITION in
GetCursorPos
- Correctly check if the current thread belongs to the active desktop
Modified:
trunk/reactos/win32ss/include/ntuser.h
trunk/reactos/win32ss/user/ntuser/desktop.c
trunk/reactos/win32ss/user/ntuser/simplecall.c
trunk/reactos/win32ss/user/user32/include/ntwrapper.h
Modified: trunk/reactos/win32ss/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
==============================================================================
--- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Wed Oct 31 14:55:23 2012
@@ -3251,7 +3251,6 @@
#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e
-#define ONEPARAM_ROUTINE_GETCURSORPOSITION 0xfffe0048 // use ONEPARAM_ or TWOPARAM
routine ?
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0xfffd0050
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0xfffd0052
#define MSQ_STATE_CAPTURE 0x1
Modified: trunk/reactos/win32ss/user/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] Wed Oct 31 14:55:23 2012
@@ -26,7 +26,7 @@
/* GLOBALS *******************************************************************/
/* Currently active desktop */
-PDESKTOP InputDesktop = NULL;
+PDESKTOP gpdeskInputDesktop = NULL;
HDESK InputDesktopHandle = NULL;
HDC ScreenDeviceContext = NULL;
PTHREADINFO gptiDesktopThread;
@@ -420,7 +420,7 @@
PDESKTOP FASTCALL
IntGetActiveDesktop(VOID)
{
- return InputDesktop;
+ return gpdeskInputDesktop;
}
/*
@@ -1654,7 +1654,7 @@
InputWindowStation->ActiveDesktop = pdesk;
/* Set the global state. */
- InputDesktop = pdesk;
+ gpdeskInputDesktop = pdesk;
InputDesktopHandle = hdesk;
TRACE("SwitchDesktop InputDesktopHandle 0x%p\n",InputDesktopHandle);
ObDereferenceObject(pdesk);
Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Wed Oct 31 14:55:23 2012
@@ -259,25 +259,6 @@
RETURN(Result);
}
- case ONEPARAM_ROUTINE_GETCURSORPOSITION:
- {
- BOOL ret = TRUE;
-
- _SEH2_TRY
- {
- ProbeForWrite((POINT*)Param,sizeof(POINT),1);
- RtlCopyMemory((POINT*)Param,&gpsi->ptCursor,sizeof(POINT));
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- SetLastNtError(_SEH2_GetExceptionCode());
- ret = FALSE;
- }
- _SEH2_END;
-
- RETURN (ret);
- }
-
case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING:
{
BOOL Enable;
@@ -334,9 +315,10 @@
BOOL Ret = TRUE;
PPOINTL pptl;
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
- if (pti->hdesk != InputDesktopHandle) RETURN(FALSE);
+ if (pti->rpdesk != IntGetActiveDesktop()) RETURN(FALSE);
_SEH2_TRY
{
+ ProbeForWrite((POINT*)Param,sizeof(POINT),1);
pptl = (PPOINTL)Param;
*pptl = gpsi->ptCursor;
}
Modified: trunk/reactos/win32ss/user/user32/include/ntwrapper.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
==============================================================================
--- trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] Wed Oct 31 14:55:23
2012
@@ -806,7 +806,7 @@
EXTINLINE BOOL NtUserxGetCursorPos(POINT* lpPoint)
{
- return (BOOL)NtUserCallOneParam((DWORD_PTR)lpPoint,
ONEPARAM_ROUTINE_GETCURSORPOSITION);
+ return (BOOL)NtUserCallOneParam((DWORD_PTR)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOS);
}
EXTINLINE BOOL NtUserxSetMenuBarHeight(HMENU menu, INT height)