diff options
| author | Gerd Moellmann | 2001-03-14 16:36:44 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-03-14 16:36:44 +0000 |
| commit | 1e8324d9a0eaec8e4de2a9a3b309ab77e1ae827b (patch) | |
| tree | 86e0bf92f4d8ee6c7f55c291b7429d3326c1efda /src | |
| parent | d12f6f836957169fbc07a890035fbf86e3cd9829 (diff) | |
| download | emacs-1e8324d9a0eaec8e4de2a9a3b309ab77e1ae827b.tar.gz emacs-1e8324d9a0eaec8e4de2a9a3b309ab77e1ae827b.zip | |
(do_switch_frame): Remove unused parameter NO_EVENT, add
FOR_DELETION. Avoid resizing the mini-window of the selected
frame if FOR_DELETION is set.
(Fselect_frame, Fhandle_switch_frame, Fdelete_frame)
(Fmake_frame_invisible): Change calls to do_switch_frame for new
signature.
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/frame.c b/src/frame.c index 44f14187305..08aa8e4494c 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -545,11 +545,25 @@ Note that changing the size of one terminal frame automatically affects all.") | |||
| 545 | XCDR (XCAR (tem)) = Fcopy_sequence (XCDR (XCAR (tem))); | 545 | XCDR (XCAR (tem)) = Fcopy_sequence (XCDR (XCAR (tem))); |
| 546 | return frame; | 546 | return frame; |
| 547 | } | 547 | } |
| 548 | |||
| 548 | 549 | ||
| 550 | /* Perform the switch to frame FRAME. | ||
| 551 | |||
| 552 | If FRAME is a switch-frame event `(switch-frame FRAME1)', use | ||
| 553 | FRAME1 as frame. | ||
| 554 | |||
| 555 | If TRACK is non-zero and the frame that currently has the focus | ||
| 556 | redirects its focus to the selected frame, redirect that focused | ||
| 557 | frame's focus to FRAME instead. | ||
| 558 | |||
| 559 | FOR_DELETION non-zero means that the selected frame is being | ||
| 560 | deleted, which includes the possibility that the frame's display | ||
| 561 | is dead. */ | ||
| 562 | |||
| 549 | Lisp_Object | 563 | Lisp_Object |
| 550 | do_switch_frame (frame, no_enter, track) | 564 | do_switch_frame (frame, track, for_deletion) |
| 551 | Lisp_Object frame, no_enter; | 565 | Lisp_Object frame; |
| 552 | int track; | 566 | int track, for_deletion; |
| 553 | { | 567 | { |
| 554 | struct frame *sf = SELECTED_FRAME (); | 568 | struct frame *sf = SELECTED_FRAME (); |
| 555 | 569 | ||
| @@ -600,7 +614,7 @@ do_switch_frame (frame, no_enter, track) | |||
| 600 | #else /* ! 0 */ | 614 | #else /* ! 0 */ |
| 601 | /* Instead, apply it only to the frame we're pointing to. */ | 615 | /* Instead, apply it only to the frame we're pointing to. */ |
| 602 | #ifdef HAVE_WINDOW_SYSTEM | 616 | #ifdef HAVE_WINDOW_SYSTEM |
| 603 | if (track && (FRAME_WINDOW_P (XFRAME (frame)))) | 617 | if (track && FRAME_WINDOW_P (XFRAME (frame))) |
| 604 | { | 618 | { |
| 605 | Lisp_Object focus, xfocus; | 619 | Lisp_Object focus, xfocus; |
| 606 | 620 | ||
| @@ -615,7 +629,7 @@ do_switch_frame (frame, no_enter, track) | |||
| 615 | #endif /* HAVE_X_WINDOWS */ | 629 | #endif /* HAVE_X_WINDOWS */ |
| 616 | #endif /* ! 0 */ | 630 | #endif /* ! 0 */ |
| 617 | 631 | ||
| 618 | if (FRAME_HAS_MINIBUF_P (sf)) | 632 | if (!for_deletion && FRAME_HAS_MINIBUF_P (sf)) |
| 619 | resize_mini_window (XWINDOW (FRAME_MINIBUF_WINDOW (sf)), 1); | 633 | resize_mini_window (XWINDOW (FRAME_MINIBUF_WINDOW (sf)), 1); |
| 620 | 634 | ||
| 621 | selected_frame = frame; | 635 | selected_frame = frame; |
| @@ -644,7 +658,7 @@ function is called.") | |||
| 644 | (frame, no_enter) | 658 | (frame, no_enter) |
| 645 | Lisp_Object frame, no_enter; | 659 | Lisp_Object frame, no_enter; |
| 646 | { | 660 | { |
| 647 | return do_switch_frame (frame, no_enter, 1); | 661 | return do_switch_frame (frame, 1, 0); |
| 648 | } | 662 | } |
| 649 | 663 | ||
| 650 | 664 | ||
| @@ -663,7 +677,7 @@ to that frame.") | |||
| 663 | /* Preserve prefix arg that the command loop just cleared. */ | 677 | /* Preserve prefix arg that the command loop just cleared. */ |
| 664 | current_kboard->Vprefix_arg = Vcurrent_prefix_arg; | 678 | current_kboard->Vprefix_arg = Vcurrent_prefix_arg; |
| 665 | call1 (Vrun_hooks, Qmouse_leave_buffer_hook); | 679 | call1 (Vrun_hooks, Qmouse_leave_buffer_hook); |
| 666 | return do_switch_frame (event, no_enter, 0); | 680 | return do_switch_frame (event, 0, 0); |
| 667 | } | 681 | } |
| 668 | 682 | ||
| 669 | DEFUN ("ignore-event", Fignore_event, Signore_event, 0, 0, "", | 683 | DEFUN ("ignore-event", Fignore_event, Signore_event, 0, 0, "", |
| @@ -1135,7 +1149,7 @@ frame. The hook is called with one argument FRAME.") | |||
| 1135 | } | 1149 | } |
| 1136 | } | 1150 | } |
| 1137 | 1151 | ||
| 1138 | do_switch_frame (frame1, Qnil, 0); | 1152 | do_switch_frame (frame1, 0, 1); |
| 1139 | sf = SELECTED_FRAME (); | 1153 | sf = SELECTED_FRAME (); |
| 1140 | } | 1154 | } |
| 1141 | 1155 | ||
| @@ -1509,7 +1523,7 @@ but if the second optional argument FORCE is non-nil, you may do so.") | |||
| 1509 | #if 0 /* This isn't logically necessary, and it can do GC. */ | 1523 | #if 0 /* This isn't logically necessary, and it can do GC. */ |
| 1510 | /* Don't let the frame remain selected. */ | 1524 | /* Don't let the frame remain selected. */ |
| 1511 | if (EQ (frame, selected_frame)) | 1525 | if (EQ (frame, selected_frame)) |
| 1512 | do_switch_frame (next_frame (frame, Qt), Qnil, 0) | 1526 | do_switch_frame (next_frame (frame, Qt), 0, 0) |
| 1513 | #endif | 1527 | #endif |
| 1514 | 1528 | ||
| 1515 | /* Don't allow minibuf_window to remain on a deleted frame. */ | 1529 | /* Don't allow minibuf_window to remain on a deleted frame. */ |