diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-10-23 07:49:24 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-10-23 07:49:24 +0000 |
commit | e177ac3a87e612f6b12c0f244e12b51c0144160e (patch) | |
tree | 7e58aa4d91d364259f6c354d83521fa88e91b49e /src/keyboard.c | |
parent | 08e8171fd0049408c03e7d92c51dc957a5a06a74 (diff) | |
download | emacs-e177ac3a87e612f6b12c0f244e12b51c0144160e.tar.gz emacs-e177ac3a87e612f6b12c0f244e12b51c0144160e.tar.bz2 emacs-e177ac3a87e612f6b12c0f244e12b51c0144160e.zip |
(kbd_buffer_get_event): Cope if mouse_position_hook does not store anything.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 27d79ea6908..0007045651c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2210,6 +2210,10 @@ kbd_buffer_get_event () Lisp_Object x, y; unsigned long time; + /* Note that this uses F to determine which display to look at. + If there is no valid info, it does not store anything + so x remains nil. */ + x = Qnil; (*mouse_position_hook) (&f, &bar_window, &part, &x, &y, &time); obj = Qnil; @@ -2218,7 +2222,7 @@ kbd_buffer_get_event () /* Decide if we should generate a switch-frame event. Don't generate switch-frame events for motion outside of all Emacs frames. */ - if (f) + if (!NILP (x) && f) { Lisp_Object frame; @@ -2236,7 +2240,7 @@ kbd_buffer_get_event () #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 (obj)) + if (!NILP (x) && NILP (obj)) obj = make_lispy_movement (f, bar_window, part, x, y, time); #endif } |