--- rxvt-unicode/src/command.C 2006/01/31 00:25:16 1.295 +++ rxvt-unicode/src/command.C 2006/01/31 21:35:39 1.302 @@ -51,11 +51,6 @@ #include "version.h" #include "command.h" -#if HAVE_SCHED_YIELD -#undef HAVE_SCHED_YIELD // disabled for the time being -//# include -#endif - #ifdef KEYSYM_RESOURCE # include "keyboard.h" #endif @@ -1097,19 +1092,19 @@ } #endif -#if HAVE_SCHED_YIELD +#if LINUX_YIELD_HACK static struct event_handler { - check_watcher cw_yield; + check_watcher yield_ev; - void yield (check_watcher &w) + void yield_cb (check_watcher &w) { - sched_yield (); + usleep (0); w.stop (); } event_handler () - : cw_yield (this, &event_handler::yield) + : yield_ev (this, &event_handler::yield_cb) { } } event_handler; @@ -1139,9 +1134,9 @@ } else if (r < 0 && (errno == EAGAIN || errno == EINTR)) { -#if HAVE_SCHED_YIELD +#if LINUX_YIELD_HACK if (display->is_local) - event_handler.cw_yield.start (); + event_handler.yield_ev.start (); #endif } else @@ -1705,6 +1700,7 @@ if (!focus) { focus = 1; + want_refresh = 1; HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); @@ -1723,7 +1719,6 @@ if (rs[Rs_fade]) { pix_colors = pix_colors_focused; - want_refresh = 1; scr_recolour (); } #endif @@ -1736,6 +1731,7 @@ if (focus) { focus = 0; + want_refresh = 1; HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); @@ -1761,7 +1757,6 @@ if (rs[Rs_fade]) { pix_colors = pix_colors_unfocused; - want_refresh = 1; scr_recolour (); } #endif @@ -2464,7 +2459,7 @@ if (!i || prop == NULL #if TINTING - || !rs[Rs_color + Color_tint] + || !ISSET_PIXCOLOR (Color_tint) #endif ) have_pixmap = 0; @@ -2542,8 +2537,8 @@ { int shade = rs[Rs_shade] ? atoi (rs[Rs_shade]) : 100; - rxvt_rgba c; - pix_colors_focused [Color_tint].get (this, c); + rgba c; + pix_colors_focused [Color_tint].get (c); ShadeXImage (this, image, shade, c.r, c.g, c.b); } @@ -2576,8 +2571,7 @@ for (i = 1; i < (int) (sizeof (parent) / sizeof (Window)); i++) { oldp = parent[i]; - XQueryTree (xdisp, parent[i - 1], &root, - &parent[i], &list, &n); + XQueryTree (xdisp, parent[i - 1], &root, &parent[i], &list, &n); XFree (list); if (parent[i] == display->root) @@ -2595,19 +2589,18 @@ n = 0; if (pchanged) - { - for (; n < (unsigned int)i; n++) - { - XGetWindowAttributes (xdisp, parent[n], &wattr); - if (wattr.depth != rootdepth || wattr.c_class == InputOnly) - { - n = (int) (sizeof (parent) / sizeof (Window)) + 1; - break; - } - } - } + for (; n < (unsigned int)i; n++) + { + XGetWindowAttributes (xdisp, parent[n], &wattr); - if (n > (int) (sizeof (parent) / sizeof (parent[0]))) + if (wattr.depth != rootdepth || wattr.c_class == InputOnly) + { + n = (int) (sizeof (parent) / sizeof (Window)) + 1; + break; + } + } + + if (n > (sizeof (parent) / sizeof (parent[0]))) { XSetWindowBackground (xdisp, parent[0], pix_colors_focused[Color_border]); XSetWindowBackground (xdisp, vt, pix_colors_focused[Color_bg]); @@ -3576,7 +3569,6 @@ (unsigned int) (args[1] * fheight)); break; - /* * reports - some output format copied from XTerm */ @@ -3723,11 +3715,11 @@ { if (str[0] == '?' && !str[1]) { - rxvt_rgba c; - pix_colors_focused[color].get (this, c); + rgba c; + pix_colors_focused[color].get (c); #if XFT - if (c.a != rxvt_rgba::MAX_CC) + if (c.a != rgba::MAX_CC) tt_printf ("\033]%d;rgba:%04x/%04x/%04x/%04x%c", report, c.a, c.r, c.g, c.b, resp); else #endif @@ -3855,9 +3847,12 @@ #if TRANSPARENT && TINTING case URxvt_Color_tint: process_color_seq (op, Color_tint, str, resp); + check_our_parents (); + if (am_transparent) want_full_refresh = want_refresh = 1; + break; #endif