summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-01-20 15:39:08 +0100
committerBert <ber.t@gmx.com>2011-01-20 15:39:08 +0100
commit00f32120a6c62069b66737a5265d9befa3ac59ac (patch)
treeddb349e961cc69f8ca14c0cabad6747a3c777341 /main.c
parent822ef72657b60902bd67e48fb339c1c6fc5e0e5a (diff)
downloadnsxiv-00f32120a6c62069b66737a5265d9befa3ac59ac.tar.zst
Handle expose events
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);
}