unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: John Carr <jfc@MIT.EDU>
Subject: cursor display bug caused by focus tracking change (21.2)
Date: Mon, 17 Mar 2003 07:04:36 -0500	[thread overview]
Message-ID: <200303171204.HAA29063@nerd-xing.mit.edu> (raw)


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  <rms@gnu.org>
	
	        * 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

                 reply	other threads:[~2003-03-17 12:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200303171204.HAA29063@nerd-xing.mit.edu \
    --to=jfc@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).