From 97ae9b0ce77b001e9651c48a3092132da4820293 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Nov 2011 11:45:04 +1000 Subject: Print the "usage", i.e. what this program actually does Signed-off-by: Peter Hutterer --- multitouch.c | 11 +++++++++-- 1 file 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); -- cgit v1.2.3