winex11.drv: Don't assume that owner is top-level window in set_style_hints.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2016-06-25 13:59:49 +02:00 committed by Alexandre Julliard
parent a04c393a73
commit 6afecf2223
1 changed files with 7 additions and 1 deletions

View File

@ -748,10 +748,16 @@ static void set_style_hints( struct x11drv_win_data *data, DWORD style, DWORD ex
{
Window group_leader = data->whole_window;
HWND owner = GetWindow( data->hwnd, GW_OWNER );
Window owner_win = X11DRV_get_whole_window( owner );
Window owner_win = 0;
XWMHints *wm_hints;
Atom window_type;
if (owner)
{
owner = GetAncestor( owner, GA_ROOT );
owner_win = X11DRV_get_whole_window( owner );
}
if (owner_win)
{
XSetTransientForHint( data->display, data->whole_window, owner_win );