diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/fluxbox-remote.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/util/fluxbox-remote.cc b/util/fluxbox-remote.cc index eb7a413..67c2193 100644 --- a/util/fluxbox-remote.cc +++ b/util/fluxbox-remote.cc | |||
@@ -24,15 +24,21 @@ | |||
24 | #include <X11/Xlib.h> | 24 | #include <X11/Xlib.h> |
25 | #include <X11/Xatom.h> | 25 | #include <X11/Xatom.h> |
26 | #include <string.h> | 26 | #include <string.h> |
27 | #include <stdlib.h> | ||
28 | #include <stdio.h> | ||
27 | 29 | ||
28 | int main(int argc, char **argv) { | 30 | int main(int argc, char **argv) { |
29 | 31 | ||
30 | if (argc <= 1) | 32 | if (argc <= 1) { |
31 | return 1; | 33 | printf("fluxbox-remote <fluxbox-command>\n"); |
34 | return EXIT_SUCCESS; | ||
35 | } | ||
32 | 36 | ||
33 | Display *disp = XOpenDisplay(NULL); | 37 | Display *disp = XOpenDisplay(NULL); |
34 | if (!disp) | 38 | if (!disp) { |
35 | return 1; | 39 | perror("error, can't open display."); |
40 | return EXIT_FAILURE; | ||
41 | } | ||
36 | 42 | ||
37 | Atom fbcmd_atom = XInternAtom(disp, "_FLUXBOX_COMMAND", False); | 43 | Atom fbcmd_atom = XInternAtom(disp, "_FLUXBOX_COMMAND", False); |
38 | Window root = DefaultRootWindow(disp); | 44 | Window root = DefaultRootWindow(disp); |
@@ -44,6 +50,8 @@ int main(int argc, char **argv) { | |||
44 | XCloseDisplay(disp); | 50 | XCloseDisplay(disp); |
45 | 51 | ||
46 | if (ret == Success) | 52 | if (ret == Success) |
47 | return 0; | 53 | return EXIT_SUCCESS; |
48 | return 1; | 54 | |
55 | return EXIT_FAILURE; | ||
49 | } | 56 | } |
57 | |||