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/resizor.c | |
parent | 19dd1d7eb1dc99528028dac0a3b7650d786614ca (diff) | |
download | weston-a8a0db3497280b50d3b1546a4dbbc3c840bd1637.tar.gz weston-a8a0db3497280b50d3b1546a4dbbc3c840bd1637.tar.bz2 weston-a8a0db3497280b50d3b1546a4dbbc3c840bd1637.zip |
window: Move button handler to widget
Diffstat (limited to 'clients/resizor.c')
-rw-r--r-- | clients/resizor.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clients/resizor.c b/clients/resizor.c index 10378241..2818e26f 100644 --- a/clients/resizor.c +++ b/clients/resizor.c @@ -190,11 +190,12 @@ show_menu(struct resizor *resizor, struct input *input, uint32_t time) } static void -button_handler(struct window *window, +button_handler(struct widget *widget, struct input *input, uint32_t time, int button, int state, void *data) { - struct resizor *resizor = data; + struct window *window = data; + struct resizor *resizor = window_get_user_data(window); switch (button) { case BTN_RIGHT: @@ -232,7 +233,8 @@ resizor_create(struct display *display) height = resizor->height.current + 0.5; window_set_child_size(resizor->window, resizor->width, height); - window_set_button_handler(resizor->window, button_handler); + widget_set_button_handler(window_get_widget(resizor->window), + button_handler); resizor_draw(resizor); |