--- rxvt-unicode/src/command.C 2012/06/07 11:27:08 1.519 +++ rxvt-unicode/src/command.C 2012/12/29 14:23:35 1.527 @@ -6,7 +6,7 @@ * Copyright (c) 1992 John Bovey, University of Kent at Canterbury * - original version * Copyright (c) 1994 Robert Nation - * - extensive modifications + * - extensive modifications * Copyright (c) 1995 Garrett D'Amore * - vt100 printing * Copyright (c) 1995 Steven Hirsch @@ -22,7 +22,7 @@ * and Linux 1.2.x * Copyright (c) 1997,1998 Oezguer Kesim * Copyright (c) 1998-2001 Geoff Wing - * - extensive modifications + * - extensive modifications * Copyright (c) 1998 Alfredo K. Kojima * Copyright (c) 2001 Marius Gedminas * - Ctrl/Mod4+Tab works like Meta+Tab (options) @@ -1469,13 +1469,16 @@ bool want_position_change = SHOULD_INVOKE (HOOK_POSITION_CHANGE); + bool moved = false; #ifdef HAVE_BG_PIXMAP if (bg_window_position_sensitive ()) - want_position_change = true; + { + want_position_change = true; + if (!(bg_flags & BG_IS_VALID)) + moved = true; + } #endif - bool moved = false; - if (want_position_change) { int x, y; @@ -1493,11 +1496,8 @@ parent_x = x; parent_y = y; HOOK_INVOKE ((this, HOOK_POSITION_CHANGE, DT_INT, x, DT_INT, y, DT_END)); + moved = true; } - - if (bg_set_position (x, y) - || !(bg_flags & BG_IS_VALID)) - moved = true; } if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) @@ -1840,7 +1840,7 @@ #endif } -#if ENABLE_TRANSPARENCY || ENABLE_PERL +#if BG_IMAGE_FROM_ROOT || ENABLE_PERL void ecb_hot rxvt_term::rootwin_cb (XEvent &ev) { @@ -1860,7 +1860,7 @@ if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID] || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) { -# if ENABLE_TRANSPARENCY +#if BG_IMAGE_FROM_ROOT bg_set_root_pixmap (); update_background (); #endif @@ -2389,6 +2389,8 @@ if (len == (size_t)-1) { mbstate.reset (); // reset now undefined conversion state + // a -1 might indicate that a previous incomplete char is invalid (previous return -2) + // in which case we "erroneously" return the next byte which might be valid. return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through } @@ -3453,7 +3455,8 @@ case URxvt_Color_border: process_color_seq (op, Color_border, str, resp); break; -#if ENABLE_TRANSPARENCY + +#if BG_IMAGE_FROM_ROOT case URxvt_Color_tint: process_color_seq (op, Color_tint, str, resp); { @@ -3490,8 +3493,14 @@ if (*str != ';') { - if (fimage.set_file_geometry (str)) - changed = true; + try + { + fimage.set_file_geometry (this, str); + changed = true; + } + catch (const class rxvt_failure_exception &e) + { + } } else { @@ -3506,7 +3515,8 @@ { int x, y; get_window_origin (x, y); - bg_set_position (x, y); + parent_x = x; + parent_y = y; } update_background (); }