From 2d4d12940ed0722246576589c85643d28d4df851 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 22 Dec 2009 00:50:33 -0800 Subject: Fixed a bug where we would reload a (potentially closed) image with an expose event because it hadn't been scaled yet. --- src/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 19c1646..e22c7fb 100644 --- a/src/main.c +++ b/src/main.c @@ -127,7 +127,7 @@ void handleevent(XEvent *event){ curimg->ximg = NULL; if(curimg->state >= LOADED) curimg->state = LOADED; - else if(curimg->state > FASTLOADED) + else if(curimg->state >= FASTLOADED) curimg->state = FASTLOADED; } @@ -140,7 +140,9 @@ void handleevent(XEvent *event){ if(curimg){ if(curimg->state >= SCALED) curimg->state = SCALED; - else if(curimg->state > FASTSCALED) + else if(curimg->state >= LOADED) + curimg->state = LOADED; + else if(curimg->state >= FASTSCALED) curimg->state = FASTSCALED; } break; -- cgit v1.2.3