--- rxvt-unicode/src/main.C 2008/11/04 16:41:12 1.312 +++ rxvt-unicode/src/main.C 2009/05/30 08:51:23 1.318 @@ -648,7 +648,7 @@ ws.ws_row = nrow; ws.ws_xpixel = width; ws.ws_ypixel = height; - (void)ioctl (pty->pty, TIOCSWINSZ, &ws); + ioctl (pty->pty, TIOCSWINSZ, &ws); #if 0 // TIOCSWINSZ is supposed to do this automatically and correctly @@ -690,6 +690,7 @@ prop = (*fs)[1]->properties (); prop.height += lineSpace; + prop.width += letterSpace; fs->set_prop (prop, false); @@ -915,6 +916,7 @@ bool set_hint = !HOOK_INVOKE ((this, HOOK_RESIZE_ALL_WINDOWS, DT_INT, newwidth, DT_INT, newheight, DT_END)); + // to avoid races between us and the wm, we clear the incremental size hints around the xresizewindow if (set_hint) { szHint.flags &= ~(PBaseSize | PResizeInc); @@ -970,6 +972,9 @@ #endif } + if (set_hint) + XSetWMNormalHints (dpy, parent[0], &szHint); + fix_screen = ncol != prev_ncol || nrow != prev_nrow; if (fix_screen || newwidth != old_width || newheight != old_height) @@ -985,13 +990,8 @@ if (bgPixmap.window_size_sensitive ()) update_background (); #endif - - scr_clear (); } - if (set_hint) - XSetWMNormalHints (dpy, parent[0], &szHint); - if (fix_screen || old_height == 0) scr_reset (); @@ -1078,18 +1078,17 @@ bool rxvt_term::IMisRunning () { - char *p; Atom atom; Window win; char server[IMBUFSIZ]; /* get current locale modifier */ - if ((p = XSetLocaleModifiers (NULL)) != NULL) + if (char *p = XSetLocaleModifiers (0)) { strcpy (server, "@server="); - strncat (server, & (p[4]), IMBUFSIZ - 9); /* skip "@im=" */ + strncat (server, p + 4, IMBUFSIZ - 9); /* skip "@im=" */ - if ((p = strchr (server + 1, '@')) != NULL) /* first one only */ + if (p = strchr (server + 1, '@')) /* first one only */ *p = '\0'; atom = XInternAtom (dpy, server, False);