void SetDnDAllowed(bool isDnDAllowed)
{ mDnDAllowed = isDnDAllowed;}
void VmxDnDVersionChanged(uint32 version);
+ bool IsDragEnterAllowed(void);
private:
void OnRpcSrcDragBegin(uint32 sessionId,
void
GuestDnDDest::UIDragEnter(const CPClipboard *clip)
{
+ if (!mMgr->IsDragEnterAllowed()) {
+ Debug("%s: not allowed.\n", __FUNCTION__);
+ return;
+ }
+
Debug("%s: entering.\n", __FUNCTION__);
if (GUEST_DND_DEST_DRAGGING == mMgr->GetState() ||
}
+/**
+ * Check if DragEnter is allowed.
+ *
+ * @return true if DragEnter is allowed, false otherwise.
+ */
+
+bool
+GuestDnDMgr::IsDragEnterAllowed(void)
+{
+ /*
+ * Right after any DnD is finished, there may be some unexpected
+ * DragEnter from UI, and may disturb our state machine. The
+ * mHideDetWndTimer will only be valid for 0.5 second after each
+ * DnD, and during this time UI DragEnter is not allowed.
+ */
+ return mHideDetWndTimer == NULL;
+}
+
+
/**
* Handle version change in VMX.
*