diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-10 09:43:58 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-10 10:45:52 -0500 |
commit | 75bc667a709dbdda261e6ce3d6e8f3be222ebe14 (patch) | |
tree | 3fb01fa66866a4127e6db0f50ab9faf911a40aa6 /clients/resizor.c | |
parent | cadd0f5cd9c5de37a72e61011ccaa452a151a70e (diff) | |
download | weston-75bc667a709dbdda261e6ce3d6e8f3be222ebe14.tar.gz weston-75bc667a709dbdda261e6ce3d6e8f3be222ebe14.tar.bz2 weston-75bc667a709dbdda261e6ce3d6e8f3be222ebe14.zip |
window: Drop the window widget
It was just a temporary convenience for moving things over.
Diffstat (limited to 'clients/resizor.c')
-rw-r--r-- | clients/resizor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clients/resizor.c b/clients/resizor.c index 2818e26f..8f70d537 100644 --- a/clients/resizor.c +++ b/clients/resizor.c @@ -38,6 +38,7 @@ struct resizor { struct display *display; struct window *window; + struct widget *widget; struct window *menu; int32_t width; @@ -194,8 +195,7 @@ button_handler(struct widget *widget, struct input *input, uint32_t time, int button, int state, void *data) { - struct window *window = data; - struct resizor *resizor = window_get_user_data(window); + struct resizor *resizor = data; switch (button) { case BTN_RIGHT: @@ -217,6 +217,7 @@ resizor_create(struct display *display) memset(resizor, 0, sizeof *resizor); resizor->window = window_create(display, 500, 400); + resizor->widget = window_add_widget(resizor->window, resizor); window_set_title(resizor->window, "Wayland Resizor"); resizor->display = display; @@ -233,8 +234,7 @@ resizor_create(struct display *display) height = resizor->height.current + 0.5; window_set_child_size(resizor->window, resizor->width, height); - widget_set_button_handler(window_get_widget(resizor->window), - button_handler); + widget_set_button_handler(resizor->widget, button_handler); resizor_draw(resizor); |