--- rxvt-unicode/src/command.C 2007/12/14 02:27:54 1.378 +++ rxvt-unicode/src/command.C 2007/12/24 06:51:37 1.385 @@ -200,7 +200,7 @@ int width = wcswidth (fname, wcslen (fname)); - max_it (width, 8+5); // for char + hey + max_it (width, 8+5); // for char + hex max_it (width, strlen (attr)); if (y >= 0) @@ -1043,15 +1043,14 @@ display->flush (); } +/* checks wether a refresh is requested and starts the refresh timer */ void -rxvt_term::prepare_cb (ev::prepare &w, int revents) +rxvt_term::refresh_check () { - make_current (); - - display->flush (); - if (want_refresh && !flush_ev.is_active ()) flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally + + display->flush (); } void @@ -1069,6 +1068,7 @@ { hidden_cursor = !hidden_cursor; want_refresh = 1; + refresh_check (); } #endif @@ -1080,6 +1080,7 @@ { hidden_text = !hidden_text; want_refresh = 1; + refresh_check (); } else w.stop (); @@ -1090,9 +1091,12 @@ void rxvt_term::cont_scroll_cb (ev::timer &w, int revents) { - if ((scrollbar_isUp() || scrollbar_isDn()) && - scr_page (scrollbar_isUp() ? UP : DN, 1)) - want_refresh = 1; + if ((scrollbar_isUp () || scrollbar_isDn ()) + && scr_page (scrollbar_isUp () ? UP : DN, 1)) + { + want_refresh = 1; + refresh_check (); + } else w.stop (); } @@ -1106,6 +1110,7 @@ { selection_extend (selection_save_x, selection_save_y, selection_save_state); want_refresh = 1; + refresh_check (); } else w.stop (); @@ -1116,9 +1121,11 @@ void rxvt_term::slip_wheel_cb (ev::timer &w, int revents) { - if (mouse_slip_wheel_speed < 0 ? scr_page (DN, -mouse_slip_wheel_speed) - : scr_page (UP, mouse_slip_wheel_speed)) - want_refresh = 1; + if (scr_changeview (view_start - mouse_slip_wheel_speed)) + { + want_refresh = 1; + refresh_check (); + } if (view_start == top_row || view_start == 0 || mouse_slip_wheel_speed == 0) { @@ -1206,6 +1213,8 @@ if (revents & ev::WRITE) pty_write (); + + refresh_check (); } void @@ -1450,6 +1459,7 @@ update_background (); #endif } + HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); } break; @@ -1509,6 +1519,7 @@ scr_expose (ev.xexpose.x, ev.xexpose.y, ev.xexpose.width, ev.xexpose.height, False); } + want_refresh = 1; } else @@ -1665,6 +1676,8 @@ pointer_blank (); } #endif + + refresh_check (); } void @@ -1784,9 +1797,12 @@ bgPixmap.set_root_pixmap (); update_background (); } + break; } # endif + + refresh_check (); } #endif @@ -3377,10 +3393,12 @@ process_color_seq (op, Color_tint, str, resp); { bool changed = false; + if (ISSET_PIXCOLOR (Color_tint)) changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]); else changed = bgPixmap.unset_tint (); + if (changed) update_background (); } @@ -3413,6 +3431,7 @@ if (str == NULL) bgPixmap.set_defaultGeometry (); } + while (str) { str++; @@ -3420,8 +3439,9 @@ changed++; str = strchr (str, ';'); } + if (changed) - update_background (); + update_background (); } break; #endif