mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-11 06:05:08 +08:00
Added switch delay and double-tap options to win32 and added a
tray icon to the client and server that gives status feedback to the user and allows the user to kill the app.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "CArchConsoleWindows.h"
|
||||
#include "IArchMultithread.h"
|
||||
#include "CArch.h"
|
||||
#include <cstdio>
|
||||
|
||||
@@ -20,12 +21,12 @@
|
||||
// CArchConsoleWindows
|
||||
//
|
||||
|
||||
DWORD CArchConsoleWindows::s_thread = 0;
|
||||
CArchThread CArchConsoleWindows::s_thread = 0;
|
||||
|
||||
CArchConsoleWindows::CArchConsoleWindows() :
|
||||
m_output(NULL)
|
||||
{
|
||||
s_thread = GetCurrentThreadId();
|
||||
s_thread = ARCH->newCurrentThread();
|
||||
|
||||
m_mutex = ARCH->newMutex();
|
||||
}
|
||||
@@ -33,6 +34,7 @@ CArchConsoleWindows::CArchConsoleWindows() :
|
||||
CArchConsoleWindows::~CArchConsoleWindows()
|
||||
{
|
||||
ARCH->closeMutex(m_mutex);
|
||||
ARCH->closeThread(s_thread);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -101,7 +103,7 @@ CArchConsoleWindows::getNewlineForConsole()
|
||||
BOOL WINAPI
|
||||
CArchConsoleWindows::signalHandler(DWORD)
|
||||
{
|
||||
// terminate cleanly and skip remaining handlers
|
||||
PostThreadMessage(s_thread, WM_QUIT, 0, 0);
|
||||
// terminate thread and skip remaining handlers
|
||||
ARCH->cancelThread(s_thread);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user