summaryrefslogtreecommitdiff
path: root/clients/smoke.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-01-10 09:43:58 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-01-10 10:45:52 -0500
commit75bc667a709dbdda261e6ce3d6e8f3be222ebe14 (patch)
tree3fb01fa66866a4127e6db0f50ab9faf911a40aa6 /clients/smoke.c
parentcadd0f5cd9c5de37a72e61011ccaa452a151a70e (diff)
downloadweston-75bc667a709dbdda261e6ce3d6e8f3be222ebe14.tar.gz
window: Drop the window widget
It was just a temporary convenience for moving things over.
Diffstat (limited to 'clients/smoke.c')
-rw-r--r--clients/smoke.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/clients/smoke.c b/clients/smoke.c
index 47f9ca5d..2624deb4 100644
--- a/clients/smoke.c
+++ b/clients/smoke.c
@@ -38,6 +38,7 @@
struct smoke {
struct display *display;
struct window *window;
+ struct widget *widget;
cairo_surface_t *surface;
int x, y, width, height;
int offset, current;
@@ -267,6 +268,7 @@ int main(int argc, char *argv[])
smoke.height = 200;
smoke.display = d;
smoke.window = window_create(d, smoke.width, smoke.height);
+ smoke.widget = window_add_widget(smoke.window, &smoke);
window_set_title(smoke.window, "smoke");
window_set_buffer_type(smoke.window, WINDOW_BUFFER_TYPE_SHM);
@@ -289,8 +291,7 @@ int main(int argc, char *argv[])
window_flush(smoke.window);
- widget_set_motion_handler(window_get_widget(smoke.window),
- smoke_motion_handler);
+ widget_set_motion_handler(smoke.widget, smoke_motion_handler);
window_set_user_data(smoke.window, &smoke);
frame_callback(&smoke, NULL, 0);