diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-10 12:23:19 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-10 14:22:10 -0500 |
commit | b67e94b17083e014085c582ebb4b691aa700ea5e (patch) | |
tree | 29730dca72f0b68510500cd59ff22783ab6569b4 /clients/resizor.c | |
parent | 5d12990dbecea205f095a17d02fdb952ba22cf13 (diff) | |
download | weston-b67e94b17083e014085c582ebb4b691aa700ea5e.tar.gz weston-b67e94b17083e014085c582ebb4b691aa700ea5e.tar.bz2 weston-b67e94b17083e014085c582ebb4b691aa700ea5e.zip |
window: Make resize and redraw handlers widget vfuncs
Diffstat (limited to 'clients/resizor.c')
-rw-r--r-- | clients/resizor.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/clients/resizor.c b/clients/resizor.c index 395fdcdb..945f2ae7 100644 --- a/clients/resizor.c +++ b/clients/resizor.c @@ -98,8 +98,9 @@ frame_callback(void *data, struct wl_callback *callback, uint32_t time) } static void -resizor_draw(struct resizor *resizor) +redraw_handler(struct widget *widget, void *data) { + struct resizor *resizor = data; cairo_surface_t *surface; cairo_t *cr; struct rectangle allocation; @@ -123,14 +124,6 @@ resizor_draw(struct resizor *resizor) } static void -redraw_handler(struct window *window, void *data) -{ - struct resizor *resizor = data; - - resizor_draw(resizor); -} - -static void keyboard_focus_handler(struct window *window, struct input *device, void *data) { @@ -219,7 +212,7 @@ resizor_create(struct display *display) window_set_key_handler(resizor->window, key_handler); window_set_user_data(resizor->window, resizor); - window_set_redraw_handler(resizor->window, redraw_handler); + widget_set_redraw_handler(resizor->widget, redraw_handler); window_set_keyboard_focus_handler(resizor->window, keyboard_focus_handler); |