From d78a6773050d0abb5b211a33f688abbb2eb43f53 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 25 Jul 2011 10:02:09 +0300 Subject: Fix for not calling QPlatformCursor's pointerEvent. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code to pass mouse events to platform cursors is there in 4.8, however it went missing in refactor. This patch restores it. Change-Id: I7873c892c1ae907fc084d3f00f7d4e5a6293ba4d Reviewed-on: http://codereview.qt.nokia.com/2083 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index a54dab6398..b44503141e 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -62,6 +62,9 @@ #include "private/qwindow_p.h" #include "private/qkeymapper_p.h" #include "private/qcursor_p.h" +#ifndef QT_NO_CURSOR +#include "qplatformcursor_qpa.h" +#endif #include @@ -570,6 +573,12 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo if (window) { QMouseEvent ev(type, localPoint, globalPoint, button, buttons, QGuiApplication::keyboardModifiers()); +#ifndef QT_NO_CURSOR + QList > cursors = QPlatformCursorPrivate::getInstances(); + for (int i = 0; i < cursors.count(); ++i) + if (cursors.at(i)) + cursors.at(i).data()->pointerEvent(ev); +#endif QGuiApplication::sendSpontaneousEvent(window, &ev); return; } -- cgit v1.2.3