Commit a5baf57b authored by runge's avatar runge

x11vnc: -cursor_drag for DnD, etc.

parent a255783e
2006-10-11 Karl Runge <runge@karlrunge.com>
* x11vnc: -cursor_drag for DnD, etc.
2006-09-23 Karl Runge <runge@karlrunge.com> 2006-09-23 Karl Runge <runge@karlrunge.com>
* Java viewer: improvements to connection response, faster * Java viewer: improvements to connection response, faster
connections. connections.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1447,7 +1447,9 @@ int get_which_cursor(void) { ...@@ -1447,7 +1447,9 @@ int get_which_cursor(void) {
if (drag_in_progress || button_mask) { if (drag_in_progress || button_mask) {
/* XXX not exactly what we want for menus */ /* XXX not exactly what we want for menus */
return -1; if (! cursor_drag_changes) {
return -1;
}
} }
if (!strcmp(multiple_cursors_mode, "arrow")) { if (!strcmp(multiple_cursors_mode, "arrow")) {
......
...@@ -1879,6 +1879,10 @@ void print_help(int mode) { ...@@ -1879,6 +1879,10 @@ void print_help(int mode) {
" extensions available. On Solaris and IRIX if XFIXES\n" " extensions available. On Solaris and IRIX if XFIXES\n"
" is not available, -overlay mode will be attempted.\n" " is not available, -overlay mode will be attempted.\n"
"\n" "\n"
"-cursor_drag Show cursor shape changes even when the mouse is being\n"
" dragged with a mouse button down. This is useful if you\n"
" want to be able to see Drag-and-Drop cursor icons, etc.\n"
"\n"
"-arrow n Choose an alternate \"arrow\" cursor from a set of\n" "-arrow n Choose an alternate \"arrow\" cursor from a set of\n"
" some common ones. n can be 1 to %d. Default is: %d\n" " some common ones. n can be 1 to %d. Default is: %d\n"
" Ignored when in XFIXES cursor-grabbing mode.\n" " Ignored when in XFIXES cursor-grabbing mode.\n"
...@@ -3133,6 +3137,8 @@ void print_help(int mode) { ...@@ -3133,6 +3137,8 @@ void print_help(int mode) {
" show_cursor enable showing a cursor.\n" " show_cursor enable showing a cursor.\n"
" noshow_cursor disable showing a cursor. (same as\n" " noshow_cursor disable showing a cursor. (same as\n"
" \"nocursor\")\n" " \"nocursor\")\n"
" cursor_drag enable cursor changes during drag.\n"
" nocursor_drag disable cursor changes during drag.\n"
" arrow:n set -arrow to alternate n.\n" " arrow:n set -arrow to alternate n.\n"
" xfixes enable xfixes cursor shape mode.\n" " xfixes enable xfixes cursor shape mode.\n"
" noxfixes disable xfixes cursor shape mode.\n" " noxfixes disable xfixes cursor shape mode.\n"
...@@ -3285,16 +3291,17 @@ void print_help(int mode) { ...@@ -3285,16 +3291,17 @@ void print_help(int mode) {
" listen lookup nolookup accept afteraccept gone shm\n" " listen lookup nolookup accept afteraccept gone shm\n"
" noshm flipbyteorder noflipbyteorder onetile noonetile\n" " noshm flipbyteorder noflipbyteorder onetile noonetile\n"
" solid_color solid nosolid blackout xinerama noxinerama\n" " solid_color solid nosolid blackout xinerama noxinerama\n"
" xtrap noxtrap xrandr noxrandr xrandr_mode rotate padgeom\n" " xtrap noxtrap xrandr noxrandr xrandr_mode rotate\n"
" quiet q noquiet modtweak nomodtweak xkb noxkb capslock\n" " padgeom quiet q noquiet modtweak nomodtweak xkb noxkb\n"
" nocapslock skip_lockkeys noskip_lockkeys skip_keycodes\n" " capslock nocapslock skip_lockkeys noskip_lockkeys\n"
" sloppy_keys nosloppy_keys skip_dups noskip_dups\n" " skip_keycodes sloppy_keys nosloppy_keys skip_dups\n"
" add_keysyms noadd_keysyms clear_mods noclear_mods\n" " noskip_dups add_keysyms noadd_keysyms clear_mods\n"
" clear_keys noclear_keys remap repeat norepeat fb nofb\n" " noclear_mods clear_keys noclear_keys remap repeat\n"
" bell nobell sel nosel primary noprimary setprimary\n" " norepeat fb nofb bell nobell sel nosel primary\n"
" nosetprimary clipboard noclipboard setclipboard\n" " noprimary setprimary nosetprimary clipboard noclipboard\n"
" nosetclipboard seldir cursorshape nocursorshape\n" " setclipboard nosetclipboard seldir cursorshape\n"
" cursorpos nocursorpos cursor show_cursor noshow_cursor\n" " nocursorshape cursorpos nocursorpos cursor_drag\n"
" nocursor_drag cursor show_cursor noshow_cursor\n"
" nocursor arrow xfixes noxfixes xdamage noxdamage\n" " nocursor arrow xfixes noxfixes xdamage noxdamage\n"
" xd_area xd_mem alphacut alphafrac alpharemove\n" " xd_area xd_mem alphacut alphafrac alpharemove\n"
" noalpharemove alphablend noalphablend xwarppointer\n" " noalpharemove alphablend noalphablend xwarppointer\n"
......
...@@ -158,6 +158,10 @@ int vnc_connect = 1; /* -vncconnect option */ ...@@ -158,6 +158,10 @@ int vnc_connect = 1; /* -vncconnect option */
int show_cursor = 1; /* show cursor shapes */ int show_cursor = 1; /* show cursor shapes */
int show_multiple_cursors = 0; /* show X when on root background, etc */ int show_multiple_cursors = 0; /* show X when on root background, etc */
char *multiple_cursors_mode = NULL; char *multiple_cursors_mode = NULL;
#ifndef CURSOR_DRAG
#define CURSOR_DRAG 0
#endif
int cursor_drag_changes = CURSOR_DRAG;
int cursor_pos_updates = 1; /* cursor position updates -cursorpos */ int cursor_pos_updates = 1; /* cursor position updates -cursorpos */
int cursor_shape_updates = 1; /* cursor shape updates -nocursorshape */ int cursor_shape_updates = 1; /* cursor shape updates -nocursorshape */
int use_xwarppointer = 0; /* use XWarpPointer instead of XTestFake... */ int use_xwarppointer = 0; /* use XWarpPointer instead of XTestFake... */
......
...@@ -133,6 +133,7 @@ extern int vnc_connect; ...@@ -133,6 +133,7 @@ extern int vnc_connect;
extern int show_cursor; extern int show_cursor;
extern int show_multiple_cursors; extern int show_multiple_cursors;
extern char *multiple_cursors_mode; extern char *multiple_cursors_mode;
extern int cursor_drag_changes;
extern int cursor_pos_updates; extern int cursor_pos_updates;
extern int cursor_shape_updates; extern int cursor_shape_updates;
extern int use_xwarppointer; extern int use_xwarppointer;
......
...@@ -2400,6 +2400,21 @@ char *process_remote_cmd(char *cmd, int stringonly) { ...@@ -2400,6 +2400,21 @@ char *process_remote_cmd(char *cmd, int stringonly) {
rfbLog("remote_cmd: turning off cursorpos mode.\n"); rfbLog("remote_cmd: turning off cursorpos mode.\n");
cursor_pos_updates = 0; cursor_pos_updates = 0;
} else if (!strcmp(p, "cursor_drag")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, cursor_drag_changes);
goto qry;
}
cursor_drag_changes = 1;
rfbLog("remote_cmd: setting cursor_drag_changes: %d.\n", cursor_drag_changes);
} else if (!strcmp(p, "nocursor_drag")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, !cursor_drag_changes);
goto qry;
}
cursor_drag_changes = 0;
rfbLog("remote_cmd: setting cursor_drag_changes: %d.\n", cursor_drag_changes);
} else if (strstr(p, "cursor") == p) { } else if (strstr(p, "cursor") == p) {
COLON_CHECK("cursor:") COLON_CHECK("cursor:")
if (query) { if (query) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.TH X11VNC "1" "October 2006" "x11vnc " "User Commands" .TH X11VNC "1" "October 2006" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.8.3, lastmod: 2006-10-07 version: 0.8.3, lastmod: 2006-10-11
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
...@@ -2196,6 +2196,12 @@ unless the display has overlay visuals or XFIXES ...@@ -2196,6 +2196,12 @@ unless the display has overlay visuals or XFIXES
extensions available. On Solaris and IRIX if XFIXES extensions available. On Solaris and IRIX if XFIXES
is not available, \fB-overlay\fR mode will be attempted. is not available, \fB-overlay\fR mode will be attempted.
.PP .PP
\fB-cursor_drag\fR
.IP
Show cursor shape changes even when the mouse is being
dragged with a mouse button down. This is useful if you
want to be able to see Drag-and-Drop cursor icons, etc.
.PP
\fB-arrow\fR \fIn\fR \fB-arrow\fR \fIn\fR
.IP .IP
Choose an alternate "arrow" cursor from a set of Choose an alternate "arrow" cursor from a set of
...@@ -3729,6 +3735,10 @@ show_cursor enable showing a cursor. ...@@ -3729,6 +3735,10 @@ show_cursor enable showing a cursor.
noshow_cursor disable showing a cursor. (same as noshow_cursor disable showing a cursor. (same as
"nocursor") "nocursor")
.IP .IP
cursor_drag enable cursor changes during drag.
.IP
nocursor_drag disable cursor changes during drag.
.IP
arrow:n set \fB-arrow\fR to alternate n. arrow:n set \fB-arrow\fR to alternate n.
.IP .IP
xfixes enable xfixes cursor shape mode. xfixes enable xfixes cursor shape mode.
...@@ -4000,16 +4010,17 @@ unlock connect allowonce allow localhost nolocalhost ...@@ -4000,16 +4010,17 @@ unlock connect allowonce allow localhost nolocalhost
listen lookup nolookup accept afteraccept gone shm listen lookup nolookup accept afteraccept gone shm
noshm flipbyteorder noflipbyteorder onetile noonetile noshm flipbyteorder noflipbyteorder onetile noonetile
solid_color solid nosolid blackout xinerama noxinerama solid_color solid nosolid blackout xinerama noxinerama
xtrap noxtrap xrandr noxrandr xrandr_mode rotate padgeom xtrap noxtrap xrandr noxrandr xrandr_mode rotate
quiet q noquiet modtweak nomodtweak xkb noxkb capslock padgeom quiet q noquiet modtweak nomodtweak xkb noxkb
nocapslock skip_lockkeys noskip_lockkeys skip_keycodes capslock nocapslock skip_lockkeys noskip_lockkeys
sloppy_keys nosloppy_keys skip_dups noskip_dups skip_keycodes sloppy_keys nosloppy_keys skip_dups
add_keysyms noadd_keysyms clear_mods noclear_mods noskip_dups add_keysyms noadd_keysyms clear_mods
clear_keys noclear_keys remap repeat norepeat fb nofb noclear_mods clear_keys noclear_keys remap repeat
bell nobell sel nosel primary noprimary setprimary norepeat fb nofb bell nobell sel nosel primary
nosetprimary clipboard noclipboard setclipboard noprimary setprimary nosetprimary clipboard noclipboard
nosetclipboard seldir cursorshape nocursorshape setclipboard nosetclipboard seldir cursorshape
cursorpos nocursorpos cursor show_cursor noshow_cursor nocursorshape cursorpos nocursorpos cursor_drag
nocursor_drag cursor show_cursor noshow_cursor
nocursor arrow xfixes noxfixes xdamage noxdamage nocursor arrow xfixes noxfixes xdamage noxdamage
xd_area xd_mem alphacut alphafrac alpharemove xd_area xd_mem alphacut alphafrac alpharemove
noalpharemove alphablend noalphablend xwarppointer noalpharemove alphablend noalphablend xwarppointer
......
...@@ -2048,6 +2048,10 @@ int main(int argc, char* argv[]) { ...@@ -2048,6 +2048,10 @@ int main(int argc, char* argv[]) {
} else if (!strcmp(arg, "-nocursor")) { } else if (!strcmp(arg, "-nocursor")) {
multiple_cursors_mode = strdup("none"); multiple_cursors_mode = strdup("none");
show_cursor = 0; show_cursor = 0;
} else if (!strcmp(arg, "-cursor_drag")) {
cursor_drag_changes = 1;
} else if (!strcmp(arg, "-nocursor_drag")) {
cursor_drag_changes = 0;
} else if (!strcmp(arg, "-arrow")) { } else if (!strcmp(arg, "-arrow")) {
CHECK_ARGC CHECK_ARGC
alt_arrow = atoi(argv[++i]); alt_arrow = atoi(argv[++i]);
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
* -DPASSWD_REQUIRED=1 exit unless a password is supplied. * -DPASSWD_REQUIRED=1 exit unless a password is supplied.
* -DPASSWD_UNLESS_NOPW=1 exit unless a password is supplied and no -nopw. * -DPASSWD_UNLESS_NOPW=1 exit unless a password is supplied and no -nopw.
* *
* -DCURSOR_DRAG=1 to have -cursor_drag as the default.
* -DWIREFRAME=0 to have -nowireframe as the default. * -DWIREFRAME=0 to have -nowireframe as the default.
* -DWIREFRAME_COPYRECT=0 to have -nowirecopyrect as the default. * -DWIREFRAME_COPYRECT=0 to have -nowirecopyrect as the default.
* -DWIREFRAME_PARMS=... set default -wirecopyrect parameters. * -DWIREFRAME_PARMS=... set default -wirecopyrect parameters.
......
...@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0; ...@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.8.3 lastmod: 2006-10-07"; char lastmod[] = "0.8.3 lastmod: 2006-10-11";
/* X display info */ /* X display info */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment