From: Scott Shawcroft Date: Sun, 12 Jan 2020 20:10:39 +0000 (-0800) Subject: Ignore touch events generated by a TrackPad. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1f5d683e6bbab6d5694bd28524b24022fef70195;p=pulseview.git Ignore touch events generated by a TrackPad. This improves two finger drag trackpad zooming and panning on a Macbook Pro immensely because it used to redraw every touch event. This change makes it rely on the mouse wheel events instead. Pinch-to-zoom no longer works. Two finger drag up and down is an alternative. This fixes bug #1056. --- diff --git a/pv/views/trace/viewport.cpp b/pv/views/trace/viewport.cpp index 85db5250..0c73ec49 100644 --- a/pv/views/trace/viewport.cpp +++ b/pv/views/trace/viewport.cpp @@ -116,6 +116,9 @@ bool Viewport::touch_event(QTouchEvent *event) pinch_zoom_active_ = false; return false; } + if (event->device()->type() == QTouchDevice::TouchPad) { + return false; + } const QTouchEvent::TouchPoint &touchPoint0 = touchPoints.first(); const QTouchEvent::TouchPoint &touchPoint1 = touchPoints.last();