summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2001-02-21 09:14:26 +0000
committerPhilipp Lohmann <pl@openoffice.org>2001-02-21 09:14:26 +0000
commitf644276d9dc26c08557b86f7113d85e8dddf09d3 (patch)
tree229d18c823fd75a2cf51ac05ceb365aa697a2ced /dtrans
parent48f6da7f8fe7d02674ee9ede25ef40eecd8d9988 (diff)
end drag on rejectDrop
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/X11/X11_selection.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx
index 3db0e6d1367d..238679f6fc72 100644
--- a/dtrans/source/X11/X11_selection.cxx
+++ b/dtrans/source/X11/X11_selection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: X11_selection.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: obr $ $Date: 2001-02-20 16:50:27 $
+ * last change: $Author: pl $ $Date: 2001-02-21 10:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1771,6 +1771,9 @@ void SelectionManager::handleDragEvent( XEvent& rMessage )
dtde.Transferable = m_xDragSourceTransferable;
it->second->drop( dtde );
bCancel = false;
+
+ m_bDropSent = true;
+ m_nDropTimeout = time( NULL );
}
else bCancel = true;
}
@@ -1882,6 +1885,17 @@ void SelectionManager::reject( Window aDropWindow, Time aTimestamp )
if( aDropWindow == m_aCurrentDropWindow )
{
sendDragStatus( None );
+ if( m_bDropSent && m_xDragSourceListener.is() )
+ {
+ DragSourceDropEvent dsde;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = DNDConstants::ACTION_NONE;
+ dsde.DropSuccess = sal_False;
+ m_xDragSourceListener->dragDropEnd( dsde );
+ m_xDragSourceListener.clear();
+ }
}
}