… | |
… | |
1652 | { |
1652 | { |
1653 | if (!TermWin.focus) |
1653 | if (!TermWin.focus) |
1654 | { |
1654 | { |
1655 | TermWin.focus = 1; |
1655 | TermWin.focus = 1; |
1656 | want_refresh = 1; |
1656 | want_refresh = 1; |
1657 | #ifdef USE_XIM |
1657 | #if USE_XIM |
1658 | if (Input_Context != NULL) |
1658 | if (Input_Context != NULL) |
1659 | { |
1659 | { |
1660 | IMSetStatusPosition (); |
1660 | IMSetStatusPosition (); |
1661 | XSetICFocus (Input_Context); |
1661 | XSetICFocus (Input_Context); |
1662 | } |
1662 | } |
1663 | #endif |
1663 | #endif |
1664 | #ifdef CURSOR_BLINK |
1664 | #if CURSOR_BLINK |
1665 | if (options & Opt_cursorBlink) |
1665 | if (options & Opt_cursorBlink) |
1666 | cursor_blink_ev.start (NOW + BLINK_INTERVAL); |
1666 | cursor_blink_ev.start (NOW + BLINK_INTERVAL); |
1667 | #endif |
1667 | #endif |
1668 | #ifdef OFF_FOCUS_FADING |
1668 | #if OFF_FOCUS_FADING |
1669 | if (rs[Rs_fade]) |
1669 | if (rs[Rs_fade]) |
1670 | { |
1670 | { |
1671 | pix_colors = pix_colors_focused; |
1671 | pix_colors = pix_colors_focused; |
1672 | scr_recolour (); |
1672 | scr_recolour (); |
1673 | } |
1673 | } |
… | |
… | |
1687 | iso14755buf = 0; |
1687 | iso14755buf = 0; |
1688 | #endif |
1688 | #endif |
1689 | #if ENABLE_OVERLAY |
1689 | #if ENABLE_OVERLAY |
1690 | scr_overlay_off (); |
1690 | scr_overlay_off (); |
1691 | #endif |
1691 | #endif |
1692 | #ifdef USE_XIM |
1692 | #if USE_XIM |
1693 | if (Input_Context != NULL) |
1693 | if (Input_Context != NULL) |
1694 | XUnsetICFocus (Input_Context); |
1694 | XUnsetICFocus (Input_Context); |
1695 | #endif |
1695 | #endif |
1696 | #ifdef CURSOR_BLINK |
1696 | #if CURSOR_BLINK |
1697 | if (options & Opt_cursorBlink) |
1697 | if (options & Opt_cursorBlink) |
1698 | cursor_blink_ev.stop (); |
1698 | cursor_blink_ev.stop (); |
1699 | hidden_cursor = 0; |
1699 | hidden_cursor = 0; |
1700 | #endif |
1700 | #endif |
1701 | #ifdef OFF_FOCUS_FADING |
1701 | #if OFF_FOCUS_FADING |
1702 | if (rs[Rs_fade]) |
1702 | if (rs[Rs_fade]) |
1703 | { |
1703 | { |
1704 | pix_colors = pix_colors_unfocused; |
1704 | pix_colors = pix_colors_unfocused; |
1705 | scr_recolour (); |
1705 | scr_recolour (); |
1706 | } |
1706 | } |
… | |
… | |
2561 | } |
2561 | } |
2562 | } |
2562 | } |
2563 | |
2563 | |
2564 | if (n > (int) (sizeof (TermWin.parent) / sizeof (TermWin.parent[0]))) |
2564 | if (n > (int) (sizeof (TermWin.parent) / sizeof (TermWin.parent[0]))) |
2565 | { |
2565 | { |
2566 | XSetWindowBackground (disp, TermWin.parent[0], pix_colors_focused[Color_fg]); |
2566 | XSetWindowBackground (disp, TermWin.parent[0], pix_colors_focused[Color_border]); |
2567 | XSetWindowBackground (disp, TermWin.vt, pix_colors_focused[Color_bg]); |
2567 | XSetWindowBackground (disp, TermWin.vt, pix_colors_focused[Color_bg]); |
2568 | am_transparent = 0; |
2568 | am_transparent = 0; |
2569 | /* XXX: also turn off Opt_transparent? */ |
2569 | /* XXX: also turn off Opt_transparent? */ |
2570 | } |
2570 | } |
2571 | else |
2571 | else |
… | |
… | |
2646 | /* Read a text string from the input buffer */ |
2646 | /* Read a text string from the input buffer */ |
2647 | unicode_t buf[UBUFSIZ]; |
2647 | unicode_t buf[UBUFSIZ]; |
2648 | bool refreshnow = false; |
2648 | bool refreshnow = false; |
2649 | int nlines = 0; |
2649 | int nlines = 0; |
2650 | unicode_t *str = buf; |
2650 | unicode_t *str = buf; |
|
|
2651 | unicode_t *eol = str + min (TermWin.ncol, UBUFSIZ); |
2651 | |
2652 | |
2652 | for (;;) |
2653 | for (;;) |
2653 | { |
2654 | { |
2654 | if (ch == NOCHAR || (IS_CONTROL (ch) && ch != C0_LF && ch != C0_CR && ch != C0_HT)) |
2655 | if (ch == NOCHAR || (IS_CONTROL (ch) && ch != C0_LF && ch != C0_CR && ch != C0_HT)) |
2655 | break; |
2656 | break; |
2656 | |
2657 | |
2657 | *str++ = ch; |
2658 | *str++ = ch; |
2658 | |
2659 | |
2659 | if (ch == C0_LF) |
2660 | if (ch == C0_LF || str >= eol) |
2660 | { |
2661 | { |
|
|
2662 | if (ch == C0_LF) |
2661 | nlines++; |
2663 | nlines++; |
|
|
2664 | |
2662 | refresh_count++; |
2665 | refresh_count++; |
2663 | |
2666 | |
2664 | if (!(options & Opt_jumpScroll) |
2667 | if (!(options & Opt_jumpScroll) |
2665 | || (refresh_count >= refresh_limit * (TermWin.nrow - 1))) |
2668 | || (refresh_count >= refresh_limit * (TermWin.nrow - 1))) |
2666 | { |
2669 | { |
… | |
… | |
2673 | if (nlines >= TermWin.nrow - 1) |
2676 | if (nlines >= TermWin.nrow - 1) |
2674 | { |
2677 | { |
2675 | scr_add_lines (buf, nlines, str - buf); |
2678 | scr_add_lines (buf, nlines, str - buf); |
2676 | nlines = 0; |
2679 | nlines = 0; |
2677 | str = buf; |
2680 | str = buf; |
|
|
2681 | eol = str + min (TermWin.ncol, UBUFSIZ); |
2678 | } |
2682 | } |
2679 | } |
|
|
2680 | |
2683 | |
2681 | if (str >= buf + UBUFSIZ) |
2684 | if (str >= eol) |
2682 | { |
2685 | { |
|
|
2686 | if (eol >= buf + UBUFSIZ) |
|
|
2687 | { |
2683 | ch = NOCHAR; |
2688 | ch = NOCHAR; |
2684 | break; |
2689 | break; |
|
|
2690 | } |
|
|
2691 | else |
|
|
2692 | eol = min (eol + TermWin.ncol, buf + UBUFSIZ); |
|
|
2693 | } |
|
|
2694 | |
2685 | } |
2695 | } |
2686 | |
2696 | |
2687 | seq_begin = cmdbuf_ptr; |
2697 | seq_begin = cmdbuf_ptr; |
2688 | ch = next_char (); |
2698 | ch = next_char (); |
2689 | } |
2699 | } |