diff view/Pane.cpp @ 877:7463ece5d5e8 alignment_view

Wheel event thing
author Chris Cannam
date Fri, 14 Nov 2014 10:19:50 +0000
parents 59a22f3bf86d
children dd95abfe736c
line wrap: on
line diff
--- a/view/Pane.cpp	Fri Oct 17 16:47:53 2014 +0100
+++ b/view/Pane.cpp	Fri Nov 14 10:19:50 2014 +0000
@@ -2286,6 +2286,13 @@
         // Coarse wheel information (or vertical zoom, which is
         // necessarily coarse itself)
 
+        // Sometimes on Linux we're seeing absurdly extreme angles on
+        // the first wheel event -- discard those entirely
+        if (abs(m_pendingWheelAngle) >= 600) {
+            m_pendingWheelAngle = 0;
+            return;
+        }
+        
         while (abs(m_pendingWheelAngle) >= 120) {
 
             int sign = (m_pendingWheelAngle < 0 ? -1 : 1);