diff options
author | Oliver Braun <obr@openoffice.org> | 2001-02-07 13:09:28 +0000 |
---|---|---|
committer | Oliver Braun <obr@openoffice.org> | 2001-02-07 13:09:28 +0000 |
commit | 6fcb1be1c120bb15cdcac3720d0c51c7e9a3bda9 (patch) | |
tree | 06496d882ff1ba41612cdce2a9bfa430073386ea | |
parent | d6e74e7b24225a12c979996400d605a212fd5b45 (diff) |
default behavior for lazy listeners
-rw-r--r-- | dtrans/source/X11/X11_selection.cxx | 10 | ||||
-rw-r--r-- | dtrans/source/X11/X11_selection.hxx | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx index a73dde38d825..aaa7b7ff2165 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.6 $ + * $Revision: 1.7 $ * - * last change: $Author: pl $ $Date: 2001-02-06 10:23:58 $ + * last change: $Author: obr $ $Date: 2001-02-07 14:09:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1295,6 +1295,7 @@ void SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) else aEvent.DropAction = DNDConstants::ACTION_NONE; m_nLastDropAction = aEvent.DropAction; + m_bLazyListener = true; if( ! m_bDropEnterSent ) { m_bDropEnterSent = true; @@ -1302,6 +1303,8 @@ void SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) } else it->second->dragOver( aEvent ); + if( m_bLazyListener ) + accept( aEvent.DropAction ); } else if( rMessage.message_type == m_nXdndLeave && @@ -1401,6 +1404,7 @@ void SelectionManager::sendDragStatus( Atom nDropAction ) { MutexGuard aGuard(m_aMutex); + m_bLazyListener = false; if( m_xDragSourceListener.is() ) { DragSourceDragEvent dsde; @@ -2405,7 +2409,7 @@ void SelectionManager::dispatchEvent( int millisec ) else { MutexGuard aGuard(m_aMutex); - XSync( m_pDisplay, False ); + XFlush( m_pDisplay ); } } diff --git a/dtrans/source/X11/X11_selection.hxx b/dtrans/source/X11/X11_selection.hxx index 0fddbfcadec3..172f6db1f937 100644 --- a/dtrans/source/X11/X11_selection.hxx +++ b/dtrans/source/X11/X11_selection.hxx @@ -2,9 +2,9 @@ * * $RCSfile: X11_selection.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: pl $ $Date: 2001-02-06 16:07:37 $ + * last change: $Author: obr $ $Date: 2001-02-07 14:09:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -291,6 +291,7 @@ namespace x11 { Reference< ::com::sun::star::datatransfer::XTransferable > m_xDropTransferable; int m_nLastX, m_nLastY; + bool m_bLazyListener; // drag only |