Fixed the compatibility issue for the skins that are using MouseOverAction/MouseLeaveAction in Meters.

This commit is contained in:
spx
2010-08-13 23:20:20 +00:00
parent 8fe2a26a51
commit 20c3702501
4 changed files with 44 additions and 28 deletions

View File

@ -48,6 +48,7 @@ CMeterButton::CMeterButton(CMeterWindow* meterWindow) : CMeter(meterWindow)
m_Bitmap = NULL;
m_State = BUTTON_STATE_NORMAL;
m_Clicked = false;
m_Executable = false;
}
/*
@ -284,7 +285,7 @@ bool CMeterButton::MouseUp(POINT pos, CMeterWindow* window)
{
if (m_State == BUTTON_STATE_DOWN)
{
if (window && m_Clicked && HitTest2(pos.x, pos.y, true))
if (window && m_Clicked && m_Executable && HitTest2(pos.x, pos.y, true))
{
// Do a delayed execute or ortherwise !RainmeterRefresh crashes
PostMessage(window->GetWindow(), WM_DELAYED_EXECUTE, (WPARAM)NULL, (LPARAM)m_Command.c_str());
@ -300,7 +301,7 @@ bool CMeterButton::MouseUp(POINT pos, CMeterWindow* window)
bool CMeterButton::MouseDown(POINT pos)
{
if (HitTest2(pos.x, pos.y, true))
if (m_Executable && HitTest2(pos.x, pos.y, true))
{
m_State = BUTTON_STATE_DOWN;
m_Clicked = true;