Hello again,
Here's a modified version of the "mouse move triggers update patch".
This version generates a stream of updates as long as the mouse
moves. Although this uses more CPU, it updates more reliably and with
small timeout values produces quite smooth results when hauling
complex stuff around in CorelDRAW.
Cheers,
Mark
--- VNCHooks.cpp~ Mon Mar 5 17:32:17 2001
+++ VNCHooks.cpp Mon May 21 23:56:55 2001
@@ -70,6 +70,9 @@
BOOL prf_use_MButtonUp = FALSE; // Use
middle mouse button up events
BOOL prf_use_RButtonUp = FALSE; // Use
right mouse button up events
BOOL prf_use_Deferral = FALSE; // Use
deferred updates
+UINT prf_MouseMoveTimeout = 0; // Delay
+period between last mouse move and update
+
+DWORD lastMouseMoveUpdateAt = 0; // time when mouse move last triggered an
+update
HKEY hModuleKey = NULL;
// Key used to save settings
HINSTANCE hInstance = NULL; //
This instance of the DLL
@@ -577,7 +580,15 @@
break;
case WM_TIMER:
- if (prf_use_Timer)
+ if(lastMouseMoveUpdateAt != 0)
+ {
+ if((GetCurrentTime() - lastMouseMoveUpdateAt) >
+prf_MouseMoveTimeout)
+ {
+ SendDeferredWindowRect(hWnd);
+ lastMouseMoveUpdateAt = 0;
+ }
+ }
+ if (prf_use_Timer)
SendDeferredWindowRect(hWnd);
break;
@@ -692,6 +703,16 @@
// WinRFB also wants to know about mouse movement
case WM_NCMOUSEMOVE:
case WM_MOUSEMOVE:
+ if (prf_MouseMoveTimeout != 0)
+ {
+ DWORD currentTime = GetCurrentTime();
+ if(lastMouseMoveUpdateAt == 0 ||
+ (currentTime - lastMouseMoveUpdateAt) >
+prf_MouseMoveTimeout)
+ {
+ SendDeferredWindowRect(hWnd);
+ lastMouseMoveUpdateAt = currentTime;
+ }
+ }
// Inform WinRFB that the mouse has moved and pass it the current
cursor handle
PostMessage(
hVeneto,
@@ -1034,6 +1055,10 @@
"use_Deferral",
TRUE
);
+ prf_MouseMoveTimeout = GetProfileInt(
+ "MouseMoveTimeout",
+ 0
+ );
return TRUE;
}
@@ -1088,6 +1113,11 @@
WriteProfileInt(
"use_Deferral",
prf_use_Deferral
+ );
+
+ WriteProfileInt(
+ "MouseMoveTimeout",
+ prf_MouseMoveTimeout
);
free(sModulePrefs);
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------