mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
[Win32k|User32]
- Updated paint functions to use one calls. - Found one leak in engwindow.c and monitor.c, not the big one. svn path=/trunk/; revision=45339
This commit is contained in:
parent
4d1da2ea5c
commit
1263c98dae
5 changed files with 56 additions and 13 deletions
|
@ -198,8 +198,7 @@ UpdateWindow(
|
||||||
pWnd->state & WNDS_INTERNALPAINT ||
|
pWnd->state & WNDS_INTERNALPAINT ||
|
||||||
pWnd->spwndChild )
|
pWnd->spwndChild )
|
||||||
{*/
|
{*/
|
||||||
return RedrawWindow( hWnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
|
return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_UPDATEWINDOW);
|
||||||
// return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_UPDATEWINDOW);
|
|
||||||
/* }
|
/* }
|
||||||
return TRUE;*/
|
return TRUE;*/
|
||||||
}
|
}
|
||||||
|
@ -213,10 +212,7 @@ ValidateRgn(
|
||||||
HWND hWnd,
|
HWND hWnd,
|
||||||
HRGN hRgn)
|
HRGN hRgn)
|
||||||
{
|
{
|
||||||
/* FIXME: should RDW_NOCHILDREN be included too? Ros used to,
|
return NtUserCallHwndParamLock(hWnd, (DWORD)hRgn, TWOPARAM_ROUTINE_VALIDATERGN);
|
||||||
but Wine dont so i removed it... */
|
|
||||||
return RedrawWindow( hWnd, NULL, hRgn, RDW_VALIDATE );
|
|
||||||
// return NtUserCallHwndParamLock(hWnd, (DWORD)hRgn, TWOPARAM_ROUTINE_VALIDATERGN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -84,6 +84,8 @@ IntEngWndUpdateClipObj(
|
||||||
CLIPOBJ *ClipObj = NULL;
|
CLIPOBJ *ClipObj = NULL;
|
||||||
CLIPOBJ *OldClipObj;
|
CLIPOBJ *OldClipObj;
|
||||||
|
|
||||||
|
DPRINT("IntEngWndUpdateClipObj\n");
|
||||||
|
|
||||||
hVisRgn = VIS_ComputeVisibleRegion(Window, TRUE, TRUE, TRUE);
|
hVisRgn = VIS_ComputeVisibleRegion(Window, TRUE, TRUE, TRUE);
|
||||||
if (hVisRgn != NULL)
|
if (hVisRgn != NULL)
|
||||||
{
|
{
|
||||||
|
@ -115,6 +117,7 @@ IntEngWndUpdateClipObj(
|
||||||
{
|
{
|
||||||
DPRINT1("Warning: Couldn't lock visible region of window DC\n");
|
DPRINT1("Warning: Couldn't lock visible region of window DC\n");
|
||||||
}
|
}
|
||||||
|
REGION_FreeRgnByHandle(hVisRgn);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -190,7 +190,7 @@ IntAttachMonitor(IN PDEVOBJ *pGdiDevice,
|
||||||
Monitor->rcWork = Monitor->rcMonitor;
|
Monitor->rcWork = Monitor->rcMonitor;
|
||||||
Monitor->cWndStack = 0;
|
Monitor->cWndStack = 0;
|
||||||
|
|
||||||
Monitor->hrgnMonitor= IntSysCreateRectRgnIndirect( &Monitor->rcMonitor );
|
Monitor->hrgnMonitor = IntSysCreateRectRgnIndirect( &Monitor->rcMonitor );
|
||||||
|
|
||||||
IntGdiSetRegionOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_PUBLIC);
|
IntGdiSetRegionOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_PUBLIC);
|
||||||
|
|
||||||
|
@ -264,6 +264,9 @@ IntDetachMonitor(IN PDEVOBJ *pGdiDevice)
|
||||||
Monitor->Next->Prev = Monitor->Prev;
|
Monitor->Next->Prev = Monitor->Prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Monitor->hrgnMonitor)
|
||||||
|
REGION_FreeRgnByHandle(Monitor->hrgnMonitor);
|
||||||
|
|
||||||
IntDestroyMonitorObject(Monitor);
|
IntDestroyMonitorObject(Monitor);
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
|
|
@ -712,9 +712,39 @@ NtUserCallHwndParamLock(
|
||||||
DWORD Param,
|
DWORD Param,
|
||||||
DWORD Routine)
|
DWORD Routine)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
DWORD Ret = 0;
|
||||||
|
PWINDOW_OBJECT Window;
|
||||||
|
PWND Wnd;
|
||||||
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
DECLARE_RETURN(DWORD);
|
||||||
|
|
||||||
|
DPRINT1("Enter NtUserCallHwndParamLock\n");
|
||||||
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
if (!(Window = UserGetWindowObject(hWnd)) || !Window->Wnd)
|
||||||
|
{
|
||||||
|
RETURN( FALSE);
|
||||||
|
}
|
||||||
|
UserRefObjectCo(Window, &Ref);
|
||||||
|
|
||||||
|
Wnd = Window->Wnd;
|
||||||
|
|
||||||
|
switch (Routine)
|
||||||
|
{
|
||||||
|
case TWOPARAM_ROUTINE_VALIDATERGN:
|
||||||
|
Ret = (DWORD)co_UserRedrawWindow( Window, NULL, (HRGN)Param, RDW_VALIDATE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserDerefObjectCo(Window);
|
||||||
|
|
||||||
|
RETURN( Ret);
|
||||||
|
|
||||||
|
CLEANUP:
|
||||||
|
DPRINT1("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
|
||||||
|
UserLeave();
|
||||||
|
END_CLEANUP;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -4625,6 +4625,7 @@ NtUserSetWindowRgn(
|
||||||
HRGN hRgn,
|
HRGN hRgn,
|
||||||
BOOL bRedraw)
|
BOOL bRedraw)
|
||||||
{
|
{
|
||||||
|
HRGN hrgnCopy;
|
||||||
PWINDOW_OBJECT Window;
|
PWINDOW_OBJECT Window;
|
||||||
DECLARE_RETURN(INT);
|
DECLARE_RETURN(INT);
|
||||||
|
|
||||||
|
@ -4636,15 +4637,25 @@ NtUserSetWindowRgn(
|
||||||
RETURN( 0);
|
RETURN( 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME - Verify if hRgn is a valid handle!!!!
|
if (hRgn) // The region will be deleted in user32.
|
||||||
Propably make this operation thread-safe, but maybe it's not necessary */
|
{
|
||||||
|
if (GDIOBJ_ValidateHandle(hRgn, GDI_OBJECT_TYPE_REGION))
|
||||||
|
{
|
||||||
|
hrgnCopy = IntSysCreateRectRgn(0, 0, 0, 0);
|
||||||
|
NtGdiCombineRgn(hrgnCopy, hRgn, 0, RGN_COPY);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
RETURN( 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
hrgnCopy = (HRGN) 1;
|
||||||
|
|
||||||
if(Window->hrgnClip)
|
if (Window->hrgnClip)
|
||||||
{
|
{
|
||||||
/* Delete no longer needed region handle */
|
/* Delete no longer needed region handle */
|
||||||
GreDeleteObject(Window->hrgnClip);
|
GreDeleteObject(Window->hrgnClip);
|
||||||
}
|
}
|
||||||
Window->hrgnClip = hRgn;
|
Window->hrgnClip = hrgnCopy;
|
||||||
|
|
||||||
/* FIXME - send WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages to the window */
|
/* FIXME - send WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages to the window */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue