--- rxvt-unicode/src/main.C 2011/07/09 13:14:47 1.357 +++ rxvt-unicode/src/main.C 2011/08/19 16:01:37 1.360 @@ -107,7 +107,7 @@ } // check to see whether this combination already exists otherwise - for (cc = v.end (); cc-- > v.begin (); ) + for (cc = v.begin (); cc < v.end (); cc++) if (cc->c1 == c1 && cc->c2 == c2) return COMPOSE_LO + (cc - v.begin ()); @@ -708,6 +708,15 @@ ncol = width / fwidth; nrow = height / fheight; + + // When the size of the vt window is not a multiple of the cell + // size, i.e., when the wm does not honour our size hints, there are + // extra areas not covered by the terminal screen. Such gaps, when a + // bg pixmap is set, would have to be cleared manually to properly + // refresh the background. We take the simpler route and shrink the + // vt window so as to avoid creating gaps. + width = ncol * fwidth; + height = nrow * fheight; } /*----------------------------------------------------------------------*/ @@ -1080,7 +1089,7 @@ scr_reset (); #ifdef USE_XIM - IMSetPosition (); + im_set_position (); #endif } @@ -1151,7 +1160,7 @@ /* Checking whether input method is running. */ bool -rxvt_term::IMisRunning () +rxvt_term::im_is_running () { Atom atom; Window win; @@ -1177,7 +1186,7 @@ } void -rxvt_term::IMSendSpot () +rxvt_term::im_send_spot () { XPoint nspot; XVaNestedList preedit_attr; @@ -1293,7 +1302,7 @@ * open a suitable preedit type */ bool -rxvt_term::IM_get_IC (const char *modifiers) +rxvt_term::im_get_ic (const char *modifiers) { int i, j, found; XIM xim; @@ -1501,7 +1510,7 @@ vt_select_input (); #endif - IMSetPosition (); + im_set_position (); return true; } @@ -1539,7 +1548,7 @@ { strcpy (buf, "@im="); strncat (buf, s[i], IMBUFSIZ - 5); - if (IM_get_IC (buf)) + if (im_get_ic (buf)) { found = true; break; @@ -1554,11 +1563,11 @@ } /* try with XMODIFIERS env. var. */ - if (IM_get_IC ("")) + if (im_get_ic ("")) goto done; /* try with no modifiers base IF the user didn't specify an IM */ - if (IM_get_IC ("@im=none")) + if (im_get_ic ("@im=none")) goto done; done: @@ -1569,7 +1578,7 @@ } void -rxvt_term::IMSetPosition () +rxvt_term::im_set_position () { XRectangle preedit_rect, status_rect, *needed_rect; XVaNestedList preedit_attr, status_attr; @@ -1577,7 +1586,7 @@ if (!Input_Context || !focus || !(input_style & (XIMPreeditArea | XIMPreeditPosition)) - || !IMisRunning ()) + || !im_is_running ()) return; if (input_style & XIMPreeditPosition)