summaryrefslogtreecommitdiffstats
path: root/base/base_drop_target.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/base_drop_target.cc')
-rw-r--r--base/base_drop_target.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/base_drop_target.cc b/base/base_drop_target.cc
index 9809255..1dda396 100644
--- a/base/base_drop_target.cc
+++ b/base/base_drop_target.cc
@@ -11,6 +11,7 @@
///////////////////////////////////////////////////////////////////////////////
IDropTargetHelper* BaseDropTarget::cached_drop_target_helper_ = NULL;
+int32 BaseDropTarget::drag_identity_ = 0;
BaseDropTarget::BaseDropTarget(HWND hwnd)
: hwnd_(hwnd),
@@ -53,6 +54,11 @@ HRESULT BaseDropTarget::DragEnter(IDataObject* data_object,
*effect = DROPEFFECT_NONE;
return S_OK;
}
+
+ // Update the drag identity, skipping 0.
+ if (++drag_identity_ == 0)
+ ++drag_identity_;
+
current_data_object_ = data_object;
POINT screen_pt = { cursor_position.x, cursor_position.y };
*effect = OnDragEnter(current_data_object_, key_state, screen_pt, *effect);