/*
* PROJECT: ReactOS Win32k subsystem
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: subsystems/win32/win32k/ntuser/windc.c
+ * FILE: win32ss/user/ntuser/windc.c
* PURPOSE: Window DC management
* COPYRIGHT: Copyright 2007 ReactOS Team
*/
ULONG Flags,
BOOL SetClipOrigin)
{
- DC *dc = DC_LockDc(hDC);
- if(!dc)
- return;
+ RECTL rect;
- if (Window == NULL)
- {
- dc->ptlDCOrig.x = 0;
- dc->ptlDCOrig.y = 0;
- }
- else
+ if (Window)
{
if (Flags & DCX_WINDOW)
{
- dc->ptlDCOrig.x = Window->rcWindow.left;
- dc->ptlDCOrig.y = Window->rcWindow.top;
+ rect = Window->rcWindow;
}
else
{
- dc->ptlDCOrig.x = Window->rcClient.left;
- dc->ptlDCOrig.y = Window->rcClient.top;
+ rect = Window->rcClient;
}
}
- dc->fs |= DC_FLAG_DIRTY_RAO;
- DC_UnlockDc(dc);
+
+ /* Set DC Origin and Window Rectangle */
+ GreSetDCOrg( hDC, rect.left, rect.top, &rect);
}
}
void FASTCALL
-DceFreeClassDCE(HDC hDC)
+DceFreeClassDCE(PDCE pdceClass)
{
PDCE pDCE;
PLIST_ENTRY ListEntry;
{
pDCE = CONTAINING_RECORD(ListEntry, DCE, List);
ListEntry = ListEntry->Flink;
- if (pDCE->hDC == hDC)
+ if (pDCE == pdceClass)
{
DceFreeDCE(pDCE, TRUE); // Might have gone cheap!
}
XCLIPOBJ* Clip;
PWND Wnd;
HWND hWnd;
- PPROPERTY pprop;
hWnd = IntWindowFromDC(hdc);
if (hWnd && (Wnd = UserGetWindowObject(hWnd)))
{
- pprop = IntGetProp(Wnd, AtomWndObj);
-
- Clip = (XCLIPOBJ*)pprop->Data;
+ Clip = (XCLIPOBJ*)UserGetProp(Wnd, AtomWndObj, TRUE);
if ( Clip && Clip->Hwnd == hWnd )
{