summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2016-03-08 14:37:55 -0800
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2016-03-21 04:51:39 +0000
commit96740193e1e0f0608f67660811a44b696924ad4c (patch)
treeafbe0240723d9d5b8d27fe8f2866e91132efe57e /src/gui/kernel/qwindowsysteminterface.cpp
parent0fed37e2cfed18518afb607d4d7e4f243910a55c (diff)
QWheelEvent: Make NoScrollPhase public
This reverts d5fde514106f5479f9c929c8a165aced4a1b2c84 and makes that enum value the default for QWheelEvent::phase() with non phase-aware mice. [ChangeLog][QtGui] QWheelEvent::phase() returns NoScrollPhase with non phase-aware mice. This is most mice and input devices except, for now, Apple's trackpads and Magic Mouse. Change-Id: I929fb39889cf116e89dcd134c1b1ec6587b8f05e Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 01e27d72d4..5b91f1bc7e 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -318,9 +318,6 @@ void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local,
void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase,
Qt::MouseEventSource source, bool invertedScrolling)
{
- if (!QGuiApplicationPrivate::scrollNoPhaseAllowed && phase == Qt::NoScrollPhase)
- phase = Qt::ScrollUpdate;
-
// Qt 4 sends two separate wheel events for horizontal and vertical
// deltas. For Qt 5 we want to send the deltas in one event, but at the
// same time preserve source and behavior compatibility with Qt 4.
@@ -944,9 +941,7 @@ bool QWindowSystemEventHandler::sendEvent(QWindowSystemInterfacePrivate::WindowS
QWindowSystemInterfacePrivate::WheelEvent::WheelEvent(QWindow *w, ulong time, const QPointF &local, const QPointF &global, QPoint pixelD,
QPoint angleD, int qt4D, Qt::Orientation qt4O, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase, Qt::MouseEventSource src, bool inverted)
: InputEvent(w, time, Wheel, mods), pixelDelta(pixelD), angleDelta(angleD), qt4Delta(qt4D),
- qt4Orientation(qt4O), localPos(local), globalPos(global),
- phase(!QGuiApplicationPrivate::scrollNoPhaseAllowed && phase == Qt::NoScrollPhase ? Qt::ScrollUpdate : phase),
- source(src), inverted(inverted)
+ qt4Orientation(qt4O), localPos(local), globalPos(global), phase(phase), source(src), inverted(inverted)
{
}