Added ReleaseDC function to the USER driver interface.
This commit is contained in:
parent
0446f54694
commit
3f61afbbc8
|
@ -105,6 +105,7 @@ static BOOL load_driver(void)
|
|||
GET_USER_FUNC(GetDC);
|
||||
GET_USER_FUNC(ForceWindowRaise);
|
||||
GET_USER_FUNC(MsgWaitForMultipleObjectsEx);
|
||||
GET_USER_FUNC(ReleaseDC);
|
||||
GET_USER_FUNC(ScrollDC);
|
||||
GET_USER_FUNC(ScrollWindowEx);
|
||||
GET_USER_FUNC(SetFocus);
|
||||
|
|
|
@ -531,6 +531,17 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ReleaseDC (X11DRV.@)
|
||||
*/
|
||||
void X11DRV_ReleaseDC( HWND hwnd, HDC hdc )
|
||||
{
|
||||
POINT org;
|
||||
|
||||
org.x = org.y = 0;
|
||||
X11DRV_SetDrawable( hdc, root_window, IncludeInferiors, &org, &org );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SWP_DoWinPosChanging
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
@ cdecl GetDC(long long long long) X11DRV_GetDC
|
||||
@ cdecl ForceWindowRaise(long) X11DRV_ForceWindowRaise
|
||||
@ cdecl MsgWaitForMultipleObjectsEx(long ptr long long long) X11DRV_MsgWaitForMultipleObjectsEx
|
||||
@ cdecl ReleaseDC(long long) X11DRV_ReleaseDC
|
||||
@ cdecl ScrollDC(long long long ptr ptr long ptr) X11DRV_ScrollDC
|
||||
@ cdecl ScrollWindowEx(long long long ptr ptr long ptr long) X11DRV_ScrollWindowEx
|
||||
@ cdecl SetFocus(long) X11DRV_SetFocus
|
||||
|
|
|
@ -98,6 +98,7 @@ typedef struct tagUSER_DRIVER {
|
|||
BOOL (*pGetDC)(HWND,HDC,HRGN,DWORD);
|
||||
void (*pForceWindowRaise)(HWND);
|
||||
DWORD (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
|
||||
void (*pReleaseDC)(HWND,HDC);
|
||||
BOOL (*pScrollDC)(HDC,INT,INT,const RECT*,const RECT*,HRGN,LPRECT);
|
||||
INT (*pScrollWindowEx)(HWND,INT,INT,const RECT*,const RECT*,HRGN,LPRECT,UINT);
|
||||
void (*pSetFocus)(HWND);
|
||||
|
|
|
@ -172,6 +172,8 @@ void DCE_FreeWindowDCE( HWND hwnd )
|
|||
}
|
||||
else if( pDCE->DCXflags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN) ) /* Class DCE*/
|
||||
{
|
||||
if (USER_Driver.pReleaseDC)
|
||||
USER_Driver.pReleaseDC( pDCE->hwndCurrent, pDCE->hDC );
|
||||
DCE_DeleteClipRgn( pDCE );
|
||||
pDCE->hwndCurrent = 0;
|
||||
}
|
||||
|
@ -191,6 +193,8 @@ void DCE_FreeWindowDCE( HWND hwnd )
|
|||
DCE_ReleaseDC( pDCE );
|
||||
}
|
||||
|
||||
if (pDCE->hwndCurrent && USER_Driver.pReleaseDC)
|
||||
USER_Driver.pReleaseDC( pDCE->hwndCurrent, pDCE->hDC );
|
||||
pDCE->DCXflags &= DCX_CACHE;
|
||||
pDCE->DCXflags |= DCX_DCEEMPTY;
|
||||
pDCE->hwndCurrent = 0;
|
||||
|
@ -247,7 +251,8 @@ static INT DCE_ReleaseDC( DCE* dce )
|
|||
/* don't keep around invalidated entries
|
||||
* because SetDCState() disables hVisRgn updates
|
||||
* by removing dirty bit. */
|
||||
|
||||
if (dce->hwndCurrent && USER_Driver.pReleaseDC)
|
||||
USER_Driver.pReleaseDC( dce->hwndCurrent, dce->hDC );
|
||||
dce->hwndCurrent = 0;
|
||||
dce->DCXflags &= DCX_CACHE;
|
||||
dce->DCXflags |= DCX_DCEEMPTY;
|
||||
|
@ -306,6 +311,8 @@ BOOL DCE_InvalidateDCE(HWND hwnd, const RECT* pRectUpdate)
|
|||
/* Don't bother with visible regions of unused DCEs */
|
||||
|
||||
TRACE("\tpurged %p dce [%04x]\n", dce, dce->hwndCurrent);
|
||||
if (dce->hwndCurrent && USER_Driver.pReleaseDC)
|
||||
USER_Driver.pReleaseDC( dce->hwndCurrent, dce->hDC );
|
||||
dce->hwndCurrent = 0;
|
||||
dce->DCXflags &= DCX_CACHE;
|
||||
dce->DCXflags |= DCX_DCEEMPTY;
|
||||
|
|
|
@ -694,8 +694,8 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
|
|||
DestroyMenu( wndPtr->hSysMenu );
|
||||
wndPtr->hSysMenu = 0;
|
||||
}
|
||||
USER_Driver.pDestroyWindow( hwnd );
|
||||
DCE_FreeWindowDCE( hwnd ); /* Always do this to catch orphaned DCs */
|
||||
USER_Driver.pDestroyWindow( hwnd );
|
||||
WINPROC_FreeProc( wndPtr->winproc, WIN_PROC_WINDOW );
|
||||
CLASS_RemoveWindow( wndPtr->class );
|
||||
wndPtr->class = NULL;
|
||||
|
|
Loading…
Reference in New Issue