Fix that unloaded skin is displayed in context menu until fade is complete

This commit is contained in:
Birunthan Mohanathas
2013-03-10 12:14:40 +02:00
parent 3552a928dd
commit af8befd22b
3 changed files with 29 additions and 29 deletions

View File

@ -389,6 +389,8 @@ void CMeterWindow::RemoveWindowExStyle(LONG_PTR flag)
*/
void CMeterWindow::Deactivate()
{
Rainmeter->RemoveMeterWindow(this);
HideFade();
SetTimer(m_Window, TIMER_DEACTIVATE, m_FadeDuration + 50, NULL);
}
@ -2879,7 +2881,7 @@ LRESULT CMeterWindow::OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (m_FadeStartTime == 0)
{
KillTimer(m_Window, TIMER_DEACTIVATE);
Rainmeter->DeleteMeterWindow(this, true); // "delete this;"
delete this;
}
break;
}