diff options
author | Tony Lainson <t.lainson@gmail.com> | 2015-11-10 14:54:16 +1100 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2015-11-10 16:56:37 +0100 |
commit | 8b52c85dd1fb145b1012cd508ffd74465db7025a (patch) | |
tree | 3d56b196eda9840a91a54364685691fbda8f7eac /sent.c | |
parent | 4ca44387e65a96a93b56ed1491f5f90c5e25d948 (diff) |
don't assume we get a ConfigureNotify event
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.
Diffstat (limited to 'sent.c')
-rw-r--r-- | sent.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -506,8 +506,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; |