changeset 103244:1fd5de3f20cd

* frame.c (do_switch_frame): Under NS_IMPL_COCOA section, check whether selected frame is viable before raising it (based on patch by David Reitter), and improve commentary.
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Mon, 18 May 2009 08:01:51 +0000
parents c5cff5d1a017
children c878fe60e8be
files src/frame.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Mon May 18 08:01:20 2009 +0000
+++ b/src/frame.c	Mon May 18 08:01:51 2009 +0000
@@ -867,8 +867,12 @@
   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