winemac.drv: Don't assume that owner is top-level window in set_cocoa_window_properties.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2016-06-25 13:59:42 +02:00 committed by Alexandre Julliard
parent da31ddb797
commit a04c393a73
1 changed files with 2 additions and 0 deletions

View File

@ -342,6 +342,8 @@ static void set_cocoa_window_properties(struct macdrv_win_data *data)
ex_style = GetWindowLongW(data->hwnd, GWL_EXSTYLE);
owner = GetWindow(data->hwnd, GW_OWNER);
if (owner)
owner = GetAncestor(owner, GA_ROOT);
owner_win = macdrv_get_cocoa_window(owner, TRUE);
macdrv_set_cocoa_parent_window(data->cocoa_window, owner_win);