From 4d19d194070f508faeddcbbd4c31fd4ce720825a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 18 Jul 2013 14:16:33 -0700 Subject: [PATCH] * keyboard.c: Try to fix typos in previous change. (DISPLAY_LIST_INFO): New macro. (kbd_buffer_get_event): Do not access members that are not present in X11. Revert nadvertent change of "!=" to "=". --- src/ChangeLog | 7 +++++++ src/keyboard.c | 15 +++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index de80ac168bd..164445432ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-07-18 Paul Eggert + + * keyboard.c: Try to fix typos in previous change. + (DISPLAY_LIST_INFO): New macro. + (kbd_buffer_get_event): Do not access members that are not present + in X11. Revert nadvertent change of "!=" to "=". + 2013-07-18 Juanma Barranquero * keyboard.c (kbd_buffer_get_event): diff --git a/src/keyboard.c b/src/keyboard.c index f025d6c5dfa..fce466eca2f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4066,7 +4066,12 @@ kbd_buffer_get_event (KBOARD **kbp, } else if (event->kind == FOCUS_OUT_EVENT) { -#if defined (HAVE_NS) || defined (HAVE_X11) || defined (WINDOWSNT) +#if defined HAVE_X11 || defined HAVE_NS +# define DISPLAY_LIST_INFO(di) (di) +#elif defined WINDOWSNT +# define DISPLAY_LIST_INFO(di) FRAME_X_DISPLAY_INFO (di) +#endif +#ifdef DISPLAY_LIST_INFO #ifdef HAVE_NS struct ns_display_info *di; @@ -4076,11 +4081,13 @@ kbd_buffer_get_event (KBOARD **kbp, Lisp_Object frame = event->frame_or_window; bool focused = false; - for (di = x_display_list; di && ! focused; di = FRAME_X_DISPLAY_INFO (di)->next) - focused = FRAME_X_DISPLAY_INFO (di)->x_highlight_frame = 0; + for (di = x_display_list; + di && ! focused; + di = DISPLAY_LIST_INFO (di)->next) + focused = DISPLAY_LIST_INFO (di)->x_highlight_frame != 0; if (! focused) obj = make_lispy_focus_out (frame); -#endif /* HAVE_NS || HAVE_X11 || WINDOWSNT */ +#endif /* DISPLAY_LIST_INFO */ kbd_fetch_ptr = event + 1; } -- 2.39.2