blob: a9b328fe9dcc1cf31a22daaece67a370be319269 [file] [log] [blame]
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +00001/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
Constantin Kaplinsky2c019832008-05-30 11:02:04 +00002 * Copyright (C) 2004-2008 Constantin Kaplinsky. All Rights Reserved.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +00003 *
4 * This is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This software is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this software; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 * USA.
18 */
19
20// FIXME: Check cases when screen width/height is not a multiply of 32.
21// e.g. 800x600.
22
23#include <strings.h>
24#include <sys/types.h>
25#include <sys/stat.h>
26#include <unistd.h>
27#include <errno.h>
28#include <rfb/Logger_stdio.h>
29#include <rfb/LogWriter.h>
30#include <rfb/VNCServerST.h>
31#include <rfb/Configuration.h>
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000032#include <rfb/Timer.h>
33#include <network/TcpSocket.h>
34#include <tx/TXWindow.h>
35
Constantin Kaplinskya3b60c42006-06-02 04:07:49 +000036#include <vncconfig/QueryConnectDialog.h>
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000037
38#include <signal.h>
39#include <X11/X.h>
40#include <X11/Xlib.h>
41#include <X11/Xutil.h>
42#ifdef HAVE_XTEST
43#include <X11/extensions/XTest.h>
44#endif
Pierre Ossmana7b728a2014-06-13 10:56:59 +000045#ifdef HAVE_XDAMAGE
46#include <X11/extensions/Xdamage.h>
47#endif
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000048
49#include <x0vncserver/Geometry.h>
50#include <x0vncserver/Image.h>
Constantin Kaplinsky614c7b52007-12-26 18:17:09 +000051#include <x0vncserver/XPixelBuffer.h>
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000052#include <x0vncserver/PollingScheduler.h>
53
54// XXX Lynx/OS 2.3: protos for select(), bzero()
55#ifdef Lynx
56#include <sys/proto.h>
57#endif
58
Constantin Kaplinskyb9632702006-12-01 10:54:55 +000059extern char buildtime[];
60
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000061using namespace rfb;
62using namespace network;
63
64static LogWriter vlog("Main");
65
66IntParameter pollingCycle("PollingCycle", "Milliseconds per one polling "
67 "cycle; actual interval may be dynamically "
68 "adjusted to satisfy MaxProcessorUsage setting", 30);
69IntParameter maxProcessorUsage("MaxProcessorUsage", "Maximum percentage of "
70 "CPU time to be consumed", 35);
71BoolParameter useShm("UseSHM", "Use MIT-SHM extension if available", true);
72BoolParameter useOverlay("OverlayMode", "Use overlay mode under "
73 "IRIX or Solaris", true);
74StringParameter displayname("display", "The X display", "");
75IntParameter rfbport("rfbport", "TCP port to listen for RFB protocol",5900);
76IntParameter queryConnectTimeout("QueryConnectTimeout",
77 "Number of seconds to show the Accept Connection dialog before "
78 "rejecting the connection",
79 10);
80StringParameter hostsFile("HostsFile", "File with IP access control rules", "");
81
82//
83// Allow the main loop terminate itself gracefully on receiving a signal.
84//
85
86static bool caughtSignal = false;
87
88static void CleanupSignalHandler(int sig)
89{
90 caughtSignal = true;
91}
92
93
94class QueryConnHandler : public VNCServerST::QueryConnectionHandler,
95 public QueryResultCallback {
96public:
97 QueryConnHandler(Display* dpy, VNCServerST* vs)
98 : display(dpy), server(vs), queryConnectDialog(0), queryConnectSock(0) {}
99 ~QueryConnHandler() { delete queryConnectDialog; }
100
101 // -=- VNCServerST::QueryConnectionHandler interface
102 virtual VNCServerST::queryResult queryConnection(network::Socket* sock,
103 const char* userName,
104 char** reason) {
105 if (queryConnectSock) {
Adam Tkacd36b6262009-09-04 10:57:20 +0000106 *reason = strDup("Another connection is currently being queried.");
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000107 return VNCServerST::REJECT;
108 }
109 if (!userName) userName = "(anonymous)";
110 queryConnectSock = sock;
111 CharArray address(sock->getPeerAddress());
112 delete queryConnectDialog;
113 queryConnectDialog = new QueryConnectDialog(display, address.buf,
114 userName, queryConnectTimeout,
115 this);
116 queryConnectDialog->map();
117 return VNCServerST::PENDING;
118 }
119
120 // -=- QueryResultCallback interface
121 virtual void queryApproved() {
122 server->approveConnection(queryConnectSock, true, 0);
123 queryConnectSock = 0;
124 }
125 virtual void queryRejected() {
126 server->approveConnection(queryConnectSock, false,
127 "Connection rejected by local user");
128 queryConnectSock = 0;
129 }
130private:
131 Display* display;
132 VNCServerST* server;
133 QueryConnectDialog* queryConnectDialog;
134 network::Socket* queryConnectSock;
135};
136
137
Pierre Ossmanb6b4dc62014-01-20 15:05:21 +0100138class XDesktop : public SDesktop, public TXGlobalEventHandler
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000139{
140public:
141 XDesktop(Display* dpy_, Geometry *geometry_)
Constantin Kaplinsky303433a2008-06-04 05:57:06 +0000142 : dpy(dpy_), geometry(geometry_), pb(0), server(0),
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000143 oldButtonMask(0), haveXtest(false), haveDamage(false),
144 maxButtons(0), running(false)
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000145 {
146#ifdef HAVE_XTEST
147 int xtestEventBase;
148 int xtestErrorBase;
149 int major, minor;
150
151 if (XTestQueryExtension(dpy, &xtestEventBase,
152 &xtestErrorBase, &major, &minor)) {
153 XTestGrabControl(dpy, True);
154 vlog.info("XTest extension present - version %d.%d",major,minor);
155 haveXtest = true;
156 } else {
157#endif
158 vlog.info("XTest extension not present");
159 vlog.info("Unable to inject events or display while server is grabbed");
160#ifdef HAVE_XTEST
161 }
162#endif
163
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000164#ifdef HAVE_XDAMAGE
165 int xdamageErrorBase;
166
167 if (XDamageQueryExtension(dpy, &xdamageEventBase, &xdamageErrorBase)) {
168 TXWindow::setGlobalEventHandler(this);
169 haveDamage = true;
170 } else {
171#endif
172 vlog.info("DAMAGE extension not present");
173 vlog.info("Will have to poll screen for changes");
174#ifdef HAVE_XDAMAGE
175 }
176#endif
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000177 }
178 virtual ~XDesktop() {
179 stop();
180 }
181
Constantin Kaplinskydc873dc2008-06-04 09:46:57 +0000182 inline void poll() {
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000183 if (pb and not haveDamage)
Constantin Kaplinskydc873dc2008-06-04 09:46:57 +0000184 pb->poll(server);
185 }
186
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000187 // -=- SDesktop interface
188
189 virtual void start(VNCServer* vs) {
190
191 // Determine actual number of buttons of the X pointer device.
192 unsigned char btnMap[8];
193 int numButtons = XGetPointerMapping(dpy, btnMap, 8);
194 maxButtons = (numButtons > 8) ? 8 : numButtons;
195 vlog.info("Enabling %d button%s of X pointer device",
196 maxButtons, (maxButtons != 1) ? "s" : "");
197
Constantin Kaplinskye0c80c52008-06-04 03:10:05 +0000198 // Create an ImageFactory instance for producing Image objects.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000199 ImageFactory factory((bool)useShm, (bool)useOverlay);
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000200
Constantin Kaplinskydc873dc2008-06-04 09:46:57 +0000201 // Create pixel buffer and provide it to the server object.
Pierre Ossmanb6b4dc62014-01-20 15:05:21 +0100202 pb = new XPixelBuffer(dpy, factory, geometry->getRect());
Constantin Kaplinskye0c80c52008-06-04 03:10:05 +0000203 vlog.info("Allocated %s", pb->getImage()->classDesc());
204
Constantin Kaplinskyc341ac62008-08-21 03:35:08 +0000205 server = (VNCServerST *)vs;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000206 server->setPixelBuffer(pb);
207
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000208#ifdef HAVE_XDAMAGE
209 if (haveDamage) {
210 damage = XDamageCreate(dpy, DefaultRootWindow(dpy),
211 XDamageReportRawRectangles);
212 }
213#endif
214
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000215 running = true;
216 }
217
218 virtual void stop() {
219 running = false;
220
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000221#ifdef HAVE_XDAMAGE
222 if (haveDamage)
223 XDamageDestroy(dpy, damage);
224#endif
225
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000226 delete pb;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000227 pb = 0;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000228 }
229
230 inline bool isRunning() {
231 return running;
232 }
233
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000234 virtual void pointerEvent(const Point& pos, int buttonMask) {
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000235#ifdef HAVE_XTEST
236 if (!haveXtest) return;
237 XTestFakeMotionEvent(dpy, DefaultScreen(dpy),
238 geometry->offsetLeft() + pos.x,
239 geometry->offsetTop() + pos.y,
240 CurrentTime);
241 if (buttonMask != oldButtonMask) {
242 for (int i = 0; i < maxButtons; i++) {
243 if ((buttonMask ^ oldButtonMask) & (1<<i)) {
244 if (buttonMask & (1<<i)) {
245 XTestFakeButtonEvent(dpy, i+1, True, CurrentTime);
246 } else {
247 XTestFakeButtonEvent(dpy, i+1, False, CurrentTime);
248 }
249 }
250 }
251 }
252 oldButtonMask = buttonMask;
253#endif
254 }
255
256 virtual void keyEvent(rdr::U32 key, bool down) {
257#ifdef HAVE_XTEST
258 if (!haveXtest) return;
259 int keycode = XKeysymToKeycode(dpy, key);
260 if (keycode)
261 XTestFakeKeyEvent(dpy, keycode, down, CurrentTime);
262#endif
263 }
264
265 virtual void clientCutText(const char* str, int len) {
266 }
267
268 virtual Point getFbSize() {
269 return Point(pb->width(), pb->height());
270 }
271
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000272 // -=- TXGlobalEventHandler interface
273
274 virtual bool handleGlobalEvent(XEvent* ev) {
275#ifdef HAVE_XDAMAGE
276 XDamageNotifyEvent* dev;
277 Rect rect;
278
279 if (ev->type != xdamageEventBase)
280 return false;
281
282 if (!running)
283 return true;
284
285 dev = (XDamageNotifyEvent*)ev;
286 rect.setXYWH(dev->area.x, dev->area.y, dev->area.width, dev->area.height);
287 server->add_changed(rect);
288
289 return true;
Pierre Ossman25ae7e32015-03-03 16:45:18 +0100290#else
291 return false;
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000292#endif
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000293 }
294
295protected:
296 Display* dpy;
297 Geometry* geometry;
Constantin Kaplinsky2c019832008-05-30 11:02:04 +0000298 XPixelBuffer* pb;
Constantin Kaplinskyc341ac62008-08-21 03:35:08 +0000299 VNCServerST* server;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000300 int oldButtonMask;
301 bool haveXtest;
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000302 bool haveDamage;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000303 int maxButtons;
304 bool running;
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000305#ifdef HAVE_XDAMAGE
306 Damage damage;
307 int xdamageEventBase;
308#endif
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000309};
310
311
312class FileTcpFilter : public TcpFilter
313{
314
315public:
316
317 FileTcpFilter(const char *fname)
318 : TcpFilter("-"), fileName(NULL), lastModTime(0)
319 {
320 if (fname != NULL)
321 fileName = strdup((char *)fname);
322 }
323
324 virtual ~FileTcpFilter()
325 {
326 if (fileName != NULL)
327 free(fileName);
328 }
329
330 virtual bool verifyConnection(Socket* s)
331 {
332 if (!reloadRules()) {
333 vlog.error("Could not read IP filtering rules: rejecting all clients");
334 filter.clear();
335 filter.push_back(parsePattern("-"));
336 return false;
337 }
338
339 return TcpFilter::verifyConnection(s);
340 }
341
342protected:
343
344 bool reloadRules()
345 {
346 if (fileName == NULL)
347 return true;
348
349 struct stat st;
350 if (stat(fileName, &st) != 0)
351 return false;
352
353 if (st.st_mtime != lastModTime) {
354 // Actually reload only if the file was modified
355 FILE *fp = fopen(fileName, "r");
356 if (fp == NULL)
357 return false;
358
359 // Remove all the rules from the parent class
360 filter.clear();
361
362 // Parse the file contents adding rules to the parent class
363 char buf[32];
364 while (readLine(buf, 32, fp)) {
365 if (buf[0] && strchr("+-?", buf[0])) {
366 filter.push_back(parsePattern(buf));
367 }
368 }
369
370 fclose(fp);
371 lastModTime = st.st_mtime;
372 }
373 return true;
374 }
375
376protected:
377
378 char *fileName;
379 time_t lastModTime;
380
381private:
382
383 //
384 // NOTE: we silently truncate long lines in this function.
385 //
386
387 bool readLine(char *buf, int bufSize, FILE *fp)
388 {
389 if (fp == NULL || buf == NULL || bufSize == 0)
390 return false;
391
392 if (fgets(buf, bufSize, fp) == NULL)
393 return false;
394
395 char *ptr = strchr(buf, '\n');
396 if (ptr != NULL) {
397 *ptr = '\0'; // remove newline at the end
398 } else {
399 if (!feof(fp)) {
400 int c;
401 do { // skip the rest of a long line
402 c = getc(fp);
403 } while (c != '\n' && c != EOF);
404 }
405 }
406 return true;
407 }
408
409};
410
411char* programName;
412
Constantin Kaplinsky2039d7b2008-06-04 10:43:10 +0000413static void printVersion(FILE *fp)
414{
Peter Ã…strand4eacc022009-02-27 10:12:14 +0000415 fprintf(fp, "TigerVNC Server version %s, built %s\n",
Constantin Kaplinskyea7b6502008-09-28 05:08:48 +0000416 PACKAGE_VERSION, buildtime);
Constantin Kaplinsky2039d7b2008-06-04 10:43:10 +0000417}
418
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000419static void usage()
420{
Constantin Kaplinsky2039d7b2008-06-04 10:43:10 +0000421 printVersion(stderr);
422 fprintf(stderr, "\nUsage: %s [<parameters>]\n", programName);
423 fprintf(stderr, " %s --version\n", programName);
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000424 fprintf(stderr,"\n"
425 "Parameters can be turned on with -<param> or off with -<param>=0\n"
426 "Parameters which take a value can be specified as "
427 "-<param> <value>\n"
428 "Other valid forms are <param>=<value> -<param>=<value> "
429 "--<param>=<value>\n"
430 "Parameter names are case-insensitive. The parameters are:\n\n");
431 Configuration::listParams(79, 14);
432 exit(1);
433}
434
435int main(int argc, char** argv)
436{
437 initStdIOLoggers();
438 LogWriter::setLogParams("*:stderr:30");
439
440 programName = argv[0];
441 Display* dpy;
442
Adam Tkacc58b3d12010-04-23 13:55:10 +0000443 Configuration::enableServerParams();
444
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000445 for (int i = 1; i < argc; i++) {
446 if (Configuration::setParam(argv[i]))
447 continue;
448
449 if (argv[i][0] == '-') {
450 if (i+1 < argc) {
451 if (Configuration::setParam(&argv[i][1], argv[i+1])) {
452 i++;
453 continue;
454 }
455 }
Constantin Kaplinsky2039d7b2008-06-04 10:43:10 +0000456 if (strcmp(argv[i], "-v") == 0 ||
457 strcmp(argv[i], "-version") == 0 ||
458 strcmp(argv[i], "--version") == 0) {
459 printVersion(stdout);
460 return 0;
461 }
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000462 usage();
463 }
464
465 usage();
466 }
467
468 CharArray dpyStr(displayname.getData());
469 if (!(dpy = XOpenDisplay(dpyStr.buf[0] ? dpyStr.buf : 0))) {
Constantin Kaplinsky7bdccd72008-08-20 06:22:28 +0000470 // FIXME: Why not vlog.error(...)?
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000471 fprintf(stderr,"%s: unable to open display \"%s\"\r\n",
Constantin Kaplinsky7bdccd72008-08-20 06:22:28 +0000472 programName, XDisplayName(dpyStr.buf));
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000473 exit(1);
474 }
475
476 signal(SIGHUP, CleanupSignalHandler);
477 signal(SIGINT, CleanupSignalHandler);
478 signal(SIGTERM, CleanupSignalHandler);
479
480 try {
481 TXWindow::init(dpy,"x0vncserver");
482 Geometry geo(DisplayWidth(dpy, DefaultScreen(dpy)),
483 DisplayHeight(dpy, DefaultScreen(dpy)));
Constantin Kaplinsky23c60222008-06-04 03:58:07 +0000484 if (geo.getRect().is_empty()) {
485 vlog.error("Exiting with error");
486 return 1;
487 }
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000488 XDesktop desktop(dpy, &geo);
Constantin Kaplinsky82328312008-04-24 08:44:24 +0000489
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000490 VNCServerST server("x0vncserver", &desktop);
491 QueryConnHandler qcHandler(dpy, &server);
492 server.setQueryConnectionHandler(&qcHandler);
493
Adam Tkac93ff5db2010-02-05 15:54:10 +0000494 TcpListener listener(NULL, (int)rfbport);
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000495 vlog.info("Listening on port %d", (int)rfbport);
496
Constantin Kaplinsky7bdccd72008-08-20 06:22:28 +0000497 const char *hostsData = hostsFile.getData();
498 FileTcpFilter fileTcpFilter(hostsData);
499 if (strlen(hostsData) != 0)
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000500 listener.setFilter(&fileTcpFilter);
Constantin Kaplinsky7bdccd72008-08-20 06:22:28 +0000501 delete[] hostsData;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000502
503 PollingScheduler sched((int)pollingCycle, (int)maxProcessorUsage);
504
505 while (!caughtSignal) {
506 struct timeval tv;
507 fd_set rfds;
508 std::list<Socket*> sockets;
509 std::list<Socket*>::iterator i;
510
511 // Process any incoming X events
512 TXWindow::handleXEvents(dpy);
513
514 FD_ZERO(&rfds);
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000515 FD_SET(ConnectionNumber(dpy), &rfds);
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000516 FD_SET(listener.getFd(), &rfds);
517 server.getSockets(&sockets);
518 int clients_connected = 0;
519 for (i = sockets.begin(); i != sockets.end(); i++) {
520 if ((*i)->isShutdown()) {
521 server.removeSocket(*i);
522 delete (*i);
523 } else {
524 FD_SET((*i)->getFd(), &rfds);
525 clients_connected++;
526 }
527 }
528
Constantin Kaplinsky813dbb42006-12-05 08:03:18 +0000529 if (!clients_connected)
530 sched.reset();
531
532 if (sched.isRunning()) {
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000533 int wait_ms = sched.millisRemaining();
534 if (wait_ms > 500) {
535 wait_ms = 500;
536 }
537 tv.tv_usec = wait_ms * 1000;
538#ifdef DEBUG
539 // fprintf(stderr, "[%d]\t", wait_ms);
540#endif
541 } else {
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000542 tv.tv_usec = 100000;
543 }
544 tv.tv_sec = 0;
545
546 // Do the wait...
547 sched.sleepStarted();
548 int n = select(FD_SETSIZE, &rfds, 0, 0, &tv);
549 sched.sleepFinished();
550
551 if (n < 0) {
552 if (errno == EINTR) {
553 vlog.debug("Interrupted select() system call");
554 continue;
555 } else {
556 throw rdr::SystemException("select", errno);
557 }
558 }
559
560 // Accept new VNC connections
561 if (FD_ISSET(listener.getFd(), &rfds)) {
562 Socket* sock = listener.accept();
563 if (sock) {
564 server.addSocket(sock);
565 } else {
566 vlog.status("Client connection rejected");
567 }
568 }
569
570 Timer::checkTimeouts();
571 server.checkTimeouts();
572
573 // Client list could have been changed.
574 server.getSockets(&sockets);
575
576 // Nothing more to do if there are no client connections.
577 if (sockets.empty())
578 continue;
579
580 // Process events on existing VNC connections
581 for (i = sockets.begin(); i != sockets.end(); i++) {
582 if (FD_ISSET((*i)->getFd(), &rfds))
583 server.processSocketEvent(*i);
584 }
585
586 if (desktop.isRunning() && sched.goodTimeToPoll()) {
587 sched.newPass();
588 desktop.poll();
589 }
590 }
591
592 } catch (rdr::Exception &e) {
Pierre Ossmanad8609a2012-04-26 09:04:14 +0000593 vlog.error("%s", e.str());
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000594 return 1;
595 }
596
Constantin Kaplinsky0c4306c2008-09-05 07:13:55 +0000597 TXWindow::handleXEvents(dpy);
598
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000599 vlog.info("Terminated");
600 return 0;
601}