diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-09-29 21:02:17 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-10-04 14:53:33 +0200 |
commit | da5cdcdeddf7bc21606b4cb64d8b1fc412146935 (patch) | |
tree | e887175264e671a241e735763100e40adaa15e7c /vcl/inc/win | |
parent | 96e67461c8b451f3a313bcc973ac49c5e49537c0 (diff) |
Convert tick-based timer events to versioned ones
Instead of storing the system ticks in the timer event message
simply store a version.
Moves the version handling code into a VersionedEvent class,
inherited by WinSalTimer and AquaSalTimer.
Change-Id: I5add85031d36b3424a26a9ef798294cbfb00b2e4
Reviewed-on: https://gerrit.libreoffice.org/42959
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/win')
-rw-r--r-- | vcl/inc/win/saltimer.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h index f87361e55ed8..06e77b171cb3 100644 --- a/vcl/inc/win/saltimer.h +++ b/vcl/inc/win/saltimer.h @@ -22,13 +22,14 @@ #include <saltimer.hxx> -class WinSalTimer : public SalTimer +class WinSalTimer final : public SalTimer, protected VersionedEvent { // for access to Impl* functions friend LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ); + // for access to m_bPollForMessage + friend static void CALLBACK SalTimerProc( PVOID data, BOOLEAN ); HANDLE m_nTimerId; ///< Windows timer id - sal_uInt32 m_nTimerStartTicks; ///< system ticks at timer start % SAL_MAX_UINT32 bool m_bPollForMessage; ///< Run yield until a message is caught (most likely the 0ms timer) void ImplStart( sal_uIntPtr nMS ); @@ -49,7 +50,7 @@ public: inline bool WinSalTimer::IsValidWPARAM( WPARAM aWPARAM ) const { - return aWPARAM == m_nTimerStartTicks; + return IsValidEventVersion( static_cast<sal_Int32>( aWPARAM ) ); } inline bool WinSalTimer::PollForMessage() const |