Use enum wl_pointer_button_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_pointer_button_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 98baa8a..5a5c8db 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -525,7 +525,9 @@
}
notify_button(&c->base.seat->seat,
- weston_compositor_get_time(), button, state);
+ weston_compositor_get_time(), button,
+ state ? WL_POINTER_BUTTON_STATE_PRESSED :
+ WL_POINTER_BUTTON_STATE_RELEASED);
}
static int