* xterm.c (x_focus_changed): Check if daemonp when sending focus in
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 21 Oct 2012 14:53:28 +0000 (16:53 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 21 Oct 2012 14:53:28 +0000 (16:53 +0200)
event.

Fixes: debbugs:12681

src/ChangeLog
src/xterm.c

index 979c38e..412e678 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-21  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xterm.c (x_focus_changed): Check if daemonp when sending focus in
+       event (Bug#12681).
+
 2012-10-21  Glenn Morris  <rgm@gnu.org>
 
        * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
index a4c3e12..8b00587 100644 (file)
@@ -3448,7 +3448,8 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra
 
           /* Don't stop displaying the initial startup message
              for a switch-frame event we don't need.  */
-          if (NILP (Vterminal_frame)
+          /* When run as a deamon, Vterminal_frame is always NIL.  */
+          if ((NILP (Vterminal_frame) || EQ (Fdaemonp(), Qt))
               && CONSP (Vframe_list)
               && !NILP (XCDR (Vframe_list)))
             {