summaryrefslogtreecommitdiffstats
path: root/unix/xserver
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-11-09 17:28:44 +0100
committerPierre Ossman <ossman@cendio.se>2018-11-09 17:28:44 +0100
commitb85febcd752f38cc05233db628795f8fea91795f (patch)
tree10bf7d316e0d37acbd8825c4118e51384ff995c3 /unix/xserver
parentf9de17665a3549e7e1eb44584ce73d6cafbd4c99 (diff)
parenta4308c9ec45b0ebcafaed2280b442d2840098e4e (diff)
downloadtigervnc-b85febcd752f38cc05233db628795f8fea91795f.tar.gz
tigervnc-b85febcd752f38cc05233db628795f8fea91795f.zip
Merge branch 'exittimer' of https://github.com/CendioOssman/tigervnc
Diffstat (limited to 'unix/xserver')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc8
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index e61472b3..d8b3a4d4 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -22,6 +22,7 @@
//
#include <assert.h>
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
@@ -367,7 +368,7 @@ void XserverDesktop::blockHandler(int* timeout)
}
// Trigger timers and check when the next will expire
- int nextTimeout = server->checkTimeouts();
+ int nextTimeout = Timer::checkTimeouts();
if (nextTimeout > 0 && (*timeout == -1 || nextTimeout < *timeout))
*timeout = nextTimeout;
} catch (rdr::Exception& e) {
@@ -423,6 +424,11 @@ void XserverDesktop::approveConnection(uint32_t opaqueId, bool accept,
// SDesktop callbacks
+void XserverDesktop::terminate()
+{
+ kill(getpid(), SIGTERM);
+}
+
void XserverDesktop::pointerEvent(const Point& pos, int buttonMask)
{
vncPointerMove(pos.x + vncGetScreenX(screenIndex),
diff --git a/unix/xserver/hw/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h
index ff36b3b5..1253935f 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.h
+++ b/unix/xserver/hw/vnc/XserverDesktop.h
@@ -87,6 +87,7 @@ public:
// rfb::SDesktop callbacks
virtual void start(rfb::VNCServer* vs);
virtual void stop();
+ virtual void terminate();
virtual void queryConnection(network::Socket* sock,
const char* userName);
virtual void pointerEvent(const rfb::Point& pos, int buttonMask);