diff options
author | Adrian Robert <Adrian.B.Robert@gmail.com> | 2009-05-18 08:01:51 +0000 |
---|---|---|
committer | Adrian Robert <Adrian.B.Robert@gmail.com> | 2009-05-18 08:01:51 +0000 |
commit | 06302656f363621255dc99dc1be5dcf89a943cde (patch) | |
tree | 0f1a7dda8e0ce84a2149e60ba9b65ff2b954eff2 | |
parent | 1564e6499ec27783f38f16bc75e67df484f274e6 (diff) | |
download | emacs-06302656f363621255dc99dc1be5dcf89a943cde.tar.gz |
* 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.
-rw-r--r-- | src/frame.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/frame.c b/src/frame.c index de857af0273..afcc96cf6f7 100644 --- a/src/frame.c +++ b/src/frame.c @@ -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 |