blob: f2067fba07a2d1b41675907266589dfb285ab6cd [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 Ossmana7b728a2014-06-13 10:56:59 +0000138class XDesktop : public SDesktop, public ColourMap, 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.
Constantin Kaplinskyf773a8e2008-06-04 04:30:10 +0000202 pb = new XPixelBuffer(dpy, factory, geometry->getRect(), this);
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;
290#endif
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000291 }
292
293protected:
294 Display* dpy;
295 Geometry* geometry;
Constantin Kaplinsky2c019832008-05-30 11:02:04 +0000296 XPixelBuffer* pb;
Constantin Kaplinskyc341ac62008-08-21 03:35:08 +0000297 VNCServerST* server;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000298 int oldButtonMask;
299 bool haveXtest;
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000300 bool haveDamage;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000301 int maxButtons;
302 bool running;
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000303#ifdef HAVE_XDAMAGE
304 Damage damage;
305 int xdamageEventBase;
306#endif
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000307};
308
309
310class FileTcpFilter : public TcpFilter
311{
312
313public:
314
315 FileTcpFilter(const char *fname)
316 : TcpFilter("-"), fileName(NULL), lastModTime(0)
317 {
318 if (fname != NULL)
319 fileName = strdup((char *)fname);
320 }
321
322 virtual ~FileTcpFilter()
323 {
324 if (fileName != NULL)
325 free(fileName);
326 }
327
328 virtual bool verifyConnection(Socket* s)
329 {
330 if (!reloadRules()) {
331 vlog.error("Could not read IP filtering rules: rejecting all clients");
332 filter.clear();
333 filter.push_back(parsePattern("-"));
334 return false;
335 }
336
337 return TcpFilter::verifyConnection(s);
338 }
339
340protected:
341
342 bool reloadRules()
343 {
344 if (fileName == NULL)
345 return true;
346
347 struct stat st;
348 if (stat(fileName, &st) != 0)
349 return false;
350
351 if (st.st_mtime != lastModTime) {
352 // Actually reload only if the file was modified
353 FILE *fp = fopen(fileName, "r");
354 if (fp == NULL)
355 return false;
356
357 // Remove all the rules from the parent class
358 filter.clear();
359
360 // Parse the file contents adding rules to the parent class
361 char buf[32];
362 while (readLine(buf, 32, fp)) {
363 if (buf[0] && strchr("+-?", buf[0])) {
364 filter.push_back(parsePattern(buf));
365 }
366 }
367
368 fclose(fp);
369 lastModTime = st.st_mtime;
370 }
371 return true;
372 }
373
374protected:
375
376 char *fileName;
377 time_t lastModTime;
378
379private:
380
381 //
382 // NOTE: we silently truncate long lines in this function.
383 //
384
385 bool readLine(char *buf, int bufSize, FILE *fp)
386 {
387 if (fp == NULL || buf == NULL || bufSize == 0)
388 return false;
389
390 if (fgets(buf, bufSize, fp) == NULL)
391 return false;
392
393 char *ptr = strchr(buf, '\n');
394 if (ptr != NULL) {
395 *ptr = '\0'; // remove newline at the end
396 } else {
397 if (!feof(fp)) {
398 int c;
399 do { // skip the rest of a long line
400 c = getc(fp);
401 } while (c != '\n' && c != EOF);
402 }
403 }
404 return true;
405 }
406
407};
408
409char* programName;
410
Constantin Kaplinsky2039d7b2008-06-04 10:43:10 +0000411static void printVersion(FILE *fp)
412{
Peter Ã…strand4eacc022009-02-27 10:12:14 +0000413 fprintf(fp, "TigerVNC Server version %s, built %s\n",
Constantin Kaplinskyea7b6502008-09-28 05:08:48 +0000414 PACKAGE_VERSION, buildtime);
Constantin Kaplinsky2039d7b2008-06-04 10:43:10 +0000415}
416
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000417static void usage()
418{
Constantin Kaplinsky2039d7b2008-06-04 10:43:10 +0000419 printVersion(stderr);
420 fprintf(stderr, "\nUsage: %s [<parameters>]\n", programName);
421 fprintf(stderr, " %s --version\n", programName);
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000422 fprintf(stderr,"\n"
423 "Parameters can be turned on with -<param> or off with -<param>=0\n"
424 "Parameters which take a value can be specified as "
425 "-<param> <value>\n"
426 "Other valid forms are <param>=<value> -<param>=<value> "
427 "--<param>=<value>\n"
428 "Parameter names are case-insensitive. The parameters are:\n\n");
429 Configuration::listParams(79, 14);
430 exit(1);
431}
432
433int main(int argc, char** argv)
434{
435 initStdIOLoggers();
436 LogWriter::setLogParams("*:stderr:30");
437
438 programName = argv[0];
439 Display* dpy;
440
Adam Tkacc58b3d12010-04-23 13:55:10 +0000441 Configuration::enableServerParams();
442
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000443 for (int i = 1; i < argc; i++) {
444 if (Configuration::setParam(argv[i]))
445 continue;
446
447 if (argv[i][0] == '-') {
448 if (i+1 < argc) {
449 if (Configuration::setParam(&argv[i][1], argv[i+1])) {
450 i++;
451 continue;
452 }
453 }
Constantin Kaplinsky2039d7b2008-06-04 10:43:10 +0000454 if (strcmp(argv[i], "-v") == 0 ||
455 strcmp(argv[i], "-version") == 0 ||
456 strcmp(argv[i], "--version") == 0) {
457 printVersion(stdout);
458 return 0;
459 }
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000460 usage();
461 }
462
463 usage();
464 }
465
466 CharArray dpyStr(displayname.getData());
467 if (!(dpy = XOpenDisplay(dpyStr.buf[0] ? dpyStr.buf : 0))) {
Constantin Kaplinsky7bdccd72008-08-20 06:22:28 +0000468 // FIXME: Why not vlog.error(...)?
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000469 fprintf(stderr,"%s: unable to open display \"%s\"\r\n",
Constantin Kaplinsky7bdccd72008-08-20 06:22:28 +0000470 programName, XDisplayName(dpyStr.buf));
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000471 exit(1);
472 }
473
474 signal(SIGHUP, CleanupSignalHandler);
475 signal(SIGINT, CleanupSignalHandler);
476 signal(SIGTERM, CleanupSignalHandler);
477
478 try {
479 TXWindow::init(dpy,"x0vncserver");
480 Geometry geo(DisplayWidth(dpy, DefaultScreen(dpy)),
481 DisplayHeight(dpy, DefaultScreen(dpy)));
Constantin Kaplinsky23c60222008-06-04 03:58:07 +0000482 if (geo.getRect().is_empty()) {
483 vlog.error("Exiting with error");
484 return 1;
485 }
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000486 XDesktop desktop(dpy, &geo);
Constantin Kaplinsky82328312008-04-24 08:44:24 +0000487
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000488 VNCServerST server("x0vncserver", &desktop);
489 QueryConnHandler qcHandler(dpy, &server);
490 server.setQueryConnectionHandler(&qcHandler);
491
Adam Tkac93ff5db2010-02-05 15:54:10 +0000492 TcpListener listener(NULL, (int)rfbport);
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000493 vlog.info("Listening on port %d", (int)rfbport);
494
Constantin Kaplinsky7bdccd72008-08-20 06:22:28 +0000495 const char *hostsData = hostsFile.getData();
496 FileTcpFilter fileTcpFilter(hostsData);
497 if (strlen(hostsData) != 0)
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000498 listener.setFilter(&fileTcpFilter);
Constantin Kaplinsky7bdccd72008-08-20 06:22:28 +0000499 delete[] hostsData;
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000500
501 PollingScheduler sched((int)pollingCycle, (int)maxProcessorUsage);
502
503 while (!caughtSignal) {
504 struct timeval tv;
505 fd_set rfds;
506 std::list<Socket*> sockets;
507 std::list<Socket*>::iterator i;
508
509 // Process any incoming X events
510 TXWindow::handleXEvents(dpy);
511
512 FD_ZERO(&rfds);
Pierre Ossmana7b728a2014-06-13 10:56:59 +0000513 FD_SET(ConnectionNumber(dpy), &rfds);
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000514 FD_SET(listener.getFd(), &rfds);
515 server.getSockets(&sockets);
516 int clients_connected = 0;
517 for (i = sockets.begin(); i != sockets.end(); i++) {
518 if ((*i)->isShutdown()) {
519 server.removeSocket(*i);
520 delete (*i);
521 } else {
522 FD_SET((*i)->getFd(), &rfds);
523 clients_connected++;
524 }
525 }
526
Constantin Kaplinsky813dbb42006-12-05 08:03:18 +0000527 if (!clients_connected)
528 sched.reset();
529
530 if (sched.isRunning()) {
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000531 int wait_ms = sched.millisRemaining();
532 if (wait_ms > 500) {
533 wait_ms = 500;
534 }
535 tv.tv_usec = wait_ms * 1000;
536#ifdef DEBUG
537 // fprintf(stderr, "[%d]\t", wait_ms);
538#endif
539 } else {
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000540 tv.tv_usec = 100000;
541 }
542 tv.tv_sec = 0;
543
544 // Do the wait...
545 sched.sleepStarted();
546 int n = select(FD_SETSIZE, &rfds, 0, 0, &tv);
547 sched.sleepFinished();
548
549 if (n < 0) {
550 if (errno == EINTR) {
551 vlog.debug("Interrupted select() system call");
552 continue;
553 } else {
554 throw rdr::SystemException("select", errno);
555 }
556 }
557
558 // Accept new VNC connections
559 if (FD_ISSET(listener.getFd(), &rfds)) {
560 Socket* sock = listener.accept();
561 if (sock) {
562 server.addSocket(sock);
563 } else {
564 vlog.status("Client connection rejected");
565 }
566 }
567
568 Timer::checkTimeouts();
569 server.checkTimeouts();
570
571 // Client list could have been changed.
572 server.getSockets(&sockets);
573
574 // Nothing more to do if there are no client connections.
575 if (sockets.empty())
576 continue;
577
578 // Process events on existing VNC connections
579 for (i = sockets.begin(); i != sockets.end(); i++) {
580 if (FD_ISSET((*i)->getFd(), &rfds))
581 server.processSocketEvent(*i);
582 }
583
584 if (desktop.isRunning() && sched.goodTimeToPoll()) {
585 sched.newPass();
586 desktop.poll();
587 }
588 }
589
590 } catch (rdr::Exception &e) {
Pierre Ossmanad8609a2012-04-26 09:04:14 +0000591 vlog.error("%s", e.str());
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000592 return 1;
593 }
594
Constantin Kaplinsky0c4306c2008-09-05 07:13:55 +0000595 TXWindow::handleXEvents(dpy);
596
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000597 vlog.info("Terminated");
598 return 0;
599}