Reverted change at OnDelayedMove() in d25ae27:

http://rainmeter.net/forum/viewtopic.php?p=83860
This commit is contained in:
spx 2013-02-12 23:19:17 +09:00
parent d25ae270c4
commit f48c7f9e01
2 changed files with 5 additions and 21 deletions

View File

@ -3515,15 +3515,6 @@ void CMeterWindow::SetKeepOnScreen(bool b)
m_KeepOnScreen = b;
WriteOptions(OPTION_KEEPONSCREEN);
MoveWindowIfAppropriate();
}
/*
** Helper function for setting KeepOnScreen
**
*/
bool CMeterWindow::MoveWindowIfAppropriate()
{
if (m_KeepOnScreen)
{
int x = m_ScreenX;
@ -3534,11 +3525,8 @@ bool CMeterWindow::MoveWindowIfAppropriate()
if (x != m_ScreenX || y != m_ScreenY)
{
MoveWindow(x, y);
return true;
}
}
return false;
}
/*
@ -4651,20 +4639,17 @@ LRESULT CMeterWindow::OnDelayedRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
/*
** Handles delayed move
** Handles delayed move.
** Do not save the position in this handler for the sake of preventing move by temporal resolution/workarea change.
**
*/
LRESULT CMeterWindow::OnDelayedMove(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
m_Parser.ResetMonitorVariables(this);
// Move the window to correct position
ResizeWindow(true);
if (!MoveWindowIfAppropriate())
{
ScreenToWindow();
}
// Move the window temporarily
ResizeWindow(false);
SetWindowPos(m_Window, NULL, m_ScreenX, m_ScreenY, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
return 0;
}

View File

@ -326,7 +326,6 @@ private:
void HandleButtons(POINT pos, BUTTONPROC proc, bool execute = true);
void SetClickThrough(bool b);
void SetKeepOnScreen(bool b);
bool MoveWindowIfAppropriate();
void SetWindowDraggable(bool b);
void SetSavePosition(bool b);
void SavePositionIfAppropriate();