aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorJohn Hawthorn <jhawthor@uvic.ca>2008-05-27 16:02:33 -0700
committerJohn Hawthorn <jhawthor@uvic.ca>2008-05-27 16:02:33 -0700
commit303b0bc49f9fa99d061bb149006bbfd327a394ca (patch)
tree9cc03b67158bad02effe5db71e62d167f74d28a5 /src/main.c
parent15ecc77d083443cf91272e985cf5789e4f17f39e (diff)
downloadmirror-meh-303b0bc49f9fa99d061bb149006bbfd327a394ca.tar.gz
mirror-meh-303b0bc49f9fa99d061bb149006bbfd327a394ca.tar.bz2
mirror-meh-303b0bc49f9fa99d061bb149006bbfd327a394ca.zip
add Enter & stdout functionality
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index a99acd0..51dea22 100644
--- a/src/main.c
+++ b/src/main.c
@@ -231,13 +231,15 @@ void run(struct imagenode *image){
buf = NULL;
redraw = 1;
break;
+ case XK_Return:
+ printf("%s\n", image->filename);
+ break;
}
break;
}
}
if(redraw){
while(!buf){
- printf("loading %s\n", image->filename);
buf = loadbuf(image->filename, &bufwidth, &bufheight);
if(!buf){
if(image->next == image){
@@ -277,7 +279,6 @@ void run(struct imagenode *image){
img = create_image_from_buffer(buf, imagewidth, imageheight, bufwidth, bufheight);
assert(img);
}
- printf("Displaying\n");
XFillRectangle(display, window, gc, 0, 0, fillw, fillh);
XPutImage(display, window, gc, img, 0, 0, xoffset, yoffset, width, height);
XFillRectangle(display, window, gc, width - fillw, height - fillh, fillw, fillh);