summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac.mm
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-04-07 08:59:41 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-04-07 12:07:24 (GMT)
commitca2d62f97f991d042a781d9d7bd0dbda910e1d04 (patch)
tree70cbe028192caa678ff86a034d6cd2ff987cd32c /src/gui/kernel/qcocoaview_mac.mm
parent179fafcc370c907a6070c7150695d446255e68d1 (diff)
downloadQt-ca2d62f97f991d042a781d9d7bd0dbda910e1d04.zip
Qt-ca2d62f97f991d042a781d9d7bd0dbda910e1d04.tar.gz
Qt-ca2d62f97f991d042a781d9d7bd0dbda910e1d04.tar.bz2
Drag cursor is not updated when modifier keys are pressed/released in
the Cocoa Builds. The drag move events were compressed based only on the position of the cursor. It has to be based on both position and the "drag operation" in native event. Reviewed-by: nrc
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 19367d1..9b581c5 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -300,11 +300,13 @@ extern "C" {
NSPoint windowPoint = [sender draggingLocation];
NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint];
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
+ NSDragOperation nsActions = [sender draggingSourceOperationMask];
QPoint posDrag(localPoint.x, localPoint.y);
- if (qt_mac_mouse_inside_answer_rect(posDrag))
+ if (qt_mac_mouse_inside_answer_rect(posDrag)
+ && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions)
return QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction));
// send drag move event to the widget
- NSDragOperation nsActions = [sender draggingSourceOperationMask];
+ QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions;
Qt::DropActions qtAllowed = QT_PREPEND_NAMESPACE(qt_mac_mapNSDragOperations)(nsActions);
QMimeData *mimeData = dropData;
if (QDragManager::self()->source())