changeset 9618:9fe4987e4896

(do_mouse_tracking): Now a FRAME_PTR. (EVENT_QUEUES_EMPTY, Ftrack_mouse, tracking_off): Changed accordingly. (kbd_buffer_get_event): Let do_mouse_tracking specify the display for mouse tracking.
author Richard M. Stallman <rms@gnu.org>
date Thu, 20 Oct 1994 05:33:22 +0000
parents 3ea6ce042453
children 1c985426ad84
files src/keyboard.c
diffstat 1 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Thu Oct 20 04:40:28 1994 +0000
+++ b/src/keyboard.c	Thu Oct 20 05:33:22 1994 +0000
@@ -374,10 +374,10 @@
    dequeuing functions?  Such a flag could be screwed up by interrupts
    at inopportune times.  */
 
-/* If this flag is non-zero, we check mouse_moved to see when the
-   mouse moves, and motion events will appear in the input stream.  If
-   it is zero, mouse motion is ignored.  */
-static int do_mouse_tracking;
+/* If this flag is a frame, we check mouse_moved to see when the
+   mouse moves, and motion events will appear in the input stream.
+   Otherwise, mouse motion is ignored.  */
+static Lisp_Object do_mouse_tracking;
 
 /* The window system handling code should set this if the mouse has
    moved since the last call to the mouse_position_hook.  Calling that
@@ -392,7 +392,8 @@
    is readable input; all the events in the queue might be button-up
    events, and do_mouse_tracking might be off.  */
 #define EVENT_QUEUES_EMPTY \
-  ((kbd_fetch_ptr == kbd_store_ptr) && (!do_mouse_tracking || !mouse_moved))
+  ((kbd_fetch_ptr == kbd_store_ptr) \
+   && (! FRAMEP (do_mouse_tracking) || !mouse_moved))
 
 
 /* Symbols to head events.  */
@@ -1889,13 +1890,14 @@
 
 /* Restore mouse tracking enablement.  See Ftrack_mouse for the only use
    of this function.  */
+
 static Lisp_Object
 tracking_off (old_value)
      Lisp_Object old_value;
 {
   if (! XFASTINT (old_value))
     {
-      do_mouse_tracking = 0;
+      do_mouse_tracking = Qnil;
 
       /* Redisplay may have been preempted because there was input
 	 available, and it assumes it will be called again after the
@@ -1922,13 +1924,12 @@
   int count = specpdl_ptr - specpdl;
   Lisp_Object val;
 
-  XSETINT (val, do_mouse_tracking);
-  record_unwind_protect (tracking_off, val);
+  record_unwind_protect (tracking_off, do_mouse_tracking);
 
   if (!input_pending && !detect_input_pending ())
     prepare_menu_bars ();
 
-  do_mouse_tracking = 1;
+  XSETFRAME (do_mouse_tracking, selected_frame);
   
   val = Fprogn (args);
   return unbind_to (count, val);
@@ -2200,9 +2201,9 @@
 	}
     }
   /* Try generating a mouse motion event.  */
-  else if (do_mouse_tracking && mouse_moved)
+  else if (FRAMEP (do_mouse_tracking) && mouse_moved)
     {
-      FRAME_PTR f = 0;
+      FRAME_PTR f = XFRAME (do_mouse_tracking);
       Lisp_Object bar_window;
       enum scroll_bar_part part;
       Lisp_Object x, y;
@@ -5877,7 +5878,7 @@
   recent_keys_index = 0;
   kbd_fetch_ptr = kbd_buffer;
   kbd_store_ptr = kbd_buffer;
-  do_mouse_tracking = 0;
+  do_mouse_tracking = Qnil;
   input_pending = 0;
 
 #ifdef MULTI_FRAME