From ef9545d77327e286e277702f1dcdab65d8bc8e71 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Sun, 18 Nov 2007 21:11:13 +0000 Subject: [PATCH] * Handle closing cacaview by window manager --- src/cacaview.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cacaview.c b/src/cacaview.c index 53737f5..31c073e 100644 --- a/src/cacaview.c +++ b/src/cacaview.c @@ -133,7 +133,8 @@ int main(int argc, char **argv) caca_event_t ev; unsigned int const event_mask = CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE - | CACA_EVENT_MOUSE_PRESS; + | CACA_EVENT_MOUSE_PRESS + | CACA_EVENT_QUIT; unsigned int new_status = 0, new_help = 0; int event; @@ -291,6 +292,8 @@ int main(int argc, char **argv) update = 1; set_zoom(zoom); } + else if(ev.type & CACA_EVENT_QUIT) + quit = 1; if(status || new_status) status = new_status;