aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathias <mathias>2007-07-03 19:04:46 (GMT)
committermathias <mathias>2007-07-03 19:04:46 (GMT)
commit24c023192fd5757bd1e1308f3aa00a41d0e21728 (patch)
tree83e5c08baf36d9c4671dc1e31e72617847901168
parentb70f4c144c0428324952f40939b2ada2a2d173a9 (diff)
downloadfluxbox_pavel-24c023192fd5757bd1e1308f3aa00a41d0e21728.zip
fluxbox_pavel-24c023192fd5757bd1e1308f3aa00a41d0e21728.tar.bz2
minor cosmetics to fluxbox-remote, display of usage
-rw-r--r--util/fluxbox-remote.cc20
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
28int main(int argc, char **argv) { 30int 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