wlt: toolkit: fix scheduling resize on widget-creation
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 30 Sep 2012 21:49:24 +0000 (23:49 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 30 Sep 2012 21:49:24 +0000 (23:49 +0200)
Instead of scheduling for redraw, we have to schedule for resize as the
new widget might want to change the size constraints.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/wlt_toolkit.c

index 60b7c7c..bbc8591 100644 (file)
@@ -1370,7 +1370,7 @@ int wlt_window_create_widget(struct wlt_window *wnd,
        widget->wnd = wnd;
        widget->data = data;
 
-       wlt_window_schedule_redraw(wnd);
+       wlt_window_set_size(wnd, wnd->buffer.width, wnd->buffer.height);
        shl_dlist_link_tail(&wnd->widget_list, &widget->list);
        *out = widget;
        return 0;