File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1249,6 +1249,7 @@ bool VNCConn::Init(const wxString& host,
12491249 }
12501250
12511251 conn_stopwatch.Start ();
1252+ pointer_scroll_stopwatch.Start ();
12521253
12531254 return true ;
12541255}
@@ -1338,7 +1339,7 @@ void VNCConn::sendPointerEvent(wxMouseEvent &event)
13381339 if (event.RightIsDown ())
13391340 pev.buttonmask |= rfbButton3Mask;
13401341
1341- if (event.GetWheelRotation () != 0 && event.GetWheelAxis () == wxMOUSE_WHEEL_VERTICAL) {
1342+ if (event.GetWheelRotation () != 0 && event.GetWheelAxis () == wxMOUSE_WHEEL_VERTICAL && pointer_scroll_stopwatch. Time () >= 20 ) {
13421343
13431344 if (event.GetWheelRotation () > 0 ) {
13441345 pev.buttonmask |= rfbWheelUpMask;
@@ -1347,6 +1348,9 @@ void VNCConn::sendPointerEvent(wxMouseEvent &event)
13471348 if (event.GetWheelRotation () < 0 ) {
13481349 pev.buttonmask |= rfbWheelDownMask;
13491350 }
1351+
1352+ // restart the timer
1353+ pointer_scroll_stopwatch.Start ();
13501354 }
13511355
13521356 // Queue event
Original file line number Diff line number Diff line change @@ -298,6 +298,7 @@ class VNCConn: public wxEvtHandler, public wxThreadHelper
298298 int buttonmask;
299299 bool entering;
300300 };
301+ wxStopWatch pointer_scroll_stopwatch;
301302 struct keyEvent
302303 {
303304 rfbKeySym keysym;
You can’t perform that action at this time.
0 commit comments