bug-gnu-emacs
[Top][All Lists]
Advanced

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

cursor display bug caused by focus tracking change (21.2)


From: John Carr
Subject: cursor display bug caused by focus tracking change (21.2)
Date: Mon, 17 Mar 2003 07:04:36 -0500

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  <address@hidden>
        
                * 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 via email to

[Prev in Thread] Current Thread [Next in Thread]