diff options
| author | Stefan Monnier | 2009-05-19 03:30:36 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-05-19 03:30:36 +0000 |
| commit | ac71ced75b34c3a645e99986923d8b6c9b2fdc23 (patch) | |
| tree | 64773e18e9d0e1acce5b59f73448a6188bf04eb2 /src | |
| parent | 2645d15bb14dc729fef19fee9fdc2a4dfd9a3295 (diff) | |
| download | emacs-ac71ced75b34c3a645e99986923d8b6c9b2fdc23.tar.gz emacs-ac71ced75b34c3a645e99986923d8b6c9b2fdc23.zip | |
(do_switch_frame) [NS_IMPL_COCOA]: Don't raise any window.
(delete_frame) [NS_IMPL_COCOA]: Instead, do it here.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2009-05-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * frame.c (do_switch_frame) [NS_IMPL_COCOA]: Don't raise any window. | ||
| 4 | (delete_frame) [NS_IMPL_COCOA]: Instead, do it here. | ||
| 5 | |||
| 1 | 2009-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 6 | 2009-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 7 | ||
| 3 | * xterm.c (x_delete_display): Don't call XrmDestroyDatabase here. | 8 | * 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) | |||
| 866 | 866 | ||
| 867 | Fselect_window (XFRAME (frame)->selected_window, norecord); | 867 | Fselect_window (XFRAME (frame)->selected_window, norecord); |
| 868 | 868 | ||
| 869 | #ifdef NS_IMPL_COCOA | ||
| 870 | /* Under NS, there is no system mechanism for choosing a new window to be | ||
| 871 | selected -- it is left to application code. So the portion of THIS | ||
| 872 | application interfacing with NS needs to know about it. */ | ||
| 873 | if (for_deletion && FRAME_VISIBLE_P (XFRAME (selected_frame)) | ||
| 874 | && FRAME_LIVE_P (XFRAME (selected_frame)) | ||
| 875 | && ! FRAME_ICONIFIED_P (XFRAME (selected_frame))) | ||
| 876 | Fraise_frame(Qnil); | ||
| 877 | #endif | ||
| 878 | |||
| 879 | /* We want to make sure that the next event generates a frame-switch | 869 | /* We want to make sure that the next event generates a frame-switch |
| 880 | event to the appropriate frame. This seems kludgy to me, but | 870 | event to the appropriate frame. This seems kludgy to me, but |
| 881 | before you take it out, make sure that evaluating something like | 871 | before you take it out, make sure that evaluating something like |
| @@ -1423,6 +1413,15 @@ delete_frame (frame, force) | |||
| 1423 | break; | 1413 | break; |
| 1424 | } | 1414 | } |
| 1425 | } | 1415 | } |
| 1416 | #ifdef NS_IMPL_COCOA | ||
| 1417 | else | ||
| 1418 | /* Under NS, there is no system mechanism for choosing a new | ||
| 1419 | window to get focus -- it is left to application code. | ||
| 1420 | So the portion of THIS application interfacing with NS | ||
| 1421 | needs to know about it. We call Fraise_frame, but the | ||
| 1422 | purpose is really to transfer focus. */ | ||
| 1423 | Fraise_frame (frame1); | ||
| 1424 | #endif | ||
| 1426 | 1425 | ||
| 1427 | do_switch_frame (frame1, 0, 1, Qnil); | 1426 | do_switch_frame (frame1, 0, 1, Qnil); |
| 1428 | sf = SELECTED_FRAME (); | 1427 | sf = SELECTED_FRAME (); |