--- rxvt-unicode/src/command.C 2007/12/14 05:25:23 1.381 +++ rxvt-unicode/src/command.C 2008/01/08 16:25:42 1.390 @@ -28,6 +28,7 @@ * - Ctrl/Mod4+Tab works like Meta+Tab (options) * Copyright (c) 2003 Rob McMullen * Copyright (c) 2003-2007 Marc Lehmann + * Copyright (c) 2007 Emanuele Giaquinta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -200,7 +201,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) @@ -222,7 +223,7 @@ sprintf (buf, "%8x", ch); scr_overlay_set (0, y, buf); scr_overlay_set (9, y, '='); -# if !UNICODE3 +# if !UNICODE_3 if (ch >= 0x10000) ch = 0xfffd; # endif @@ -1049,6 +1050,8 @@ { if (want_refresh && !flush_ev.is_active ()) flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally + + display->flush (); } void @@ -1211,6 +1214,8 @@ if (revents & ev::WRITE) pty_write (); + + refresh_check (); } void @@ -1455,6 +1460,7 @@ update_background (); #endif } + HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); } break; @@ -1526,7 +1532,7 @@ while (XCheckTypedWindowEvent (dpy, ev.xany.window, GraphicsExpose, &unused_event)) ; - if (isScrollbarWindow (ev.xany.window)) + if (scrollBar.state && ev.xany.window == scrollBar.win) { scrollBar.setIdle (); scrollbar_show (0); @@ -1626,7 +1632,7 @@ #endif } } - else if (isScrollbarWindow (ev.xany.window) && scrollbar_isMotion ()) + else if (scrollbar_isMotion () && ev.xany.window == scrollBar.win) { while (XCheckTypedWindowEvent (dpy, scrollBar.win, MotionNotify, &ev)) @@ -1792,6 +1798,7 @@ bgPixmap.set_root_pixmap (); update_background (); } + break; } # endif @@ -1919,7 +1926,7 @@ /* * Scrollbar window processing of button press */ - if (isScrollbarWindow (ev.window)) + if (scrollBar.state && ev.window == scrollBar.win) { scrollBar.setIdle (); /* @@ -2003,7 +2010,7 @@ switch (ev.button) { case Button2: - switch (scrollbar_align) + switch (scrollBar.align) { case R_SB_ALIGN_TOP: csrO = 0; @@ -2025,7 +2032,7 @@ break; case Button1: - if (scrollbar_align == R_SB_ALIGN_CENTRE) + if (scrollBar.align == R_SB_ALIGN_CENTRE) csrO = ev.y - scrollBar.top; /* FALLTHROUGH */ @@ -2165,13 +2172,11 @@ slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY); } else - { # endif + { scr_page (v, i); scrollbar_show (1); -# ifdef MOUSE_SLIP_WHEELING } -# endif } break; #endif @@ -2311,8 +2316,6 @@ } } - refresh_check (); - return flag; } @@ -3389,10 +3392,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 (); } @@ -3425,6 +3430,7 @@ if (str == NULL) bgPixmap.set_defaultGeometry (); } + while (str) { str++; @@ -3432,8 +3438,9 @@ changed++; str = strchr (str, ';'); } + if (changed) - update_background (); + update_background (); } break; #endif