if (recalc_y)
szHint.y += DisplayHeight (dpy, display->screen) - szHint.height - 2 * ext_bwidth;
- ncol = width / fwidth;
+ ncol = width / fwidth;
nrow = height / fheight;
}
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)
{
scr_clear ();
}
+ if (set_hint)
+ XSetWMNormalHints (dpy, parent[0], &szHint);
+
if (fix_screen || old_height == 0)
scr_reset ();