Hi everybody. I'm writing a small app for an embedded device. I want a fixed background surface and 2 windows for menus/infos. i wrote this test code, here the relevant part --- dfb->SetCooperativeLevel (dfb, DFSCL_EXCLUSIVE);
/* Get a reference to the primary layer and set its cooperative level to ADMINISTRATIVE, so we can manage it */ dfb->GetDisplayLayer (dfb, DLID_PRIMARY, &main_layer); main_layer->SetCooperativeLevel (main_layer, DLSCL_ADMINISTRATIVE); DFBDisplayLayerConfig main_layer_config; main_layer_config.flags = DLCONF_BUFFERMODE; main_layer_config.buffermode = DLBM_WINDOWS; DFBSurfaceDescription main_surface_desc; main_surface_desc.flags = DSDESC_CAPS; main_surface_desc.caps = DSCAPS_PRIMARY; dfb->CreateSurface (dfb, &main_surface_desc, &main_surface); main_surface->SetColor(main_surface, 0xff, 0x00, 0x00, 0xff); main_surface->FillRectangle(main_surface, 0, 0, 680, 384); main_surface->Flip(main_surface, NULL, DSFLIP_NONE); DFBWindowDescription menu_window_desc; menu_window_desc.flags = DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY; menu_window_desc.width = 100; menu_window_desc.height = 100; menu_window_desc.posx = 10; menu_window_desc.posy = 10; main_layer->CreateWindow (main_layer, &menu_window_desc, &menu_window); menu_window->RaiseToTop (menu_window); menu_window->GetSurface (menu_window, &menu_surface); menu_surface->SetColor(menu_surface, 0x00, 0xff, 0x00, 0xff); menu_surface->FillRectangle(menu_surface, 0, 0, 50, 50); menu_surface->Flip(menu_surface, NULL, DSFLIP_NONE); --- This way, I should have a red surface (background) and a small green rectangle, but I can see just the red background. What am I doing wrong? Thanks for your help Giuseppe Iannello System administrator Two Heads s.r.l.
_______________________________________________ directfb-users mailing list directfb-users@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users