diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-11-16 20:59:58 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-11-17 09:20:58 +0000 |
commit | eca4c54e52363f80db26e228e586aeb7732c7100 (patch) | |
tree | f96c872d02d15044279c5c49097aa8ea70a8f967 /vcl/win | |
parent | 2ee802245ed9614734506a9d46edcbcee53ea2cc (diff) |
vcl: add parameter to detect if OS events are processed during Yield.
Intended as a non-functional change.
Change-Id: I1915aad03786540da1a4bfe9031d33f2c2a9b4e3
Reviewed-on: https://gerrit.libreoffice.org/20006
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/app/salinst.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index f8a96dad2754..4ddf3a9e616c 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -621,7 +621,7 @@ static void ImplSalDispatchMessage( MSG* pMsg ) ImplSalPostDispatchMsg( pMsg, lResult ); } -void ImplSalYield( bool bWait, bool bHandleAllCurrentEvents ) +bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents ) { MSG aMsg; bool bWasMsg = false, bOneEvent = false; @@ -648,10 +648,12 @@ void ImplSalYield( bool bWait, bool bHandleAllCurrentEvents ) ImplSalDispatchMessage( &aMsg ); } } + return bWasMsg; } -void WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong const nReleased) +bool WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong const nReleased) { + bool bDidWork = false; // NOTE: if nReleased != 0 this will be called without SolarMutex // so don't do anything dangerous before releasing it here SalYieldMutex* pYieldMutex = mpSalYieldMutex; @@ -692,7 +694,7 @@ void WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong } else { - ImplSalYield( bWait, bHandleAllCurrentEvents ); + bDidWork = ImplSalYield( bWait, bHandleAllCurrentEvents ); n = nCount; while ( n ) @@ -701,6 +703,7 @@ void WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong n--; } } + return bDidWork; } LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) |