mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed StartHidden issue: http://rainmeter.net/forum/viewtopic.php?f=14&t=10174
This commit is contained in:
parent
e8b9461541
commit
ed2b80fee5
@ -399,9 +399,18 @@ void CMeterWindow::Refresh(bool init, bool all)
|
||||
|
||||
// Set the window region
|
||||
CreateRegion(true); // Clear the region
|
||||
if (init) ShowWindow(m_Window, SW_SHOWNOACTIVATE);
|
||||
UpdateTransparency(m_AlphaValue, true); // Add/Remove layered flag
|
||||
Update(false);
|
||||
|
||||
if (m_BlurMode == BLURMODE_NONE)
|
||||
{
|
||||
HideBlur();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowBlur();
|
||||
}
|
||||
|
||||
if (m_KeepOnScreen)
|
||||
{
|
||||
MapCoordsToScreen(m_ScreenX, m_ScreenY, m_WindowW, m_WindowH);
|
||||
@ -411,6 +420,11 @@ void CMeterWindow::Refresh(bool init, bool all)
|
||||
|
||||
ScreenToWindow();
|
||||
|
||||
if (all || oldZPos != m_WindowZPosition)
|
||||
{
|
||||
ChangeZPos(m_WindowZPosition, all);
|
||||
}
|
||||
|
||||
// Start the timers
|
||||
if (m_WindowUpdate >= 0)
|
||||
{
|
||||
@ -425,22 +439,6 @@ void CMeterWindow::Refresh(bool init, bool all)
|
||||
throw CError(L"Unable to set timer!", __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
UpdateTransparency(m_AlphaValue, true);
|
||||
|
||||
if (all || oldZPos != m_WindowZPosition)
|
||||
{
|
||||
ChangeZPos(m_WindowZPosition, all);
|
||||
}
|
||||
|
||||
if (m_BlurMode == BLURMODE_NONE)
|
||||
{
|
||||
HideBlur();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowBlur();
|
||||
}
|
||||
|
||||
m_Rainmeter->SetCurrentParser(NULL);
|
||||
|
||||
m_Refreshing = false;
|
||||
@ -3006,14 +3004,7 @@ void CMeterWindow::UpdateTransparency(int alpha, bool reset)
|
||||
BLENDFUNCTION blendPixelFunction= {AC_SRC_OVER, 0, alpha, AC_SRC_ALPHA};
|
||||
POINT ptWindowScreenPosition = {m_ScreenX, m_ScreenY};
|
||||
POINT ptSrc = {0, 0};
|
||||
SIZE szWindow = {m_WindowW, m_WindowH};
|
||||
|
||||
if (szWindow.cx == 0 || szWindow.cy == 0)
|
||||
{
|
||||
// Set dummy size to avoid invalid state
|
||||
szWindow.cx = 1;
|
||||
szWindow.cy = 1;
|
||||
}
|
||||
SIZE szWindow = {m_DIBSectionBufferW, m_DIBSectionBufferH};
|
||||
|
||||
HDC dcScreen = GetDC(0);
|
||||
HDC dcMemory = CreateCompatibleDC(dcScreen);
|
||||
|
Loading…
Reference in New Issue
Block a user