summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-11-23 21:44:36 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-11-24 09:02:31 +0000
commit4bd8ffd27f17ec4915790a260087ef1890169911 (patch)
tree063b8ac7c5909252934fffe00dd90367f94ab7b7 /vcl/win
parent37b5f1ed3139b8569bfec0fcb5077f6b66b79acd (diff)
Replace return boolean from DoYield with pleasant enumeration.
Change-Id: I1b1f885b4d7916a18dfb2457a8e9af9a5b4ae6e4 Reviewed-on: https://gerrit.libreoffice.org/20138 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.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index fcb5a1581405..5cf6c3dd58ba 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -621,7 +621,8 @@ static void ImplSalDispatchMessage( MSG* pMsg )
ImplSalPostDispatchMsg( pMsg, lResult );
}
-bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
+SalYieldResult
+ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
{
MSG aMsg;
bool bWasMsg = false, bOneEvent = false;
@@ -648,12 +649,13 @@ bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
ImplSalDispatchMessage( &aMsg );
}
}
- return bWasMsg;
+ return bWasMsg ? SalYieldResult::EVENT :
+ SalYieldResult::TIMEOUT;
}
-bool WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong const nReleased)
+SalYieldResult WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong const nReleased)
{
- bool bDidWork = false;
+ SalYieldResult eDidWork = SalYieldResult::TIMEOUT;
// NOTE: if nReleased != 0 this will be called without SolarMutex
// so don't do anything dangerous before releasing it here
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
@@ -694,7 +696,7 @@ bool WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong
}
else
{
- bDidWork = ImplSalYield( bWait, bHandleAllCurrentEvents );
+ eDidWork = ImplSalYield( bWait, bHandleAllCurrentEvents );
n = nCount;
while ( n )
@@ -703,7 +705,7 @@ bool WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong
n--;
}
}
- return bDidWork;
+ return eDidWork;
}
LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef )