unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* cursor display bug caused by focus tracking change (21.2)
@ 2003-03-17 12:04 John Carr
  0 siblings, 0 replies; only message in thread
From: John Carr @ 2003-03-17 12:04 UTC (permalink / 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-17 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-17 12:04 cursor display bug caused by focus tracking change (21.2) John Carr

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).