aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Hawthorn <jhawthor@uvic.ca>2009-01-03 01:08:17 -0800
committerJohn Hawthorn <jhawthor@uvic.ca>2009-01-03 01:08:17 -0800
commitfedf5595b3777cd05bf3ff812eae26973ffddaa4 (patch)
treef0a0b165c8bd2ce64b01e074b5e0b010b6ba9564 /src
parentdb42a5d2d980df2ea018f330635229f53484d556 (diff)
downloadmirror-meh-fedf5595b3777cd05bf3ff812eae26973ffddaa4.tar.gz
mirror-meh-fedf5595b3777cd05bf3ff812eae26973ffddaa4.tar.bz2
mirror-meh-fedf5595b3777cd05bf3ff812eae26973ffddaa4.zip
Fixed a bug where a thin horizontal line next to the image was not filled black.
Diffstat (limited to 'src')
-rw-r--r--src/xlib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xlib.c b/src/xlib.c
index 3025f16..7dfa69b 100644
--- a/src/xlib.c
+++ b/src/xlib.c
@@ -100,13 +100,15 @@ void drawimage(XImage *ximg, unsigned int width, unsigned int height){
if(xoffset){
rects[0].width = rects[1].width = xoffset;
rects[0].height = rects[1].height = height;
- rects[1].x = width - xoffset;
+ rects[1].x = xoffset + ximg->width;
rects[1].y = 0;
+ rects[1].width = width - rects[1].x;
}else if(yoffset){
rects[0].width = rects[1].width = width;
- rects[0].height = rects[1].height = yoffset;
+ rects[0].height = yoffset;
rects[1].x = 0;
- rects[1].y = height - yoffset;
+ rects[1].y = yoffset + ximg->height;
+ rects[1].height = height - rects[1].y;
}
XFillRectangles(display, window, gc, rects, 2);
}