From a04c393a73445f3016e1e3852c22846eb4295bb7 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Sat, 25 Jun 2016 13:59:42 +0200 Subject: [PATCH] winemac.drv: Don't assume that owner is top-level window in set_cocoa_window_properties. Signed-off-by: Piotr Caban Signed-off-by: Ken Thomases Signed-off-by: Alexandre Julliard --- dlls/winemac.drv/window.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 0d507f4611..db1e528caf 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -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);