Mercurial > emacs
changeset 9840:81829106d303
(EVENT_QUEUES_EMPTY): Only test do_mouse_tracking and mouse_moved #ifdef
HAVE_MOUSE.
(Ftrack_mouse): Protect with #ifdef HAVE_MOUSE.
(syms_of_keyboard): Protect initialization of do_mouse_tracking, defsubr
of Strack_mouse, and DEFVAR of track-mouse with #ifdef HAVE_MOUSE.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Wed, 09 Nov 1994 03:43:30 +0000 |
parents | 21c1a413ab75 |
children | 34901f215641 |
files | src/keyboard.c |
diffstat | 1 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Wed Nov 09 00:25:38 1994 +0000 +++ b/src/keyboard.c Wed Nov 09 03:43:30 1994 +0000 @@ -375,6 +375,7 @@ dequeuing functions? Such a flag could be screwed up by interrupts at inopportune times. */ +#ifdef HAVE_MOUSE /* 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. */ @@ -396,6 +397,9 @@ ((kbd_fetch_ptr == kbd_store_ptr) \ && (! FRAMEP (do_mouse_tracking) || !mouse_moved)) +#else /* Not HAVE_MOUSE. */ +#define EVENT_QUEUES_EMPTY (kbd_fetch_ptr == kbd_store_ptr) +#endif /* HAVE_MOUSE. */ /* Symbols to head events. */ Lisp_Object Qmouse_movement; @@ -1935,6 +1939,8 @@ } +#ifdef HAVE_MOUSE + /* Restore mouse tracking enablement. See Ftrack_mouse for the only use of this function. */ @@ -1981,6 +1987,8 @@ val = Fprogn (args); return unbind_to (count, val); } + +#endif /* HAVE_MOUSE */ /* Low level keyboard/mouse input. kbd_buffer_store_event places events in kbd_buffer, and @@ -2261,6 +2269,7 @@ } } } +#ifdef HAVE_MOUSE /* Try generating a mouse motion event. */ else if (FRAMEP (do_mouse_tracking) && mouse_moved) { @@ -2297,13 +2306,12 @@ } #endif -#if defined (MULTI_FRAME) || defined (HAVE_MOUSE) /* If we didn't decide to make a switch-frame event, go ahead and return a mouse-motion event. */ if (!NILP (x) && NILP (obj)) obj = make_lispy_movement (f, bar_window, part, x, y, time); -#endif } +#endif /* HAVE_MOUSE */ else /* We were promised by the above while loop that there was something for us to read! */ @@ -5959,7 +5967,9 @@ recent_keys_index = 0; kbd_fetch_ptr = kbd_buffer; kbd_store_ptr = kbd_buffer; +#ifdef HAVE_MOUSE do_mouse_tracking = Qnil; +#endif input_pending = 0; #ifdef MULTI_FRAME @@ -6165,7 +6175,9 @@ defsubr (&Sread_key_sequence); defsubr (&Srecursive_edit); +#ifdef HAVE_MOUSE defsubr (&Strack_mouse); +#endif defsubr (&Sinput_pending_p); defsubr (&Scommand_execute); defsubr (&Srecent_keys); @@ -6383,8 +6395,10 @@ and the minor mode maps regardless of `overriding-local-map'."); Voverriding_local_map_menu_flag = Qnil; +#ifdef HAVE_MOUSE DEFVAR_BOOL ("track-mouse", &do_mouse_tracking, "*Non-nil means generate motion events for mouse motion."); +#endif DEFVAR_LISP ("system-key-alist", &Vsystem_key_alist, "Alist of system-specific X windows key symbols.\n\