Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e551555d
Commit
e551555d
authored
Feb 09, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the win data pointer only available in the thread that owns the
window.
parent
c67a307b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
window.c
dlls/x11drv/window.c
+4
-4
winpos.c
dlls/x11drv/winpos.c
+4
-6
No files found.
dlls/x11drv/window.c
View file @
e551555d
...
...
@@ -848,7 +848,7 @@ BOOL X11DRV_DestroyWindow( HWND hwnd )
if
(
data
->
hWMIconBitmap
)
DeleteObject
(
data
->
hWMIconBitmap
);
if
(
data
->
hWMIconMask
)
DeleteObject
(
data
->
hWMIconMask
);
wine_tsx11_lock
();
XDeleteContext
(
gdi_
display
,
(
XID
)
hwnd
,
win_data_context
);
XDeleteContext
(
display
,
(
XID
)
hwnd
,
win_data_context
);
wine_tsx11_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
data
);
...
...
@@ -902,10 +902,9 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
data
->
hWMIconBitmap
=
0
;
data
->
hWMIconMask
=
0
;
/* use gdi_display so that it's available from all threads (FIXME) */
wine_tsx11_lock
();
if
(
!
win_data_context
)
win_data_context
=
XUniqueContext
();
XSaveContext
(
gdi_
display
,
(
XID
)
hwnd
,
win_data_context
,
(
char
*
)
data
);
XSaveContext
(
display
,
(
XID
)
hwnd
,
win_data_context
,
(
char
*
)
data
);
wine_tsx11_unlock
();
/* initialize the dimensions before sending WM_GETMINMAXINFO */
...
...
@@ -1058,7 +1057,8 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
struct
x11drv_win_data
*
X11DRV_get_win_data
(
HWND
hwnd
)
{
char
*
data
;
if
(
XFindContext
(
gdi_display
,
(
XID
)
hwnd
,
win_data_context
,
&
data
))
data
=
NULL
;
if
(
!
hwnd
||
XFindContext
(
thread_display
(),
(
XID
)
hwnd
,
win_data_context
,
&
data
))
data
=
NULL
;
return
(
struct
x11drv_win_data
*
)
data
;
}
...
...
dlls/x11drv/winpos.c
View file @
e551555d
...
...
@@ -176,12 +176,13 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
{
HWND
top
=
get_top_clipping_window
(
hwnd
);
struct
x11drv_escape_set_drawable
escape
;
struct
x11drv_win_data
*
data
;
escape
.
mode
=
IncludeInferiors
;
/* don't clip siblings if using parent clip region */
if
(
flags
&
DCX_PARENTCLIP
)
flags
&=
~
DCX_CLIPSIBLINGS
;
if
(
top
!=
hwnd
)
if
(
top
!=
hwnd
||
!
(
data
=
X11DRV_get_win_data
(
hwnd
))
)
{
POINT
client_offset
;
...
...
@@ -213,16 +214,13 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
}
else
{
struct
x11drv_win_data
*
data
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
FALSE
;
if
(
IsIconic
(
hwnd
))
{
escape
.
drawable
=
data
->
icon_window
?
data
->
icon_window
:
data
->
whole_window
;
escape
.
org
.
x
=
0
;
escape
.
org
.
y
=
0
;
escape
.
drawable_org
=
escape
.
org
;
MapWindowPoints
(
hwnd
,
0
,
&
escape
.
drawable_org
,
1
);
}
else
{
...
...
@@ -1521,7 +1519,7 @@ int X11DRV_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
{
if
(
IsWindow
(
hwnd
))
FIXME
(
"not supported on other
process
window %p
\n
"
,
hwnd
);
FIXME
(
"not supported on other
thread
window %p
\n
"
,
hwnd
);
SetLastError
(
ERROR_INVALID_WINDOW_HANDLE
);
return
FALSE
;
}
...
...
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