]> git.eshelyaron.com Git - emacs.git/commitdiff
* keyboard.c: Try to fix typos in previous change.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Jul 2013 21:16:33 +0000 (14:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Jul 2013 21:16:33 +0000 (14:16 -0700)
(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
src/keyboard.c

index de80ac168bd1a5e190e20577de55e2384c791d21..164445432ecf70a9e182812670a8ff0cf75ab6de 100644 (file)
@@ -1,3 +1,10 @@
+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):
index f025d6c5dfa4fcd089c0ff10154799a1d10433df..fce466eca2fa5a4283a2b725083570ede7153744 100644 (file)
@@ -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;
         }