From 5ec86886a75267e8fafe26102d32055d1376808b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 21 Oct 2012 16:53:28 +0200 Subject: [PATCH] * xterm.c (x_focus_changed): Check if daemonp when sending focus in event. Fixes: debbugs:12681 --- src/ChangeLog | 5 +++++ src/xterm.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 979c38e4920..412e67828a7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-10-21 Jan Djärv + + * xterm.c (x_focus_changed): Check if daemonp when sending focus in + event (Bug#12681). + 2012-10-21 Glenn Morris * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el. diff --git a/src/xterm.c b/src/xterm.c index a4c3e125d8d..8b005873f4d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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))) { -- 2.39.2