dtrans/source/win32/clipb/MtaOleClipb.cxx | 7 +- fpicker/source/win32/filepicker/WinFileOpenImpl.cxx | 6 + fpicker/source/win32/folderpicker/MtaFop.cxx | 6 + sfx2/source/appl/shutdowniconw32.cxx | 14 +++- vcl/win/app/salinst.cxx | 49 ++++++--------- vcl/win/app/saltimer.cxx | 11 ++- vcl/win/gdi/salprn.cxx | 3 vcl/win/window/salframe.cxx | 63 +++++++++++++++----- vcl/win/window/salobj.cxx | 30 +++++++-- 9 files changed, 129 insertions(+), 60 deletions(-)
New commits: commit 1a3fd60b983c9b98c75c746359abf434d013683c Author: Michael Stahl <mst...@redhat.com> Date: Tue Apr 12 14:47:45 2016 +0200 vcl: simplify WNT SalYieldMutex::release() further ... ... by asserting that the current thread is the owner of the SalYieldMutex. Anything else would be a bug anyway. Change-Id: I564c184ae21b99a096f67edbc729b3f2b0e307de diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index d55fa70..346d439 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -143,33 +143,30 @@ void SalYieldMutex::acquire() void SalYieldMutex::release() { DWORD nThreadId = GetCurrentThreadId(); - if ( mnThreadId != nThreadId ) - m_mutex.release(); - else + assert(mnThreadId == nThreadId); + + bool const isRelease(1 == mnCount); + if ( isRelease ) { - bool const isRelease(1 == mnCount); - if ( isRelease ) - { - OpenGLContext::prepareForYield(); + OpenGLContext::prepareForYield(); - SalData* pSalData = GetSalData(); - if ( pSalData->mnAppThreadId != nThreadId ) - { - // If we don't call these message, the Output from the - // Java clients doesn't come in the right order - GdiFlush(); + SalData* pSalData = GetSalData(); + if ( pSalData->mnAppThreadId != nThreadId ) + { + // If we don't call these message, the Output from the + // Java clients doesn't come in the right order + GdiFlush(); - } - mnThreadId = 0; } + mnThreadId = 0; + } - mnCount--; - m_mutex.release(); + mnCount--; + m_mutex.release(); - if ( isRelease ) - { // do this *after* release - m_condition.set(); // wake up ImplSalYieldMutexAcquireWithWait() - } + if ( isRelease ) + { // do this *after* release + m_condition.set(); // wake up ImplSalYieldMutexAcquireWithWait() } } commit edac93859ba8b6446dce08b0cffb9def3d9ff182 Author: Michael Stahl <mst...@redhat.com> Date: Tue Apr 12 14:42:43 2016 +0200 vcl: simplify WNT SalYieldMutex::release() a bit The ordering between clearing mnThreadId and OpenGLContext shouldn't matter since it was already inconsistent. Change-Id: I0b7b6457547e9e38527de58ba062fd7092178056 diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index f47e5d8..d55fa70 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -147,25 +147,20 @@ void SalYieldMutex::release() m_mutex.release(); else { - bool isRelease(1 == mnCount); + bool const isRelease(1 == mnCount); if ( isRelease ) { + OpenGLContext::prepareForYield(); + SalData* pSalData = GetSalData(); if ( pSalData->mnAppThreadId != nThreadId ) { - OpenGLContext::prepareForYield(); - // If we don't call these message, the Output from the // Java clients doesn't come in the right order GdiFlush(); - mnThreadId = 0; - } - else - { - mnThreadId = 0; - OpenGLContext::prepareForYield(); } + mnThreadId = 0; } mnCount--; commit 6f047b5866ee7c3f707a4f12ef9f95e7dbdb6e93 Author: Michael Stahl <mst...@redhat.com> Date: Mon Apr 11 23:15:23 2016 +0200 WNT: check result of PostMessage() ... so the next time something overflows the main thread's message queue it's easier to debug. Change-Id: I90a35e46f3b2cab190c7da5e53024ec549159ac6 diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 3c9f462..39975e8 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -27,7 +27,7 @@ to problems because they all use the one and only mutex called SolarMutex. In order to transfer clipboard requests to our sta thread we use a - hidden window an forward these requests via window messages. + hidden window and forward these requests via window messages. */ #ifdef _MSC_VER @@ -37,6 +37,7 @@ //#define UNICODE #include <osl/diagnose.h> +#include <sal/log.hxx> #include "MtaOleClipb.hxx" #include <osl/conditn.hxx> @@ -589,7 +590,9 @@ LRESULT CMtaOleClipboard::sendMessage( UINT msg, WPARAM wParam, LPARAM lParam ) bool CMtaOleClipboard::postMessage( UINT msg, WPARAM wParam, LPARAM lParam ) { - return PostMessageA( m_hwndMtaOleReqWnd, msg, wParam, lParam ) ? true : false; + BOOL const ret = PostMessageA(m_hwndMtaOleReqWnd, msg, wParam, lParam); + SAL_WARN_IF(0 == ret, "dtrans", "ERROR: PostMessage() failed!"); + return ret ? true : false; } // the window proc diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx index 91720ea..1c8e432 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx @@ -416,11 +416,12 @@ void SAL_CALL CWinFileOpenImpl::cancel() { // simulate a mouse click to the // cancel button - PostMessage( + BOOL const ret = PostMessage( m_hwndFileOpenDlg, WM_COMMAND, MAKEWPARAM(IDCANCEL,BN_CLICKED), (LPARAM)GetDlgItem(m_hwndFileOpenDlg, IDCANCEL)); + SAL_WARN_IF(0 == ret, "fpicker", "ERROR: PostMessage() failed!"); } } @@ -727,11 +728,12 @@ void SAL_CALL CWinFileOpenImpl::onInitDone() m_FilePicker->resumeEventNotification(); //#105996 let vcl know that now a system window is active - PostMessage( + BOOL const ret = PostMessage( HWND_BROADCAST, RegisterWindowMessage(TEXT("SYSTEM_WINDOW_ACTIVATED")), 0, 0); + SAL_WARN_IF(0 == ret, "fpicker", "ERROR: PostMessage() failed!"); // call the parent function to center the // dialog to its parent diff --git a/fpicker/source/win32/folderpicker/MtaFop.cxx b/fpicker/source/win32/folderpicker/MtaFop.cxx index 78b144b..99a436c 100644 --- a/fpicker/source/win32/folderpicker/MtaFop.cxx +++ b/fpicker/source/win32/folderpicker/MtaFop.cxx @@ -248,11 +248,12 @@ sal_Bool CMtaFolderPicker::browseForFolder( ) } // marshall request into the sta thread - PostMessageA( + BOOL const ret = PostMessageA( m_hwndStaRequestWnd, MSG_BROWSEFORFOLDER, 0, reinterpret_cast< LPARAM >( &aReqCtx ) ); + SAL_WARN_IF(0 == ret, "fpicker", "ERROR: PostMessage() failed!"); // waiting for the event to be signaled or // window messages so that we don't block @@ -350,11 +351,12 @@ void SAL_CALL CMtaFolderPicker::cancel( ) { // simulate a mouse click to the // cancel button - PostMessageA( + BOOL const ret = PostMessageA( m_hwnd, WM_COMMAND, MAKEWPARAM( IDCANCEL, BN_CLICKED ), (LPARAM)GetDlgItem( m_hwnd, IDCANCEL ) ); + SAL_WARN_IF(0 == ret, "fpicker", "ERROR: PostMessage() failed!"); } } diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index ce37d30..89117e4 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -305,8 +305,11 @@ LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP switch( lParam ) { case WM_LBUTTONDBLCLK: - PostMessage( aExecuterWindow, WM_COMMAND, IDM_TEMPLATE, (LPARAM)hWnd ); + { + BOOL const ret = PostMessage(aExecuterWindow, WM_COMMAND, IDM_TEMPLATE, (LPARAM)hWnd); + SAL_WARN_IF(0 == ret, "sfx.appl", "ERROR: PostMessage() failed!"); break; + } case WM_RBUTTONDOWN: { @@ -322,7 +325,8 @@ LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP EnableMenuItem( popupMenu, IDM_TEMPLATE, MF_BYCOMMAND | (ShutdownIcon::bModalMode ? MF_GRAYED : MF_ENABLED) ); int m = TrackPopupMenuEx( popupMenu, TPM_RETURNCMD|TPM_LEFTALIGN|TPM_RIGHTBUTTON, pt.x, pt.y, hWnd, NULL ); - PostMessage( hWnd, 0, 0, 0 ); + BOOL const ret = PostMessage( hWnd, 0, 0, 0 ); + SAL_WARN_IF(0 == ret, "sfx.appl", "ERROR: PostMessage() failed!"); switch( m ) { case IDM_OPEN: @@ -347,7 +351,8 @@ LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP break; } - PostMessage( aExecuterWindow, WM_COMMAND, m, (LPARAM)hWnd ); + BOOL const ret2 = PostMessage(aExecuterWindow, WM_COMMAND, m, (LPARAM)hWnd); + SAL_WARN_IF(0 == ret2, "sfx.appl", "ERROR: PostMessage() failed!"); } break; } @@ -372,7 +377,8 @@ LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP nid.uID = ID_QUICKSTART; Shell_NotifyIconA(NIM_DELETE, &nid); - PostMessage( aExecuterWindow, WM_COMMAND, IDM_EXIT, (LPARAM)hWnd ); + BOOL const ret = PostMessage(aExecuterWindow, WM_COMMAND, IDM_EXIT, (LPARAM)hWnd); + SAL_WARN_IF(0 == ret, "sfx.appl", "ERROR: PostMessage() failed!"); } else return DefWindowProc(hWnd, uMsg, wParam, lParam); diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index a44e930..f47e5d8 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -869,7 +869,10 @@ void SalTimer::Start( sal_uLong nMS ) if ( pSalData->mpFirstInstance ) { if ( pSalData->mnAppThreadId != GetCurrentThreadId() ) - PostMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS ); + { + BOOL const ret = PostMessageW(pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } else SendMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS ); } diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx index c6f04be..30aa816 100644 --- a/vcl/win/app/saltimer.cxx +++ b/vcl/win/app/saltimer.cxx @@ -81,7 +81,10 @@ void WinSalTimer::Start( sal_uLong nMS ) if ( pSalData->mpFirstInstance ) { if ( pSalData->mnAppThreadId != GetCurrentThreadId() ) - PostMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS ); + { + BOOL const ret = PostMessageW(pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } else SendMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS ); } @@ -124,7 +127,11 @@ void CALLBACK SalTimerProc(PVOID, BOOLEAN) // always post message when the timer fires, we will remove the ones // that happened during execution of the callback later directly from // the message queue - PostMessageW(pSalData->mpFirstInstance->mhComWnd, SAL_MSG_TIMER_CALLBACK, 0, 0); + BOOL const ret = PostMessageW(pSalData->mpFirstInstance->mhComWnd, SAL_MSG_TIMER_CALLBACK, 0, 0); +#if OSL_DEBUG_LEVEL > 0 + if (0 == ret) // SEH prevents using SAL_WARN here? + fputs("ERROR: PostMessage() failed!", stderr); +#endif #if defined ( __MINGW32__ ) && !defined ( _WIN64 ) } diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 0ddcc82..465cfe3 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -1515,7 +1515,8 @@ bool WinSalPrinter::StartJob( const OUString* pFileName, bWhile = FALSE; } while ( bWhile ); - PostMessageW( GetSalData()->mpFirstInstance->mhComWnd, SAL_MSG_DUMMY, 0, 0 ); + BOOL const ret = PostMessageW(GetSalData()->mpFirstInstance->mhComWnd, SAL_MSG_DUMMY, 0, 0); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); // bring up a file chooser if printing to file port but no file name given OUString aOutFileName; diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index f04d923..7a6f5c6 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -1061,7 +1061,9 @@ void WinSalFrame::ReleaseGraphics( SalGraphics* pGraphics ) bool WinSalFrame::PostEvent(ImplSVEvent* pData) { - return (bool)PostMessageW( mhWnd, SAL_MSG_USEREVENT, 0, (LPARAM)pData ); + BOOL const ret = PostMessageW(mhWnd, SAL_MSG_USEREVENT, 0, (LPARAM)pData); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + return static_cast<bool>(ret); } void WinSalFrame::SetTitle( const OUString& rTitle ) @@ -1207,7 +1209,10 @@ void WinSalFrame::Show( bool bVisible, bool bNoActivate ) // in the thread of the window, which has create this window. // We post this message to avoid deadlocks if ( GetSalData()->mnAppThreadId != GetCurrentThreadId() ) - PostMessageW( mhWnd, SAL_MSG_SHOW, bVisible, bNoActivate ); + { + BOOL const ret = PostMessageW(mhWnd, SAL_MSG_SHOW, bVisible, bNoActivate); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } else ImplSalShow( mhWnd, bVisible, bNoActivate ); } @@ -2046,7 +2051,10 @@ void WinSalFrame::ToTop( sal_uInt16 nFlags ) // in the thread of the window, which has create this window. // We post this message to avoid deadlocks if ( GetSalData()->mnAppThreadId != GetCurrentThreadId() ) - PostMessageW( mhWnd, SAL_MSG_TOTOP, nFlags, 0 ); + { + BOOL const ret = PostMessageW( mhWnd, SAL_MSG_TOTOP, nFlags, 0 ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } else ImplSalToTop( mhWnd, nFlags ); } @@ -3036,7 +3044,8 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg, vcl::Window *pWin = pFrame->GetWindow(); if( pWin && pWin->ImplGetWindowImpl()->mpFrameData->mnFocusId ) { - PostMessageW( hWnd, nMsg, wParam, lParam ); + BOOL const ret = PostMessageW( hWnd, nMsg, wParam, lParam ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); return 1; } } @@ -3769,7 +3778,8 @@ static bool ImplHandlePaintMsg( HWND hWnd ) { RECT* pRect = new RECT; CopyRect( pRect, &aUpdateRect ); - PostMessageW( hWnd, SAL_MSG_POSTPAINT, (WPARAM)pRect, 0 ); + BOOL const ret = PostMessageW(hWnd, SAL_MSG_POSTPAINT, (WPARAM)pRect, 0); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); } EndPaint( hWnd, &aPs ); } @@ -3805,7 +3815,10 @@ static void ImplHandlePaintMsg2( HWND hWnd, RECT* pRect ) delete pRect; } else - PostMessageW( hWnd, SAL_MSG_POSTPAINT, (WPARAM)pRect, 0 ); + { + BOOL const ret = PostMessageW(hWnd, SAL_MSG_POSTPAINT, (WPARAM)pRect, 0); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } static void SetMaximizedFrameGeometry( HWND hWnd, WinSalFrame* pFrame, RECT* pParentRect ) @@ -3947,7 +3960,10 @@ static void ImplHandleMoveMsg( HWND hWnd ) ImplSalYieldMutexRelease(); } else - PostMessageW( hWnd, SAL_MSG_POSTMOVE, 0, 0 ); + { + BOOL const ret = PostMessageW( hWnd, SAL_MSG_POSTMOVE, 0, 0 ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } static void ImplCallSizeHdl( HWND hWnd ) @@ -3968,7 +3984,10 @@ static void ImplCallSizeHdl( HWND hWnd ) ImplSalYieldMutexRelease(); } else - PostMessageW( hWnd, SAL_MSG_POSTCALLSIZE, 0, 0 ); + { + BOOL const ret = PostMessageW( hWnd, SAL_MSG_POSTCALLSIZE, 0, 0 ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } static void ImplHandleSizeMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) @@ -4023,7 +4042,10 @@ static void ImplHandleFocusMsg( HWND hWnd ) ImplSalYieldMutexRelease(); } else - PostMessageW( hWnd, SAL_MSG_POSTFOCUS, 0, 0 ); + { + BOOL const ret = PostMessageW( hWnd, SAL_MSG_POSTFOCUS, 0, 0 ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } static void ImplHandleCloseMsg( HWND hWnd ) @@ -4039,7 +4061,10 @@ static void ImplHandleCloseMsg( HWND hWnd ) ImplSalYieldMutexRelease(); } else - PostMessageW( hWnd, WM_CLOSE, 0, 0 ); + { + BOOL const ret = PostMessageW( hWnd, WM_CLOSE, 0, 0 ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } static long ImplHandleShutDownMsg( HWND hWnd ) @@ -4122,7 +4147,8 @@ static void ImplHandleForcePalette( HWND hWnd ) { if ( !ImplSalYieldMutexTryToAcquire() ) { - PostMessageW( hWnd, SAL_MSG_FORCEPALETTE, 0, 0 ); + BOOL const ret = PostMessageW( hWnd, SAL_MSG_FORCEPALETTE, 0, 0 ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); return; } @@ -4172,9 +4198,15 @@ static LRESULT ImplHandlePalette( bool bFrame, HWND hWnd, UINT nMsg, if ( ImplSalYieldMutexTryToAcquire() ) bReleaseMutex = TRUE; else if ( nMsg == WM_QUERYNEWPALETTE ) - PostMessageW( hWnd, SAL_MSG_POSTQUERYNEWPAL, wParam, lParam ); + { + BOOL const ret = PostMessageW(hWnd, SAL_MSG_POSTQUERYNEWPAL, wParam, lParam); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } else /* ( nMsg == WM_PALETTECHANGED ) */ - PostMessageW( hWnd, SAL_MSG_POSTPALCHANGED, wParam, lParam ); + { + BOOL const ret = PostMessageW(hWnd, SAL_MSG_POSTPALCHANGED, wParam, lParam); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } WinSalVirtualDevice*pTempVD; @@ -5904,7 +5936,10 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP { MSG aMsg; if( ! PeekMessageW( &aMsg, 0, WM_PAINT, WM_PAINT, PM_NOREMOVE | PM_NOYIELD ) ) - PostMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_POSTTIMER, 0, nCurTime ); + { + BOOL const ret = PostMessageW(pSalData->mpFirstInstance->mhComWnd, SAL_MSG_POSTTIMER, 0, nCurTime); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } } } diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx index 01a330c..a0fb9c3 100644 --- a/vcl/win/window/salobj.cxx +++ b/vcl/win/window/salobj.cxx @@ -112,7 +112,10 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) ImplSalYieldMutexRelease(); } else - PostMessageW( pObject->mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 ); + { + BOOL const ret = PostMessageW(pObject->mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } } else if ( pData->message == WM_KILLFOCUS ) @@ -129,7 +132,10 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) ImplSalYieldMutexRelease(); } else - PostMessageW( pObject->mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 ); + { + BOOL const ret = PostMessageW(pObject->mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } } else pObject->mhLastFocusWnd = (HWND)pData->wParam; @@ -153,7 +159,10 @@ bool ImplSalPreDispatchMsg( MSG* pMsg ) ImplSalYieldMutexAcquireWithWait(); pObject = ImplFindSalObject( pMsg->hwnd ); if ( pObject && !pObject->IsMouseTransparent() ) - PostMessageW( pObject->mhWnd, SALOBJ_MSG_TOTOP, 0, 0 ); + { + BOOL const ret = PostMessageW(pObject->mhWnd, SALOBJ_MSG_TOTOP, 0, 0); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } ImplSalYieldMutexRelease(); } @@ -288,7 +297,10 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l ImplSalYieldMutexAcquireWithWait(); pSysObj = GetSalObjWindowPtr( hWnd ); if ( pSysObj && !pSysObj->IsMouseTransparent() ) - PostMessageW( hWnd, SALOBJ_MSG_TOTOP, 0, 0 ); + { + BOOL const ret = PostMessageW( hWnd, SALOBJ_MSG_TOTOP, 0, 0 ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } ImplSalYieldMutexRelease(); } break; @@ -302,7 +314,10 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l rDef = FALSE; } else - PostMessageW( hWnd, SALOBJ_MSG_TOTOP, 0, 0 ); + { + BOOL const ret = PostMessageW( hWnd, SALOBJ_MSG_TOTOP, 0, 0 ); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } break; case SALOBJ_MSG_POSTFOCUS: @@ -319,7 +334,10 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l ImplSalYieldMutexRelease(); } else - PostMessageW( hWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 ); + { + BOOL const ret = PostMessageW(hWnd, SALOBJ_MSG_POSTFOCUS, 0, 0); + SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!"); + } rDef = FALSE; break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits