--- rxvt-unicode/src/main.C 2008/11/04 13:28:40 1.311 +++ rxvt-unicode/src/main.C 2008/11/04 16:41:12 1.312 @@ -627,7 +627,7 @@ if (recalc_y) szHint.y += DisplayHeight (dpy, display->screen) - szHint.height - 2 * ext_bwidth; - ncol = width / fwidth; + ncol = width / fwidth; nrow = height / fheight; } @@ -913,8 +913,14 @@ window_calc (newwidth, newheight); - if (!HOOK_INVOKE ((this, HOOK_RESIZE_ALL_WINDOWS, DT_INT, newwidth, DT_INT, newheight, DT_END))) - XSetWMNormalHints (dpy, parent[0], &szHint); + bool set_hint = !HOOK_INVOKE ((this, HOOK_RESIZE_ALL_WINDOWS, DT_INT, newwidth, DT_INT, newheight, DT_END)); + + if (set_hint) + { + szHint.flags &= ~(PBaseSize | PResizeInc); + XSetWMNormalHints (dpy, parent[0], &szHint); + szHint.flags |= PBaseSize | PResizeInc; + } if (!ignoreparent) { @@ -983,6 +989,9 @@ scr_clear (); } + if (set_hint) + XSetWMNormalHints (dpy, parent[0], &szHint); + if (fix_screen || old_height == 0) scr_reset ();