mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Small change about !RainmeterQuit (simpler way)
This commit is contained in:
parent
415c905d0a
commit
8bff3e2ac2
@ -640,7 +640,7 @@ void RainmeterQuit(HWND, const char* arg)
|
||||
if (Rainmeter)
|
||||
{
|
||||
// Quit needs to be delayed since it crashes if done during Update()
|
||||
PostMessage(Rainmeter->GetTrayWindow()->GetWindow(), WM_DELAYED_QUIT, (WPARAM)NULL, (LPARAM)NULL);
|
||||
PostMessage(Rainmeter->GetTrayWindow()->GetWindow(), WM_COMMAND, MAKEWPARAM(ID_CONTEXT_QUIT, 0), (LPARAM)NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1781,7 +1781,7 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg,
|
||||
else if (wcsicmp(bang.c_str(), L"!RainmeterQuit") == 0)
|
||||
{
|
||||
// Quit needs to be delayed since it crashes if done during Update()
|
||||
PostMessage(m_TrayWindow->GetWindow(), WM_DELAYED_QUIT, (WPARAM)NULL, (LPARAM)NULL);
|
||||
PostMessage(m_TrayWindow->GetWindow(), WM_COMMAND, MAKEWPARAM(ID_CONTEXT_QUIT, 0), (LPARAM)NULL);
|
||||
}
|
||||
else if (wcsicmp(bang.c_str(), L"!Execute") == 0)
|
||||
{
|
||||
|
@ -631,14 +631,6 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_DELAYED_QUIT:
|
||||
if (Rainmeter)
|
||||
{
|
||||
if (Rainmeter->GetDummyLitestep()) PostQuitMessage(0);
|
||||
quitModule(Rainmeter->GetInstance());
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_DESTROY:
|
||||
if (Rainmeter->GetDummyLitestep()) PostQuitMessage(0);
|
||||
break;
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "Measure.h"
|
||||
|
||||
#define WM_DELAYED_REFRESH_ALL WM_APP + 0
|
||||
#define WM_DELAYED_QUIT WM_APP + 1
|
||||
|
||||
#define WM_NOTIFYICON WM_USER + 101
|
||||
#define TRAYICON_SIZE 16
|
||||
|
Loading…
Reference in New Issue
Block a user