From 125264843b0e1f8afccc85ea30c329f0366eb716 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 25 Sep 2013 13:50:57 +0000 Subject: - custom screen saver detection code removed - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6230 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/winver.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mir_core') 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) -- cgit v1.2.3