[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - vcl/unx

Jan-Marek Glogowski glogow at fbihome.de
Sat Mar 22 08:14:43 PDT 2014


 vcl/unx/kde4/KDESalDisplay.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 448cd2be26527dc55b13d89c53c723ff62c32e95
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Mar 14 21:02:16 2014 +0100

    fdo#67011 KDE4: prevent blocking in Display::Yield
    
    SalX11Display registers a Yield handler, which splits check and
    and processing into two functions, which both lock the yield mutex.
    
    Normally this no problem, but during a Drag'n'Drop operation the
    D'n'D thread also checks and processes XEvents (for D'n'D). So the
    XNextEvent in Display::Yield will actually block, if the seen XEvent
    was for D'n'D and was already processed.
    
    (cherry picked from commit 6c7374f071d998f726cd4a5b67baf54e357d096b)
    
    Change-Id: Ifb0631b38abc0ddab23cd74aad05120b4b3dacad
    Reviewed-on: https://gerrit.libreoffice.org/8710
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index 21440fc..650b266 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -51,6 +51,10 @@ void SalKDEDisplay::Yield()
     if( DispatchInternalEvent() )
         return;
 
+    // Prevent blocking from Drag'n'Drop events, which may have already have processed the event
+    if (XEventsQueued( pDisp_, QueuedAfterReading ) == 0)
+        return;
+
     DBG_ASSERT( static_cast<SalYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() ==
                 osl::Thread::getCurrentIdentifier(),
                 "will crash soon since solar mutex not locked in SalKDEDisplay::Yield" );


More information about the Libreoffice-commits mailing list