summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-04-15 17:38:10 (GMT)
committerhobbs <hobbs>2000-04-15 17:38:10 (GMT)
commitdefc6cf3bab5ccc2760262a443b56e5e9ea3f276 (patch)
treea70b9737a71ec4be0368b8e2644376596b801c84 /win
parent30ef153836366775a90fa9c38edc7d239a391fb7 (diff)
downloadtk-defc6cf3bab5ccc2760262a443b56e5e9ea3f276.zip
tk-defc6cf3bab5ccc2760262a443b56e5e9ea3f276.tar.gz
tk-defc6cf3bab5ccc2760262a443b56e5e9ea3f276.tar.bz2
* 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]
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c15
1 files changed, 12 insertions, 3 deletions
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.
*/