summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2011-07-14 20:03:08 +0100
committerConnor Lane Smith <cls@lubutu.com>2011-07-14 20:03:08 +0100
commit2b92c95230fbbdcf47f701d9cc4fd133a7972fae (patch)
tree565a5c34b05621c85ed58f6b1d7210973a4eec03 /draw.c
parent16a0c0d52aa947b3fe8c9285986567189537d339 (diff)
efficiency tweaks
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/draw.c b/draw.c
index 2028fd9..d0beee8 100644
--- a/draw.c
+++ b/draw.c
@@ -96,7 +96,7 @@ initdc(void) {
DC *dc;
if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())
- fprintf(stderr, "no locale support\n");
+ fputs("no locale support\n", stderr);
if(!(dc = calloc(1, sizeof *dc)))
eprintf("cannot malloc %u bytes:", sizeof *dc);
if(!(dc->dpy = XOpenDisplay(NULL)))
@@ -153,10 +153,10 @@ resizedc(DC *dc, unsigned int w, unsigned int h) {
if(dc->canvas)
XFreePixmap(dc->dpy, dc->canvas);
- dc->canvas = XCreatePixmap(dc->dpy, DefaultRootWindow(dc->dpy), w, h,
- DefaultDepth(dc->dpy, DefaultScreen(dc->dpy)));
dc->w = w;
dc->h = h;
+ dc->canvas = XCreatePixmap(dc->dpy, DefaultRootWindow(dc->dpy), w, h,
+ DefaultDepth(dc->dpy, DefaultScreen(dc->dpy)));
}
int