From defc6cf3bab5ccc2760262a443b56e5e9ea3f276 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 15 Apr 2000 17:38:10 +0000 Subject: * win/tkWinWm.c (WmProc): added check in WM_MOUSEACTIVATE so we correctly activate native menus when clicking in when we didn't have focus [Bug: 2272] --- ChangeLog | 4 ++++ win/tkWinWm.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e7aa09..e60a912 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,10 @@ 2000-04-14 Jeff Hobbs + * win/tkWinWm.c (WmProc): added check in WM_MOUSEACTIVATE so we + correctly activate native menus when clicking in when we didn't + have focus [Bug: 2272] + * generic/tkCanvas.c (CanvasEventProc:2451): corrected cast * generic/tkEntry.c (Tk_EntryObjCmd): adjusted finishing error diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 2b1da14..7be7598 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.21 2000/02/26 03:11:07 hobbs Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.22 2000/04/15 17:38:13 hobbs Exp $ */ #include "tkWinInt.h" @@ -4282,9 +4282,18 @@ WmProc(hwnd, message, wParam, lParam) ActivateEvent *eventPtr; winPtr = GetTopLevel((HWND) wParam); + if (winPtr && (TkGrabState(winPtr) != TK_GRAB_EXCLUDED)) { + /* + * This allows us to pass the message onto the + * native menus [Bug: 2272] + */ + result = DefWindowProc(hwnd, message, wParam, lParam); + goto done; + } + /* - * Don't activate the window yet since there may be grabs - * that should take precedence. Instead we need to queue + * Don't activate the window yet since there is a grab + * that takes precedence. Instead we need to queue * an event so we can check the grab state right before we * handle the mouse event. */ -- cgit v0.12