From: Daniel Stone Date: Wed, 30 May 2012 15:31:50 +0000 (+0100) Subject: test-client.c: Replace hard-coded magic value X-Git-Tag: 20120702.1049~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11d7139989860a1405124b889db2fbad087a5a09;p=profile%2Fivi%2Fweston.git test-client.c: Replace hard-coded magic value Took me a second to work out that the 272 was actually BTN_LEFT, as keys and buttons share a namespace in evdev. Signed-off-by: Daniel Stone --- diff --git a/tests/test-client.c b/tests/test-client.c index c6dfd96..fc65ee6 100644 --- a/tests/test-client.c +++ b/tests/test-client.c @@ -28,6 +28,7 @@ #include #include #include /* needed for GLfloat */ +#include struct display { struct wl_display *display; @@ -96,7 +97,7 @@ pointer_handle_button(void *data, struct wl_pointer *pointer, struct input *input = data; uint32_t bit; - bit = 1 << (button - 272); + bit = 1 << (button - BTN_LEFT); if (state) input->button_mask |= bit; else