Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ee21c443
Commit
ee21c443
authored
Jan 15, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced X11DRV_CritSection references by wine_tsx11_(un)lock.
parent
8efd4540
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
20 deletions
+17
-20
brush.c
graphics/x11drv/brush.c
+2
-2
wine_gl.h
include/wine_gl.h
+3
-2
clipboard.c
windows/x11drv/clipboard.c
+6
-9
event.c
windows/x11drv/event.c
+6
-7
No files found.
graphics/x11drv/brush.c
View file @
ee21c443
...
@@ -112,7 +112,7 @@ static Pixmap BRUSH_DitherColor( DC *dc, COLORREF color )
...
@@ -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 )
...
@@ -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
;
}
}
...
...
include/wine_gl.h
View file @
ee21c443
...
@@ -11,11 +11,12 @@
...
@@ -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
...
...
windows/x11drv/clipboard.c
View file @
ee21c443
...
@@ -359,8 +359,7 @@ int X11DRV_CLIPBOARD_CacheDataFormats( Atom SelectionName )
...
@@ -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 )
...
@@ -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)
...
@@ -797,7 +796,7 @@ void X11DRV_ReleaseClipboard(void)
TRACE
(
"
\t
giving up selection (spw = %08x)
\n
"
,
TRACE
(
"
\t
giving 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)
...
@@ -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)
...
@@ -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,7 +1039,7 @@ BOOL X11DRV_GetClipboardData(UINT wFormat)
...
@@ -1042,7 +1039,7 @@ 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
...
...
windows/x11drv/event.c
View file @
ee21c443
...
@@ -191,16 +191,15 @@ static void CALLBACK EVENT_ProcessAllEvents( ULONG_PTR arg )
...
@@ -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,
...
@@ -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,
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment