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/clients/dnd.c b/clients/dnd.c
index c6f0f18..b6720f0 100644
--- a/clients/dnd.c
+++ b/clients/dnd.c
@@ -358,7 +358,8 @@
static void
dnd_button_handler(struct widget *widget,
struct input *input, uint32_t time,
- uint32_t button, uint32_t state, void *data)
+ uint32_t button, enum wl_pointer_button_state state,
+ void *data)
{
struct dnd *dnd = data;
int32_t x, y;
@@ -378,7 +379,7 @@
x -= allocation.x;
y -= allocation.y;
- if (item && state == 1) {
+ if (item && state == WL_POINTER_BUTTON_STATE_PRESSED) {
dnd_drag = malloc(sizeof *dnd_drag);
dnd_drag->dnd = dnd;
dnd_drag->input = input;