]> source.dussan.org Git - tigervnc.git/commitdiff
Re-order the handling of messages to work around an issue whereby the window would...
authorDRC <dcommander@users.sourceforge.net>
Thu, 10 Mar 2011 10:21:48 +0000 (10:21 +0000)
committerDRC <dcommander@users.sourceforge.net>
Thu, 10 Mar 2011 10:21:48 +0000 (10:21 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1_1@4352 3789f03b-4d11-0410-bbf8-ca57d06f2519

win/vncviewer/CConn.cxx

index 3381ad5c04803f48e0e2656c7e965d8a59d93d67..b067134afc2850f0d8eef0b6f18e903c30c83084 100644 (file)
@@ -357,10 +357,7 @@ CConn::blockCallback() {
 
     // Wait for socket data, or a message to process
     DWORD result = MsgWaitForMultipleObjects(1, &sockEvent.h, FALSE, INFINITE, QS_ALLINPUT);
-    if (result == WAIT_OBJECT_0) {
-      // - Network event notification.  Return control to I/O routine.
-      break;
-    } else if (result == WAIT_FAILED) {
+    if (result == WAIT_FAILED) {
       // - The wait operation failed - raise an exception
       throw rdr::SystemException("blockCallback wait error", GetLastError());
     }
@@ -375,6 +372,10 @@ CConn::blockCallback() {
       // ToAscii() internally).
       DispatchMessage(&msg);
     }
+
+    if (result == WAIT_OBJECT_0)
+      // - Network event notification.  Return control to I/O routine.
+      break;
   }
 
   // Before we return control to the InStream, reset the network event