From ac71ced75b34c3a645e99986923d8b6c9b2fdc23 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 19 May 2009 03:30:36 +0000 Subject: [PATCH] (do_switch_frame) [NS_IMPL_COCOA]: Don't raise any window. (delete_frame) [NS_IMPL_COCOA]: Instead, do it here. --- src/ChangeLog | 5 +++++ src/frame.c | 19 +++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4645317e94b..b73bc05325e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-05-19 Stefan Monnier + + * frame.c (do_switch_frame) [NS_IMPL_COCOA]: Don't raise any window. + (delete_frame) [NS_IMPL_COCOA]: Instead, do it here. + 2009-05-19 YAMAMOTO Mitsuharu * xterm.c (x_delete_display): Don't call XrmDestroyDatabase here. diff --git a/src/frame.c b/src/frame.c index afcc96cf6f7..10713826b50 100644 --- a/src/frame.c +++ b/src/frame.c @@ -866,16 +866,6 @@ do_switch_frame (frame, track, for_deletion, norecord) Fselect_window (XFRAME (frame)->selected_window, norecord); -#ifdef NS_IMPL_COCOA - /* 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 - /* We want to make sure that the next event generates a frame-switch event to the appropriate frame. This seems kludgy to me, but before you take it out, make sure that evaluating something like @@ -1423,6 +1413,15 @@ delete_frame (frame, force) break; } } +#ifdef NS_IMPL_COCOA + else + /* Under NS, there is no system mechanism for choosing a new + window to get focus -- it is left to application code. + So the portion of THIS application interfacing with NS + needs to know about it. We call Fraise_frame, but the + purpose is really to transfer focus. */ + Fraise_frame (frame1); +#endif do_switch_frame (frame1, 0, 1, Qnil); sf = SELECTED_FRAME (); -- 2.11.4.GIT