From 42395514d4ae2759b759d67a2f2189b6614f4ea8 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 4 Nov 2008 16:41:12 +0000 Subject: [PATCH] *** empty log message *** --- src/main.C | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 (); -- 2.34.1