diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-09-29 12:14:24 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-09-29 12:35:44 +0300 |
commit | 3e5371aba3eb29efb9574881212cba0975c168d7 (patch) | |
tree | 28fe652d11e6c2c1cfdbcc7b005b4daca79dc89d | |
parent | d5cdc7567299f03e655dfbb1d59c371fb3253b88 (diff) |
Avoid deadlock in a convoluted situation with an IME and a URP client
Change-Id: I0338d1c68fe6be8793777a3a238c750560bcf7fe
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 2428135518a8..5d5daab73a9c 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, |