* Update the screen to match the current bitmap, after adding stuff * with add_tty_char etc. */
| 711 | * with add_tty_char etc. |
| 712 | */ |
| 713 | short |
| 714 | update_tty(WindowPtr window) |
| 715 | { |
| 716 | Rect r; |
| 717 | RECORD_EXISTS(record); |
| 718 | |
| 719 | #if CLIP_RECT_ONLY |
| 720 | if (record->invalid_rect.right <= record->invalid_rect.left |
| 721 | || record->invalid_rect.bottom <= record->invalid_rect.top) { |
| 722 | return noErr; |
| 723 | } |
| 724 | r = record->invalid_rect; |
| 725 | #else |
| 726 | if (EmptyRgn(record->invalid_part)) { |
| 727 | return noErr; |
| 728 | } |
| 729 | r = (*(record->invalid_part))->rgnBBox; |
| 730 | #endif |
| 731 | select_onscreen_window(record); |
| 732 | copy_bits(record, &r, srcCopy, (RgnHandle) 0); |
| 733 | #if CLIP_RECT_ONLY |
| 734 | empty_rect(&(record->invalid_rect)); |
| 735 | #else |
| 736 | SetEmptyRgn(record->invalid_part); |
| 737 | #endif |
| 738 | if (record->curs_state) { |
| 739 | pos_rect(record, &r, record->x_curs, record->y_curs, record->x_curs, |
| 740 | record->y_curs); |
| 741 | InvertRect(&r); |
| 742 | } |
| 743 | |
| 744 | return noErr; |
| 745 | } |
| 746 | |
| 747 | /* |
| 748 | * Low level add to screen |
no test coverage detected