Author: hbelusca
Date: Wed Oct 31 19:39:53 2012
New Revision: 57660
URL:
http://svn.reactos.org/svn/reactos?rev=57660&view=rev
Log:
Synchronize with trunk's revision r57659.
Modified:
branches/ros-csrss/ (props changed)
branches/ros-csrss/win32ss/include/ntuser.h
branches/ros-csrss/win32ss/user/ntuser/desktop.c
branches/ros-csrss/win32ss/user/ntuser/desktop.h
branches/ros-csrss/win32ss/user/ntuser/simplecall.c
branches/ros-csrss/win32ss/user/user32/include/ntwrapper.h
Propchange: branches/ros-csrss/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 31 19:39:53 2012
@@ -13,4 +13,4 @@
/branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
/branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567
/branches/wlan-bringup:54809-54998
-/trunk/reactos:57561-57653
+/trunk/reactos:57561-57659
Modified: branches/ros-csrss/win32ss/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/include/ntuse…
==============================================================================
--- branches/ros-csrss/win32ss/include/ntuser.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/include/ntuser.h [iso-8859-1] Wed Oct 31 19:39:53 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: branches/ros-csrss/win32ss/user/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/d…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/desktop.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/desktop.c [iso-8859-1] Wed Oct 31 19:39:53
2012
@@ -26,8 +26,7 @@
/* GLOBALS *******************************************************************/
/* Currently active desktop */
-PDESKTOP InputDesktop = NULL;
-HDESK InputDesktopHandle = NULL;
+PDESKTOP gpdeskInputDesktop = NULL;
HDC ScreenDeviceContext = NULL;
PTHREADINFO gptiDesktopThread;
HCURSOR gDesktopCursor = NULL;
@@ -420,7 +419,7 @@
PDESKTOP FASTCALL
IntGetActiveDesktop(VOID)
{
- return InputDesktop;
+ return gpdeskInputDesktop;
}
/*
@@ -1464,40 +1463,31 @@
BOOL fInherit,
ACCESS_MASK dwDesiredAccess)
{
- PDESKTOP pdesk;
NTSTATUS Status;
HDESK hdesk = NULL;
+ ULONG HandleAttributes = 0;
UserEnterExclusive();
- TRACE("Enter NtUserOpenInputDesktop InputDesktopHandle
0x%p\n",InputDesktopHandle);
-
- /* Get a pointer to the desktop object */
- Status = IntValidateDesktopHandle(InputDesktopHandle, UserMode, 0, &pdesk);
- if (!NT_SUCCESS(Status))
- {
- ERR("Validation of input desktop handle (0x%p) failed\n",
InputDesktopHandle);
- goto Exit;
- }
+ TRACE("Enter NtUserOpenInputDesktop gpdeskInputDesktop
0x%p\n",gpdeskInputDesktop);
+
+ if(fInherit) HandleAttributes = OBJ_INHERIT;
/* Create a new handle to the object */
Status = ObOpenObjectByPointer(
- pdesk,
- 0,
+ gpdeskInputDesktop,
+ HandleAttributes,
NULL,
dwDesiredAccess,
ExDesktopObjectType,
UserMode,
(PHANDLE)&hdesk);
- ObDereferenceObject(pdesk);
-
if (!NT_SUCCESS(Status))
{
ERR("Failed to open input desktop object\n");
SetLastNtError(Status);
- goto Exit;
- }
-Exit:
+ }
+
TRACE("NtUserOpenInputDesktop returning 0x%p\n",hdesk);
UserLeave();
return hdesk;
@@ -1654,9 +1644,8 @@
InputWindowStation->ActiveDesktop = pdesk;
/* Set the global state. */
- InputDesktop = pdesk;
- InputDesktopHandle = hdesk;
- TRACE("SwitchDesktop InputDesktopHandle 0x%p\n",InputDesktopHandle);
+ gpdeskInputDesktop = pdesk;
+ TRACE("SwitchDesktop gpdeskInputDesktop 0x%p\n",gpdeskInputDesktop);
ObDereferenceObject(pdesk);
RETURN(TRUE);
Modified: branches/ros-csrss/win32ss/user/ntuser/desktop.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/d…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/desktop.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/desktop.h [iso-8859-1] Wed Oct 31 19:39:53
2012
@@ -70,7 +70,6 @@
DESKTOP_WRITEOBJECTS
extern PDESKTOP InputDesktop;
-extern HDESK InputDesktopHandle;
extern PCLS DesktopWindowClass;
extern HDC ScreenDeviceContext;
extern PTHREADINFO gptiDesktopThread;
Modified: branches/ros-csrss/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/s…
==============================================================================
--- branches/ros-csrss/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/ntuser/simplecall.c [iso-8859-1] Wed Oct 31 19:39:53
2012
@@ -260,25 +260,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;
@@ -335,9 +316,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: branches/ros-csrss/win32ss/user/user32/include/ntwrapper.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/i…
==============================================================================
--- branches/ros-csrss/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] Wed Oct 31
19:39:53 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)