… | |
… | |
48 | #include "../config.h" /* NECESSARY */ |
48 | #include "../config.h" /* NECESSARY */ |
49 | #include "rxvt.h" /* NECESSARY */ |
49 | #include "rxvt.h" /* NECESSARY */ |
50 | #include "version.h" |
50 | #include "version.h" |
51 | #include "command.h" |
51 | #include "command.h" |
52 | |
52 | |
|
|
53 | #if HAVE_SCHED_YIELD |
|
|
54 | # include <sched.h> |
|
|
55 | #endif |
|
|
56 | |
53 | #ifdef KEYSYM_RESOURCE |
57 | #ifdef KEYSYM_RESOURCE |
54 | # include "keyboard.h" |
58 | # include "keyboard.h" |
55 | #endif |
59 | #endif |
56 | |
60 | |
57 | #include <csignal> |
61 | #include <csignal> |
58 | |
|
|
59 | #define HAVE_SCHED_YIELD 1 //D//TODO//FIXME |
|
|
60 | #if HAVE_SCHED_YIELD |
|
|
61 | # include <sched.h> |
|
|
62 | #endif |
|
|
63 | |
62 | |
64 | /*----------------------------------------------------------------------*/ |
63 | /*----------------------------------------------------------------------*/ |
65 | |
64 | |
66 | #define IS_CONTROL(ch) !((ch) & 0xffffff60UL) |
65 | #define IS_CONTROL(ch) !((ch) & 0xffffff60UL) |
67 | |
66 | |
… | |
… | |
985 | SET_LOCALE (locale); |
984 | SET_LOCALE (locale); |
986 | |
985 | |
987 | display->flush (); |
986 | display->flush (); |
988 | |
987 | |
989 | if (want_refresh && !flush_ev.active) |
988 | if (want_refresh && !flush_ev.active) |
990 | flush_ev.start (NOW + 0.01); |
989 | flush_ev.start (NOW + 1. / 60.); // refresh at max. 60 hz normally |
991 | } |
990 | } |
992 | |
991 | |
993 | void |
992 | void |
994 | rxvt_term::flush_cb (time_watcher &w) |
993 | rxvt_term::flush_cb (time_watcher &w) |
995 | { |
994 | { |
… | |
… | |
2695 | |
2694 | |
2696 | if (!OPTION (Opt_jumpScroll) |
2695 | if (!OPTION (Opt_jumpScroll) |
2697 | || (refresh_count >= refresh_limit * (nrow - 1))) |
2696 | || (refresh_count >= refresh_limit * (nrow - 1))) |
2698 | { |
2697 | { |
2699 | refreshnow = true; |
2698 | refreshnow = true; |
|
|
2699 | refresh_count = 0; |
2700 | ch = NOCHAR; |
2700 | ch = NOCHAR; |
2701 | break; |
2701 | break; |
2702 | } |
2702 | } |
2703 | |
2703 | |
2704 | // scr_add_lines only works for nlines <= nrow - 1. |
2704 | // scr_add_lines only works for nlines <= nrow - 1. |
… | |
… | |
2741 | refresh_limit++; |
2741 | refresh_limit++; |
2742 | else |
2742 | else |
2743 | { |
2743 | { |
2744 | flag = true; |
2744 | flag = true; |
2745 | scr_refresh (refresh_type); |
2745 | scr_refresh (refresh_type); |
|
|
2746 | flush_ev.stop (); |
2746 | } |
2747 | } |
2747 | } |
2748 | } |
2748 | |
2749 | |
2749 | } |
2750 | } |
2750 | else |
2751 | else |
… | |
… | |
4064 | if (mode) |
4065 | if (mode) |
4065 | SET_OPTION (Opt_intensityStyles); |
4066 | SET_OPTION (Opt_intensityStyles); |
4066 | else |
4067 | else |
4067 | CLR_OPTION (Opt_intensityStyles); |
4068 | CLR_OPTION (Opt_intensityStyles); |
4068 | |
4069 | |
4069 | want_refresh = 1; |
4070 | scr_touch (true); |
4070 | want_full_refresh = 1; |
|
|
4071 | break; |
4071 | break; |
4072 | #endif |
4072 | #endif |
4073 | case 1048: /* alternative cursor save */ |
4073 | case 1048: /* alternative cursor save */ |
4074 | case 1049: |
4074 | case 1049: |
4075 | if (OPTION (Opt_secondaryScreen)) |
4075 | if (OPTION (Opt_secondaryScreen)) |