]> code.delx.au - gnu-emacs/commitdiff
* frame.c (do_switch_frame): Under NS_IMPL_COCOA section, check whether selected...
authorAdrian Robert <Adrian.B.Robert@gmail.com>
Mon, 18 May 2009 08:01:51 +0000 (08:01 +0000)
committerAdrian Robert <Adrian.B.Robert@gmail.com>
Mon, 18 May 2009 08:01:51 +0000 (08:01 +0000)
src/frame.c

index de857af0273eb482c1a6aa8a4df2904790e5fbec..afcc96cf6f7b9e1638c25befea66bfe19d7e8697 100644 (file)
@@ -867,8 +867,12 @@ do_switch_frame (frame, track, for_deletion, norecord)
   Fselect_window (XFRAME (frame)->selected_window, norecord);
 
 #ifdef NS_IMPL_COCOA
-  /* term gets no other notification of this */
-  if (for_deletion)
+  /* Under NS, there is no system mechanism for choosing a new window to be
+     selected -- it is left to application code.  So the portion of THIS
+     application interfacing with NS needs to know about it. */
+  if (for_deletion && FRAME_VISIBLE_P (XFRAME (selected_frame))
+      && FRAME_LIVE_P (XFRAME (selected_frame))
+      && ! FRAME_ICONIFIED_P (XFRAME (selected_frame)))
     Fraise_frame(Qnil);
 #endif