Mercurial > dwindows
diff os2/dw.c @ 466:c3dfa117b080
Added new code to make the menu handlers window local instead of global.
According to the docs this will only work on Win2k/98 and above, so I
added a WINNT_COMPAT define to allow Dynamic Windows to work on WinNT and
Win95 without the new menu code. Also improved on this same fix for OS/2.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 08 Oct 2003 09:36:10 +0000 |
parents | 4ff2c7210973 |
children | 0a2f13ba2d5c |
line wrap: on
line diff
--- a/os2/dw.c Thu Oct 02 07:51:26 2003 +0000 +++ b/os2/dw.c Wed Oct 08 09:36:10 2003 +0000 @@ -2157,11 +2157,11 @@ int (* API clickfunc)(HWND, void *) = (int (* API)(HWND, void *))tmp->signalfunction; ULONG command = COMMANDMSG(&msg)->cmd; - if(tmp->id) + if(tmp->id && command == tmp->id) { HWND menuowner = _menu_owner(tmp->window); - if((menuowner == hWnd || menuowner == NULLHANDLE) && command == tmp->id) + if(menuowner == hWnd || menuowner == NULLHANDLE) { result = clickfunc(tmp->window, tmp->data); tmp = NULL;