Minor tweaks
This commit is contained in:
parent
d991e61d68
commit
2c2741a9cc
1 changed files with 6 additions and 6 deletions
10
herbe.c
10
herbe.c
|
@ -4,6 +4,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
@ -60,9 +61,9 @@ int main(int argc, char *argv[])
|
||||||
signal(SIGALRM, expire);
|
signal(SIGALRM, expire);
|
||||||
alarm(duration);
|
alarm(duration);
|
||||||
|
|
||||||
display = XOpenDisplay(NULL);
|
display = XOpenDisplay(0);
|
||||||
|
|
||||||
if (display == NULL)
|
if (display == 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Cannot open display\n");
|
fprintf(stderr, "Cannot open display\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
@ -123,10 +124,9 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
XMapWindow(display, window);
|
XMapWindow(display, window);
|
||||||
|
|
||||||
XEvent event;
|
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
XEvent event;
|
||||||
XNextEvent(display, &event);
|
XNextEvent(display, &event);
|
||||||
|
|
||||||
if (event.type == Expose)
|
if (event.type == Expose)
|
||||||
|
@ -142,7 +142,7 @@ int main(int argc, char *argv[])
|
||||||
XftDrawDestroy(draw);
|
XftDrawDestroy(draw);
|
||||||
XftColorFree(display, visual, colormap, &color);
|
XftColorFree(display, visual, colormap, &color);
|
||||||
XftFontClose(display, font);
|
XftFontClose(display, font);
|
||||||
|
|
||||||
XCloseDisplay(display);
|
XCloseDisplay(display);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue