diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-04-11 23:15:23 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-04-12 15:17:03 +0200 |
commit | 6f047b5866ee7c3f707a4f12ef9f95e7dbdb6e93 (patch) | |
tree | 341a7c333dfaadf0e9e240330e158f67bb2a5203 /fpicker | |
parent | 3bbd98301ad95a9aff74bd2ae08c1e2e04a0f10b (diff) |
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
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/win32/filepicker/WinFileOpenImpl.cxx | 6 | ||||
-rw-r--r-- | fpicker/source/win32/folderpicker/MtaFop.cxx | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx index 91720ea71253..1c8e432dde34 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 78b144bdbf5a..99a436c2859e 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!"); } } |