diff options
| author | Eli Zaretskii | 2008-08-24 20:12:41 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-08-24 20:12:41 +0000 |
| commit | 1266f9ef8e922c210f0058f2480955698a7b19bf (patch) | |
| tree | 5fee4cbe47fb35698f38bd02937f10a066c9dfa1 /src | |
| parent | 75adb00dcfed4ab6ee916ad1202c504e859514e5 (diff) | |
| download | emacs-1266f9ef8e922c210f0058f2480955698a7b19bf.tar.gz emacs-1266f9ef8e922c210f0058f2480955698a7b19bf.zip | |
(make_terminal_frame): Initialize f->terminal, f->terminal->reference_count,
and scroll bars on MS-DOS as well. Set the top frame to newly created frame.
(Fmake_terminal_frame): Reuse the_only_display_info.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/frame.c | 36 |
2 files changed, 24 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 89921e7b395..dbfc3f799c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2008-08-24 Eli Zaretskii <eliz@gnu.org> | 1 | 2008-08-24 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * frame.c (make_terminal_frame): Initialize f->terminal, | ||
| 4 | f->terminal->reference_count, and scroll bars on MS-DOS as well. | ||
| 5 | Set the top frame to newly created frame. | ||
| 6 | (Fmake_terminal_frame): Reuse the_only_display_info. | ||
| 7 | |||
| 3 | * vm-limit.c (get_lim_data) [MSDOS]: Use alternative methods of | 8 | * vm-limit.c (get_lim_data) [MSDOS]: Use alternative methods of |
| 4 | estimating available memory. | 9 | estimating available memory. |
| 5 | 10 | ||
diff --git a/src/frame.c b/src/frame.c index 8d67f20ae48..496b08fae29 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -585,6 +585,8 @@ make_terminal_frame (struct terminal *terminal) | |||
| 585 | 585 | ||
| 586 | f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */ | 586 | f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */ |
| 587 | f->async_visible = 1; /* Don't let visible be cleared later. */ | 587 | f->async_visible = 1; /* Don't let visible be cleared later. */ |
| 588 | f->terminal = terminal; | ||
| 589 | f->terminal->reference_count++; | ||
| 588 | #ifdef MSDOS | 590 | #ifdef MSDOS |
| 589 | f->output_data.tty->display_info = &the_only_display_info; | 591 | f->output_data.tty->display_info = &the_only_display_info; |
| 590 | if (!inhibit_window_system | 592 | if (!inhibit_window_system |
| @@ -614,22 +616,10 @@ make_terminal_frame (struct terminal *terminal) | |||
| 614 | #else | 616 | #else |
| 615 | { | 617 | { |
| 616 | f->output_method = output_termcap; | 618 | f->output_method = output_termcap; |
| 617 | f->terminal = terminal; | ||
| 618 | f->terminal->reference_count++; | ||
| 619 | create_tty_output (f); | 619 | create_tty_output (f); |
| 620 | 620 | ||
| 621 | FRAME_FOREGROUND_PIXEL (f) = FACE_TTY_DEFAULT_FG_COLOR; | 621 | FRAME_FOREGROUND_PIXEL (f) = FACE_TTY_DEFAULT_FG_COLOR; |
| 622 | FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR; | 622 | FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR; |
| 623 | |||
| 624 | FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; | ||
| 625 | FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; | ||
| 626 | |||
| 627 | /* Set the top frame to the newly created frame. */ | ||
| 628 | if (FRAMEP (FRAME_TTY (f)->top_frame) | ||
| 629 | && FRAME_LIVE_P (XFRAME (FRAME_TTY (f)->top_frame))) | ||
| 630 | XFRAME (FRAME_TTY (f)->top_frame)->async_visible = 2; /* obscured */ | ||
| 631 | |||
| 632 | FRAME_TTY (f)->top_frame = frame; | ||
| 633 | } | 623 | } |
| 634 | 624 | ||
| 635 | #ifdef CANNOT_DUMP | 625 | #ifdef CANNOT_DUMP |
| @@ -638,6 +628,16 @@ make_terminal_frame (struct terminal *terminal) | |||
| 638 | #endif | 628 | #endif |
| 639 | #endif /* MSDOS */ | 629 | #endif /* MSDOS */ |
| 640 | 630 | ||
| 631 | FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; | ||
| 632 | FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; | ||
| 633 | |||
| 634 | /* Set the top frame to the newly created frame. */ | ||
| 635 | if (FRAMEP (FRAME_TTY (f)->top_frame) | ||
| 636 | && FRAME_LIVE_P (XFRAME (FRAME_TTY (f)->top_frame))) | ||
| 637 | XFRAME (FRAME_TTY (f)->top_frame)->async_visible = 2; /* obscured */ | ||
| 638 | |||
| 639 | FRAME_TTY (f)->top_frame = frame; | ||
| 640 | |||
| 641 | if (!noninteractive) | 641 | if (!noninteractive) |
| 642 | init_frame_faces (f); | 642 | init_frame_faces (f); |
| 643 | 643 | ||
| @@ -717,14 +717,17 @@ affects all frames on the same terminal device. */) | |||
| 717 | terminal = XCDR (terminal); | 717 | terminal = XCDR (terminal); |
| 718 | t = get_terminal (terminal, 1); | 718 | t = get_terminal (terminal, 1); |
| 719 | } | 719 | } |
| 720 | #ifdef MSDOS | ||
| 721 | if (t && t != the_only_display_info.terminal) | ||
| 722 | /* msdos.c assumes a single tty_display_info object. */ | ||
| 723 | error ("Multiple terminals are not supported on this platform"); | ||
| 724 | if (!t) | ||
| 725 | t = the_only_display_info.terminal; | ||
| 726 | #endif | ||
| 720 | } | 727 | } |
| 721 | 728 | ||
| 722 | if (!t) | 729 | if (!t) |
| 723 | { | 730 | { |
| 724 | #ifdef MSDOS | ||
| 725 | /* msdos.c assumes a single tty_display_info object. */ | ||
| 726 | error ("Multiple terminals are not supported on this platform"); | ||
| 727 | #else /* !MSDOS */ | ||
| 728 | char *name = 0, *type = 0; | 731 | char *name = 0, *type = 0; |
| 729 | Lisp_Object tty, tty_type; | 732 | Lisp_Object tty, tty_type; |
| 730 | 733 | ||
| @@ -751,7 +754,6 @@ affects all frames on the same terminal device. */) | |||
| 751 | } | 754 | } |
| 752 | 755 | ||
| 753 | t = init_tty (name, type, 0); /* Errors are not fatal. */ | 756 | t = init_tty (name, type, 0); /* Errors are not fatal. */ |
| 754 | #endif /* !MSDOS */ | ||
| 755 | } | 757 | } |
| 756 | 758 | ||
| 757 | f = make_terminal_frame (t); | 759 | f = make_terminal_frame (t); |