summaryrefslogtreecommitdiffstats
path: root/x11vnc/xevents.c
diff options
context:
space:
mode:
authorrunge <runge>2007-08-04 00:53:38 +0000
committerrunge <runge>2007-08-04 00:53:38 +0000
commit338301c1883da09e99647826c73db817bc984366 (patch)
tree46c8b0f53fe4b5d75220fef639193f62232832d9 /x11vnc/xevents.c
parent0f162f1f0b462a5b088c57ef3461dd7ecbf24d13 (diff)
downloadlibvncserver-338301c1883da09e99647826c73db817bc984366.zip
libvncserver-338301c1883da09e99647826c73db817bc984366.tar.gz
x11vnc: -xrefresh, .DCOPserver bug, -unixpw_unsafe ignores SSH tunnel.
Diffstat (limited to 'x11vnc/xevents.c')
-rw-r--r--x11vnc/xevents.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/x11vnc/xevents.c b/x11vnc/xevents.c
index 002dd99..101bd32 100644
--- a/x11vnc/xevents.c
+++ b/x11vnc/xevents.c
@@ -792,6 +792,7 @@ void check_xevents(int reset) {
static time_t last_time_sync = 0;
time_t now = time(NULL);
static double last_request = 0.0;
+ static double last_xrefresh = 0.0;
XErrorHandler old_handler;
if (unixpw_in_progress) return;
@@ -836,6 +837,31 @@ void check_xevents(int reset) {
}
}
+ if (have_clients && xrefresh > 0.0 && dnow() > last_xrefresh + xrefresh) {
+ XSetWindowAttributes swa;
+ Visual visual;
+ Window xrf;
+ unsigned long mask;
+
+ swa.override_redirect = True;
+ swa.backing_store = NotUseful;
+ swa.save_under = False;
+ swa.background_pixmap = None;
+ visual.visualid = CopyFromParent;
+ mask = (CWOverrideRedirect|CWBackingStore|CWSaveUnder|CWBackPixmap);
+
+ xrf = XCreateWindow(dpy, window, coff_x, coff_y, dpy_x, dpy_y, 0, CopyFromParent,
+ InputOutput, &visual, mask, &swa);
+ if (xrf != None) {
+ if (0) fprintf(stderr, "XCreateWindow(%d, %d, %d, %d) 0x%lx\n", coff_x, coff_y, dpy_x, dpy_y, xrf);
+ XMapWindow(dpy, xrf);
+ XFlush_wr(dpy);
+ XDestroyWindow(dpy, xrf);
+ XFlush_wr(dpy);
+ }
+ last_xrefresh = dnow();
+ }
+
if (now > last_call+1) {
/* we only check these once a second or so. */
int n = 0;
OpenPOWER on IntegriCloud