diff options
author | runge <runge> | 2006-03-08 17:52:23 +0000 |
---|---|---|
committer | runge <runge> | 2006-03-08 17:52:23 +0000 |
commit | 5e72609631a1893acfe6a31d0129553ed3044a20 (patch) | |
tree | b75197718dc94f26c56cdfbb39d069c79f1cd767 /x11vnc/remote.c | |
parent | c997e901c4c268438d063a78bdb121b8f5e8d585 (diff) | |
download | libtdevnc-5e72609631a1893acfe6a31d0129553ed3044a20.tar.gz libtdevnc-5e72609631a1893acfe6a31d0129553ed3044a20.zip |
x11vnc: do CLIPBOARD, reverse conn require passwds, -usepw, -debug_sel, -storepasswd homedir.
Diffstat (limited to 'x11vnc/remote.c')
-rw-r--r-- | x11vnc/remote.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/x11vnc/remote.c b/x11vnc/remote.c index 30e9a5b..7fd315a 100644 --- a/x11vnc/remote.c +++ b/x11vnc/remote.c @@ -22,6 +22,7 @@ #include "cursor.h" #include "userinput.h" #include "keyboard.h" +#include "selection.h" int send_remote_cmd(char *cmd, int query, int wait); int do_remote_query(char *remote_cmd, char *query_cmd, int remote_sync, @@ -2116,6 +2117,7 @@ char *process_remote_cmd(char *cmd, int stringonly) { rfbLog("remote_cmd: enabling watch selection+primary.\n"); watch_selection = 1; watch_primary = 1; + watch_clipboard = 1; } else if (!strcmp(p, "nosel")) { if (query) { @@ -2125,6 +2127,7 @@ char *process_remote_cmd(char *cmd, int stringonly) { rfbLog("remote_cmd: disabling watch selection+primary.\n"); watch_selection = 0; watch_primary = 0; + watch_clipboard = 0; } else if (!strcmp(p, "primary")) { if (query) { @@ -2142,6 +2145,54 @@ char *process_remote_cmd(char *cmd, int stringonly) { rfbLog("remote_cmd: disabling watch_primary.\n"); watch_primary = 0; + } else if (!strcmp(p, "setprimary")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, set_primary); + goto qry; + } + rfbLog("remote_cmd: enabling set_primary.\n"); + set_primary = 1; + + } else if (!strcmp(p, "nosetprimary")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, !set_primary); + goto qry; + } + rfbLog("remote_cmd: disabling set_primary.\n"); + set_primary = 0; + + } else if (!strcmp(p, "clipboard")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, watch_clipboard); + goto qry; + } + rfbLog("remote_cmd: enabling watch_clipboard.\n"); + watch_clipboard = 1; + + } else if (!strcmp(p, "noclipboard")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, !watch_clipboard); + goto qry; + } + rfbLog("remote_cmd: disabling watch_clipboard.\n"); + watch_clipboard = 0; + + } else if (!strcmp(p, "setclipboard")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, set_clipboard); + goto qry; + } + rfbLog("remote_cmd: enabling set_clipboard.\n"); + set_clipboard = 1; + + } else if (!strcmp(p, "nosetclipboard")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, !set_clipboard); + goto qry; + } + rfbLog("remote_cmd: disabling set_clipboard.\n"); + set_clipboard = 0; + } else if (strstr(p, "seldir") == p) { COLON_CHECK("seldir:") if (query) { @@ -3501,6 +3552,21 @@ char *process_remote_cmd(char *cmd, int stringonly) { debug_grabs = 0; rfbLog("set debug_grabs to: %d\n", debug_grabs); + } else if (!strcmp(p, "debug_sel")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, debug_sel); + goto qry; + } + debug_sel = 1; + rfbLog("set debug_sel to: %d\n", debug_sel); + } else if (!strcmp(p, "nodebug_sel")) { + if (query) { + snprintf(buf, bufn, "ans=%s:%d", p, !debug_sel); + goto qry; + } + debug_sel = 0; + rfbLog("set debug_sel to: %d\n", debug_sel); + } else if (!strcmp(p, "dbg")) { if (query) { snprintf(buf, bufn, "ans=%s:%d", p, crash_debug); |