diff options
| author | Karoly Lorentey | 2005-09-07 23:28:54 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-09-07 23:28:54 +0000 |
| commit | 5b65d888a676b023b7232b460105551e51a58a13 (patch) | |
| tree | e4de724a9d0b94abe002537267adf38f6f80b76b /src | |
| parent | b8c89bf6382f885d1d20e94a617d55ea0709b023 (diff) | |
| download | emacs-5b65d888a676b023b7232b460105551e51a58a13.tar.gz emacs-5b65d888a676b023b7232b460105551e51a58a13.zip | |
Enforce the presence of `window-system' and `tty-type' frame parameters in all frames.
* src/dispnew.c (init_display): Set up `window-system' and `tty-type'
frame parameters in the initial tty frame.
* src/frame.c (Fmake_terminal_frame): Look up the `tty-type' frame
parameter, not `tty' when discovering the tty type of the new frame.
Initialize `tty' and `tty-type' frame parameters in the new frame.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-402
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 6 | ||||
| -rw-r--r-- | src/frame.c | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 2cb661c6ba7..1ee951b0be0 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6776,7 +6776,9 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\ | |||
| 6776 | 6776 | ||
| 6777 | d->reference_count++; | 6777 | d->reference_count++; |
| 6778 | d->display_info.tty->top_frame = selected_frame; | 6778 | d->display_info.tty->top_frame = selected_frame; |
| 6779 | change_frame_size (XFRAME (selected_frame), FrameRows (d->display_info.tty), FrameCols (d->display_info.tty), 0, 0, 1); | 6779 | change_frame_size (XFRAME (selected_frame), |
| 6780 | FrameRows (d->display_info.tty), | ||
| 6781 | FrameCols (d->display_info.tty), 0, 0, 1); | ||
| 6780 | 6782 | ||
| 6781 | /* Delete the initial display. */ | 6783 | /* Delete the initial display. */ |
| 6782 | if (--initial_device->reference_count == 0 | 6784 | if (--initial_device->reference_count == 0 |
| @@ -6784,9 +6786,11 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\ | |||
| 6784 | (*initial_device->delete_device_hook) (initial_device); | 6786 | (*initial_device->delete_device_hook) (initial_device); |
| 6785 | 6787 | ||
| 6786 | /* Update frame parameters to reflect the new type. */ | 6788 | /* Update frame parameters to reflect the new type. */ |
| 6789 | Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil)); | ||
| 6787 | Fmodify_frame_parameters | 6790 | Fmodify_frame_parameters |
| 6788 | (selected_frame, Fcons (Fcons (Qtty_type, | 6791 | (selected_frame, Fcons (Fcons (Qtty_type, |
| 6789 | Fdisplay_tty_type (selected_frame)), Qnil)); | 6792 | Fdisplay_tty_type (selected_frame)), Qnil)); |
| 6793 | Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qtty, Qnil), Qnil)); | ||
| 6790 | } | 6794 | } |
| 6791 | 6795 | ||
| 6792 | { | 6796 | { |
diff --git a/src/frame.c b/src/frame.c index ecbae7f593f..5ebdf7f11d8 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -661,6 +661,8 @@ affects all frames on the same terminal device. */) | |||
| 661 | struct device *d = NULL; | 661 | struct device *d = NULL; |
| 662 | Lisp_Object frame, tem; | 662 | Lisp_Object frame, tem; |
| 663 | struct frame *sf = SELECTED_FRAME (); | 663 | struct frame *sf = SELECTED_FRAME (); |
| 664 | Lisp_Object tty, tty_type; | ||
| 665 | struct gcpro gcpro1, gcpro2; | ||
| 664 | 666 | ||
| 665 | #ifdef MSDOS | 667 | #ifdef MSDOS |
| 666 | if (sf->output_method != output_msdos_raw | 668 | if (sf->output_method != output_msdos_raw |
| @@ -693,7 +695,6 @@ affects all frames on the same terminal device. */) | |||
| 693 | 695 | ||
| 694 | if (!d) | 696 | if (!d) |
| 695 | { | 697 | { |
| 696 | Lisp_Object tty, tty_type; | ||
| 697 | char *name = 0, *type = 0; | 698 | char *name = 0, *type = 0; |
| 698 | 699 | ||
| 699 | tty = Fassq (Qtty, parms); | 700 | tty = Fassq (Qtty, parms); |
| @@ -711,7 +712,7 @@ affects all frames on the same terminal device. */) | |||
| 711 | 712 | ||
| 712 | tty_type = Fassq (Qtty_type, parms); | 713 | tty_type = Fassq (Qtty_type, parms); |
| 713 | if (EQ (tty_type, Qnil)) | 714 | if (EQ (tty_type, Qnil)) |
| 714 | tty_type = Fassq (Qtty, XFRAME (selected_frame)->param_alist); | 715 | tty_type = Fassq (Qtty_type, XFRAME (selected_frame)->param_alist); |
| 715 | if (EQ (tty_type, Qnil) && FRAME_TERMCAP_P (XFRAME (selected_frame)) | 716 | if (EQ (tty_type, Qnil) && FRAME_TERMCAP_P (XFRAME (selected_frame)) |
| 716 | && FRAME_TTY (XFRAME (selected_frame))->type) | 717 | && FRAME_TTY (XFRAME (selected_frame))->type) |
| 717 | tty_type = build_string (FRAME_TTY (XFRAME (selected_frame))->type); | 718 | tty_type = build_string (FRAME_TTY (XFRAME (selected_frame))->type); |
| @@ -750,10 +751,14 @@ affects all frames on the same terminal device. */) | |||
| 750 | adjust_glyphs (f); | 751 | adjust_glyphs (f); |
| 751 | calculate_costs (f); | 752 | calculate_costs (f); |
| 752 | XSETFRAME (frame, f); | 753 | XSETFRAME (frame, f); |
| 754 | GCPRO2 (tty_type, tty); | ||
| 753 | Fmodify_frame_parameters (frame, Vdefault_frame_alist); | 755 | Fmodify_frame_parameters (frame, Vdefault_frame_alist); |
| 754 | Fmodify_frame_parameters (frame, parms); | 756 | Fmodify_frame_parameters (frame, parms); |
| 755 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil)); | 757 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil)); |
| 756 | 758 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty_type, tty_type), Qnil)); | |
| 759 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty, tty), Qnil)); | ||
| 760 | UNGCPRO; | ||
| 761 | |||
| 757 | /* Make the frame face alist be frame-specific, so that each | 762 | /* Make the frame face alist be frame-specific, so that each |
| 758 | frame could change its face definitions independently. */ | 763 | frame could change its face definitions independently. */ |
| 759 | f->face_alist = Fcopy_alist (sf->face_alist); | 764 | f->face_alist = Fcopy_alist (sf->face_alist); |