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

Bug#594856: #594856 xterm: pointer remains invisible after running aptitude



fix attached (incremental after fix for #591265)

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
# ftp://invisible-island.net/xterm/patches/temp/xterm-262b.patch.gz
# patch by Thomas E. Dickey <dickey@invisible-island.net>
# created  Wed Sep  1 21:37:44 UTC 2010
# ------------------------------------------------------------------------------
# misc.c         |   47 ++++++++++++++++++++++++-----------------------
# xterm.h        |    4 ++--
# xterm.log.html |    6 +++++-
# 3 files changed, 31 insertions(+), 26 deletions(-)
# ------------------------------------------------------------------------------
Index: misc.c
--- xterm-262a+/misc.c	2010-09-01 00:19:06.000000000 +0000
+++ xterm-262b/misc.c	2010-09-01 10:49:30.000000000 +0000
@@ -1,4 +1,4 @@
-/* $XTermId: misc.c,v 1.508 2010/09/01 00:19:06 tom Exp $ */
+/* $XTermId: misc.c,v 1.509 2010/09/01 10:49:30 tom Exp $ */
 
 /*
  * Copyright 1999-2009,2010 by Thomas E. Dickey
@@ -425,9 +425,32 @@
 		   && event.xany.type == MotionNotify
 		   && event.xcrossing.window == XtWindow(xw)) {
 	    SendMousePosition(xw, &event);
+	    xtermShowPointer(xw, True);
 	    continue;
 	}
 
+	/*
+	 * If the event is interesting (and not a keyboard event), turn the
+	 * mouse pointer back on.
+	 */
+	if (screen->hide_pointer) {
+	    switch (event.xany.type) {
+	    case KeyPress:
+	    case KeyRelease:
+	    case ButtonPress:
+	    case ButtonRelease:
+		/* also these... */
+	    case Expose:
+	    case NoExpose:
+	    case PropertyNotify:
+	    case ClientMessage:
+		break;
+	    default:
+		xtermShowPointer(xw, True);
+		break;
+	    }
+	}
+
 	if (!event.xany.send_event ||
 	    screen->allowSendEvents ||
 	    ((event.xany.type != KeyPress) &&
@@ -435,28 +458,6 @@
 	     (event.xany.type != ButtonPress) &&
 	     (event.xany.type != ButtonRelease))) {
 
-	    /*
-	     * If the event is interesting (and not a keyboard event), turn the
-	     * mouse pointer back on.
-	     */
-	    if (screen->hide_pointer) {
-		switch (event.xany.type) {
-		case KeyPress:
-		case KeyRelease:
-		case ButtonPress:
-		case ButtonRelease:
-		    /* also these... */
-		case Expose:
-		case NoExpose:
-		case PropertyNotify:
-		case ClientMessage:
-		    break;
-		default:
-		    xtermShowPointer(xw, True);
-		    break;
-		}
-	    }
-
 	    XtDispatchEvent(&event);
 	}
     } while (XtAppPending(app_con) & XtIMXEvent);
Index: xterm.h
--- xterm-262a+/xterm.h	2010-08-29 22:42:57.000000000 +0000
+++ xterm-262b/xterm.h	2010-09-01 10:47:44.000000000 +0000
@@ -1,4 +1,4 @@
-/* $XTermId: xterm.h,v 1.630 2010/08/29 22:42:57 tom Exp $ */
+/* $XTermId: xterm.h,v 1.631 2010/09/01 10:47:44 tom Exp $ */
 
 /************************************************************
 
@@ -713,7 +713,7 @@
 #endif
 
 /* button.c */
-#define	MotionOff( s, t ) {						\
+#define	MotionOff( s, t ) if (!(screen->hide_pointer)) {		\
 	    (s)->event_mask |= ButtonMotionMask;			\
 	    (s)->event_mask &= ~PointerMotionMask;			\
 	    XSelectInput(XtDisplay((t)), XtWindow((t)), (long) (s)->event_mask); }
Index: xterm.log.html
--- xterm-262a+/xterm.log.html	2010-08-31 23:16:32.000000000 +0000
+++ xterm-262b/xterm.log.html	2010-09-01 09:56:21.000000000 +0000
@@ -31,7 +31,7 @@
  * sale, use or other dealings in this Software without prior written        *
  * authorization.                                                            *
  *****************************************************************************
-  $XTermId: xterm.log.html,v 1.966 2010/08/31 23:16:32 tom Exp $
+  $XTermId: xterm.log.html,v 1.967 2010/09/01 09:56:21 tom Exp $
   -->
 <HTML>
 <HEAD>
@@ -324,6 +324,10 @@
 
 <H1><A NAME="xterm_dev">Development</A></H1>
 <ul>
+	<li>improve <code>pointerMode</code> by continuing to watch for motion
+	    events after mouse tracking is disabled if the pointer is hidden
+	    (Debian #594856).
+
 	<li>further extend initialization for active-icon font to check if
 	    the font was not loaded succesfully,
 	    to retry with <code>font1</code>,

Attachment: signature.asc
Description: Digital signature


Reply to: