From a56a6a6f9c7c9f6e8f5ec6995a0f05454be73e94 Mon Sep 17 00:00:00 2001 From: Kevin Lange Date: Thu, 24 Apr 2014 22:38:27 -0700 Subject: [PATCH] fix some dumb stuff in Draw --- userspace/gui/basic/draw.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/userspace/gui/basic/draw.c b/userspace/gui/basic/draw.c index 374d1da3..d37a7f38 100644 --- a/userspace/gui/basic/draw.c +++ b/userspace/gui/basic/draw.c @@ -214,14 +214,8 @@ void ttk_render() { ttk_window_t _window; ttk_window_t * window = &_window; - yutani_window_t _wina; - _wina.buffer = wina->buffer; - _wina.width = wina->width; - _wina.height = wina->height; - _wina.focused = wina->focused; - window->core_context = ctx; - window->core_window = &_wina; + window->core_window = ttk_window; window->width = ctx->width; // - decor_width(); window->height = ctx->height; //- decor_height(); window->off_x = 0; //decor_left_width; @@ -231,7 +225,6 @@ void ttk_render() { draw_fill(ctx, rgb(TTK_BACKGROUND_DEFAULT)); ttk_redraw_borders(window); - { int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, window->core_window->width); cairo_surface_t * core_surface = cairo_image_surface_create_for_data(window->core_context->backbuffer, CAIRO_FORMAT_ARGB32, window->core_window->width, window->core_window->height, stride); @@ -403,13 +396,15 @@ int main (int argc, char ** argv) { wina = yutani_window_create(yctx, width, height); ctx = init_graphics_yutani_double_buffer(wina); - draw_fill(ctx, rgb(255,255,255)); + draw_fill(ctx, rgba(0,0,0,0)); + init_decorations(); yutani_window_advertise(yctx, wina, "Draw!"); setup_ttk(wina); + close_button = ttk_decor_button_close(quit_app); ((ttk_object *)close_button)->x = width - 28;