summaryrefslogtreecommitdiff
path: root/clients/resizor.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-05-30 16:31:52 +0100
committerKristian Høgsberg <krh@bitplanet.net>2012-05-31 15:43:03 -0400
commitc9785eacca7fe48119547bc7ed476754d8bcf610 (patch)
treedaab9cadd0b852786aaffe124862a1839cfc4e44 /clients/resizor.c
parent4dbadb1556f296cf148ed91a1044004ec6c80707 (diff)
downloadweston-c9785eacca7fe48119547bc7ed476754d8bcf610.tar.gz
Use enum wl_keyboard_key_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_keyboard_key_state enum, and explicit comparisons. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'clients/resizor.c')
-rw-r--r--clients/resizor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/clients/resizor.c b/clients/resizor.c
index 81865618..d02ab29c 100644
--- a/clients/resizor.c
+++ b/clients/resizor.c
@@ -139,12 +139,13 @@ keyboard_focus_handler(struct window *window,
static void
key_handler(struct window *window, struct input *input, uint32_t time,
- uint32_t key, uint32_t sym, uint32_t state, void *data)
+ uint32_t key, uint32_t sym, enum wl_keyboard_key_state state,
+ void *data)
{
struct resizor *resizor = data;
struct rectangle allocation;
- if (state == 0)
+ if (state == WL_KEYBOARD_KEY_STATE_RELEASED)
return;
window_get_allocation(resizor->window, &allocation);