#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
+#include <string.h>
#include "config.h"
signal(SIGALRM, expire);
alarm(duration);
- display = XOpenDisplay(NULL);
+ display = XOpenDisplay(0);
- if (display == NULL)
+ if (display == 0)
{
fprintf(stderr, "Cannot open display\n");
exit(EXIT_FAILURE);
XMapWindow(display, window);
- XEvent event;
-
while (1)
{
+ XEvent event;
XNextEvent(display, &event);
if (event.type == Expose)
XftDrawDestroy(draw);
XftColorFree(display, visual, colormap, &color);
XftFontClose(display, font);
-
XCloseDisplay(display);
+
return EXIT_SUCCESS;
-}
+}
\ No newline at end of file