diff options
author | Bert <ber.t@gmx.com> | 2011-01-20 15:39:08 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-01-20 15:39:08 +0100 |
commit | 00f32120a6c62069b66737a5265d9befa3ac59ac (patch) | |
tree | ddb349e961cc69f8ca14c0cabad6747a3c777341 /main.c | |
parent | 822ef72657b60902bd67e48fb339c1c6fc5e0e5a (diff) | |
download | nsxiv-00f32120a6c62069b66737a5265d9befa3ac59ac.tar.zst |
Handle expose events
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); } |