winex11.drv: Empty clipboard cache on process unload to avoid false positives being reported for memory leaks.

This commit is contained in:
Rob Shearman 2009-12-29 19:03:40 +00:00 committed by Alexandre Julliard
parent 3547ea011a
commit e4888b0e3c
3 changed files with 12 additions and 0 deletions

View File

@ -3282,3 +3282,13 @@ void X11DRV_SelectionClear( HWND hWnd, XEvent *xev )
X11DRV_CLIPBOARD_ReleaseSelection( event->display, event->selection,
event->window, hWnd, event->time );
}
/***********************************************************************
* X11DRV_Clipboard_Cleanup
*/
void X11DRV_Clipboard_Cleanup(void)
{
selectionAcquired = S_NOSELECTION;
X11DRV_EmptyClipboard(FALSE);
}

View File

@ -765,6 +765,7 @@ extern XContext winContext;
extern void X11DRV_InitClipboard(void);
extern int CDECL X11DRV_AcquireClipboard(HWND hWndClipWindow);
extern void X11DRV_Clipboard_Cleanup(void);
extern void X11DRV_ResetSelectionOwner(void);
extern void CDECL X11DRV_SetFocus( HWND hwnd );
extern Cursor X11DRV_GetCursor( Display *display, struct tagCURSORICONINFO *ptr );

View File

@ -583,6 +583,7 @@ static void thread_detach(void)
*/
static void process_detach(void)
{
X11DRV_Clipboard_Cleanup();
#ifdef SONAME_LIBXXF86VM
/* cleanup XVidMode */
X11DRV_XF86VM_Cleanup();