/
index
/
herbe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
inline
| side by side (parent:
d991e61
)
Minor tweaks
author
Samuel Dudik
<redacted>
Sat, 8 Aug 2020 13:55:18 +0000
(15:55 +0200)
committer
Samuel Dudik
<redacted>
Sat, 8 Aug 2020 13:55:18 +0000
(15:55 +0200)
herbe.c
patch
|
blob
|
history
diff --git
a/herbe.c
b/herbe.c
index 438d1bc70b50bba693e37c8ad483b4b468ed1241..e219301540223496e70a4d006887e322551bfdb2 100644
(file)
--- a/
herbe.c
+++ b/
herbe.c
@@
-4,6
+4,7
@@
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.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);
alarm(duration);
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);
{
fprintf(stderr, "Cannot open display\n");
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);
if (event.type == Expose)
XNextEvent(display, &event);
if (event.type == Expose)
@@
-142,7
+142,7
@@
int main(int argc, char *argv[])
XftDrawDestroy(draw);
XftColorFree(display, visual, colormap, &color);
XftFontClose(display, font);
XftDrawDestroy(draw);
XftColorFree(display, visual, colormap, &color);
XftFontClose(display, font);
-
XCloseDisplay(display);
XCloseDisplay(display);
+
return EXIT_SUCCESS;
return EXIT_SUCCESS;
-}
+}
\ No newline at end of file