Created
September 18, 2015 20:31
-
-
Save swallat/c8b597f5f7590854b6e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm b/qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm | |
index 06e957c..9e7c543 100644 | |
--- a/qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm | |
+++ b/qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm | |
@@ -73,9 +73,11 @@ void QCocoaCursor::setPos(const QPoint &position) | |
pos.x = position.x(); | |
pos.y = position.y(); | |
- CGEventRef e = CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0); | |
- CGEventPost(kCGHIDEventTap, e); | |
- CFRelease(e); | |
+ CGEventRef e = CGEventCreateMouseEvent(NULL, kCGEventMouseMoved, pos, kCGMouseButtonLeft); | |
+ if (e != NULL) { | |
+ CGEventPost(kCGHIDEventTap, e); | |
+ CFRelease(e); | |
+ } | |
} | |
NSCursor *QCocoaCursor::convertCursor(QCursor * cursor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment