diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-25 13:50:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-25 13:50:57 +0000 |
commit | 125264843b0e1f8afccc85ea30c329f0366eb716 (patch) | |
tree | d29170f7259bfec7410bb082e44b1d670b8134b8 /src | |
parent | e4b8e9d9704a986c71565ef723cc8de208d97740 (diff) |
- custom screen saver detection code removed
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@6230 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdaway/sendmsg.cpp | 6 | ||||
-rw-r--r-- | src/mir_core/winver.cpp | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/core/stdaway/sendmsg.cpp b/src/core/stdaway/sendmsg.cpp index b981615f65..79bc374a97 100644 --- a/src/core/stdaway/sendmsg.cpp +++ b/src/core/stdaway/sendmsg.cpp @@ -315,11 +315,11 @@ static INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wPa static int StatusModeChange(WPARAM wParam, LPARAM lParam)
{
- BOOL bScreenSaverRunning = FALSE;
int statusMode = (int)wParam;
char *szProto = (char*)lParam;
- if (protoModeMsgFlags == 0) return 0;
+ if (protoModeMsgFlags == 0)
+ return 0;
// If its a global change check the complete PFLAGNUM_3 flags to see if a popup might be needed
if ( !szProto)
@@ -335,7 +335,7 @@ static int StatusModeChange(WPARAM wParam, LPARAM lParam) return 0;
}
- SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &bScreenSaverRunning, FALSE);
+ BOOL bScreenSaverRunning = IsScreenSaverRunning();
if (GetStatusModeByte(statusMode, "Ignore"))
ChangeAllProtoMessages(szProto, statusMode, NULL);
diff --git a/src/mir_core/winver.cpp b/src/mir_core/winver.cpp index 03a6e62a28..96f2ddb26b 100644 --- a/src/mir_core/winver.cpp +++ b/src/mir_core/winver.cpp @@ -64,8 +64,7 @@ MIR_CORE_DLL(BOOL) IsFullScreen() ClientToScreen(hWnd, (LPPOINT)&rect);
ClientToScreen(hWnd, (LPPOINT)&rect.right);
- if (EqualRect(&rect, &rectw) && IntersectRect(&recti, &rect, &rcScreen) &&
- EqualRect(&recti, &rcScreen))
+ if (EqualRect(&rect, &rectw) && IntersectRect(&recti, &rect, &rcScreen) && EqualRect(&recti, &rcScreen))
return true;
}
}
@@ -79,8 +78,11 @@ MIR_CORE_DLL(BOOL) IsWorkstationLocked(void) if (hDesk == NULL)
return true;
+ TCHAR tszName[100];
+ DWORD cbName;
+ BOOL bLocked = (!GetUserObjectInformation(hDesk, UOI_NAME, tszName, SIZEOF(tszName), &cbName) || lstrcmpi(tszName,_T("default")) != 0);
CloseDesktop(hDesk);
- return false;
+ return bLocked;
}
MIR_CORE_DLL(BOOL) IsScreenSaverRunning(void)
|