diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-15 15:50:15 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-15 15:50:15 (GMT) |
commit | d03c27040c08827eddbb086f70a50f8b908f97cc (patch) | |
tree | b95e1f0da0af171ebc0ace99919a9a3251738a4c /src/gui/kernel/qcursor_mac.mm | |
parent | 07f724cd5abd0548fb32ed3469bde113daf028c4 (diff) | |
parent | afb54fe253ded94152575b23539552aa8f4ad384 (diff) | |
download | Qt-d03c27040c08827eddbb086f70a50f8b908f97cc.zip Qt-d03c27040c08827eddbb086f70a50f8b908f97cc.tar.gz Qt-d03c27040c08827eddbb086f70a50f8b908f97cc.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (31 commits)
Speed up qsTr() by caching the translation context
Crash while printing from the portedcanvas example on Mac Cocoa.
qdoc: Fixed .qdocconf files for assistant.
Disable debug-only framework builds on Mac.
Compile (with -no-pch)
Add missing QT_NO_BEARERMANAGEMENT ifdefs.
Introduce a qconfig feature for Bearer Management
Fix MOBILITY-404
Remove holes in bearer management data structures.
Don't link bearer plugins against QtGui unnecessarily.
Added missing newline after warning message when using -L with qml
Doc: updating scripts
Fixed a crash on embedded due to uninitialized pointer.
Fix a race where QThread::exit() is "lost" when called after start()
qdoc: Removed all <table> attributes in favor of using css.
Autotest failure: dialogModality test fails on cocoa (macgui)
Force the bic test to compile in 32-bit mode on Mac
Revert "Doc: Updating design files."
Remove statically allocated pixmaps through the post routine
qdoc: Checked for empty title.
...
Diffstat (limited to 'src/gui/kernel/qcursor_mac.mm')
-rw-r--r-- | src/gui/kernel/qcursor_mac.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qcursor_mac.mm b/src/gui/kernel/qcursor_mac.mm index 03e38b0..c3d6c54 100644 --- a/src/gui/kernel/qcursor_mac.mm +++ b/src/gui/kernel/qcursor_mac.mm @@ -224,6 +224,15 @@ QPoint QCursor::pos() void QCursor::setPos(int x, int y) { +#ifdef QT_MAC_USE_COCOA + CGPoint pos; + pos.x = x; + pos.y = y; + + CGEventRef e = CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0); + CGEventPost(kCGHIDEventTap, e); + CFRelease(e); +#else CGWarpMouseCursorPosition(CGPointMake(x, y)); /* I'm not too keen on doing this, but this makes it a lot easier, so I just @@ -240,6 +249,7 @@ void QCursor::setPos(int x, int y) QApplication::mouseButtons(), QApplication::keyboardModifiers()); qt_sendSpontaneousEvent(widget, &me); } +#endif } void QCursorData::initCursorFromBitmap() |