Release 970525

Tue May 20 19:20:23 1997  Pablo Saratxaga <srtxg@linux.chanae.stben.be>

	* [resources/sysres_Es.rc]
	Updated CHOOSE_FONT, CHOOSE_COLOR, EDITMENU for Spanish.

Mon May 19 22:06:04 1997  Michiel van Loon <mfvl@xs4all.nl>

	* [multimedia/mcistring.c]
	Corrected bug for device!element command.

	* [multimedia/mmaux.c]
	Replaced printf and fprintf calls by dprintf_mmaux.

	* [multimedia/audio.c]
	Corrected debugmessage in wodGetVolume.
	Include code for MCI_CUE command.

	* [multimedia/mmsystem.c]
	Added the MCIERR_SEQ error messages.

	* [if1632/mmsystem.spec] [multimedia/audio.c] [multimedia/mmsystem.c]
	Changed call structure of waveInOpen and waveOutOpen.

	* [multimedia/mmsystem.c] [multimedia/audio.c] [multimedia/midi.c]
	  [multimedia/mmaux.c] [multimedia/mcicda.c] [multimedia/mcianim.c]
	  [multimedia/mcistring.c] [include/mmsystem.h]
	Changed the deviceID scheme.

	* [include/queue.h] [include/win16drv.h] [msdos/dpmi.c]
	  [windows/user.c] [windows/driver.c] [graphic/wing.c]
	  [graphics/x11drv/bitmap.c] [misc/wsprintf.c] [misc/crtdll.c]
	Removed compiler warnings.

Mon May 19 01:32:24 1997  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [controls/menu.c] [windows/win.c] [windows/graphics.c]
	Popup menu shade, new system menu implementation, 
	ModifyMenu() fixes, better check mark painting.

	* [windows/mdi.c]
	MDI client fix for Win32.

Sat May 17 12:02:11 1997  Albrecht Kleine  <kleine@ak.sax.de>

	* [objects/metafile.c]
	Added handling of META_DIBBITBLT, META_SETTEXTJUSTIFICATION
	plus bugfix in META_EXTTEXTOUT (start_of_text etc.)

Thu May 15 22:52:00 1997  Jimen Ching  <jching@flex.com>

	* [loader/ne_image.c]
	Make sure dgroup is valid by checking pModule->flags consistently.
diff --git a/windows/win.c b/windows/win.c
index e5be6f4..f093af1 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -43,6 +43,7 @@
 static WORD wDragWidth = 4;
 static WORD wDragHeight= 3;
 
+extern BOOL32 MENU_PatchResidentPopup( HQUEUE16, WND* );
 extern HCURSOR16 CURSORICON_IconToCursor(HICON16, BOOL32);
 extern HWND32 CARET_GetHwnd(void);
 extern BOOL32 WINPOS_ActivateOtherWindow(WND* pWnd);
@@ -569,8 +570,9 @@
     wndPtr->pVScroll       = NULL;
     wndPtr->pHScroll       = NULL;
     wndPtr->pProp          = NULL;
-    wndPtr->hSysMenu       = MENU_GetDefSysMenu();
     wndPtr->userdata       = 0;
+    wndPtr->hSysMenu       = (wndPtr->dwStyle & WS_SYSMENU)
+			     ? MENU_GetSysMenu( hwnd, 0 ) : 0;
 
     if (classPtr->cbWndExtra) memset( wndPtr->wExtra, 0, classPtr->cbWndExtra);
 
@@ -1000,7 +1002,7 @@
         /* FIXME: clean up palette - see "Internals" p.352 */
     }
 
-    if( !QUEUE_IsDoomedQueue(wndPtr->hmemTaskQ) )
+    if( !QUEUE_IsExitingQueue(wndPtr->hmemTaskQ) )
 	 WIN_SendParentNotify( hwnd, WM_DESTROY, wndPtr->wIDmenu, (LPARAM)hwnd );
     if (!IsWindow32(hwnd)) return TRUE;
 
@@ -1012,7 +1014,7 @@
     {
         SetWindowPos32( hwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW |
 		        SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|
-		        ((QUEUE_IsDoomedQueue(wndPtr->hmemTaskQ))?SWP_DEFERERASE:0) );
+		        ((QUEUE_IsExitingQueue(wndPtr->hmemTaskQ))?SWP_DEFERERASE:0) );
 	if (!IsWindow32(hwnd)) return TRUE;
     }
 
@@ -1020,6 +1022,9 @@
 
     if( !(wndPtr->dwStyle & WS_CHILD) )
     {
+      /* make sure top menu popup doesn't get destroyed */
+      MENU_PatchResidentPopup( TRUE, wndPtr );
+
       for (;;)
       {
         WND *siblingPtr = wndPtr->parent->child;  /* First sibling */