aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index ac1ce37..cbb0fdc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -200,7 +200,10 @@ void run(struct imagenode *image){
for(;;){
XEvent event;
- while(XPending(display)){
+ for(;;){
+ if(redraw && !XPending(display)){
+ break;
+ }
XNextEvent(display, &event);
switch(event.type){
case MapNotify:
@@ -273,6 +276,7 @@ void run(struct imagenode *image){
free(tmp);
}
setaspect(bufwidth, bufheight);
+ continue;
}
if(!img){
if(width * bufheight > height * bufwidth){