all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cursor display bug caused by focus tracking change (21.2)
@ 2003-03-17 12:04 John Carr
  2003-03-18 13:22 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages 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] 3+ messages in thread

* Re: cursor display bug caused by focus tracking change (21.2)
  2003-03-17 12:04 cursor display bug caused by focus tracking change (21.2) John Carr
@ 2003-03-18 13:22 ` Richard Stallman
  2003-03-18 17:49   ` Jan D.
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2003-03-18 13:22 UTC (permalink / raw)
  Cc: emacs-devel

    To fix: restore the code in #if 0 in xterm.c:XTread_socket cases
    EnterNotify and LeaveNotify.

This would reintroduce the problem that I fixed.  I no longer remember
what it was, but we can hardly assume it is a more rare setup than
yours.

Some time ago I obtained a set of rules for the right way to do X
focus calculations.  But nobody was prepared to implement it.  Would
someone like to implement it now?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cursor display bug caused by focus tracking change (21.2)
  2003-03-18 13:22 ` Richard Stallman
@ 2003-03-18 17:49   ` Jan D.
  0 siblings, 0 replies; 3+ messages in thread
From: Jan D. @ 2003-03-18 17:49 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman wrote:
>     To fix: restore the code in #if 0 in xterm.c:XTread_socket cases
>     EnterNotify and LeaveNotify.
> 
> This would reintroduce the problem that I fixed.  I no longer remember
> what it was, but we can hardly assume it is a more rare setup than
> yours.
> 
> Some time ago I obtained a set of rules for the right way to do X
> focus calculations.  But nobody was prepared to implement it.  Would
> someone like to implement it now?

In CVS I implemented new focus rules in June.  Those vere partly based on the 
ones you had, but they did not work well in the case where no window manager 
was running.  So the rules used by xterm helped to complete the implementation.

I gather from the subject that this issue was found on 21.2.  The new rules are 
not implemented in 21.2 or 21.3.

See thread starting at 
http://mail.gnu.org/archive/html/emacs-devel/2002-06/msg00615.html

	Jan D.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-18 17:49 UTC | newest]

Thread overview: 3+ messages (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
2003-03-18 13:22 ` Richard Stallman
2003-03-18 17:49   ` Jan D.

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.