Good work digging into this problem. I am glad to hear this is only
a Windows problem. It confirms my limited testing of this issue on
other platforms. Do you have any preferences of the two solutions?
Robert On 02/26/2011 12:42 PM, Martin Koegler wrote: The problem is, that the viewer is (for windows) too busy for delivering the WM_PAINT. TLS seems to be a reliable trigger, but it should be possible to construct work loads for the non-TLS case too, where the screen updates are stalled.How can it be fixed: 1) The situation can be improved, if in win/vncviewer/CConn.cxx the priority of the Windows events is raised: In 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) { // - The wait operation failed - raise an exception throw rdr::SystemException("blockCallback wait error", GetLastError()); } // - There should be a message in the message queue MSG msg; while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { // IMPORTANT: We mustn't call TranslateMessage() here, because instead we // call ToAscii() in CKeyboard::keyEvent(). ToAscii() stores dead key // state from one call to the next, which would be messed up by calls to // TranslateMessage() (actually it looks like TranslateMessage() calls // ToAscii() internally). DispatchMessage(&msg); } => // Wait for socket data, or a message to process DWORD result = MsgWaitForMultipleObjects(1, &sockEvent.h, FALSE, INFINITE, QS_ALLINPUT); if (result == WAIT_FAILED) { // - The wait operation failed - raise an exception throw rdr::SystemException("blockCallback wait error", GetLastError()); } MSG msg; while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { // IMPORTANT: We mustn't call TranslateMessage() here, because instead we // call ToAscii() in CKeyboard::keyEvent(). ToAscii() stores dead key // state from one call to the next, which would be messed up by calls to // TranslateMessage() (actually it looks like TranslateMessage() calls // ToAscii() internally). DispatchMessage(&msg); } if (result == WAIT_OBJECT_0) { // - Network event notification. Return control to I/O routine. break; } 2) Add regular explicit calls to UpdateWindow(hWnd) to force an immediate update. Maybe in DesktopWindow::processMessage, case WM_TIMER after the call to updateWindow(). --
Robert Goley
![]() FOSS Implementation Specialist Toll Free: (800) 338-4984 Local: (770) 479-7933 Fax: (770) 479-4076 www.openrda.com America's only Free & Open Source fund accounting software company. |
------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________ Tigervnc-devel mailing list Tigervnc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-devel