From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Carr Newsgroups: gmane.emacs.bugs Subject: cursor display bug caused by focus tracking change (21.2) Date: Mon, 17 Mar 2003 07:04:36 -0500 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200303171204.HAA29063@nerd-xing.mit.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1047904006 29233 80.91.224.249 (17 Mar 2003 12:26:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2003 12:26:46 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 17 13:26:44 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18uthT-0007bC-00 for ; Mon, 17 Mar 2003 13:26:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18utfp-000540-01 for gnu-bug-gnu-emacs@m.gmane.org; Mon, 17 Mar 2003 07:25:01 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18utXE-0002Ut-00 for bug-gnu-emacs@gnu.org; Mon, 17 Mar 2003 07:16:08 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18utNj-0000LI-00 for bug-gnu-emacs@gnu.org; Mon, 17 Mar 2003 07:06:20 -0500 Original-Received: from pacific-carrier-annex.mit.edu ([18.7.21.83]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18utM9-00008J-00 for bug-gnu-emacs@gnu.org; Mon, 17 Mar 2003 07:04:41 -0500 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by pacific-carrier-annex.mit.edu (8.9.2/8.9.2) with ESMTP id HAA00030 for ; Mon, 17 Mar 2003 07:04:36 -0500 (EST) Original-Received: from melbourne-city-street.mit.edu (MELBOURNE-CITY-STREET.MIT.EDU [18.7.21.86]) by grand-central-station.mit.edu (8.9.2/8.9.2) with ESMTP id HAA18146 for ; Mon, 17 Mar 2003 07:04:36 -0500 (EST) Original-Received: from nerd-xing.mit.edu (NERD-XING.MIT.EDU [18.7.16.74]) ) h2HC4a0x006470 for ; Mon, 17 Mar 2003 07:04:36 -0500 (EST) Original-Received: (from jfc@localhost) by nerd-xing.mit.edu (8.9.3) id HAA29063; Mon, 17 Mar 2003 07:04:36 -0500 (EST) Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4625 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4625 Between emacs 21.1.1 and 21.2 a change was made that made the cursor invisible for me when using the X Window System. This is a window-manager dependent problem. It seems to have been caused by this change: 2001-11-12 Richard M. Stallman * xterm.c (XTread_socket): Don't update focus for EnterNotify or LeaveNotify events. Only FocusIn and FocusOut do that now. [...] I make my input focus follow the mouse without window manager intervention. This is not the same as having the window manager watch the mouse and force the input focus to the window under the mouse. To the best of my knowledge, the ICCCM has always permitted this mode of operation. If the window manager does not force focus to a window, the X client does not receive focus events. Because emacs is looking for focus events only, it never realizes that the window has input focus. To reproduce: run emacs without a window manager and notice that the cursor is invisible. To fix: restore the code in #if 0 in xterm.c:XTread_socket cases EnterNotify and LeaveNotify. Other, more complicated fixes are possible, such as unblanking the cursor when a window receives input when emacs thought the focus was elsewhere. *** src/emacs-21.2/src/xterm.c.orig Sat Mar 16 05:34:56 2002 --- src/emacs-21.2/src/xterm.c Mon Mar 17 06:42:14 2003 *************** *** 10659,10665 **** { f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); ! #if 0 if (event.xcrossing.focus) { /* Avoid nasty pop/raise loops. */ --- 10659,10665 ---- { f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); ! #if 1 if (event.xcrossing.focus) { /* Avoid nasty pop/raise loops. */ *************** *** 10738,10744 **** bufp += n, count += n, numchars -= n; } ! #if 0 if (event.xcrossing.focus) x_mouse_leave (dpyinfo); else --- 10738,10744 ---- bufp += n, count += n, numchars -= n; } ! #if 1 if (event.xcrossing.focus) x_mouse_leave (dpyinfo); else