From: Richard M. Stallman Date: Tue, 9 May 1995 04:47:52 +0000 (+0000) Subject: (Funfocus_frame): Check for live X frame. X-Git-Tag: emacs-19.34~4086 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=917ad15f0318e760e3f0b41ad0d3633c6ed1c703;p=emacs.git (Funfocus_frame): Check for live X frame. --- diff --git a/src/xfns.c b/src/xfns.c index 722c6791dc1..712dac5696b 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3024,12 +3024,16 @@ DEFUN ("unfocus-frame", Funfocus_frame, Sunfocus_frame, 0, 0, 0, "If a frame has been focused, release it.") () { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame); - if (dpyinfo->x_focus_frame) + if (FRAME_X_P (selected_frame)) { - BLOCK_INPUT; - x_unfocus_frame (dpyinfo->x_focus_frame); - UNBLOCK_INPUT; + struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame); + + if (dpyinfo->x_focus_frame) + { + BLOCK_INPUT; + x_unfocus_frame (dpyinfo->x_focus_frame); + UNBLOCK_INPUT; + } } return Qnil;