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
20bc10c3
Commit
20bc10c3
authored
Nov 15, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Properly forget about a foreign window when it's destroyed through DestroyWindow().
parent
9de2ed97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
window.c
dlls/winex11.drv/window.c
+20
-9
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+1
-1
No files found.
dlls/winex11.drv/window.c
View file @
20bc10c3
...
...
@@ -78,6 +78,7 @@ static XContext win_data_context;
static
Time
last_user_time
;
static
Window
user_time_window
;
static
const
char
foreign_window_prop
[]
=
"__wine_x11_foreign_window"
;
static
const
char
whole_window_prop
[]
=
"__wine_x11_whole_window"
;
static
const
char
client_window_prop
[]
=
"__wine_x11_client_window"
;
static
const
char
icon_window_prop
[]
=
"__wine_x11_icon_window"
;
...
...
@@ -1753,7 +1754,23 @@ done:
*/
static
void
destroy_whole_window
(
Display
*
display
,
struct
x11drv_win_data
*
data
,
BOOL
already_destroyed
)
{
if
(
!
data
->
whole_window
)
return
;
if
(
!
data
->
whole_window
)
{
if
(
data
->
embedded
)
{
Window
xwin
=
(
Window
)
GetPropA
(
data
->
hwnd
,
foreign_window_prop
);
if
(
xwin
)
{
wine_tsx11_lock
();
if
(
!
already_destroyed
)
XSelectInput
(
display
,
xwin
,
0
);
XDeleteContext
(
display
,
xwin
,
winContext
);
wine_tsx11_unlock
();
RemovePropA
(
data
->
hwnd
,
foreign_window_prop
);
}
}
return
;
}
TRACE
(
"win %p xwin %lx/%lx
\n
"
,
data
->
hwnd
,
data
->
whole_window
,
data
->
client_window
);
wine_tsx11_lock
();
...
...
@@ -1894,14 +1911,7 @@ void X11DRV_DestroyNotify( HWND hwnd, XEvent *event )
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
embedded
)
FIXME
(
"window %p/%lx destroyed from the outside
\n
"
,
hwnd
,
data
->
whole_window
);
if
(
!
data
->
whole_window
)
{
wine_tsx11_lock
();
XDeleteContext
(
display
,
event
->
xdestroywindow
.
window
,
winContext
);
wine_tsx11_unlock
();
}
else
destroy_whole_window
(
display
,
data
,
TRUE
);
destroy_whole_window
(
display
,
data
,
TRUE
);
if
(
data
->
embedded
)
SendMessageW
(
hwnd
,
WM_CLOSE
,
0
,
0
);
}
...
...
@@ -2153,6 +2163,7 @@ HWND create_foreign_window( Display *display, Window xwin )
data
->
embedded
=
TRUE
;
data
->
mapped
=
TRUE
;
SetPropA
(
hwnd
,
foreign_window_prop
,
(
HANDLE
)
xwin
);
wine_tsx11_lock
();
XSaveContext
(
display
,
xwin
,
winContext
,
(
char
*
)
data
->
hwnd
);
wine_tsx11_unlock
();
...
...
dlls/winex11.drv/x11drv_main.c
View file @
20bc10c3
...
...
@@ -197,7 +197,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
*/
static
inline
BOOL
ignore_error
(
Display
*
display
,
XErrorEvent
*
event
)
{
if
(
event
->
request_code
==
X_SetInputFocus
&&
if
(
(
event
->
request_code
==
X_SetInputFocus
||
event
->
request_code
==
X_ChangeWindowAttributes
)
&&
(
event
->
error_code
==
BadMatch
||
event
->
error_code
==
BadWindow
))
return
TRUE
;
/* ignore a number of errors on gdi display caused by creating/destroying windows */
...
...
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