summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-12-11 16:45:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-12-11 16:45:31 +0300
commiteebad29559ff027ff2955fe63f95478668e968de (patch)
treebc480b6507b6df334fd2f6051bbc465ff7a9d44f /src/core
parenta569fea827be7c1719f3eaca1d8b33d82d4b7889 (diff)
IsTerminalDisconnected() moved to core
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdidle/src/idle.cpp17
-rw-r--r--src/core/stdidle/src/stdafx.h1
2 files changed, 1 insertions, 17 deletions
diff --git a/src/core/stdidle/src/idle.cpp b/src/core/stdidle/src/idle.cpp
index 4802dd1262..a022c56cb2 100644
--- a/src/core/stdidle/src/idle.cpp
+++ b/src/core/stdidle/src/idle.cpp
@@ -111,22 +111,6 @@ typedef enum _WTS_INFO_CLASS
static BOOL bModuleInitialized = FALSE;
-BOOL IsTerminalDisconnected()
-{
- PVOID pBuffer = nullptr;
- DWORD pBytesReturned = 0;
- BOOL result = FALSE;
-
- if (WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSConnectState, (LPTSTR *)&pBuffer, &pBytesReturned)) {
- if (*(PDWORD)pBuffer == WTSDisconnected)
- result = TRUE;
- }
-
- if (pBuffer)
- WTSFreeMemory(pBuffer);
- return result;
-}
-
typedef struct
{
UINT_PTR hTimer;
@@ -222,6 +206,7 @@ static void IdleObject_Tick(IdleObject * obj)
obj->idleType = idleType;
NotifyEventHooks(hIdleEvent, 0, IDF_ISIDLE | flags);
}
+
if (IdleObject_IsIdle(obj) && !idle) {
IdleObject_ClearIdle(obj);
obj->idleType = 0;
diff --git a/src/core/stdidle/src/stdafx.h b/src/core/stdidle/src/stdafx.h
index dde53388fd..6ca7b977ad 100644
--- a/src/core/stdidle/src/stdafx.h
+++ b/src/core/stdidle/src/stdafx.h
@@ -26,7 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <shlobj.h>
#include <commctrl.h>
#include <vssym32.h>
-#include <Wtsapi32.h>
#include <stdio.h>
#include <time.h>