aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.c b/main.c
index e0433d8..cd68350 100644
--- a/main.c
+++ b/main.c
@@ -69,7 +69,7 @@ int main(int argc, char **argv) {
imlib_init(&win);
img_load(&img, options->filenames[fileidx]);
- img_render(&img, &win);
+ img_display(&img, &win);
run();
@@ -113,4 +113,9 @@ void on_configurenotify(XEvent *ev) {
}
void on_expose(XEvent *ev) {
+ if (!ev)
+ return;
+
+ img_render(&img, &win, ev->xexpose.x, ev->xexpose.y,
+ ev->xexpose.width, ev->xexpose.height);
}