From 88c3bc66450281c6d1599e5b2cfd9ec334cdfb83 Mon Sep 17 00:00:00 2001
From: runge <runge>
Date: Mon, 20 Dec 2004 15:46:51 +0000
Subject:  x11vnc: minor tweaks for 0.7 file release

---
 x11vnc/README     |  5 ++---
 x11vnc/tkx11vnc   | 37 +++++++++++++++++++++++++++++++++++--
 x11vnc/tkx11vnc.h | 37 +++++++++++++++++++++++++++++++++++--
 x11vnc/x11vnc.1   |  2 +-
 x11vnc/x11vnc.c   |  6 +-----
 5 files changed, 74 insertions(+), 13 deletions(-)

diff --git a/x11vnc/README b/x11vnc/README
index 7a0394a..8e9a89b 100644
--- a/x11vnc/README
+++ b/x11vnc/README
@@ -1,5 +1,5 @@
 
-x11vnc README file                         Date: Sun Dec 19 23:34:22 EST 2004
+x11vnc README file                         Date: Mon Dec 20 11:34:56 EST 2004
 
 The following information is taken from these URLs:
 
@@ -2701,8 +2701,7 @@ x11vnc: a VNC server for real X displays
    Here are all of x11vnc command line options:
 % x11vnc -help
 
-x11vnc: allow VNC connections to real X11 displays. 0.6.3pre lastmod: 2004-12-1
-9
+x11vnc: allow VNC connections to real X11 displays. 0.7pre lastmod: 2004-12-20
 
 Typical usage is:
 
diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc
index fcdf369..b32598f 100755
--- a/x11vnc/tkx11vnc
+++ b/x11vnc/tkx11vnc
@@ -168,6 +168,7 @@ Debugging
 	=F logfile:
 	quiet
 	--
+	=GA show-start-cmd
 	=G debug_gui
 
 Permissions
@@ -232,6 +233,14 @@ proc set_internal_help {} {
 Launch x11vnc with the settings you have prescribed in the gui.
 The x11vnc process is started in an xterm window so you can see the
 output, kill it, etc.
+"
+
+	set helptext(show-start-cmd) "
+Displays in the text area what the x11vnc start command (i.e. the command
+run by \"Actions -> start\") looks like for the current values of the
+settings.  This can be done even in the attached state.  Intended for
+debugging the gui.  The help item for \"Actions -> start\" gives the
+same info.
 "
 
 	set helptext(debug_gui) "
@@ -541,6 +550,9 @@ proc help_win {item} {
 		set str [get_start_x11vnc_txt]
 		append text $str
 		append_text "$str\n"
+		append text "\nPossible \$HOME/.x11vncrc settings for this command:\n\n"
+		set rctxt [get_start_x11vnc_cmd 1]
+		append text "$rctxt\n"
 	}
 
 	regsub -all { } $item " " name
@@ -1391,6 +1403,9 @@ proc do_action {item} {
 	} elseif {$item == "clear-all"} {
 		clear_all
 		return
+	} elseif {$item == "show-start-cmd"} {
+		show_start_cmd
+		return
 	} elseif {$item == "all-settings"} {
 		show_all_settings
 		return
@@ -2080,7 +2095,12 @@ proc get_start_x11vnc_txt {} {
 	return $msg
 }
 
-proc get_start_x11vnc_cmd {} {
+proc show_start_cmd {} {
+	set msg [get_start_x11vnc_txt]
+	append_text "$msg\n"
+}
+
+proc get_start_x11vnc_cmd {{show_rc 0}} {
 	global menu_var unset_str x11vnc_prog
 
 	set xterm_cmd "xterm -iconic -geometry 80x35 -title x11vnc-console -e"
@@ -2089,6 +2109,8 @@ proc get_start_x11vnc_cmd {} {
 
 	lappend cmd $x11vnc_prog
 
+	set rc_txt ""
+
 	set saw_id 0
 
 	foreach item [lsort [array names menu_var]] {
@@ -2119,11 +2141,15 @@ proc get_start_x11vnc_cmd {} {
 		if {$item == "dontdisconnect" && $menu_var($item) == "-1"} {
 			continue
 		}
+		if {$item == "alwaysshared" && $menu_var($item) == "-1"} {
+			continue
+		}
 
 		if {[value_is_bool $item]} {
 			if {[info exists menu_var($item)]} {
 				if {$menu_var($item)} {
 					lappend cmd "-$item"
+					append rc_txt "-$item\n"
 				}
 			}
 		} elseif {[value_is_string $item]} {
@@ -2133,9 +2159,12 @@ proc get_start_x11vnc_cmd {} {
 					set nitem $item
 					if {$nitem == "screen_blank"} {
 						set nitem "sb"
+					} elseif {$nitem == "xrandr_mode"} {
+						set nitem "xrandr"
 					}
 					lappend cmd "-$nitem"
 					lappend cmd $menu_var($item)
+					append rc_txt "-$nitem $menu_var($item)\n"
 				}
 			}
 		}
@@ -2144,7 +2173,11 @@ proc get_start_x11vnc_cmd {} {
 	lappend cmd "/dev/null"
 	lappend cmd "&"
 	
-	return $cmd
+	if {$show_rc} {
+		return $rc_txt
+	} else {
+		return $cmd
+	}
 }
 
 proc start_x11vnc {} {
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index 63db7dd..0f442a2 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -174,6 +174,7 @@
 "	=F logfile:\n"
 "	quiet\n"
 "	--\n"
+"	=GA show-start-cmd\n"
 "	=G debug_gui\n"
 "\n"
 "Permissions\n"
@@ -240,6 +241,14 @@
 "output, kill it, etc.\n"
 "\"\n"
 "\n"
+"	set helptext(show-start-cmd) \"\n"
+"Displays in the text area what the x11vnc start command (i.e. the command\n"
+"run by \\\"Actions -> start\\\") looks like for the current values of the\n"
+"settings.  This can be done even in the attached state.  Intended for\n"
+"debugging the gui.  The help item for \\\"Actions -> start\\\" gives the\n"
+"same info.\n"
+"\"\n"
+"\n"
 "	set helptext(debug_gui) \"\n"
 "Set debug_gui to get more output printed in the text area.\n"
 "\"\n"
@@ -547,6 +556,9 @@
 "		set str [get_start_x11vnc_txt]\n"
 "		append text $str\n"
 "		append_text \"$str\\n\"\n"
+"		append text \"\\nPossible \\$HOME/.x11vncrc settings for this command:\\n\\n\"\n"
+"		set rctxt [get_start_x11vnc_cmd 1]\n"
+"		append text \"$rctxt\\n\"\n"
 "	}\n"
 "\n"
 "	regsub -all { } $item \" \" name\n"
@@ -1397,6 +1409,9 @@
 "	} elseif {$item == \"clear-all\"} {\n"
 "		clear_all\n"
 "		return\n"
+"	} elseif {$item == \"show-start-cmd\"} {\n"
+"		show_start_cmd\n"
+"		return\n"
 "	} elseif {$item == \"all-settings\"} {\n"
 "		show_all_settings\n"
 "		return\n"
@@ -2086,7 +2101,12 @@
 "	return $msg\n"
 "}\n"
 "\n"
-"proc get_start_x11vnc_cmd {} {\n"
+"proc show_start_cmd {} {\n"
+"	set msg [get_start_x11vnc_txt]\n"
+"	append_text \"$msg\\n\"\n"
+"}\n"
+"\n"
+"proc get_start_x11vnc_cmd {{show_rc 0}} {\n"
 "	global menu_var unset_str x11vnc_prog\n"
 "\n"
 "	set xterm_cmd \"xterm -iconic -geometry 80x35 -title x11vnc-console -e\"\n"
@@ -2095,6 +2115,8 @@
 "\n"
 "	lappend cmd $x11vnc_prog\n"
 "\n"
+"	set rc_txt \"\"\n"
+"\n"
 "	set saw_id 0\n"
 "\n"
 "	foreach item [lsort [array names menu_var]] {\n"
@@ -2125,11 +2147,15 @@
 "		if {$item == \"dontdisconnect\" && $menu_var($item) == \"-1\"} {\n"
 "			continue\n"
 "		}\n"
+"		if {$item == \"alwaysshared\" && $menu_var($item) == \"-1\"} {\n"
+"			continue\n"
+"		}\n"
 "\n"
 "		if {[value_is_bool $item]} {\n"
 "			if {[info exists menu_var($item)]} {\n"
 "				if {$menu_var($item)} {\n"
 "					lappend cmd \"-$item\"\n"
+"					append rc_txt \"-$item\\n\"\n"
 "				}\n"
 "			}\n"
 "		} elseif {[value_is_string $item]} {\n"
@@ -2139,9 +2165,12 @@
 "					set nitem $item\n"
 "					if {$nitem == \"screen_blank\"} {\n"
 "						set nitem \"sb\"\n"
+"					} elseif {$nitem == \"xrandr_mode\"} {\n"
+"						set nitem \"xrandr\"\n"
 "					}\n"
 "					lappend cmd \"-$nitem\"\n"
 "					lappend cmd $menu_var($item)\n"
+"					append rc_txt \"-$nitem $menu_var($item)\\n\"\n"
 "				}\n"
 "			}\n"
 "		}\n"
@@ -2150,7 +2179,11 @@
 "	lappend cmd \"/dev/null\"\n"
 "	lappend cmd \"&\"\n"
 "	\n"
-"	return $cmd\n"
+"	if {$show_rc} {\n"
+"		return $rc_txt\n"
+"	} else {\n"
+"		return $cmd\n"
+"	}\n"
 "}\n"
 "\n"
 "proc start_x11vnc {} {\n"
diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1
index 27441cb..abf7273 100644
--- a/x11vnc/x11vnc.1
+++ b/x11vnc/x11vnc.1
@@ -2,7 +2,7 @@
 .TH X11VNC "1" "December 2004" "x11vnc " "User Commands"
 .SH NAME
 x11vnc - allow VNC connections to real X11 displays
-         version: 0.6.3pre, lastmod: 2004-12-19
+         version: 0.7pre, lastmod: 2004-12-20
 .SH SYNOPSIS
 .B x11vnc
 [OPTION]...
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index 1df51a5..0a23219 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -256,7 +256,7 @@ static int xdamage_base_event_type;
 #endif
 
 /*               date +'lastmod: %Y-%m-%d' */
-char lastmod[] = "0.6.3pre lastmod: 2004-12-19";
+char lastmod[] = "0.7pre lastmod: 2004-12-20";
 
 /* X display info */
 
@@ -11879,10 +11879,6 @@ static int blackout_line_skip(int n, int x, int y, int rescan,
 	return 0;	/* do not skip */
 }
 
-/*
- * scan_display() wants to know if this changed tile can be skipped due
- * to blackout regions (we do an actual compare to find the changed region).
- */
 static int blackout_line_cmpskip(int n, int x, int y, char *dst, char *src,
     int w, int pixelsize) {
 
-- 
cgit v1.2.3

