aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2009-12-22 00:50:33 -0800
committerJohn Hawthorn <john.hawthorn@gmail.com>2009-12-22 00:50:33 -0800
commit2d4d12940ed0722246576589c85643d28d4df851 (patch)
tree3f858fe0f70e5da1f5aae808bdec734a404c8b32
parenta7fc167f214fd29eb62713c712e858031c31daf1 (diff)
downloadmirror-meh-2d4d12940ed0722246576589c85643d28d4df851.tar.gz
mirror-meh-2d4d12940ed0722246576589c85643d28d4df851.tar.bz2
mirror-meh-2d4d12940ed0722246576589c85643d28d4df851.zip
Fixed a bug where we would reload a (potentially closed) image with an expose event because it hadn't been scaled yet.
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
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;