Apply new patch fixing problem of IsRunning always returning True. See #11699
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ec073e73d1
commit
b6ae7297d2
@ -19,8 +19,7 @@
|
||||
class WXDLLIMPEXP_BASE wxMSWTimerImpl : public wxTimerImpl
|
||||
{
|
||||
public:
|
||||
wxMSWTimerImpl(wxTimer *timer);
|
||||
virtual ~wxMSWTimerImpl();
|
||||
wxMSWTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_id = 0; };
|
||||
|
||||
virtual bool Start(int milliseconds = -1, bool oneShot = false);
|
||||
virtual void Stop();
|
||||
|
@ -118,22 +118,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxTimerHiddenWindowModule, wxModule)
|
||||
// wxMSWTimerImpl class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxMSWTimerImpl::wxMSWTimerImpl(wxTimer *timer)
|
||||
:wxTimerImpl(timer)
|
||||
{
|
||||
m_id = GetNewTimerId(this);
|
||||
}
|
||||
|
||||
wxMSWTimerImpl::~wxMSWTimerImpl()
|
||||
{
|
||||
TimerMap().erase(m_id);
|
||||
}
|
||||
|
||||
bool wxMSWTimerImpl::Start(int milliseconds, bool oneShot)
|
||||
{
|
||||
if ( !wxTimerImpl::Start(milliseconds, oneShot) )
|
||||
return false;
|
||||
|
||||
m_id = GetNewTimerId(this);
|
||||
// SetTimer() normally returns just idTimer but this might change in the
|
||||
// future so use its return value to be safe
|
||||
UINT_PTR ret = ::SetTimer
|
||||
@ -157,6 +147,8 @@ bool wxMSWTimerImpl::Start(int milliseconds, bool oneShot)
|
||||
void wxMSWTimerImpl::Stop()
|
||||
{
|
||||
::KillTimer(wxTimerHiddenWindowModule::GetHWND(), m_id);
|
||||
TimerMap().erase(m_id);
|
||||
m_id = 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user