aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-23 07:49:24 +0000
committerRichard M. Stallman1994-10-23 07:49:24 +0000
commite177ac3a87e612f6b12c0f244e12b51c0144160e (patch)
tree7e58aa4d91d364259f6c354d83521fa88e91b49e /src
parent08e8171fd0049408c03e7d92c51dc957a5a06a74 (diff)
downloademacs-e177ac3a87e612f6b12c0f244e12b51c0144160e.tar.gz
emacs-e177ac3a87e612f6b12c0f244e12b51c0144160e.zip
(kbd_buffer_get_event): Cope if mouse_position_hook does not store anything.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c8
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 ()
2210 Lisp_Object x, y; 2210 Lisp_Object x, y;
2211 unsigned long time; 2211 unsigned long time;
2212 2212
2213 /* Note that this uses F to determine which display to look at.
2214 If there is no valid info, it does not store anything
2215 so x remains nil. */
2216 x = Qnil;
2213 (*mouse_position_hook) (&f, &bar_window, &part, &x, &y, &time); 2217 (*mouse_position_hook) (&f, &bar_window, &part, &x, &y, &time);
2214 2218
2215 obj = Qnil; 2219 obj = Qnil;
@@ -2218,7 +2222,7 @@ kbd_buffer_get_event ()
2218 /* Decide if we should generate a switch-frame event. Don't 2222 /* Decide if we should generate a switch-frame event. Don't
2219 generate switch-frame events for motion outside of all Emacs 2223 generate switch-frame events for motion outside of all Emacs
2220 frames. */ 2224 frames. */
2221 if (f) 2225 if (!NILP (x) && f)
2222 { 2226 {
2223 Lisp_Object frame; 2227 Lisp_Object frame;
2224 2228
@@ -2236,7 +2240,7 @@ kbd_buffer_get_event ()
2236#if defined (MULTI_FRAME) || defined (HAVE_MOUSE) 2240#if defined (MULTI_FRAME) || defined (HAVE_MOUSE)
2237 /* If we didn't decide to make a switch-frame event, go ahead and 2241 /* If we didn't decide to make a switch-frame event, go ahead and
2238 return a mouse-motion event. */ 2242 return a mouse-motion event. */
2239 if (NILP (obj)) 2243 if (!NILP (x) && NILP (obj))
2240 obj = make_lispy_movement (f, bar_window, part, x, y, time); 2244 obj = make_lispy_movement (f, bar_window, part, x, y, time);
2241#endif 2245#endif
2242 } 2246 }