If the window manager maps our window at the requested size, we may not get a
ConfigureNotify event.  This happens e.g. under ratpoison.

The result is that xw.uw and xw.uh are never set, so text is too small and
pngscale() tries to divide by 0.
---
 sent.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sent.c b/sent.c
index 1b3b8f2..eac3b4a 100644
--- a/sent.c
+++ b/sent.c
@@ -504,8 +504,7 @@ void xinit()
                die("Can't open display.");
        xw.scr = XDefaultScreen(xw.dpy);
        xw.vis = XDefaultVisual(xw.dpy, xw.scr);
-       xw.w = DisplayWidth(xw.dpy, xw.scr);
-       xw.h = DisplayHeight(xw.dpy, xw.scr);
+       resize(DisplayWidth(xw.dpy, xw.scr), DisplayHeight(xw.dpy, xw.scr));

        xw.attrs.background_pixel = WhitePixel(xw.dpy, xw.scr);
        xw.attrs.bit_gravity = CenterGravity;
-- 
2.6.1

Reply via email to