diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2009-06-19 14:23:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2009-06-19 14:59:28 -0400 |
commit | 273b6cc88c87b9d2072e97593f7a14884b69bae0 (patch) | |
tree | 711a75b00888516496d08e1a259912a030a6198d | |
parent | 63955e33656343bd8f8b4fa54704499fc78ea536 (diff) |
Set the lower threshold for selection engine's auto repeat interval.
On Windows, setting the auto repeat interval too low (i.e. ~5) caused
the scrolling during range selection to get stuck, while on Linux we
don't have this problem. I don't really know if this is a system
limitation or something we do in vcl, but setting the lower threshold
to 25 seems to fix this problem on Windows. (n#514395)
* patches/dev300/scroll-accel-vcl.diff:
-rw-r--r-- | patches/dev300/scroll-accel-vcl.diff | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/patches/dev300/scroll-accel-vcl.diff b/patches/dev300/scroll-accel-vcl.diff index 7ded0ea0d..f22d4a928 100644 --- a/patches/dev300/scroll-accel-vcl.diff +++ b/patches/dev300/scroll-accel-vcl.diff @@ -1,10 +1,11 @@ diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/inc/vcl/seleng.hxx vcl/inc/vcl/seleng.hxx --- vcl.clean/inc/vcl/seleng.hxx 2008-04-01 19:28:32.000000000 -0400 +++ vcl/inc/vcl/seleng.hxx 2008-04-03 17:57:26.000000000 -0400 -@@ -54,6 +54,7 @@ class CommandEvent; +@@ -41,6 +41,8 @@ class CommandEvent; // Timerticks #define SELENG_DRAGDROP_TIMEOUT 400 #define SELENG_AUTOREPEAT_INTERVAL 50 ++#define SELENG_AUTOREPEAT_INTERVAL_MIN 25 +#define SELENG_AUTOREPEAT_INTERVAL_MAX 300 enum SelectionMode { NO_SELECTION, SINGLE_SELECTION, RANGE_SELECTION, MULTIPLE_SELECTION }; @@ -39,15 +40,6 @@ diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/inc/v diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/source/window/seleng.cxx vcl/source/window/seleng.cxx --- vcl.clean/source/window/seleng.cxx 2008-04-01 19:28:36.000000000 -0400 +++ vcl/source/window/seleng.cxx 2008-04-03 18:24:56.000000000 -0400 -@@ -41,7 +41,7 @@ - #include <vcl/seleng.hxx> - #include <tools/debug.hxx> - -- -+#include <stdio.h> - - - inline BOOL SelectionEngine::ShouldDeselect( BOOL bModifierKey1 ) const @@ -63,8 +63,10 @@ inline BOOL SelectionEngine::ShouldDesel |* *************************************************************************/ @@ -79,7 +71,7 @@ diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/sourc aWTimer.Start(); if ( eSelMode != SINGLE_SELECTION ) { -@@ -493,3 +495,20 @@ void SelectionEngine::Command( const Com +@@ -488,3 +490,24 @@ void SelectionEngine::Command( const CommandEvent& rCEvt ) nFlags &= ~SELENG_CMDEVT; } } @@ -91,6 +83,10 @@ diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/sourc + return; + + nUpdateInterval = nInterval; ++ if (nUpdateInterval < SELENG_AUTOREPEAT_INTERVAL_MIN) ++ // Set a lower threshold. On Windows, setting this value too low ++ // would cause selection to get updated indefinitely. ++ nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MIN; + + if (aWTimer.IsActive()) + { |