From 303b0bc49f9fa99d061bb149006bbfd327a394ca Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 27 May 2008 16:02:33 -0700 Subject: add Enter & stdout functionality --- src/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3