mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Reverted change at OnDelayedMove() in d25ae27:
http://rainmeter.net/forum/viewtopic.php?p=83860
This commit is contained in:
parent
d25ae270c4
commit
f48c7f9e01
@ -3515,15 +3515,6 @@ void CMeterWindow::SetKeepOnScreen(bool b)
|
|||||||
m_KeepOnScreen = b;
|
m_KeepOnScreen = b;
|
||||||
WriteOptions(OPTION_KEEPONSCREEN);
|
WriteOptions(OPTION_KEEPONSCREEN);
|
||||||
|
|
||||||
MoveWindowIfAppropriate();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Helper function for setting KeepOnScreen
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
bool CMeterWindow::MoveWindowIfAppropriate()
|
|
||||||
{
|
|
||||||
if (m_KeepOnScreen)
|
if (m_KeepOnScreen)
|
||||||
{
|
{
|
||||||
int x = m_ScreenX;
|
int x = m_ScreenX;
|
||||||
@ -3534,11 +3525,8 @@ bool CMeterWindow::MoveWindowIfAppropriate()
|
|||||||
if (x != m_ScreenX || y != m_ScreenY)
|
if (x != m_ScreenX || y != m_ScreenY)
|
||||||
{
|
{
|
||||||
MoveWindow(x, y);
|
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)
|
LRESULT CMeterWindow::OnDelayedMove(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
m_Parser.ResetMonitorVariables(this);
|
m_Parser.ResetMonitorVariables(this);
|
||||||
|
|
||||||
// Move the window to correct position
|
// Move the window temporarily
|
||||||
ResizeWindow(true);
|
ResizeWindow(false);
|
||||||
|
SetWindowPos(m_Window, NULL, m_ScreenX, m_ScreenY, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||||
if (!MoveWindowIfAppropriate())
|
|
||||||
{
|
|
||||||
ScreenToWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -326,7 +326,6 @@ private:
|
|||||||
void HandleButtons(POINT pos, BUTTONPROC proc, bool execute = true);
|
void HandleButtons(POINT pos, BUTTONPROC proc, bool execute = true);
|
||||||
void SetClickThrough(bool b);
|
void SetClickThrough(bool b);
|
||||||
void SetKeepOnScreen(bool b);
|
void SetKeepOnScreen(bool b);
|
||||||
bool MoveWindowIfAppropriate();
|
|
||||||
void SetWindowDraggable(bool b);
|
void SetWindowDraggable(bool b);
|
||||||
void SetSavePosition(bool b);
|
void SetSavePosition(bool b);
|
||||||
void SavePositionIfAppropriate();
|
void SavePositionIfAppropriate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user