mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-09 05:13:36 +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:
@@ -22,8 +22,13 @@
|
||||
// CTimerThread
|
||||
//
|
||||
|
||||
CTimerThread::CTimerThread(double timeout) : m_timeout(timeout)
|
||||
CTimerThread::CTimerThread(double timeout, bool* timedOut) :
|
||||
m_timeout(timeout),
|
||||
m_timedOut(timedOut)
|
||||
{
|
||||
if (m_timedOut != NULL) {
|
||||
*m_timedOut = false;
|
||||
}
|
||||
if (m_timeout >= 0.0) {
|
||||
m_callingThread = new CThread(CThread::getCurrentThread());
|
||||
m_timingThread = new CThread(new TMethodJob<CTimerThread>(
|
||||
@@ -53,5 +58,8 @@ CTimerThread::timer(void*)
|
||||
LOG((CLOG_DEBUG1 "timeout in %f seconds", m_timeout));
|
||||
ARCH->sleep(m_timeout);
|
||||
LOG((CLOG_DEBUG1 "timeout"));
|
||||
if (m_timedOut != NULL) {
|
||||
*m_timedOut = true;
|
||||
}
|
||||
m_callingThread->cancel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user