emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/xterm.c


From: Pavel Janík
Subject: [Emacs-diffs] Changes to emacs/src/xterm.c
Date: Mon, 01 Apr 2002 08:43:58 -0500

Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.716 emacs/src/xterm.c:1.717
*** emacs/src/xterm.c:1.716     Sun Mar 31 11:43:51 2002
--- emacs/src/xterm.c   Mon Apr  1 08:43:58 2002
***************
*** 255,261 ****
  
  /* Non-zero means autoselect window with the mouse cursor.  */
  
! int x_autoselect_window_p;
  
  /* Non-zero means draw block and hollow cursor as wide as the glyph
     under it.  For example, if a block cursor is over a tab, it will be
--- 255,264 ----
  
  /* Non-zero means autoselect window with the mouse cursor.  */
  
! int autoselect_window_p;
! 
! /* Last window where we saw the mouse.  Used by autoselect-window.  */
! static Lisp_Object last_window;
  
  /* Non-zero means draw block and hollow cursor as wide as the glyph
     under it.  For example, if a block cursor is over a tab, it will be
***************
*** 6653,6681 ****
    last_mouse_motion_event = *event;
    XSETFRAME (last_mouse_motion_frame, frame);
  
- #if 0 /* Lisp must not be called asynchronously, so this must
-        not be done.  */
-   if (x_autoselect_window_p)
-     {
-       int area;
-       Lisp_Object window;
-       static Lisp_Object last_window;
- 
-       window = window_from_coordinates (frame, XINT (event->x), XINT 
(event->y), &area, 0);
- 
-       /* Window will be selected only when it is not selected now and
-        last mouse movement event was not in it.  Minibuffer window
-        will be selected iff it is active.  */
-       if (!EQ (window, last_window)
-         && !EQ (window, selected_window)
-         && (!MINI_WINDOW_P (XWINDOW (window))
-             || (EQ (window, minibuf_window) && minibuf_level > 0)))
-       Fselect_window (window);
- 
-       last_window=window;
-     }
- #endif
- 
    if (event->window != FRAME_X_WINDOW (frame))
      {
        frame->mouse_moved = 1;
--- 6656,6661 ----
***************
*** 10895,10901 ****
                  }
  
                if (f)
!                 note_mouse_movement (f, &event.xmotion);
                else
                  {
  #ifndef USE_TOOLKIT_SCROLL_BARS
--- 10875,10909 ----
                  }
  
                if (f)
!                 {
! 
!                   /* Generate SELECT_WINDOW_EVENTs when needed.  */
!                   if (autoselect_window_p)
!                     {
!                       Lisp_Object window;
!                       int area;
! 
!                       window = window_from_coordinates (f,
!                                                         XINT 
(event.xmotion.x), XINT (event.xmotion.y),
!                                                         &area, 0);
! 
!                       /* Window will be selected only when it is not selected 
now and
!                          last mouse movement event was not in it.  Minibuffer 
window
!                          will be selected iff it is active.  */
!                       if (!EQ (window, last_window)
!                           && !EQ (window, selected_window)
!                           && numchars > 0)
!                         {
!                           bufp->kind = SELECT_WINDOW_EVENT;
!                           bufp->frame_or_window = window;
!                           bufp->arg = Qnil;
!                           ++bufp, ++count, --numchars;
!                         }
! 
!                       last_window=window;
!                     }
!                   note_mouse_movement (f, &event.xmotion);
!                 }
                else
                  {
  #ifndef USE_TOOLKIT_SCROLL_BARS
***************
*** 15108,15116 ****
    staticpro (&previous_help_echo);
    help_echo_pos = -1;
  
!   DEFVAR_BOOL ("x-autoselect-window", &x_autoselect_window_p,
      doc: /* *Non-nil means autoselect window with mouse pointer.  */);
!   x_autoselect_window_p = 0;
  
    DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p,
      doc: /* *Non-nil means draw block cursor as wide as the glyph under it.
--- 15116,15124 ----
    staticpro (&previous_help_echo);
    help_echo_pos = -1;
  
!   DEFVAR_BOOL ("autoselect-window", &autoselect_window_p,
      doc: /* *Non-nil means autoselect window with mouse pointer.  */);
!   autoselect_window_p = 0;
  
    DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p,
      doc: /* *Non-nil means draw block cursor as wide as the glyph under it.



reply via email to

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