Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix clipboard sync from client to server #255

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/help.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/selection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/xevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down