[Libreoffice-commits] core.git: vcl/win

Jan Holesovsky kendy at collabora.com
Mon Sep 29 02:37:34 PDT 2014


 vcl/win/source/window/salframe.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 3e5371aba3eb29efb9574881212cba0975c168d7
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Sep 29 12:14:24 2014 +0300

    Avoid deadlock in a convoluted situation with an IME and a URP client
    
    Change-Id: I0338d1c68fe6be8793777a3a238c750560bcf7fe

diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 2428135..5d5daab 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2304,8 +2304,12 @@ static void ImplSalFrameEndExtTextInput( HWND hWnd, sal_uInt16 nFlags )
 
 void WinSalFrame::EndExtTextInput( sal_uInt16 nFlags )
 {
-    // Must be called in the main thread!
-    SendMessageW( mhWnd, SAL_MSG_ENDEXTTEXTINPUT, (WPARAM)nFlags, 0 );
+
+    SalData* pSalData = GetSalData();
+    if ( pSalData->mnAppThreadId != GetCurrentThreadId() )
+        ImplSalFrameEndExtTextInput( mhWnd, nFlags);
+    else
+        SendMessageW( mhWnd, SAL_MSG_ENDEXTTEXTINPUT, (WPARAM)nFlags, 0 );
 }
 
 static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf,


More information about the Libreoffice-commits mailing list