+2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ * 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 <lekktu@gmail.com>
* keyboard.c (kbd_buffer_get_event):
}
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;
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;
}