From 4dbadb1556f296cf148ed91a1044004ec6c80707 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 30 May 2012 16:31:51 +0100 Subject: 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 --- clients/terminal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clients/terminal.c') diff --git a/clients/terminal.c b/clients/terminal.c index 27ab3008..a0c69423 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -2222,13 +2222,14 @@ keyboard_focus_handler(struct window *window, static void 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 terminal *terminal = data; switch (button) { case 272: - if (state) { + if (state == WL_POINTER_BUTTON_STATE_PRESSED) { terminal->dragging = 1; input_get_position(input, &terminal->selection_start_x, -- cgit v1.2.3