|
a/src/utils/x11mon.cpp |
|
b/src/utils/x11mon.cpp |
1 |
#ifndef TEST_X11MON
|
1 |
#ifndef TEST_X11MON
|
2 |
#ifndef lint
|
2 |
#ifndef lint
|
3 |
static char rcsid[] = "@(#$Id: x11mon.cpp,v 1.1 2006-12-23 12:23:15 dockes Exp $ (C) 2006 J.F.Dockes";
|
3 |
static char rcsid[] = "@(#$Id: x11mon.cpp,v 1.1 2006-12-23 12:23:15 dockes Exp $ (C) 2006 J.F.Dockes";
|
4 |
#endif
|
4 |
#endif
|
5 |
// Poll state of X11 connectibility (to detect end of user session).
|
5 |
// Poll state of X11 connectibility (to detect end of user session).
|
6 |
|
6 |
#include "autoconfig.h"
|
|
|
7 |
#ifndef WITHOUT_X11
|
7 |
#include <stdio.h>
|
8 |
#include <stdio.h>
|
8 |
#include <X11/Xlib.h>
|
9 |
#include <X11/Xlib.h>
|
9 |
#include <signal.h>
|
10 |
#include <signal.h>
|
10 |
#include <setjmp.h>
|
11 |
#include <setjmp.h>
|
11 |
|
12 |
|
|
... |
|
... |
56 |
bool sync= XSynchronize(m_display, true);
|
57 |
bool sync= XSynchronize(m_display, true);
|
57 |
XNoOp(m_display);
|
58 |
XNoOp(m_display);
|
58 |
XSynchronize(m_display, sync);
|
59 |
XSynchronize(m_display, sync);
|
59 |
return m_ok;
|
60 |
return m_ok;
|
60 |
}
|
61 |
}
|
61 |
|
62 |
#else
|
|
|
63 |
bool x11IsAlive()
|
|
|
64 |
{
|
|
|
65 |
return true;
|
|
|
66 |
}
|
|
|
67 |
#endif /* WITHOUT_X11 */
|
62 |
|
68 |
|
63 |
#else
|
69 |
#else
|
64 |
|
70 |
|
65 |
// Test driver
|
71 |
// Test driver
|
66 |
|
72 |
|