From ce9aaf3f4250536aadf04ad77fcaa1836242b696 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Fri, 30 Oct 2020 16:19:50 +0800 Subject: [PATCH] winemac.drv: Send HTMENU instead of HTCAPTION to query window activation. Equivalent of cfcc280905b7804efde8f42bcd6bddbe5ebd8cad for winex11.drv. Signed-off-by: Zhiyi Zhang Signed-off-by: Ken Thomases Signed-off-by: Alexandre Julliard --- dlls/winemac.drv/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 066eb553f76..e7f5327fcdc 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -2348,11 +2348,11 @@ void macdrv_window_got_focus(HWND hwnd, const macdrv_event *event) if (can_activate_window(hwnd) && !(style & WS_MINIMIZE)) { - /* simulate a mouse click on the caption to find out + /* simulate a mouse click on the menu to find out * whether the window wants to be activated */ LRESULT ma = SendMessageW(hwnd, WM_MOUSEACTIVATE, (WPARAM)GetAncestor(hwnd, GA_ROOT), - MAKELONG(HTCAPTION,WM_LBUTTONDOWN)); + MAKELONG(HTMENU, WM_LBUTTONDOWN)); if (ma != MA_NOACTIVATEANDEAT && ma != MA_NOACTIVATE) { TRACE("setting foreground window to %p\n", hwnd);