aboutsummaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
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) {
96 DC *dc; 96 DC *dc;
97 97
98 if(!setlocale(LC_CTYPE, "") || !XSupportsLocale()) 98 if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())
99 fprintf(stderr, "no locale support\n"); 99 fputs("no locale support\n", stderr);
100 if(!(dc = calloc(1, sizeof *dc))) 100 if(!(dc = calloc(1, sizeof *dc)))
101 eprintf("cannot malloc %u bytes:", sizeof *dc); 101 eprintf("cannot malloc %u bytes:", sizeof *dc);
102 if(!(dc->dpy = XOpenDisplay(NULL))) 102 if(!(dc->dpy = XOpenDisplay(NULL)))
@@ -153,10 +153,10 @@ resizedc(DC *dc, unsigned int w, unsigned int h) {
153 if(dc->canvas) 153 if(dc->canvas)
154 XFreePixmap(dc->dpy, dc->canvas); 154 XFreePixmap(dc->dpy, dc->canvas);
155 155
156 dc->canvas = XCreatePixmap(dc->dpy, DefaultRootWindow(dc->dpy), w, h,
157 DefaultDepth(dc->dpy, DefaultScreen(dc->dpy)));
158 dc->w = w; 156 dc->w = w;
159 dc->h = h; 157 dc->h = h;
158 dc->canvas = XCreatePixmap(dc->dpy, DefaultRootWindow(dc->dpy), w, h,
159 DefaultDepth(dc->dpy, DefaultScreen(dc->dpy)));
160} 160}
161 161
162int 162int