summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2005-01-04 02:09:45 (GMT)
committerchengyemao <chengyemao>2005-01-04 02:09:45 (GMT)
commitc59f9dc12fdc6e3103d70d314b124ca8db05b6f3 (patch)
treecc580fd970753fd0b65473aac6b753d6a056852a /win/tkWinWm.c
parentaca80f792b0f988d2119abdc3ea424f0a73acb9c (diff)
downloadtk-c59f9dc12fdc6e3103d70d314b124ca8db05b6f3.zip
tk-c59f9dc12fdc6e3103d70d314b124ca8db05b6f3.tar.gz
tk-c59f9dc12fdc6e3103d70d314b124ca8db05b6f3.tar.bz2
Modified for separating an embedded menu's window handler from a normal popup menu window's handler; improved an embedded menu display in Windows/XP
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 82795b4..3f0d4f8 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.86 2005/01/04 01:29:12 hobbs Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.87 2005/01/04 02:09:46 chengyemao Exp $
*/
#include "tkWinInt.h"
@@ -7430,11 +7430,6 @@ WmProc(hwnd, message, wParam, lParam)
winPtr = GetTopLevel(hwnd);
switch(message) {
case WM_SYSCOMMAND:
- if (TkWinHandleMenuEvent(&hwnd, &message, &wParam, &lParam, &result)) {
- goto done;
- }
- break;
-
case WM_INITMENU:
case WM_COMMAND:
case WM_MENUCHAR:
@@ -7442,11 +7437,14 @@ WmProc(hwnd, message, wParam, lParam)
case WM_DRAWITEM:
case WM_MENUSELECT:
case WM_ENTERIDLE:
+ case WM_INITMENUPOPUP:
+ case WM_UNINITMENUPOPUP:
{
HWND hMenuHWnd = Tk_GetEmbeddedMenuHWND((Tk_Window)winPtr);
if(hMenuHWnd) {
- SendMessage(hMenuHWnd, message, wParam, lParam);
- goto done;
+ if(SendMessage(hMenuHWnd, message, wParam, lParam)) {
+ goto done;
+ }
} else {
if (TkWinHandleMenuEvent(&hwnd, &message, &wParam, &lParam, &result)) {
goto done;