summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-11-07 11:45:04 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-11-07 11:45:04 +1000
commit97ae9b0ce77b001e9651c48a3092132da4820293 (patch)
tree3d9f4e8c3fdd0613cee70da7634ff4542b1f6687
parent3077703a5762cd8d47702c5c1f1ad25efc471c76 (diff)
Print the "usage", i.e. what this program actually does
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--multitouch.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/multitouch.c b/multitouch.c
index 583fc7e..eb3550e 100644
--- a/multitouch.c
+++ b/multitouch.c
@@ -20,6 +20,13 @@
#define MAX_TOUCHES 10
+static void usage(void)
+{
+ printf("Usage:\n");
+ printf(" White window: normal touch surface\n");
+ printf(" Black bar left: grabs the touchpoint, no ownership\n");
+}
+
enum TouchState {
TSTATE_END = 0,
TSTATE_BEGIN,
@@ -141,8 +148,6 @@ static void init_windows(struct multitouch *mt)
error("Failed to establish passive grab on toolbar\n");
XSync(mt->dpy, False);
-
-
}
static Pixmap init_pixmap(struct multitouch *mt)
@@ -495,6 +500,8 @@ int main(int argc, char **argv)
int rc;
struct multitouch mt;
+ usage();
+
init(&mt);
rc = init_x11(&mt, 800, 600);