Commit 917ad15f authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Funfocus_frame): Check for live X frame.

parent bc6c324f
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment