Signed-off-by: Chao Long longchao@uniontech.com --- dlls/winex11.drv/event.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 1772a27c48b..3e4742078be 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -707,9 +707,11 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event ) { /* simulate a mouse click on the menu to find out * whether the window wants to be activated */ + DWORD ht = HTCAPTION; + if (GetClassLongW(hwnd, GCL_STYLE) & WS_SYSMENU) ht = HTMENU; LRESULT ma = SendMessageW( hwnd, WM_MOUSEACTIVATE, (WPARAM)GetAncestor( hwnd, GA_ROOT ), - MAKELONG( HTMENU, WM_LBUTTONDOWN ) ); + MAKELONG( ht, WM_LBUTTONDOWN ) ); if (ma != MA_NOACTIVATEANDEAT && ma != MA_NOACTIVATE) { set_focus( event->display, hwnd, event_time );