summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2002-10-10 17:21:57 +0000
committerPhilipp Lohmann <pl@openoffice.org>2002-10-10 17:21:57 +0000
commit619fbcc09ecb94c50d26d9045b110e5e95d7b967 (patch)
treee1419622c09f2dfa108b7ee260dbc20f571a67e6 /dtrans
parente39496b89c20c299f39dadaf5c35003c2513b325 (diff)
#104146# change drag cursor only on receiving drop action from drop target
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/X11/X11_selection.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx
index 64f309ad68fa..0145588bffb1 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.55 $
+ * $Revision: 1.56 $
*
- * last change: $Author: pl $ $Date: 2002-08-26 11:25:41 $
+ * last change: $Author: pl $ $Date: 2002-10-10 18:21:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1894,7 +1894,7 @@ bool SelectionManager::updateDragAction( int modifierState )
nNewDropAction |= DNDConstants::ACTION_DEFAULT;
}
- if( nNewDropAction != m_nUserDragAction )
+ if( nNewDropAction != m_nUserDragAction || m_nTargetAcceptAction != DNDConstants::ACTION_DEFAULT )
{
#ifdef DEBUG
fprintf( stderr, "updateDragAction: %x -> %x\n", (int)m_nUserDragAction, (int)nNewDropAction );
@@ -1909,7 +1909,6 @@ bool SelectionManager::updateDragAction( int modifierState )
dsde.DropAction = m_nUserDragAction;
dsde.UserAction = m_nUserDragAction;
m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT; // invalidate last accept
- setCursor( getDefaultCursor( m_nUserDragAction ), m_aDropWindow, m_nDragTimestamp );
m_xDragSourceListener->dropActionChanged( dsde );
}
return bRet;
@@ -2026,8 +2025,8 @@ void SelectionManager::handleDragEvent( XEvent& rMessage )
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.UserAction = getUserDragAction();
+ dsde.DropAction = DNDConstants::ACTION_NONE;
m_bDropSuccess = rMessage.xclient.data.l[1] & 1 ? true : false;
if( rMessage.xclient.data.l[1] & 1 )
{
@@ -2043,6 +2042,7 @@ void SelectionManager::handleDragEvent( XEvent& rMessage )
else
dsde.DropAction = DNDConstants::ACTION_COPY;
}
+ m_nTargetAcceptAction = dsde.DropAction;
if( ! ( rMessage.xclient.data.l[1] & 2 ) )
{
@@ -2054,6 +2054,7 @@ void SelectionManager::handleDragEvent( XEvent& rMessage )
else
m_nNoPosX = m_nNoPosY = m_nNoPosWidth = m_nNoPosHeight = 0;
+ setCursor( getDefaultCursor( dsde.DropAction ), m_aDropWindow, m_nDragTimestamp );
aGuard.clear();
m_xDragSourceListener->dragOver( dsde );
}
@@ -2064,7 +2065,7 @@ void SelectionManager::handleDragEvent( XEvent& rMessage )
dsde.Source = static_cast< OWeakObject* >(this);
dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = getUserDragAction();
+ dsde.DropAction = m_nTargetAcceptAction;
dsde.DropSuccess = m_bDropSuccess;
Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();