mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Minor code tweaks.
This commit is contained in:
parent
b5530163a2
commit
1e88fe1db3
@ -3978,9 +3978,8 @@ LRESULT CMeterWindow::OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||
}
|
||||
|
||||
// Snap to other windows
|
||||
const std::map<std::wstring, CMeterWindow*>& windows = m_Rainmeter->GetAllMeterWindows();
|
||||
std::map<std::wstring, CMeterWindow*>::const_iterator iter = windows.begin();
|
||||
for ( ; iter != windows.end(); ++iter)
|
||||
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Rainmeter->GetAllMeterWindows().begin();
|
||||
for ( ; iter != m_Rainmeter->GetAllMeterWindows().end(); ++iter)
|
||||
{
|
||||
if ((*iter).second != this)
|
||||
{
|
||||
@ -4908,10 +4907,8 @@ LRESULT CMeterWindow::OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// Check that we're still alive
|
||||
bool found = false;
|
||||
const std::map<std::wstring, CMeterWindow*>& meters = m_Rainmeter->GetAllMeterWindows();
|
||||
std::map<std::wstring, CMeterWindow*>::const_iterator iter = meters.begin();
|
||||
|
||||
for ( ; iter != meters.end(); ++iter)
|
||||
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Rainmeter->GetAllMeterWindows().begin();
|
||||
for ( ; iter != m_Rainmeter->GetAllMeterWindows().end(); ++iter)
|
||||
{
|
||||
if ((*iter).second == this)
|
||||
{
|
||||
|
@ -795,8 +795,8 @@ void CSystem::ChangeZPosInOrder()
|
||||
auto resetZPos = [&](ZPOSITION zpos)
|
||||
{
|
||||
// Reset ZPos in Z-order (Bottom)
|
||||
std::vector<CMeterWindow*>::const_iterator iter = windowsInZOrder.begin(), iterEnd = windowsInZOrder.end();
|
||||
for ( ; iter != iterEnd; ++iter)
|
||||
std::vector<CMeterWindow*>::const_iterator iter = windowsInZOrder.begin();
|
||||
for ( ; iter != windowsInZOrder.end(); ++iter)
|
||||
{
|
||||
if ((*iter)->GetWindowZPosition() == zpos)
|
||||
{
|
||||
@ -1036,9 +1036,8 @@ LRESULT CALLBACK CSystem::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||
}
|
||||
|
||||
// Deliver WM_DISPLAYCHANGE / WM_SETTINGCHANGE message to all meter windows
|
||||
const std::map<std::wstring, CMeterWindow*>& windows = Rainmeter->GetAllMeterWindows();
|
||||
std::map<std::wstring, CMeterWindow*>::const_iterator iter = windows.begin();
|
||||
for ( ; iter != windows.end(); ++iter)
|
||||
std::map<std::wstring, CMeterWindow*>::const_iterator iter = Rainmeter->GetAllMeterWindows().begin();
|
||||
for ( ; iter != Rainmeter->GetAllMeterWindows().end(); ++iter)
|
||||
{
|
||||
PostMessage((*iter).second->GetWindow(), WM_DELAYED_MOVE, (WPARAM)uMsg, (LPARAM)0);
|
||||
}
|
||||
|
@ -679,16 +679,8 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
|
||||
if (cds->dwData == RAINMETER_QUERY_ID_SKIN_WINDOWHANDLE)
|
||||
{
|
||||
LPCWSTR configName = (LPCWSTR)cds->lpData;
|
||||
const std::map<std::wstring, CMeterWindow*>& windows = Rainmeter->GetAllMeterWindows();
|
||||
std::map<std::wstring, CMeterWindow*>::const_iterator iter = windows.begin();
|
||||
for ( ; iter != windows.end(); ++iter)
|
||||
{
|
||||
if (wcscmp((*iter).first.c_str(), configName) == 0)
|
||||
{
|
||||
return (LRESULT)(*iter).second->GetWindow();
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
CMeterWindow* mw = Rainmeter->GetMeterWindow(configName);
|
||||
return (mw) ? (LRESULT)mw->GetWindow() : NULL;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user