summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-07-03 11:46:22 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-07-03 12:20:04 (GMT)
commitb43cbebc5353b7e6b2a3812046a23f327a12c4dc (patch)
tree770d1b85cf3ff141c499a3049f7e6ff3230b5bb8 /src/gui/kernel/qwidget_mac.mm
parent460e204c5b96cb67244bd9463ca0dfa56ad02564 (diff)
downloadQt-b43cbebc5353b7e6b2a3812046a23f327a12c4dc.zip
Qt-b43cbebc5353b7e6b2a3812046a23f327a12c4dc.tar.gz
Qt-b43cbebc5353b7e6b2a3812046a23f327a12c4dc.tar.bz2
Drag leave event is delivered, after re-entering the widget.
This happens only for widgets with focus frames. Since the mouse location at the time of this event will be outside of the focus frame, we cannot use it to identify the widget. Instead, use the QDragManager's currentTarget() to deliver the drag leave event. Task-number: 252088 Reviewed-by: Norwegian Rock Cat
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 250cc35..d1e4230 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -1369,6 +1369,14 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event,
// Set dropWidget to zero, so qt_mac_dnd_event
// doesn't get called a second time below:
dropWidget = 0;
+ } else if (ekind == kEventControlDragLeave) {
+ dropWidget = QDragManager::self()->currentTarget();
+ if (dropWidget) {
+ dropWidget->d_func()->qt_mac_dnd_event(kEventControlDragLeave, drag);
+ }
+ // Set dropWidget to zero, so qt_mac_dnd_event
+ // doesn't get called a second time below:
+ dropWidget = 0;
}
}
}