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: Sat, 16 Feb 2002 05:02:39 -0500

Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.704 emacs/src/xterm.c:1.705
*** emacs/src/xterm.c:1.704     Fri Feb 15 04:36:05 2002
--- emacs/src/xterm.c   Sat Feb 16 05:02:38 2002
***************
*** 253,258 ****
--- 253,262 ----
  
  static int any_help_event_p;
  
+ /* 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
     drawn as wide as that tab on the display.  */
***************
*** 6643,6648 ****
--- 6647,6672 ----
    last_mouse_motion_event = *event;
    XSETFRAME (last_mouse_motion_frame, frame);
  
+   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.  Minubuffer 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;
+     }
+ 
    if (event->window != FRAME_X_WINDOW (frame))
      {
        frame->mouse_moved = 1;
***************
*** 6664,6670 ****
  
  /* This is used for debugging, to turn off note_mouse_highlight.  */
  
!  int disable_mouse_highlight;
  
  
  
--- 6688,6694 ----
  
  /* This is used for debugging, to turn off note_mouse_highlight.  */
  
! int disable_mouse_highlight;
  
  
  
***************
*** 15040,15045 ****
--- 15064,15073 ----
    previous_help_echo = Qnil;
    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.



reply via email to

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