]> git.eshelyaron.com Git - emacs.git/commitdiff
(Funfocus_frame): Check for live X frame.
authorRichard M. Stallman <rms@gnu.org>
Tue, 9 May 1995 04:47:52 +0000 (04:47 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 9 May 1995 04:47:52 +0000 (04:47 +0000)
src/xfns.c

index 722c6791dc10d1d10e7e26a93973b4082ada81f0..712dac5696bf8fb499d9fb4de4fa19c16b08ae6e 100644 (file)
@@ -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;