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
7b3a00c0
Commit
7b3a00c0
authored
Feb 23, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Make sure that the owner window exists when setting the transient for attribute.
parent
1571337c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
window.c
dlls/winex11.drv/window.c
+25
-12
No files found.
dlls/winex11.drv/window.c
View file @
7b3a00c0
...
...
@@ -966,13 +966,34 @@ static void set_initial_wm_hints( Display *display, struct x11drv_win_data *data
/***********************************************************************
* get_owner_whole_window
*
* Retrieve an owner's window, creating it if necessary.
*/
static
Window
get_owner_whole_window
(
HWND
owner
)
{
struct
x11drv_win_data
*
data
;
if
(
!
owner
)
return
0
;
if
(
!
(
data
=
X11DRV_get_win_data
(
owner
)))
{
if
(
!
(
data
=
X11DRV_create_win_data
(
owner
)))
return
(
Window
)
GetPropA
(
owner
,
whole_window_prop
);
}
return
data
->
whole_window
;
}
/***********************************************************************
* set_wm_hints
*
* Set the window manager hints for a newly-created window
*/
static
void
set_wm_hints
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
{
Window
group_leader
;
Window
group_leader
=
data
->
whole_window
;
Window
owner_win
=
0
;
Atom
window_type
;
MwmHints
mwm_hints
;
DWORD
style
,
ex_style
;
...
...
@@ -990,21 +1011,13 @@ static void set_wm_hints( Display *display, struct x11drv_win_data *data )
style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_STYLE
);
ex_style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_EXSTYLE
);
owner
=
get_window_owner
(
data
->
hwnd
);
if
((
owner_win
=
get_owner_whole_window
(
owner
)))
group_leader
=
owner_win
;
}
/* transient for hint */
if
(
owner
)
{
Window
owner_win
=
X11DRV_get_whole_window
(
owner
);
wine_tsx11_lock
();
XSetTransientForHint
(
display
,
data
->
whole_window
,
owner_win
);
wine_tsx11_unlock
();
group_leader
=
owner_win
;
}
else
group_leader
=
data
->
whole_window
;
wine_tsx11_lock
();
if
(
owner_win
)
XSetTransientForHint
(
display
,
data
->
whole_window
,
owner_win
);
/* size hints */
set_size_hints
(
display
,
data
,
style
);
...
...
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