use a boolean value
This commit is contained in:
parent
46f42de45f
commit
16607e39e6
|
@ -43,6 +43,7 @@ main(int argc, char **argv)
|
||||||
DrawCtx *ctx;
|
DrawCtx *ctx;
|
||||||
XColor fg, bg, c;
|
XColor fg, bg, c;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
Bool running = True;
|
||||||
const char *fg_color = "#000000";
|
const char *fg_color = "#000000";
|
||||||
const char *bg_color = "#ffffff";
|
const char *bg_color = "#ffffff";
|
||||||
int opt;
|
int opt;
|
||||||
|
@ -127,14 +128,14 @@ main(int argc, char **argv)
|
||||||
XMapRaised(disp, sw->window);
|
XMapRaised(disp, sw->window);
|
||||||
XSync(disp, False);
|
XSync(disp, False);
|
||||||
|
|
||||||
while (1)
|
while (running)
|
||||||
{
|
{
|
||||||
XNextEvent(disp, &ev);
|
XNextEvent(disp, &ev);
|
||||||
switch (ev.type)
|
switch (ev.type)
|
||||||
{
|
{
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
return EXIT_SUCCESS;
|
running = False;
|
||||||
case Expose:
|
case Expose:
|
||||||
simplewindow_refresh_drawable(sw, DefaultScreen(disp));
|
simplewindow_refresh_drawable(sw, DefaultScreen(disp));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue