summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-08-20 11:16:42 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-08-20 11:33:30 (GMT)
commit206c238d5ea9601d7dae77a3a45943a1cfea2747 (patch)
treefac0b0e4c069ae3d41caee909499aff4016f66a1 /src/gui/kernel/qapplication.cpp
parent87d7479fcc5f089ac164c5336b405d0299244c43 (diff)
downloadQt-206c238d5ea9601d7dae77a3a45943a1cfea2747.zip
Qt-206c238d5ea9601d7dae77a3a45943a1cfea2747.tar.gz
Qt-206c238d5ea9601d7dae77a3a45943a1cfea2747.tar.bz2
Flickering "Whatsthis" pointer in Cocoa
Since mouse tracking is always enabled on all QCocoaView-s, we are getting mouseMoved events for both parent and child (if mouse is over the child). In such cases the mouseMoved events are ignored for the parent view. We are using the native NSCursor stack for setting the override cursor. The current implementation for changeOverrideCursor is modified to keep this stack in sync with Qt's internal list. Task-number: 258173 Reviewed-by: Morten Sorvig
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 574d845..ccf6ac9 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -101,6 +101,10 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp
#include "qdatetime.h"
+#ifdef QT_MAC_USE_COCOA
+#include <private/qt_cocoa_helpers_mac_p.h>
+#endif
+
//#define ALIEN_DEBUG
static void initResources()
@@ -3477,6 +3481,15 @@ void QApplication::changeOverrideCursor(const QCursor &cursor)
if (qApp->d_func()->cursor_list.isEmpty())
return;
qApp->d_func()->cursor_list.removeFirst();
+#ifdef QT_MAC_USE_COCOA
+ // We use native NSCursor stacks in Cocoa. The currentCursor is the
+ // top of this stack. So to avoid flickering of cursor, we have to
+ // change the cusor instead of pop-ing the existing OverrideCursor
+ // and pushing the new one.
+ qApp->d_func()->cursor_list.prepend(cursor);
+ qt_cocoaChangeOverrideCursor(cursor);
+ return;
+#endif
setOverrideCursor(cursor);
}
#endif