mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
PatchPatch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com):
- remove NtUserGetWindowRect, use GetWindowRect instead - remove NtUserGetClientOrigin and NtUserGetClientRect (unused) - remove NtUserManualGuiCheck, use NtUserCallOneParam like other private CSRSS functions do svn path=/trunk/; revision=32935
This commit is contained in:
parent
1533c2379d
commit
2fcc1cf78f
9 changed files with 13 additions and 131 deletions
|
@ -1193,7 +1193,7 @@ ScrollTrackScrollBar(HWND Wnd, INT SBType, POINT Pt)
|
|||
|
||||
if (SB_CTL != SBType)
|
||||
{
|
||||
NtUserGetWindowRect(Wnd, &WindowRect);
|
||||
GetWindowRect(Wnd, &WindowRect);
|
||||
|
||||
Pt.x -= WindowRect.left;
|
||||
Pt.y -= WindowRect.top;
|
||||
|
|
|
@ -55,7 +55,7 @@ VOID
|
|||
STDCALL
|
||||
PrivateCsrssManualGuiCheck(LONG Check)
|
||||
{
|
||||
NtUserManualGuiCheck(Check);
|
||||
NtUserCallOneParam(Check, ONEPARAM_ROUTINE_CSRSS_GUICHECK);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
|
@ -2503,6 +2503,7 @@ typedef struct tagKMDDELPARAM
|
|||
#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
|
||||
#define NOPARAM_ROUTINE_ANYPOPUP 0xffff0006
|
||||
#define NOPARAM_ROUTINE_CSRSS_INITIALIZED 0xffff0007
|
||||
#define ONEPARAM_ROUTINE_CSRSS_GUICHECK 0xffff0008
|
||||
#define ONEPARAM_ROUTINE_GETMENU 0xfffe0001 // usermode
|
||||
#define ONEPARAM_ROUTINE_ISWINDOWUNICODE 0xfffe0002
|
||||
#define ONEPARAM_ROUTINE_GETCARETINFO 0xfffe0007
|
||||
|
@ -2562,16 +2563,6 @@ ULONG_PTR
|
|||
NTAPI
|
||||
NtUserGetClassLong(HWND hWnd, INT Offset, BOOL Ansi);
|
||||
|
||||
/* Should be done in usermode */
|
||||
BOOL
|
||||
NTAPI
|
||||
NtUserGetClientOrigin(HWND hWnd, LPPOINT Point);
|
||||
|
||||
/* Should be done in usermode */
|
||||
BOOL
|
||||
NTAPI
|
||||
NtUserGetClientRect(HWND hWnd, LPRECT Rect);
|
||||
|
||||
UINT
|
||||
NTAPI
|
||||
NtUserGetMenuDefaultItem(
|
||||
|
@ -2626,23 +2617,12 @@ LONG
|
|||
NTAPI
|
||||
NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi);
|
||||
|
||||
/* Should be done in usermode */
|
||||
BOOL
|
||||
NTAPI
|
||||
NtUserGetWindowRect(HWND hWnd, LPRECT Rect);
|
||||
|
||||
DWORD
|
||||
NTAPI
|
||||
NtUserGetWindowThreadProcessId(HWND hWnd, LPDWORD UnsafePid);
|
||||
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
NtUserManualGuiCheck(LONG Check);
|
||||
|
||||
|
||||
|
||||
/* (other FocusedItem values give the position of the focused item) */
|
||||
#define NO_SELECTED_ITEM 0xffff
|
||||
|
||||
|
|
|
@ -8,5 +8,6 @@
|
|||
|
||||
ULONG FASTCALL IntSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
|
||||
DWORD STDCALL IntGetQueueStatus(BOOL ClearChanges);
|
||||
VOID FASTCALL IntUserManualGuiCheck(LONG Check);
|
||||
|
||||
#endif /* __WIN32K_MISC_H */
|
||||
|
|
|
@ -98,13 +98,13 @@ co_IntGraphicsCheck(BOOL Create)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
VOID STDCALL
|
||||
NtUserManualGuiCheck(LONG Check)
|
||||
VOID
|
||||
FASTCALL
|
||||
IntUserManualGuiCheck(LONG Check)
|
||||
{
|
||||
PW32PROCESS W32Data;
|
||||
|
||||
DPRINT("Enter NtUserManualGuiCheck\n");
|
||||
UserEnterExclusive();
|
||||
DPRINT("Enter IntUserManualGuiCheck\n");
|
||||
|
||||
W32Data = PsGetCurrentProcessWin32Process();
|
||||
if (0 == Check)
|
||||
|
@ -126,8 +126,7 @@ NtUserManualGuiCheck(LONG Check)
|
|||
}
|
||||
}
|
||||
|
||||
DPRINT("Leave NtUserManualGuiCheck\n");
|
||||
UserLeave();
|
||||
DPRINT("Leave IntUserManualGuiCheck\n");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -395,6 +395,10 @@ NtUserCallOneParam(
|
|||
case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
|
||||
/* FIXME: Should use UserEnterShared */
|
||||
RETURN(IntEnumClipboardFormats(Param));
|
||||
|
||||
case ONEPARAM_ROUTINE_CSRSS_GUICHECK:
|
||||
IntUserManualGuiCheck(Param);
|
||||
RETURN(TRUE);
|
||||
}
|
||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
|
||||
Routine, Param);
|
||||
|
|
|
@ -2887,45 +2887,6 @@ CLEANUP:
|
|||
END_CLEANUP;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Returns client window rectangle relative to the upper-left corner of client area.
|
||||
*
|
||||
* \param hWnd window handle.
|
||||
* \param Rect pointer to the buffer where the coordinates are returned.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL STDCALL
|
||||
NtUserGetClientRect(HWND hWnd, LPRECT Rect)
|
||||
{
|
||||
PWINDOW_OBJECT Window;
|
||||
RECT SafeRect;
|
||||
DECLARE_RETURN(BOOL);
|
||||
|
||||
DPRINT("Enter NtUserGetClientRect\n");
|
||||
UserEnterShared();
|
||||
|
||||
if(!(Window = UserGetWindowObject(hWnd)))
|
||||
{
|
||||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
IntGetClientRect(Window, &SafeRect);
|
||||
|
||||
if(!NT_SUCCESS(MmCopyToCaller(Rect, &SafeRect, sizeof(RECT))))
|
||||
{
|
||||
RETURN( FALSE);
|
||||
}
|
||||
RETURN( TRUE);
|
||||
|
||||
CLEANUP:
|
||||
DPRINT("Leave NtUserGetClientRect, ret=%i\n",_ret_);
|
||||
UserLeave();
|
||||
END_CLEANUP;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
|
@ -3907,44 +3868,6 @@ CLEANUP:
|
|||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Return the dimension of the window in the screen coordinates.
|
||||
* \param hWnd window handle.
|
||||
* \param Rect pointer to the buffer where the coordinates are returned.
|
||||
*/
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL STDCALL
|
||||
NtUserGetWindowRect(HWND hWnd, LPRECT Rect)
|
||||
{
|
||||
PWINDOW_OBJECT Wnd;
|
||||
NTSTATUS Status;
|
||||
DECLARE_RETURN(BOOL);
|
||||
|
||||
DPRINT("Enter NtUserGetWindowRect\n");
|
||||
UserEnterShared();
|
||||
|
||||
if (!(Wnd = UserGetWindowObject(hWnd)))
|
||||
{
|
||||
RETURN(FALSE);
|
||||
}
|
||||
Status = MmCopyToCaller(Rect, &Wnd->Wnd->WindowRect, sizeof(RECT));
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
RETURN( TRUE);
|
||||
|
||||
CLEANUP:
|
||||
DPRINT("Leave NtUserGetWindowRect, ret=%i\n",_ret_);
|
||||
UserLeave();
|
||||
END_CLEANUP;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
|
@ -106,27 +106,6 @@ UserGetClientOrigin(PWINDOW_OBJECT Window, LPPOINT Point)
|
|||
|
||||
|
||||
|
||||
BOOL STDCALL
|
||||
NtUserGetClientOrigin(HWND hWnd, LPPOINT Point)
|
||||
{
|
||||
DECLARE_RETURN(BOOL);
|
||||
PWINDOW_OBJECT Window;
|
||||
|
||||
DPRINT("Enter NtUserGetClientOrigin\n");
|
||||
UserEnterShared();
|
||||
|
||||
if (!(Window = UserGetWindowObject(hWnd)))
|
||||
RETURN(FALSE);
|
||||
|
||||
RETURN(UserGetClientOrigin(Window, Point));
|
||||
|
||||
CLEANUP:
|
||||
DPRINT("Leave NtUserGetClientOrigin, ret=%i\n",_ret_);
|
||||
UserLeave();
|
||||
END_CLEANUP;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* can_activate_window
|
||||
*
|
||||
|
|
|
@ -682,8 +682,6 @@ NtGdiSetWindowOrgEx 4
|
|||
NtUserBuildMenuItemList 4
|
||||
NtUserCreateCursorIconHandle 2
|
||||
NtUserGetClassLong 3
|
||||
NtUserGetClientOrigin 2
|
||||
NtUserGetClientRect 2
|
||||
NtUserGetMenuDefaultItem 3
|
||||
NtUserGetLastInputInfo 1
|
||||
NtUserGetMinMaxInfo 3
|
||||
|
@ -694,9 +692,7 @@ NtUserGetShellWindow 0
|
|||
NtUserGetSystemMetrics 1
|
||||
NtUserGetWindow 2
|
||||
NtUserGetWindowLong 3
|
||||
NtUserGetWindowRect 2
|
||||
NtUserGetWindowThreadProcessId 2
|
||||
NtUserManualGuiCheck 1
|
||||
NtUserMenuInfo 3
|
||||
NtUserMenuItemInfo 5
|
||||
NtUserMonitorFromPoint 3
|
||||
|
|
Loading…
Reference in a new issue