summaryrefslogtreecommitdiff
path: root/plugins/BossKeyPlus/src/BossKeyIdle.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-25 12:07:46 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-25 12:07:46 +0000
commite64818967374ebdadf6f22d18296e7bc6088277b (patch)
tree14736c4f5d51012dfccb63bc745f08a63ec4f8fd /plugins/BossKeyPlus/src/BossKeyIdle.cpp
parentdd1460d664f7266920b07527f25f87ec8233daaf (diff)
IsFullScreen(), IsWorkstationLocked(), IsScreenSaverRunning() moved to the core
git-svn-id: http://svn.miranda-ng.org/main/trunk@6226 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BossKeyPlus/src/BossKeyIdle.cpp')
-rw-r--r--plugins/BossKeyPlus/src/BossKeyIdle.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/plugins/BossKeyPlus/src/BossKeyIdle.cpp b/plugins/BossKeyPlus/src/BossKeyIdle.cpp
index a97bf01abc..806f3820e1 100644
--- a/plugins/BossKeyPlus/src/BossKeyIdle.cpp
+++ b/plugins/BossKeyPlus/src/BossKeyIdle.cpp
@@ -29,13 +29,6 @@ UINT mouseidle, minutes;
VOID CALLBACK IdleTimer(HWND hwnd, UINT umsg, UINT idEvent, DWORD dwTime);
-static bool IsScreenSaverRunning()
-{
- bool rc = FALSE;
- SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &rc, FALSE);
- return rc;
-}
-
static bool IsUserIdle()
{
DWORD dwTick;
@@ -53,14 +46,11 @@ static bool IsUserIdle()
return FALSE;
}
-
VOID CALLBACK IdleTimer(HWND hwnd, UINT umsg, UINT_PTR idEvent, DWORD dwTime)
{
- if ( hTimer == idEvent && !g_bWindowHidden &&
- ((g_wMaskAdv & (OPT_HIDEIFWINIDLE | OPT_HIDEIFMIRIDLE) && IsUserIdle()) ||
- (g_wMaskAdv & OPT_HIDEIFSCRSVR && IsScreenSaverRunning())))
-
- BossKeyHideMiranda(0, 0);
+ if ( hTimer == idEvent && !g_bWindowHidden && ((g_wMaskAdv & (OPT_HIDEIFWINIDLE | OPT_HIDEIFMIRIDLE) && IsUserIdle()) ||
+ (g_wMaskAdv & OPT_HIDEIFSCRSVR) && IsScreenSaverRunning()))
+ BossKeyHideMiranda(0, 0);
}
void InitIdleTimer()