diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-10 19:11:42 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-10 19:11:42 -0500 |
commit | bb97700474968d3a0d1869cb777b092b6d46637b (patch) | |
tree | c8fd8fe1c8559bfbdbe6d86dfb121df1a7e6a2bd /clients/eventdemo.c | |
parent | 27ff086b8edb6387c8710013a41ce631babc3e1a (diff) |
window: Get rid of the window child allocation concept
Diffstat (limited to 'clients/eventdemo.c')
-rw-r--r-- | clients/eventdemo.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clients/eventdemo.c b/clients/eventdemo.c index 5f70bc1..b8cb344 100644 --- a/clients/eventdemo.c +++ b/clients/eventdemo.c @@ -107,7 +107,7 @@ redraw_handler(struct widget *widget, void *data) if (log_redraw) printf("redraw\n"); - window_get_child_allocation(e->window, &rect); + widget_get_allocation(e->widget, &rect); surface = window_get_surface(e->window); cr = cairo_create(surface); @@ -150,7 +150,7 @@ resize_handler(struct widget *widget, height = height_max; /* set the new window dimensions */ - window_set_child_size(e->window, width, height); + widget_set_size(e->widget, width, height); } /** @@ -266,12 +266,6 @@ eventdemo_create(struct display *d) if(e == NULL) return NULL; - /* Creates a new window with the given title, width and height. - * To set the size of the window for a given usable areas width - * and height in a window decoration agnostic way use: - * window_set_child_size(struct window *window, - * int32_t width, int32_t height); - */ e->window = window_create(d, width, height); e->widget = window_add_widget(e->window, e); window_set_title(e->window, title); |