summaryrefslogtreecommitdiff
path: root/src/communications.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-03-19 08:35:36 +0000
committersabetts <sabetts>2001-03-19 08:35:36 +0000
commit23494269d7fb6bec696f305caa79a683ceb4bcbd (patch)
treedda073b707af449b62cf8329c587cac95e419e35 /src/communications.c
parent7604e8eabbcc2e6142f7b3d75d38880044dd63f7 (diff)
downloadratpoison-23494269d7fb6bec696f305caa79a683ceb4bcbd.zip
* src/main.c (ratpoison_longopts): add --command to recognized
command-line options. * src/communications.h (send_command): new function prototype * src/data.h (rp_command): new global variable * src/events.c (receive_command): new function (property_notify): handles rp_command Atoms * src/communications.c (send_command): new function * src/main.c (print_help): prints help for --command (main): handles --command command-line option
Diffstat (limited to 'src/communications.c')
-rw-r--r--src/communications.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/communications.c b/src/communications.c
index 7d94a1b..f87e115 100644
--- a/src/communications.c
+++ b/src/communications.c
@@ -66,3 +66,10 @@ send_kill ()
PRINT_ERROR ("failed to send kill event\n");
}
}
+
+int
+send_command (unsigned char *cmd)
+{
+ return XChangeProperty (dpy, DefaultRootWindow (dpy), rp_command, XA_STRING,
+ 8, PropModeAppend, cmd, strlen (cmd) + 1);
+}