diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-02-14 09:30:53 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-02-14 09:30:53 +0000 |
commit | e6dd4d6c809ed1282169a21586577f917ed7d411 (patch) | |
tree | 11c2b2df1d60f1eb7d511cdf7ceedb9d8cc28ee4 | |
parent | e72739633550a6b05f217bc35d34af1dcf0cae0f (diff) |
do not send dragLeave on no drop target
-rw-r--r-- | dtrans/source/X11/X11_selection.cxx | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx index 1078a0512d1d..f9c4f8fe8558 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.11 $ + * $Revision: 1.12 $ * - * last change: $Author: pl $ $Date: 2001-02-09 16:37:26 $ + * last change: $Author: pl $ $Date: 2001-02-14 10:30:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1995,30 +1995,32 @@ void SelectionManager::updateDragWindow( int nX, int nY, Window aRoot ) fprintf( stderr, "drag left window 0x%x (rev. %d), entered window 0x%x (rev %d)\n", m_aDropWindow, m_nCurrentProtocolVersion, aNewCurrentWindow, nNewProtocolVersion ); #endif - it = m_aDropTargets.find( m_aDropWindow ); - if( it != m_aDropTargets.end() ) - // shortcut for own drop targets - { - DropTargetEvent dte; - dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); - it->second.m_pTarget->dragExit( dte ); - } - else + if( m_aDropWindow != None ) { - // send old drop target a XdndLeave - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.format = 32; - aEvent.xclient.message_type = m_nXdndLeave; - aEvent.xclient.window = m_aDropWindow; - aEvent.xclient.data.l[0] = m_aWindow; - aEvent.xclient.data.l[1] = 0; - XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + it = m_aDropTargets.find( m_aDropWindow ); + if( it != m_aDropTargets.end() ) + // shortcut for own drop targets + { + DropTargetEvent dte; + dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget ); + it->second.m_pTarget->dragExit( dte ); + } + else + { + // send old drop target a XdndLeave + XEvent aEvent; + aEvent.type = ClientMessage; + aEvent.xclient.display = m_pDisplay; + aEvent.xclient.format = 32; + aEvent.xclient.message_type = m_nXdndLeave; + aEvent.xclient.window = m_aDropWindow; + aEvent.xclient.data.l[0] = m_aWindow; + aEvent.xclient.data.l[1] = 0; + XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent ); + } + m_xDragSourceListener->dragExit( dsde ); } - m_xDragSourceListener->dragExit( dsde ); - m_nCurrentProtocolVersion = nNewProtocolVersion; m_aDropWindow = aNewCurrentWindow; m_aDropProxy = aNewProxy != None ? aNewProxy : m_aDropWindow; |