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
06a1407c
Commit
06a1407c
authored
Jun 26, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Explicitly request creation of the per-thread data where necessary.
parent
b258f880
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
18 deletions
+24
-18
clipboard.c
dlls/winex11.drv/clipboard.c
+4
-3
mouse.c
dlls/winex11.drv/mouse.c
+1
-1
window.c
dlls/winex11.drv/window.c
+10
-7
wintab.c
dlls/winex11.drv/wintab.c
+2
-2
x11ddraw.c
dlls/winex11.drv/x11ddraw.c
+2
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-4
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+3
-1
No files found.
dlls/winex11.drv/clipboard.c
View file @
06a1407c
...
...
@@ -317,7 +317,8 @@ static UINT wSeqNo = 0;
static
Window
thread_selection_wnd
(
void
)
{
Window
w
=
x11drv_thread_data
()
->
selection_wnd
;
struct
x11drv_thread_data
*
thread_data
=
x11drv_init_thread_data
();
Window
w
=
thread_data
->
selection_wnd
;
if
(
!
w
)
{
...
...
@@ -327,12 +328,12 @@ static Window thread_selection_wnd(void)
ButtonPressMask
|
ButtonReleaseMask
|
EnterWindowMask
);
wine_tsx11_lock
();
w
=
XCreateWindow
(
thread_d
isplay
()
,
root_window
,
0
,
0
,
1
,
1
,
0
,
screen_depth
,
w
=
XCreateWindow
(
thread_d
ata
->
display
,
root_window
,
0
,
0
,
1
,
1
,
0
,
screen_depth
,
InputOutput
,
CopyFromParent
,
CWEventMask
,
&
attr
);
wine_tsx11_unlock
();
if
(
w
)
x11drv_thread_data
()
->
selection_wnd
=
w
;
thread_data
->
selection_wnd
=
w
;
else
FIXME
(
"Failed to create window. Fetching selection data will fail.
\n
"
);
}
...
...
dlls/winex11.drv/mouse.c
View file @
06a1407c
...
...
@@ -918,7 +918,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr )
*/
void
X11DRV_SetCursor
(
CURSORICONINFO
*
lpCursor
)
{
struct
x11drv_thread_data
*
data
=
x11drv_thread_data
();
struct
x11drv_thread_data
*
data
=
x11drv_
init_
thread_data
();
Cursor
cursor
;
if
(
lpCursor
)
...
...
dlls/winex11.drv/window.c
View file @
06a1407c
...
...
@@ -1487,7 +1487,6 @@ void X11DRV_SetWindowStyle( HWND hwnd, DWORD old_style )
void
X11DRV_DestroyWindow
(
HWND
hwnd
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
Display
*
display
=
thread_data
->
display
;
struct
x11drv_win_data
*
data
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
...
...
@@ -1506,13 +1505,13 @@ void X11DRV_DestroyWindow( HWND hwnd )
wine_tsx11_unlock
();
}
destroy_whole_window
(
display
,
data
,
FALSE
);
destroy_icon_window
(
display
,
data
);
destroy_whole_window
(
thread_data
->
display
,
data
,
FALSE
);
destroy_icon_window
(
thread_data
->
display
,
data
);
if
(
data
->
colormap
)
{
wine_tsx11_lock
();
XFreeColormap
(
display
,
data
->
colormap
);
XFreeColormap
(
thread_data
->
display
,
data
->
colormap
);
wine_tsx11_unlock
();
}
...
...
@@ -1520,7 +1519,7 @@ void X11DRV_DestroyWindow( HWND hwnd )
if
(
data
->
hWMIconBitmap
)
DeleteObject
(
data
->
hWMIconBitmap
);
if
(
data
->
hWMIconMask
)
DeleteObject
(
data
->
hWMIconMask
);
wine_tsx11_lock
();
XDeleteContext
(
display
,
(
XID
)
hwnd
,
win_data_context
);
XDeleteContext
(
thread_data
->
display
,
(
XID
)
hwnd
,
win_data_context
);
wine_tsx11_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
data
);
}
...
...
@@ -1638,9 +1637,12 @@ BOOL X11DRV_CreateWindow( HWND hwnd )
*/
struct
x11drv_win_data
*
X11DRV_get_win_data
(
HWND
hwnd
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
char
*
data
;
if
(
!
hwnd
||
XFindContext
(
thread_display
(),
(
XID
)
hwnd
,
win_data_context
,
&
data
))
data
=
NULL
;
if
(
!
thread_data
)
return
NULL
;
if
(
!
hwnd
)
return
NULL
;
if
(
XFindContext
(
thread_data
->
display
,
(
XID
)
hwnd
,
win_data_context
,
&
data
))
data
=
NULL
;
return
(
struct
x11drv_win_data
*
)
data
;
}
...
...
@@ -1813,6 +1815,7 @@ void X11DRV_SetCapture( HWND hwnd, UINT flags )
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
if
(
!
thread_data
)
return
;
if
(
!
(
flags
&
(
GUI_INMOVESIZE
|
GUI_INMENUMODE
)))
return
;
if
(
hwnd
)
...
...
@@ -1924,7 +1927,7 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags,
const
RECT
*
rectWindow
,
const
RECT
*
rectClient
,
const
RECT
*
visible_rect
,
const
RECT
*
valid_rects
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
struct
x11drv_thread_data
*
thread_data
=
x11drv_
init_
thread_data
();
Display
*
display
=
thread_data
->
display
;
struct
x11drv_win_data
*
data
=
X11DRV_get_win_data
(
hwnd
);
DWORD
new_style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
...
...
dlls/winex11.drv/wintab.c
View file @
06a1407c
...
...
@@ -490,7 +490,7 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
const
WCHAR
SZ_DEVICE_NAME
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
't'
,
' '
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
0
};
const
WCHAR
SZ_NON_PLUGINPLAY
[]
=
{
'n'
,
'o'
,
'n'
,
'-'
,
'p'
,
'l'
,
'u'
,
'g'
,
'i'
,
'n'
,
'p'
,
'l'
,
'a'
,
'y'
,
0
};
struct
x11drv_thread_data
*
data
=
x11drv_thread_data
();
struct
x11drv_thread_data
*
data
=
x11drv_
init_
thread_data
();
int
num_devices
;
int
loop
;
XDeviceInfo
*
devices
;
...
...
@@ -961,7 +961,7 @@ static void proximity_event( HWND hwnd, XEvent *event )
*/
int
X11DRV_AttachEventQueueToTablet
(
HWND
hOwner
)
{
struct
x11drv_thread_data
*
data
=
x11drv_thread_data
();
struct
x11drv_thread_data
*
data
=
x11drv_
init_
thread_data
();
int
num_devices
;
int
loop
;
int
cur_loop
;
...
...
dlls/winex11.drv/x11ddraw.c
View file @
06a1407c
...
...
@@ -77,6 +77,8 @@ static LRESULT WINAPI GrabWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
TRACE
(
"hwnd=%p, grab=%ld
\n
"
,
hWnd
,
wParam
);
if
(
!
data
)
return
0
;
if
(
wParam
)
{
/* find the X11 window that ddraw uses */
...
...
dlls/winex11.drv/x11drv.h
View file @
06a1407c
...
...
@@ -522,12 +522,10 @@ extern DWORD thread_data_tls_index;
static
inline
struct
x11drv_thread_data
*
x11drv_thread_data
(
void
)
{
struct
x11drv_thread_data
*
data
=
TlsGetValue
(
thread_data_tls_index
);
if
(
!
data
)
data
=
x11drv_init_thread_data
();
return
data
;
return
TlsGetValue
(
thread_data_tls_index
);
}
static
inline
Display
*
thread_display
(
void
)
{
return
x11drv_thread_data
()
->
display
;
}
static
inline
Display
*
thread_display
(
void
)
{
return
x11drv_
init_
thread_data
()
->
display
;
}
static
inline
size_t
get_property_size
(
int
format
,
unsigned
long
count
)
{
...
...
dlls/winex11.drv/x11drv_main.c
View file @
06a1407c
...
...
@@ -616,7 +616,9 @@ static void set_queue_display_fd( Display *display )
*/
struct
x11drv_thread_data
*
x11drv_init_thread_data
(
void
)
{
struct
x11drv_thread_data
*
data
;
struct
x11drv_thread_data
*
data
=
x11drv_thread_data
();
if
(
data
)
return
data
;
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
data
)
)))
{
...
...
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