From: root Date: Tue, 4 Nov 2008 16:41:12 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=42395514d4ae2759b759d67a2f2189b6614f4ea8;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/main.C b/src/main.C index c08e2ba7..0e70510d 100644 --- a/src/main.C +++ b/src/main.C @@ -627,7 +627,7 @@ rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight) 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 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in 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 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in scr_clear (); } + if (set_hint) + XSetWMNormalHints (dpy, parent[0], &szHint); + if (fix_screen || old_height == 0) scr_reset ();