diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-09 11:12:05 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-09 11:12:05 -0500 |
commit | a8a0db3497280b50d3b1546a4dbbc3c840bd1637 (patch) | |
tree | 79070109149029ba4b0712931293c8db7b7bd549 /clients/eventdemo.c | |
parent | 19dd1d7eb1dc99528028dac0a3b7650d786614ca (diff) |
window: Move button handler to widget
Diffstat (limited to 'clients/eventdemo.c')
-rw-r--r-- | clients/eventdemo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clients/eventdemo.c b/clients/eventdemo.c index 34a4dfae..54daf774 100644 --- a/clients/eventdemo.c +++ b/clients/eventdemo.c @@ -222,7 +222,7 @@ key_handler(struct window *window, struct input *input, uint32_t time, * \param data user data associated to the window */ static void -button_handler(struct window *window, struct input *input, uint32_t time, +button_handler(struct widget *widget, struct input *input, uint32_t time, int button, int state, void *data) { int32_t x, y; @@ -314,7 +314,8 @@ eventdemo_create(struct display *d) window_set_key_handler(e->window, key_handler); /* Set the callback button handler for the window */ - window_set_button_handler(e->window, button_handler); + widget_set_button_handler(window_get_widget(e->window), + button_handler); /* Set the callback motion handler for the window */ widget_set_motion_handler(window_get_widget(e->window), |