From 16607e39e632d3c6427eebd4a862053f8baccd7c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 27 Jan 2008 18:55:03 +0100 Subject: [PATCH] use a boolean value --- awesome-message.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awesome-message.c b/awesome-message.c index d9cbedab..2e0e4757 100644 --- a/awesome-message.c +++ b/awesome-message.c @@ -43,6 +43,7 @@ main(int argc, char **argv) DrawCtx *ctx; XColor fg, bg, c; XEvent ev; + Bool running = True; const char *fg_color = "#000000"; const char *bg_color = "#ffffff"; int opt; @@ -127,14 +128,14 @@ main(int argc, char **argv) XMapRaised(disp, sw->window); XSync(disp, False); - while (1) + while (running) { XNextEvent(disp, &ev); switch (ev.type) { case ButtonPress: case KeyPress: - return EXIT_SUCCESS; + running = False; case Expose: simplewindow_refresh_drawable(sw, DefaultScreen(disp)); break;