changeset 467:ecf1df2edcee

Cleanup code needs to delayed by posting to the window procedure so that the handlers don't get removed before receiving the WM_COMMAND message.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 08 Oct 2003 10:01:09 +0000
parents c3dfa117b080
children 0a2f13ba2d5c
files win/dw.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/win/dw.c	Wed Oct 08 09:36:10 2003 +0000
+++ b/win/dw.c	Wed Oct 08 10:01:09 2003 +0000
@@ -1815,6 +1815,9 @@
 		if(windowfunc)
 			windowfunc((void *)mp2);
 		break;
+	case WM_USER+5:
+		dw_signal_disconnect_by_name((HWND)mp1, DW_SIGNAL_CLICKED);
+		break;
 	case WM_NOTIFY:
 		{
 			NMHDR FAR *tem=(NMHDR FAR *)mp2;
@@ -4032,6 +4035,8 @@
 
 		popup = parent;
 		TrackPopupMenu(mymenu, 0, x, y, 0, parent, NULL);
+		/* TODO: This needs to call this on all submenus */
+		PostMessage(DW_HWND_OBJECT, WM_USER+5, (LPARAM)mymenu, 0);
 		DestroyMenu(mymenu);
 	}
 }