summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-04-27 15:11:43 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-04-28 11:36:30 (GMT)
commit5d6a56fd14cb21d9955c49305993f7b7527a27c6 (patch)
treea56b7639b31173be86bdba1994661a4910eab8d4 /src
parent8ec06f944915a56ef7ad3f1a9416b16271055fb9 (diff)
downloadQt-5d6a56fd14cb21d9955c49305993f7b7527a27c6.zip
Qt-5d6a56fd14cb21d9955c49305993f7b7527a27c6.tar.gz
Qt-5d6a56fd14cb21d9955c49305993f7b7527a27c6.tar.bz2
Don't send extra events when using the scroll wheel in Cocoa
Argh! Copy and paste is evil, not only was the test was wrong, We sent the event twice and the second time we sent the wrong value. Task-number: 250668 Reviewed-by: Morten Sørvig
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index fae4821..ff36ca1 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -807,10 +807,10 @@ extern "C" {
QWheelEvent qwe(qlocal, qglobal, deltaY, buttons, keyMods, Qt::Vertical);
qt_sendSpontaneousEvent(qwidget, &qwe);
wheelOK = qwe.isAccepted();
- if (wheelOK && QApplicationPrivate::focus_widget
+ if (!wheelOK && QApplicationPrivate::focus_widget
&& QApplicationPrivate::focus_widget != qwidget) {
QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal,
- deltaZ, buttons, keyMods, Qt::Vertical);
+ deltaY, buttons, keyMods, Qt::Vertical);
qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2);
wheelOK = qwe2.isAccepted();
}