[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xterm: Changes to 'upstream-unstable'



 MANIFEST                 |    2 
 Makefile.in              |    7 -
 THANKS                   |    3 
 Tekproc.c                |    4 
 XTerm.ad                 |    5 
 button.c                 |   53 +++++---
 cachedGCs.c              |    5 
 charproc.c               |  216 ++++++++++++++++++++--------------
 ctlseqs.ms               |    8 -
 ctlseqs.txt              |    5 
 input.c                  |   14 +-
 linedata.c               |    6 
 main.c                   |   47 +++----
 menu.c                   |  297 +++++++++++++++++++++++++++++++++++++++--------
 menu.h                   |   24 ++-
 misc.c                   |   91 +++++++-------
 package/debian/changelog |    6 
 package/xterm.spec       |    4 
 plink.sh                 |    4 
 print.c                  |   10 -
 ptydata.c                |   12 -
 ptyx.h                   |   22 ++-
 screen.c                 |   52 +++++++-
 scrollbar.c              |   28 +++-
 trace.c                  |   20 ++-
 util.c                   |   12 -
 version.h                |    4 
 xterm.h                  |   14 +-
 xterm.log.html           |   45 ++++++-
 xterm.man                |   64 +++++++++-
 30 files changed, 776 insertions(+), 308 deletions(-)

New commits:
commit 17adfe97bdb9be5917b071c96bd968c2dee765b9
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Feb 10 18:34:29 2011 +0100

    Imported Upstream version 268

diff --git a/MANIFEST b/MANIFEST
index c5e1d32..3b01936 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-267, version xterm-267
+MANIFEST for xterm-268, version xterm-268
 --------------------------------------------------------------------------------
 MANIFEST                        this file
 256colres.h                     resource-definitions for 256-color mode
diff --git a/Makefile.in b/Makefile.in
index 4d59cb1..2a6a265 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-## $XTermId: Makefile.in,v 1.173 2010/11/13 12:52:34 tom Exp $
+## $XTermId: Makefile.in,v 1.174 2010/11/24 11:21:01 tom Exp $
 # -----------------------------------------------------------------------------
 # this file is part of xterm
 #
@@ -360,6 +360,7 @@ maintainer-clean : realclean
 terminfo.out : terminfo		; tic -a -I -1 terminfo >$@
 termcap.out : termcap		; tic -a -C -U termcap >$@
 ################################################################################
+docs-ctlseqs \
 docs :: ctlseqs.html \
 	ctlseqs.pdf \
 	ctlseqs.ps \
@@ -369,6 +370,7 @@ ctlseqs.pdf : ctlseqs.ps
 ctlseqs.ps : ctlseqs.ms
 ctlseqs.txt : ctlseqs.ms
 ################################################################################
+docs-resize \
 docs :: resize.html \
 	resize.pdf \
 	resize.ps \
@@ -378,6 +380,7 @@ resize.pdf : resize.ps
 resize.ps : resize.$(manext)
 resize.txt : resize.$(manext)
 ################################################################################
+docs-xterm \
 docs :: xterm.html \
 	xterm.pdf \
 	xterm.ps \
@@ -387,6 +390,7 @@ xterm.pdf : xterm.ps
 xterm.ps : xterm.$(manext)
 xterm.txt : xterm.$(manext)
 ################################################################################
+docs-uxterm \
 docs :: uxterm.html \
 	uxterm.pdf \
 	uxterm.ps \
@@ -396,6 +400,7 @@ uxterm.pdf : uxterm.ps
 uxterm.ps : uxterm.$(manext)
 uxterm.txt : uxterm.$(manext)
 ################################################################################
+docs-koi8rxterm \
 docs :: koi8rxterm.html \
 	koi8rxterm.pdf \
 	koi8rxterm.ps \
diff --git a/THANKS b/THANKS
index 424dfa2..02cc710 100644
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
--- $XTermId: THANKS,v 1.2 2010/10/24 17:46:47 tom Exp $
+-- $XTermId: THANKS,v 1.3 2011/01/22 13:22:37 tom Exp $
 -- vile:txtmode fk=8bit
 There's no AUTHORS file in this distribution; it would be redundant since
 I (Thomas E. Dickey) have done more than 80% of the work on xterm since 1996.
@@ -40,6 +40,7 @@ Chuck Blake
 D Roland Walker
 Daniel Colascione
 Daniel Jacobowitz
+Dave Simmons
 David Dawes
 David Krause
 David Madore
diff --git a/Tekproc.c b/Tekproc.c
index a7bcf8f..d124394 100644
--- a/Tekproc.c
+++ b/Tekproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: Tekproc.c,v 1.184 2010/10/14 08:07:03 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.185 2011/01/20 10:50:19 tom Exp $ */
 
 /*
  *
@@ -1538,7 +1538,7 @@ TekRealize(Widget gw,
 
     XtWindow(tw) = TWindow(tekscr) =
 	XCreateWindow(XtDisplay(tw),
-		      XtWindow(SHELL_OF(tw)),
+		      VShellWindow(tw),
 		      tw->core.x, tw->core.y,
 		      tw->core.width, tw->core.height,
 		      BorderWidth(tw),
diff --git a/XTerm.ad b/XTerm.ad
index 975f7cd..dd99d9f 100644
--- a/XTerm.ad
+++ b/XTerm.ad
@@ -1,8 +1,8 @@
-! $XTermId: XTerm.ad,v 1.93 2010/06/15 10:55:59 tom Exp $
+! $XTermId: XTerm.ad,v 1.94 2011/01/19 22:05:58 tom Exp $
 ! -----------------------------------------------------------------------------
 ! this file is part of xterm
 !
-! Copyright 1996-2009,2010 by Thomas E. Dickey
+! Copyright 1996-2010,2011 by Thomas E. Dickey
 ! 
 !                         All Rights Reserved
 ! 
@@ -43,6 +43,7 @@
 
 *mainMenu.Label:  Main Options
 *mainMenu*toolbar*Label:  Toolbar
+*mainMenu*fullscreen*Label: Full Screen
 *mainMenu*securekbd*Label:  Secure Keyboard
 *mainMenu*allowsends*Label:  Allow SendEvents
 *mainMenu*redraw*Label:  Redraw Window
diff --git a/button.c b/button.c
index fee5681..b0c3c95 100644
--- a/button.c
+++ b/button.c
@@ -1,7 +1,7 @@
-/* $XTermId: button.c,v 1.391 2010/11/11 11:50:13 tom Exp $ */
+/* $XTermId: button.c,v 1.395 2011/02/09 10:15:46 tom Exp $ */
 
 /*
- * Copyright 1999-2009,2010 by Thomas E. Dickey
+ * Copyright 1999-2010,2011 by Thomas E. Dickey
  *
  *                         All Rights Reserved
  *
@@ -1261,8 +1261,7 @@ xtermUtf8ToTextList(XtermWidget xw,
 		(void) UTF8toLatin1(screen, data, size, &size);
 		new_size += size + 1;
 	    }
-	    new_text_list =
-		(char **) XtMalloc((Cardinal) sizeof(char *) * (unsigned) *text_list_count);
+	    new_text_list = TypeXtMallocN(char *, *text_list_count);
 	    new_text_list[0] = tmp = XtMalloc((Cardinal) new_size);
 	    for (i = 0; i < (*text_list_count); ++i) {
 		data = (Char *) (*text_list)[i];
@@ -1342,8 +1341,7 @@ overrideTargets(Widget w, String value, Atom ** resultp)
 		    if (copied[n] == ',')
 			++count;
 		}
-		result = (Atom *) XtMalloc(((2 * count) + 1)
-					   * (Cardinal) sizeof(Atom));
+		result = TypeXtMallocN(Atom, (2 * count) + 1);
 		if (result == NULL) {
 		    TRACE(("Couldn't allocate selection types\n"));
 		} else {
@@ -1355,7 +1353,7 @@ overrideTargets(Widget w, String value, Atom ** resultp)
 			size_t len = strlen(listp);
 
 			if (len == 0) {
-			    ;
+			    /* EMPTY */ ;
 			}
 #if OPT_WIDE_CHARS
 			else if (sameItem(listp, "UTF8")) {
@@ -1403,7 +1401,7 @@ allocUtf8Targets(Widget w, TScreen * screen)
 	Atom *result;
 
 	if (!overrideTargets(w, screen->utf8_select_types, &result)) {
-	    result = (Atom *) XtMalloc((Cardinal) (5 * sizeof(Atom)));
+	    result = TypeXtMallocN(Atom, 5);
 	    if (result == NULL) {
 		TRACE(("Couldn't allocate utf-8 selection targets\n"));
 	    } else {
@@ -1437,7 +1435,7 @@ alloc8bitTargets(Widget w, TScreen * screen)
 	Atom *result = 0;
 
 	if (!overrideTargets(w, screen->eightbit_select_types, &result)) {
-	    result = (Atom *) XtMalloc((Cardinal) (5 * sizeof(Atom)));
+	    result = TypeXtMallocN(Atom, 5);
 	    if (result == NULL) {
 		TRACE(("Couldn't allocate 8bit selection targets\n"));
 	    } else {
@@ -1682,7 +1680,7 @@ xtermGetSelection(Widget w,
 
 	    if (num_params) {
 		/* 'list' is freed in SelectionReceived */
-		list = XtNew(struct _SelectionList);
+		list = TypeXtMalloc(struct _SelectionList);
 		if (list != 0) {
 		    list->params = params;
 		    list->count = num_params;
@@ -1984,7 +1982,7 @@ SelectionReceived(Widget w,
 
 #if OPT_PASTE64
 	if (screen->base64_paste) {
-	    ;
+	    /* EMPTY */ ;
 	} else
 #endif
 #if OPT_READLINE
@@ -3633,10 +3631,10 @@ ConvertSelection(Widget w,
 	    Atom *my_targets = _SelectionTargets(w);
 
 	    TRACE(("XmuConvertStandardSelection - success\n"));
-	    std_targets = (Atom *) (std_return);
+	    std_targets = (Atom *) (void *) (std_return);
 	    *length = std_length + 6;
 
-	    targetP = (Atom *) XtMalloc((Cardinal) (sizeof(Atom) * (*length)));
+	    targetP = TypeXtMallocN(Atom, *length);
 	    allocP = targetP;
 
 	    *value = (XtPointer) targetP;
@@ -3821,7 +3819,7 @@ _OwnSelection(XtermWidget xw,
 
     if (count > screen->sel_atoms_size) {
 	XtFree((char *) atoms);
-	atoms = (Atom *) XtMalloc((Cardinal) (count * sizeof(Atom)));
+	atoms = TypeXtMallocN(Atom, count);
 	screen->selection_atoms = atoms;
 	screen->sel_atoms_size = count;
     }
@@ -4046,8 +4044,7 @@ SaveText(TScreen * screen,
 */
 
 /* Position: 32 - 255. */
-
-static Char
+static int
 BtnCode(XButtonEvent * event, int button)
 {
     int result = (int) (32 + (KeyState(event->state) << 2));
@@ -4061,7 +4058,21 @@ BtnCode(XButtonEvent * event, int button)
 	    result += 32;
 	result += button;
     }
-    return CharOf(result);
+    return result;
+}
+
+static unsigned
+EmitButtonCode(TScreen * screen, Char * line, unsigned count, XButtonEvent * event)
+{
+    int value = BtnCode(event, screen->mouse_button);
+
+    if (!screen->ext_mode_mouse || value < 128) {
+	line[count++] = CharOf(value);
+    } else {
+	line[count++] = CharOf(0xC0 + (value >> 6));
+	line[count++] = CharOf(0x80 + (value & 0x3F));
+    }
+    return count;
 }
 
 static void
@@ -4127,7 +4138,8 @@ EditorButton(XtermWidget xw, XButtonEvent * event)
 	/* Button-Motion events */
 	switch (event->type) {
 	case ButtonPress:
-	    line[count++] = BtnCode(event, screen->mouse_button = button);
+	    screen->mouse_button = button;
+	    count = EmitButtonCode(screen, line, count, event);
 	    break;
 	case ButtonRelease:
 	    /*
@@ -4137,7 +4149,8 @@ EditorButton(XtermWidget xw, XButtonEvent * event)
 	     */
 	    if (button < 3)
 		button = -1;
-	    line[count++] = BtnCode(event, screen->mouse_button = button);
+	    screen->mouse_button = button;
+	    count = EmitButtonCode(screen, line, count, event);
 	    break;
 	case MotionNotify:
 	    /* BTN_EVENT_MOUSE and ANY_EVENT_MOUSE modes send motion
@@ -4147,7 +4160,7 @@ EditorButton(XtermWidget xw, XButtonEvent * event)
 		&& (col == screen->mouse_col)) {
 		changed = False;
 	    } else {
-		line[count++] = BtnCode(event, screen->mouse_button);
+		count = EmitButtonCode(screen, line, count, event);
 	    }
 	    break;
 	default:
diff --git a/cachedGCs.c b/cachedGCs.c
index 3b56082..aca07aa 100644
--- a/cachedGCs.c
+++ b/cachedGCs.c
@@ -1,8 +1,8 @@
-/* $XTermId: cachedGCs.c,v 1.59 2010/04/15 00:00:17 tom Exp $ */
+/* $XTermId: cachedGCs.c,v 1.60 2011/02/09 10:11:44 tom Exp $ */
 
 /************************************************************
 
-Copyright 2007-2009,2010 by Thomas E. Dickey
+Copyright 2007-2010,2011 by Thomas E. Dickey
 
                         All Rights Reserved
 
@@ -513,6 +513,7 @@ setCgsFont(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, XTermFonts * font)
 	    NEXT(font) = font;
 	    me->mask |= GCFont;
 	} else {
+	    /* EMPTY */
 	    TRACE2(("...NOT updated font for %s\n",
 		    traceCgsEnum(cgsId)));
 	}
diff --git a/charproc.c b/charproc.c
index 098e472..d11a221 100644
--- a/charproc.c
+++ b/charproc.c
@@ -1,58 +1,58 @@
-/* $XTermId: charproc.c,v 1.1091 2010/11/11 11:41:26 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1100 2011/02/09 10:15:36 tom Exp $ */
 
 /*
-
-Copyright 1999-2009,2010 by Thomas E. Dickey
-
-                        All Rights Reserved
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name(s) of the above copyright
-holders shall not be used in advertising or otherwise to promote the
-sale, use or other dealings in this Software without prior written
-authorization.
-
-Copyright 1988  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
+ * Copyright 1999-2010,2011 by Thomas E. Dickey
+ * 
+ *                         All Rights Reserved
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the
+ * sale, use or other dealings in this Software without prior written
+ * authorization.
+ * 
+ * 
+ * Copyright 1988  The Open Group
+ * 
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ * Except as contained in this notice, the name of The Open Group shall not be
+ * used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from The Open Group.
+ * 
+ */
 /*
  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  *
@@ -225,6 +225,11 @@ static char defaultTranslations[] =
          Shift <KeyPress> Select:select-cursor-start() select-cursor-end(SELECT, CUT_BUFFER0) \n\
          Shift <KeyPress> Insert:insert-selection(SELECT, CUT_BUFFER0) \n\
 "
+#if OPT_MAXIMIZE
+"\
+                 Alt <Key>Return:fullscreen() \n\
+"
+#endif
 #if OPT_SCROLL_LOCK
 "\
         <KeyRelease> Scroll_Lock:scroll-lock() \n\
@@ -374,6 +379,7 @@ static XtActionsRec actionsList[] = {
 #endif
 #if OPT_MAXIMIZE
     { "deiconify",		HandleDeIconify },
+    { "fullscreen",		HandleFullscreen },
     { "iconify",		HandleIconify },
     { "maximize",		HandleMaximize },
     { "restore",		HandleRestoreSize },
@@ -865,6 +871,9 @@ xtermAddInput(Widget w)
 #if OPT_DABBREV
 	{ "dabbrev-expand",	    HandleDabbrevExpand },
 #endif
+#if OPT_MAXIMIZE
+	{ "fullscreen",		    HandleFullscreen },
+#endif
 #if OPT_SCROLL_LOCK
 	{ "scroll-lock",	    HandleScrollLock },
 #endif
@@ -4061,6 +4070,7 @@ SetCursorBlink(TScreen * screen, Bool enable)
     if (DoStartBlinking(screen)) {
 	StartBlinking(screen);
     } else {
+	/* EMPTY */
 #if !OPT_BLINK_TEXT
 	StopBlinking(screen);
 #endif
@@ -4152,7 +4162,7 @@ dpmodes(XtermWidget xw, BitFunc func)
 		 * Setting DECANM should have no effect, since this function
 		 * cannot be reached from vt52 mode.
 		 */
-		;
+		/* EMPTY */ ;
 	    }
 #if OPT_VT52_MODE
 	    else if (screen->terminal_id >= 100) {	/* VT52 */
@@ -4842,7 +4852,7 @@ get_icon_label(XtermWidget xw)
     XTextProperty text;
     char *result = 0;
 
-    if (XGetWMIconName(TScreenOf(xw)->display, VShellWindow, &text)) {
+    if (XGetWMIconName(TScreenOf(xw)->display, VShellWindow(xw), &text)) {
 	result = property_to_string(xw, &text);
     }
     return result;
@@ -4854,7 +4864,7 @@ get_window_label(XtermWidget xw)
     XTextProperty text;
     char *result = 0;
 
-    if (XGetWMName(TScreenOf(xw)->display, VShellWindow, &text)) {
+    if (XGetWMName(TScreenOf(xw)->display, VShellWindow(xw), &text)) {
 	result = property_to_string(xw, &text);
     }
     return result;
@@ -4912,7 +4922,7 @@ window_ops(XtermWidget xw)
 	if (AllowWindowOps(xw, ewRestoreWin)) {
 	    TRACE(("...de-iconify window\n"));
 	    XMapWindow(screen->display,
-		       VShellWindow);
+		       VShellWindow(xw));
 	}
 	break;
 
@@ -4920,7 +4930,7 @@ window_ops(XtermWidget xw)
 	if (AllowWindowOps(xw, ewMinimizeWin)) {
 	    TRACE(("...iconify window\n"));
 	    XIconifyWindow(screen->display,
-			   VShellWindow,
+			   VShellWindow(xw),
 			   DefaultScreen(screen->display));
 	}
 	break;
@@ -4932,7 +4942,7 @@ window_ops(XtermWidget xw)
 	    TRACE(("...move window to %d,%d\n", values.x, values.y));
 	    value_mask = (CWX | CWY);
 	    XReconfigureWMWindow(screen->display,
-				 VShellWindow,
+				 VShellWindow(xw),
 				 DefaultScreen(screen->display),
 				 value_mask,
 				 &values);
@@ -4948,14 +4958,14 @@ window_ops(XtermWidget xw)
     case ewRaiseWin:		/* Raise the window to the front of the stack */
 	if (AllowWindowOps(xw, ewRaiseWin)) {
 	    TRACE(("...raise window\n"));
-	    XRaiseWindow(screen->display, VShellWindow);
+	    XRaiseWindow(screen->display, VShellWindow(xw));
 	}
 	break;
 
     case ewLowerWin:		/* Lower the window to the bottom of the stack */
 	if (AllowWindowOps(xw, ewLowerWin)) {
 	    TRACE(("...lower window\n"));
-	    XLowerWindow(screen->display, VShellWindow);
+	    XLowerWindow(screen->display, VShellWindow(xw));
 	}
 	break;
 
@@ -5608,7 +5618,7 @@ RequestResize(XtermWidget xw, int rows, int cols, Bool text)
 
 	TRACE(("%s@%d -- ", __FILE__, __LINE__));
 	TRACE_HINTS(&xw->hints);
-	XSetWMNormalHints(screen->display, VShellWindow, &xw->hints);
+	XSetWMNormalHints(screen->display, VShellWindow(xw), &xw->hints);
 	TRACE(("%s@%d -- ", __FILE__, __LINE__));
 	TRACE_WM_HINTS(xw);
     }
@@ -7098,6 +7108,13 @@ VTRealize(Widget w,
 
     xw->hints.x = xpos;
     xw->hints.y = ypos;
+#if OPT_MAXIMIZE
+    /* assure single-increment resize for fullscreen */
+    if (term->screen.fullscreen) {
+	xw->hints.width_inc = 1;
+	xw->hints.height_inc = 1;
+    }
+#endif
     if ((XValue & pr) || (YValue & pr)) {
 	xw->hints.flags |= USSize | USPosition;
 	xw->hints.flags |= PWinGravity;
@@ -7142,12 +7159,12 @@ VTRealize(Widget w,
      * realized, so that it can do the right thing.
      */
     if (xw->hints.flags & USPosition)
-	XMoveWindow(XtDisplay(xw), XtWindow(SHELL_OF(xw)),
+	XMoveWindow(XtDisplay(xw), VShellWindow(xw),
 		    xw->hints.x, xw->hints.y);
 
     TRACE(("%s@%d -- ", __FILE__, __LINE__));
     TRACE_HINTS(&xw->hints);
-    XSetWMNormalHints(XtDisplay(xw), XtWindow(SHELL_OF(xw)), &xw->hints);
+    XSetWMNormalHints(XtDisplay(xw), VShellWindow(xw), &xw->hints);
     TRACE(("%s@%d -- ", __FILE__, __LINE__));
     TRACE_WM_HINTS(xw);
 
@@ -7155,7 +7172,7 @@ VTRealize(Widget w,
 	/* XChangeProperty format 32 really is "long" */
 	unsigned long pid_l = (unsigned long) getpid();
 	TRACE(("Setting _NET_WM_PID property to %lu\n", pid_l));
-	XChangeProperty(XtDisplay(xw), VShellWindow,
+	XChangeProperty(XtDisplay(xw), VShellWindow(xw),
 			pid_atom, XA_CARDINAL, 32, PropModeReplace,
 			(unsigned char *) &pid_l, 1);
     }
@@ -7290,7 +7307,7 @@ VTRealize(Widget w,
 
     resetCharsets(screen);
 
-    XDefineCursor(screen->display, VShellWindow, screen->pointer_cursor);
+    XDefineCursor(screen->display, VShellWindow(xw), screen->pointer_cursor);
 
     set_cur_col(screen, 0);
     set_cur_row(screen, 0);
@@ -7607,6 +7624,29 @@ VTInitI18N(XtermWidget xw)
 }
 #endif /* OPT_I18N_SUPPORT && OPT_INPUT_METHOD */
 
+static void
+set_cursor_outline_gc(XtermWidget xw,
+		      Boolean filled,
+		      Pixel fg,
+		      Pixel bg,
+		      Pixel cc)
+{
+    TScreen *screen = TScreenOf(xw);
+    VTwin *win = WhichVWin(screen);
+    CgsEnum cgsId = gcVTcursOutline;
+
+    if (cc == bg)
+	cc = fg;
+
+    if (filled) {
+	setCgsFore(xw, win, cgsId, bg);
+	setCgsBack(xw, win, cgsId, cc);
+    } else {
+	setCgsFore(xw, win, cgsId, cc);
+	setCgsBack(xw, win, cgsId, bg);
+    }
+}
+
 static Boolean
 VTSetValues(Widget cur,
 	    Widget request GCC_UNUSED,
@@ -7861,7 +7901,9 @@ ShowCursor(void)
 #if OPT_HIGHLIGHT_COLOR
 	if (screen->hilite_reverse) {
 	    if (in_selection && !reversed) {
-		;		/* really INVERSE ... */
+		/* EMPTY */
+		/* really INVERSE ... */
+		;
 	    } else if (in_selection || reversed) {
 		if (use_selbg) {
 		    if (use_selfg) {
@@ -7907,10 +7949,9 @@ ShowCursor(void)
 	y = CursorY(screen, screen->cur_row);
 
 	if (screen->cursor_underline) {
-
 	    /*
-	     * Overriding the combination of filled, reversed, in_selection
-	     * is too complicated since the underline and the text-cell use
+	     * Overriding the combination of filled, reversed, in_selection is
+	     * too complicated since the underline and the text-cell use
 	     * different rules.  Just redraw the text-cell, and draw the
 	     * underline on top of it.
 	     */
@@ -7918,7 +7959,7 @@ ShowCursor(void)
 
 	    /*
 	     * Our current-GC is likely to have been modified in HideCursor().
-	     * Setup a new request.
+	     * Set up a new request.
 	     */
 	    if (filled) {
 		if (T_COLOR(screen, TEXT_CURSOR) == xw->dft_foreground) {
@@ -7929,10 +7970,23 @@ ShowCursor(void)
 		setCgsFore(xw, currentWin, currentCgs, fg_pix);
 		setCgsBack(xw, currentWin, currentCgs, bg_pix);
 	    }
+	}
+
+	/*
+	 * Update the outline-gc, to keep the cursor color distinct from the
+	 * background color.
+	 */
+	set_cursor_outline_gc(xw,
+			      filled,
+			      fg_pix,
+			      bg_pix,
+			      T_COLOR(screen, TEXT_CURSOR));
 
-	    outlineGC = getCgsGC(xw, currentWin, gcVTcursOutline);
-	    if (outlineGC == 0)
-		outlineGC = currentGC;
+	outlineGC = getCgsGC(xw, currentWin, gcVTcursOutline);
+	if (outlineGC == 0)
+	    outlineGC = currentGC;
+
+	if (screen->cursor_underline) {
 
 	    /*
 	     * Finally, draw the underline.
@@ -7942,9 +7996,6 @@ ShowCursor(void)
 	    XDrawLines(screen->display, VWindow(screen), outlineGC,
 		       screen->box, NBOX, CoordModePrevious);
 	} else {
-	    outlineGC = getCgsGC(xw, currentWin, gcVTcursOutline);
-	    if (outlineGC == 0)
-		outlineGC = currentGC;
 
 	    drawXtermText(xw, flags & DRAWX_MASK,
 			  currentGC, x, y,
@@ -8694,9 +8745,7 @@ FindFontSelection(XtermWidget xw, const char *atom_name, Bool justprobe)
 	    break;
     }
     if (!a) {
-	atoms = (AtomPtr *) XtRealloc((char *) atoms,
-				      (Cardinal) sizeof(AtomPtr)
-				      * (atomCount + 1));
+	atoms = TypeXtReallocN(AtomPtr, atoms, atomCount + 1);
 	*(pAtom = &atoms[atomCount]) = XmuMakeAtom(atom_name);
     }
 
@@ -8766,16 +8815,11 @@ set_cursor_gcs(XtermWidget xw)
 	    /* both GC's use the same color */
 	    setCgsFore(xw, win, gcVTcursReverse, bg);
 	    setCgsBack(xw, win, gcVTcursReverse, cc);
-
-	    setCgsFore(xw, win, gcVTcursOutline, bg);
-	    setCgsBack(xw, win, gcVTcursOutline, cc);
 	} else {
 	    setCgsFore(xw, win, gcVTcursReverse, bg);
 	    setCgsBack(xw, win, gcVTcursReverse, cc);
-
-	    setCgsFore(xw, win, gcVTcursOutline, cc);
-	    setCgsBack(xw, win, gcVTcursOutline, bg);
 	}
+	set_cursor_outline_gc(xw, screen->always_highlight, fg, bg, cc);
 	changed = True;
     }
 
diff --git a/ctlseqs.ms b/ctlseqs.ms
index a1118b9..3c564ea 100644
--- a/ctlseqs.ms
+++ b/ctlseqs.ms
@@ -1,9 +1,9 @@
 .\"#! troff -ms $1		-*- Nroff -*-
 .\" "Xterm Control Sequences" document
-.\" $XTermId: ctlseqs.ms,v 1.235 2010/11/19 00:51:33 tom Exp $
+.\" $XTermId: ctlseqs.ms,v 1.237 2011/01/26 09:54:31 tom Exp $
 .\"
 .\"
-.\" Copyright 1996-2009,2010 by Thomas E. Dickey
+.\" Copyright 1996-2010,2011 by Thomas E. Dickey
 .\"
 .\"                         All Rights Reserved
 .\"
@@ -1117,7 +1117,7 @@ Soft terminal reset (DECSTR).
 Request ANSI mode (DECRQM).
 For VT300 and up, reply is
 .br
-  \*(Cs\*(Ps\*;\*(Pm\*$\*p
+  \*(Cs\*(Ps\*;\*(Pm\*$\*y
 .br
 where \*(Ps is the mode number as in RM,
 and \*(Pm is the mode value:
@@ -2139,6 +2139,8 @@ For positions less than 95, the resulting output is identical under both modes.
 Under extended mouse mode, positions greater than 95
 generate "extra" bytes which will confuse applications which do not treat
 their input as a UTF-8 stream.
+Likewise, \*(Cb will be UTF-8 encoded,
+to reduce confusion with wheel mouse events.
 .lP
 NOTE: Under normal mouse mode, positions outside (160,94) result in
 byte pairs which can be interpreted as a single UTF-8 character;
diff --git a/ctlseqs.txt b/ctlseqs.txt
index a16fe27..be4fa2c 100644
--- a/ctlseqs.txt
+++ b/ctlseqs.txt
@@ -607,7 +607,7 @@ CSI > Ps p
 CSI ! p   Soft terminal reset (DECSTR).
 CSI Ps$ p
           Request ANSI mode (DECRQM).  For VT300 and up, reply is
-            CSI Ps; Pm$ p
+            CSI Ps; Pm$ y
           where Ps is the mode number as in RM, and Pm is the mode
           value:
             0 - not recognized
@@ -1449,7 +1449,8 @@ tracking modes, expanding the maximum encodable position from 223 to
 2015.  For positions less than 95, the resulting output is identical
 under both modes.  Under extended mouse mode, positions greater than 95
 generate "extra" bytes which will confuse applications which do not
-treat their input as a UTF-8 stream.
+treat their input as a UTF-8 stream.  Likewise, Cb will be UTF-8
+encoded, to reduce confusion with wheel mouse events.
 
 NOTE: Under normal mouse mode, positions outside (160,94) result in byte
 pairs which can be interpreted as a single UTF-8 character; applications
diff --git a/input.c b/input.c
index 3a586b6..ffbddb7 100644
--- a/input.c
+++ b/input.c
@@ -1,7 +1,7 @@
-/* $XTermId: input.c,v 1.326 2010/06/15 22:41:09 tom Exp $ */
+/* $XTermId: input.c,v 1.327 2011/02/09 10:15:07 tom Exp $ */
 
 /*
- * Copyright 1999-2009,2010 by Thomas E. Dickey
+ * Copyright 1999-2010,2011 by Thomas E. Dickey
  *
  *                         All Rights Reserved
  *
@@ -486,7 +486,7 @@ allowedCharModifiers(XtermWidget xw, unsigned state, KEY_DATA * kd)
 		UIntClr(result, ControlMask);
 	    }
 	} else if (kd->keysym == XK_Tab || kd->keysym == XK_Return) {
-	    ;
+	    /* EMPTY */ ;
 	} else if (IsControlAlias(kd)) {
 	    /* Things like "^_" work here... */
 	    if (Masked(result, (ControlMask | ShiftMask)) == 0) {
@@ -1989,7 +1989,7 @@ VTInitModifiers(XtermWidget xw)
 		    for (l = 0; l < keysyms_per_keycode; ++l) {
 			keysym = XKeycodeToKeysym(dpy, code, l);
 			if (keysym == NoSymbol) {
-			    ;
+			    /* EMPTY */ ;
 			} else if (keysym == XK_Num_Lock) {
 			    SaveMask(num_lock);
 			} else if (keysym == XK_Alt_L || keysym == XK_Alt_R) {
@@ -1999,14 +1999,14 @@ VTInitModifiers(XtermWidget xw)
 			} else if (mask == ShiftMask
 				   && (keysym == XK_Shift_L
 				       || keysym == XK_Shift_R)) {
-			    ;	/* ignore */
+			    /* EMPTY */ ;
 			} else if (mask == ControlMask
 				   && (keysym == XK_Control_L
 				       || keysym == XK_Control_R)) {
-			    ;	/* ignore */
+			    /* EMPTY */ ;
 			} else if (mask == LockMask
 				   && (keysym == XK_Caps_Lock)) {
-			    ;	/* ignore */
+			    /* EMPTY */ ;
 			} else if (keysym == XK_Mode_switch
 #ifdef XK_ISO_Level3_Shift
 				   || keysym == XK_ISO_Level3_Shift
diff --git a/linedata.c b/linedata.c
index d39772b..5d47d1a 100644
--- a/linedata.c
+++ b/linedata.c
@@ -1,8 +1,8 @@
-/* $XTermId: linedata.c,v 1.78 2010/04/14 23:41:10 tom Exp $ */
+/* $XTermId: linedata.c,v 1.79 2011/01/21 00:07:35 tom Exp $ */
 
 /************************************************************
 
-Copyright 2009,2010 by Thomas E. Dickey
+Copyright 2009-2010,2011 by Thomas E. Dickey
 
                         All Rights Reserved
 
@@ -189,7 +189,7 @@ initLineData(XtermWidget xw)
 #define CellDataSize(screen) (SizeOfCellData + screen->lineExtra)
 
 #define CellDataAddr(screen, data, cell) \
-	(CellData *)((char *)data + (cell * CellDataSize(screen)))
+	(CellData *)(void *) ((char *)data + (cell * CellDataSize(screen)))
 
 CellData *
 newCellData(XtermWidget xw, Cardinal count)
diff --git a/main.c b/main.c
index 805b950..99fb224 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.618 2010/06/20 21:11:51 tom Exp $ */
+/* $XTermId: main.c,v 1.620 2011/02/09 10:13:32 tom Exp $ */
 
 /*
  *				 W A R N I N G
@@ -15,7 +15,7 @@
 
 /***********************************************************
 
-Copyright 2002-2009,2010 by Thomas E. Dickey
+Copyright 2002-2010,2011 by Thomas E. Dickey
 
                         All Rights Reserved
 
@@ -1753,9 +1753,6 @@ main(int argc, char *argv[]ENVP_ARG)
     int mode;
     char *my_class = DEFCLASS;
     Window winToEmbedInto = None;
-#if OPT_COLOR_RES
-    Bool reversed = False;
-#endif
 
     ProgramName = argv[0];
 
@@ -1826,14 +1823,6 @@ main(int argc, char *argv[]ENVP_ARG)
 		}
 		unique = 3;
 	    } else {
-#if OPT_COLOR_RES
-		if (abbrev(argv[n], "-reverse", (size_t) 2)
-		    || !strcmp("-rv", argv[n])) {
-		    reversed = True;
-		} else if (!strcmp("+rv", argv[n])) {
-		    reversed = False;
-		}
-#endif
 		quit = False;
 		unique = 3;
 	    }
@@ -2388,18 +2377,26 @@ main(int argc, char *argv[]ENVP_ARG)
 			winToEmbedInto, 0, 0);
     }
 #if OPT_COLOR_RES
-    TRACE(("checking resource values rv %s fg %s, bg %s\n",
-	   BtoS(term->misc.re_verse0),
+    TRACE(("checking reverseVideo before rv %s fg %s, bg %s\n",
+	   term->misc.re_verse0 ? "reverse" : "normal",
 	   NonNull(TScreenOf(term)->Tcolors[TEXT_FG].resource),
 	   NonNull(TScreenOf(term)->Tcolors[TEXT_BG].resource)));
 
-    if ((reversed && term->misc.re_verse0)
-	&& ((TScreenOf(term)->Tcolors[TEXT_FG].resource
-	     && !isDefaultForeground(TScreenOf(term)->Tcolors[TEXT_FG].resource))
-	    || (TScreenOf(term)->Tcolors[TEXT_BG].resource
-		&& !isDefaultBackground(TScreenOf(term)->Tcolors[TEXT_BG].resource))
-	))
-	ReverseVideo(term);
+    if (term->misc.re_verse0) {
+	if (isDefaultForeground(TScreenOf(term)->Tcolors[TEXT_FG].resource)
+	    && isDefaultBackground(TScreenOf(term)->Tcolors[TEXT_BG].resource)) {
+	    TScreenOf(term)->Tcolors[TEXT_FG].resource = x_strdup(XtDefaultBackground);
+	    TScreenOf(term)->Tcolors[TEXT_BG].resource = x_strdup(XtDefaultForeground);
+	} else {
+	    ReverseVideo(term);
+	}
+	term->misc.re_verse = True;
+	update_reversevideo();
+	TRACE(("updated  reverseVideo after  rv %s fg %s, bg %s\n",
+	       term->misc.re_verse ? "reverse" : "normal",
+	       NonNull(TScreenOf(term)->Tcolors[TEXT_FG].resource),
+	       NonNull(TScreenOf(term)->Tcolors[TEXT_BG].resource)));
+    }
 #endif /* OPT_COLOR_RES */
 
 #if OPT_MAXIMIZE
@@ -3333,7 +3330,7 @@ spawnXTerm(XtermWidget xw)
 	initial_erase = ttymodelist[XTTYMODE_erase].value;
 	setInitialErase = True;
     } else if (resource.ptyInitialErase) {
-	;
+	/* EMPTY */ ;
     } else if (ok_termcap) {
 	char *s = get_tcap_erase(xw);
 	TRACE(("...extracting initial_erase value from termcap\n"));
@@ -3545,7 +3542,7 @@ spawnXTerm(XtermWidget xw)
 #endif /* __MVS__ */
 		    }
 
-		    while (1) {
+		    for (;;) {
 #if USE_NO_DEV_TTY
 			if (!no_dev_tty
 			    && (ttyfd = open("/dev/tty", O_RDWR)) >= 0) {
@@ -4921,7 +4918,7 @@ parse_tty_modes(char *s, struct _xttymodes *modelist)
     int count = 0;
 
     TRACE(("parse_tty_modes\n"));
-    while (1) {
+    for (;;) {
 	size_t len;
 
 	while (*s && isascii(CharOf(*s)) && isspace(CharOf(*s)))
diff --git a/menu.c b/menu.c
index 3179fee..c4ed7e0 100644
--- a/menu.c
+++ b/menu.c
@@ -1,8 +1,7 @@
-/* $XTermId: menu.c,v 1.267 2010/06/20 21:09:10 tom Exp $ */
+/* $XTermId: menu.c,v 1.279 2011/02/09 10:00:58 tom Exp $ */


Reply to: