diff options
author | John Hawthorn <jhawthor@uvic.ca> | 2008-05-27 16:02:33 -0700 |
---|---|---|
committer | John Hawthorn <jhawthor@uvic.ca> | 2008-05-27 16:02:33 -0700 |
commit | 303b0bc49f9fa99d061bb149006bbfd327a394ca (patch) | |
tree | 9cc03b67158bad02effe5db71e62d167f74d28a5 | |
parent | 15ecc77d083443cf91272e985cf5789e4f17f39e (diff) | |
download | mirror-meh-303b0bc49f9fa99d061bb149006bbfd327a394ca.tar.gz mirror-meh-303b0bc49f9fa99d061bb149006bbfd327a394ca.tar.bz2 mirror-meh-303b0bc49f9fa99d061bb149006bbfd327a394ca.zip |
add Enter & stdout functionality
-rw-r--r-- | src/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |