Refix yesterday's patch; ignore motion events that haven't moved anywhere, and don...
authorCarl Hetherington <carl@carlh.net>
Tue, 5 Jan 2010 15:51:13 +0000 (15:51 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 5 Jan 2010 15:51:13 +0000 (15:51 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@6457 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_drag.cc
gtk2_ardour/editor_drag.h

index d3ada92ff71b08d95f2b357eed77928a80fa1f12..6345d8fd28976e233913e6e006e811799514d2ee 100644 (file)
@@ -189,10 +189,16 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
        _last_pointer_frame = adjusted_current_frame (event);
        _current_pointer_frame = _editor->event_frame (event, &_current_pointer_x, &_current_pointer_y);
 
+       /* check to see if we have moved in any way that matters since the last motion event */
+       if ( (!x_movement_matters() || _last_pointer_frame == adjusted_current_frame (event)) &&
+            (!y_movement_matters() || _last_pointer_y == _current_pointer_y) ) {
+               return false;
+       }
+
        pair<nframes64_t, int> const threshold = move_threshold ();
 
        bool const old_move_threshold_passed = _move_threshold_passed;
-       
+
        if (!from_autoscroll && !_move_threshold_passed) {
 
                bool const xp = (::llabs (adjusted_current_frame (event) - _grab_frame) >= threshold.first);
index 5d8cf390903c85eef6bdcb5f2564ce49ca358de7..bfca141c67210e26f896bc5169f77940588df0de 100644 (file)
@@ -613,6 +613,10 @@ public:
        void motion (GdkEvent *, bool);
        void finished (GdkEvent *, bool);
 
+       bool allow_vertical_autoscroll () const {
+               return false;
+       }
+
        bool y_movement_matters () const {
                return false;
        }