Release 960528

Tue May 28 19:36:36 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [controls/combo.c]
	Destroy the listbox and edit control when destroying the
	combo. This should prevent crashes on application exit.

	* [misc/system.c] [if1632/system.spec]
	Implemented InquireSystem().

	* [loader/task.c] [windows/message.c] [windows/queue.c]
	First attempt at inter-task SendMessage(). Still has a lot of
	problems.

Tue May 28 14:26:04 1996  Peter Bajusz  <hyp-x@inf.bme.hu>

	* [windows/mdi.c]
	Fixed MDITile with iconic children.

Mon May 27 20:28:18 1996  Albrecht Kleine  <kleine@ak.sax.de>

	* [misc/commdlg.c]
	ChooseFont dialog:
	- complete rewrite of FontFamilyEnumProc() and FontStyleEnumProc()
	  not real available font types (e.g. "Bold") can not selected
	- supporting more CF_LIMITSIZE- and CF_...ONLY- flags

	* [objects/font.c]
	In FONT_MatchFont perform check if "lfFaceName" is family from X11
	only if "lfFaceName" is a windows font family then do a call of
	FONT_TranslateName() : this results in better font selections in 
	ChooseFont() or applications like charmap.exe or write.exe.
	Added a ParseFontParms() call if necessary in function 
	FONT_MatchFont(): we need a font name as basis for GetTextFace() 
	even if there isn't one...

	* [resources/TODO]
	Inventory of resource translations in sysres_??.rc

Fri May 24 16:33:28 1996  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [misc/registry.c]
	_w95_loadreg: use offset to determine next RGDB position too.

Thu May 23 19:35:38 1996  Greg Kreider <kreider@natlab.research.philips.com>

	* [controls/combo.c]
	Fixed size of combo, lbox, and button (lb sometimes off by 2 pixels).

	* [misc/main.c]
	Result of option "-fixedmap" is to turn flag on.

Thu May 23 19:15:41 1996  Ronan Waide  <root@waider.ie>

	* [misc/shell.c]
	ShellExecute and FindExecutable now both use common code to
	determine the required executable file.
diff --git a/windows/event.c b/windows/event.c
index be015bf..53beabe 100644
--- a/windows/event.c
+++ b/windows/event.c
@@ -9,11 +9,15 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <errno.h>
 #include <X11/keysym.h>
 #include <X11/Xlib.h>
 #include <X11/Xresource.h>
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
+
 #include "windows.h"
 #include "gdi.h"
 #include "heap.h"
@@ -260,6 +264,91 @@
 
 
 /***********************************************************************
+ *           EVENT_WaitXEvent
+ *
+ * Wait for an X event, but at most maxWait milliseconds (-1 for no timeout).
+ * Return TRUE if an event is pending, FALSE on timeout or error
+ * (for instance lost connection with the server).
+ */
+BOOL EVENT_WaitXEvent( LONG maxWait )
+{
+    fd_set read_set;
+    struct timeval timeout;
+    XEvent event;
+    int fd = ConnectionNumber(display);
+
+    if (!XPending(display) && (maxWait != -1))
+    {
+        FD_ZERO( &read_set );
+        FD_SET( fd, &read_set );
+
+	timeout.tv_usec = (maxWait % 1000) * 1000;
+	timeout.tv_sec = maxWait / 1000;
+
+#ifdef CONFIG_IPC
+	sigsetjmp(env_wait_x, 1);
+	stop_wait_op= CONT;
+	    
+	if (DDE_GetRemoteMessage()) {
+	    while(DDE_GetRemoteMessage())
+		;
+	    return TRUE;
+	}
+	stop_wait_op= STOP_WAIT_X;
+	/* The code up to the next "stop_wait_op= CONT" must be reentrant  */
+	if (select( fd+1, &read_set, NULL, NULL, &timeout ) != 1 &&
+	    !XPending(display)) {
+	    stop_wait_op= CONT;
+	    return FALSE;
+	} else {
+	    stop_wait_op= CONT;
+	}
+#else  /* CONFIG_IPC */
+	if (select( fd+1, &read_set, NULL, NULL, &timeout ) != 1)
+            return FALSE;  /* Timeout or error */
+#endif  /* CONFIG_IPC */
+
+    }
+
+    /* Process the event (and possibly others that occurred in the meantime) */
+    do
+    {
+
+#ifdef CONFIG_IPC
+        if (DDE_GetRemoteMessage())
+        {
+            while(DDE_GetRemoteMessage()) ;
+            return TRUE;
+        }
+#endif  /* CONFIG_IPC */
+
+        XNextEvent( display, &event );
+        EVENT_ProcessEvent( &event );
+    }
+    while (XPending( display ));
+    return TRUE;
+}
+
+
+/***********************************************************************
+ *           EVENT_Synchronize
+ *
+ * Synchronize with the X server. Should not be used too often.
+ */
+void EVENT_Synchronize()
+{
+    XEvent event;
+
+    XSync( display, False );
+    while (XPending( display ))
+    {
+	XNextEvent( display, &event );
+	EVENT_ProcessEvent( &event );
+    }    
+}
+
+
+/***********************************************************************
  *           EVENT_XStateToKeyState
  *
  * Translate a X event state (Button1Mask, ShiftMask, etc...) to