diff --git a/src/help.c b/src/help.c index 4178f8b..39243b0 100644 --- a/src/help.c +++ b/src/help.c @@ -4111,7 +4111,7 @@ void print_help(int mode) { " with a long build running in it continuously streaming\n" " text output. By default x11vnc will try to detect this\n" " (3 screen polls in a row each longer than 0.25 sec with\n" -" no user input), and sleep up to 1.5 secs to let things\n" +" no user input), and sleep up to 100 ms to let things\n" " \"catch up\". Use this option to disable that detection.\n" "-slow_fb time Floating point time in seconds to delay all screen\n" " polling. For special purpose usage where a low frame\n" diff --git a/src/screen.c b/src/screen.c index 203e55a..7392ec1 100644 --- a/src/screen.c +++ b/src/screen.c @@ -4417,8 +4417,8 @@ if (0 && dt > 0.0) fprintf(stderr, "dt: %.5f %.4f\n", dt, dnowx()); msec = 1.5 * msec; set_xdamage_mark(0, 0, dpy_x, dpy_y); } - if (msec > 1500) { - msec = 1500; + if (msec > 100) { + msec = 100; } if (msec < waitms) { msec = waitms; diff --git a/src/selection.c b/src/selection.c index a334586..2b71d8a 100644 --- a/src/selection.c +++ b/src/selection.c @@ -182,7 +182,7 @@ void selection_request(XEvent *ev, char *type) { ret = XChangeProperty(ev->xselectionrequest.display, ev->xselectionrequest.requestor, ev->xselectionrequest.property, - ev->xselectionrequest.target, 32, PropModeReplace, + XA_ATOM, 32, PropModeReplace, (unsigned char *) targets, 2); if (debug_sel) { rfbLog("TARGETS: XChangeProperty() -> %d -- sz1: %d sz2: %d\n", diff --git a/src/xevents.c b/src/xevents.c index 7655ca3..0c72aee 100644 --- a/src/xevents.c +++ b/src/xevents.c @@ -1787,7 +1787,7 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) { X_LOCK; /* associate this text with PRIMARY (and SECONDARY...) */ - if (set_primary && ! own_primary && selwin != None) { + if (set_primary && selwin != None) { own_primary = 1; /* we need to grab the PRIMARY selection */ XSetSelectionOwner(dpy, XA_PRIMARY, selwin, CurrentTime); @@ -1797,7 +1797,7 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) { } } - if (set_clipboard && ! own_clipboard && clipboard_atom != None && selwin != None) { + if (set_clipboard && clipboard_atom != None && selwin != None) { own_clipboard = 1; /* we need to grab the CLIPBOARD selection */ XSetSelectionOwner(dpy, clipboard_atom, selwin, CurrentTime);