Replaced X11DRV_CritSection references by wine_tsx11_(un)lock.
This commit is contained in:
parent
8efd454067
commit
ee21c443c6
|
@ -112,7 +112,7 @@ static Pixmap BRUSH_DitherColor( DC *dc, COLORREF color )
|
||||||
unsigned int x, y;
|
unsigned int x, y;
|
||||||
Pixmap pixmap;
|
Pixmap pixmap;
|
||||||
|
|
||||||
EnterCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_lock();
|
||||||
if (color != prevColor)
|
if (color != prevColor)
|
||||||
{
|
{
|
||||||
int r = GetRValue( color ) * DITHER_LEVELS;
|
int r = GetRValue( color ) * DITHER_LEVELS;
|
||||||
|
@ -138,7 +138,7 @@ static Pixmap BRUSH_DitherColor( DC *dc, COLORREF color )
|
||||||
MATRIX_SIZE, MATRIX_SIZE, X11DRV_GetDepth() );
|
MATRIX_SIZE, MATRIX_SIZE, X11DRV_GetDepth() );
|
||||||
XPutImage( display, pixmap, BITMAP_colorGC, ditherImage, 0, 0,
|
XPutImage( display, pixmap, BITMAP_colorGC, ditherImage, 0, 0,
|
||||||
0, 0, MATRIX_SIZE, MATRIX_SIZE );
|
0, 0, MATRIX_SIZE, MATRIX_SIZE );
|
||||||
LeaveCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_unlock();
|
||||||
return pixmap;
|
return pixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
|
|
||||||
#if defined(HAVE_OPENGL)
|
#if defined(HAVE_OPENGL)
|
||||||
|
|
||||||
|
#include "ts_xlib.h"
|
||||||
#include "x11drv.h"
|
#include "x11drv.h"
|
||||||
|
|
||||||
/* As GLX relies on X, this is needed */
|
/* As GLX relies on X, this is needed */
|
||||||
#define ENTER_GL() EnterCriticalSection( &X11DRV_CritSection )
|
#define ENTER_GL() wine_tsx11_lock()
|
||||||
#define LEAVE_GL() LeaveCriticalSection( &X11DRV_CritSection )
|
#define LEAVE_GL() wine_tsx11_unlock()
|
||||||
|
|
||||||
#undef APIENTRY
|
#undef APIENTRY
|
||||||
#undef CALLBACK
|
#undef CALLBACK
|
||||||
|
|
|
@ -359,8 +359,7 @@ int X11DRV_CLIPBOARD_CacheDataFormats( Atom SelectionName )
|
||||||
|
|
||||||
TRACE("Requesting TARGETS selection for '%s' (owner=%08x)...\n",
|
TRACE("Requesting TARGETS selection for '%s' (owner=%08x)...\n",
|
||||||
TSXGetAtomName(display, selectionCacheSrc), (unsigned)ownerSelection );
|
TSXGetAtomName(display, selectionCacheSrc), (unsigned)ownerSelection );
|
||||||
|
wine_tsx11_lock();
|
||||||
EnterCriticalSection( &X11DRV_CritSection );
|
|
||||||
XConvertSelection(display, selectionCacheSrc, aTargets,
|
XConvertSelection(display, selectionCacheSrc, aTargets,
|
||||||
TSXInternAtom(display, "SELECTION_DATA", False),
|
TSXInternAtom(display, "SELECTION_DATA", False),
|
||||||
w, CurrentTime);
|
w, CurrentTime);
|
||||||
|
@ -374,7 +373,7 @@ int X11DRV_CLIPBOARD_CacheDataFormats( Atom SelectionName )
|
||||||
if( xe.xselection.selection == selectionCacheSrc )
|
if( xe.xselection.selection == selectionCacheSrc )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
LeaveCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
/* Verify that the selection returned a valid TARGETS property */
|
/* Verify that the selection returned a valid TARGETS property */
|
||||||
if ( (xe.xselection.target != aTargets)
|
if ( (xe.xselection.target != aTargets)
|
||||||
|
@ -797,7 +796,7 @@ void X11DRV_ReleaseClipboard(void)
|
||||||
TRACE("\tgiving up selection (spw = %08x)\n",
|
TRACE("\tgiving up selection (spw = %08x)\n",
|
||||||
(unsigned)selectionPrevWindow);
|
(unsigned)selectionPrevWindow);
|
||||||
|
|
||||||
EnterCriticalSection(&X11DRV_CritSection);
|
wine_tsx11_lock();
|
||||||
|
|
||||||
TRACE("Releasing CLIPBOARD selection\n");
|
TRACE("Releasing CLIPBOARD selection\n");
|
||||||
XSetSelectionOwner(display, xaClipboard, None, CurrentTime);
|
XSetSelectionOwner(display, xaClipboard, None, CurrentTime);
|
||||||
|
@ -815,8 +814,7 @@ void X11DRV_ReleaseClipboard(void)
|
||||||
while( !XCheckTypedWindowEvent( display, selectionPrevWindow,
|
while( !XCheckTypedWindowEvent( display, selectionPrevWindow,
|
||||||
SelectionClear, &xe ) );
|
SelectionClear, &xe ) );
|
||||||
}
|
}
|
||||||
|
wine_tsx11_unlock();
|
||||||
LeaveCriticalSection(&X11DRV_CritSection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get rid of any Pixmap resources we may still have */
|
/* Get rid of any Pixmap resources we may still have */
|
||||||
|
@ -1028,8 +1026,7 @@ BOOL X11DRV_GetClipboardData(UINT wFormat)
|
||||||
TRACE("Requesting %s selection from %s...\n",
|
TRACE("Requesting %s selection from %s...\n",
|
||||||
TSXGetAtomName(display, propRequest),
|
TSXGetAtomName(display, propRequest),
|
||||||
TSXGetAtomName(display, selectionCacheSrc) );
|
TSXGetAtomName(display, selectionCacheSrc) );
|
||||||
|
wine_tsx11_lock();
|
||||||
EnterCriticalSection( &X11DRV_CritSection );
|
|
||||||
XConvertSelection(display, selectionCacheSrc, propRequest,
|
XConvertSelection(display, selectionCacheSrc, propRequest,
|
||||||
TSXInternAtom(display, "SELECTION_DATA", False),
|
TSXInternAtom(display, "SELECTION_DATA", False),
|
||||||
w, CurrentTime);
|
w, CurrentTime);
|
||||||
|
@ -1042,8 +1039,8 @@ BOOL X11DRV_GetClipboardData(UINT wFormat)
|
||||||
if( xe.xselection.selection == selectionCacheSrc )
|
if( xe.xselection.selection == selectionCacheSrc )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
LeaveCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the contents of the X selection property into WINE's
|
* Read the contents of the X selection property into WINE's
|
||||||
* clipboard cache converting the selection to be compatible if possible.
|
* clipboard cache converting the selection to be compatible if possible.
|
||||||
|
|
|
@ -191,16 +191,15 @@ static void CALLBACK EVENT_ProcessAllEvents( ULONG_PTR arg )
|
||||||
|
|
||||||
TRACE( "called (thread %lx).\n", GetCurrentThreadId() );
|
TRACE( "called (thread %lx).\n", GetCurrentThreadId() );
|
||||||
|
|
||||||
EnterCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_lock();
|
||||||
while ( XPending( display ) )
|
while ( XPending( display ) )
|
||||||
{
|
{
|
||||||
XNextEvent( display, &event );
|
XNextEvent( display, &event );
|
||||||
|
wine_tsx11_unlock();
|
||||||
LeaveCriticalSection( &X11DRV_CritSection );
|
|
||||||
EVENT_ProcessEvent( &event );
|
EVENT_ProcessEvent( &event );
|
||||||
EnterCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_lock();
|
||||||
}
|
}
|
||||||
LeaveCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -894,7 +893,7 @@ static void EVENT_GetGeometry( Window win, int *px, int *py,
|
||||||
Window root, top;
|
Window root, top;
|
||||||
int x, y, width, height, border, depth;
|
int x, y, width, height, border, depth;
|
||||||
|
|
||||||
EnterCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_lock();
|
||||||
|
|
||||||
/* Get the geometry of the window */
|
/* Get the geometry of the window */
|
||||||
XGetGeometry( display, win, &root, &x, &y, &width, &height,
|
XGetGeometry( display, win, &root, &x, &y, &width, &height,
|
||||||
|
@ -903,7 +902,7 @@ static void EVENT_GetGeometry( Window win, int *px, int *py,
|
||||||
/* Translate the window origin to root coordinates */
|
/* Translate the window origin to root coordinates */
|
||||||
XTranslateCoordinates( display, win, root, 0, 0, &x, &y, &top );
|
XTranslateCoordinates( display, win, root, 0, 0, &x, &y, &top );
|
||||||
|
|
||||||
LeaveCriticalSection( &X11DRV_CritSection );
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
*px = x;
|
*px = x;
|
||||||
*py = y;
|
*py = y;
|
||||||
|
|
Loading…
Reference in New Issue