During DirectFBCreate the "default" window manager is instantiated and initialized. As part of this process, it will create a surface and flip it onto a layer regardless of whether the app will eventually use windows or not. This interferes with the operating of other functions and allocates memory for something that might be used.
So the process that this goes through starts with DirectFBCreate calling IDirectFB_Construct calling CoreLayer_GetPrimaryContext/dfb_layer_get_primary_context. This calls dfb_layer_create_context which creates the window manager stack (the "default" windows manager is my case) and then calls dfb_layer_activate_context. In this function, it calls dfb_layer_context_activate which intern calls dfb_wm_set_active. This calls the window managers SetActive API. In this call, the "default" wm will end up activating itself and because there are no windows, it draws the background. Drawing the background will instantiate a surface and flip it, which is what I want to avoid until it is needed later. In DFB 1.4.9, we modified default.c by adding a dfb_updates_reset in process_updates() if the dfb_layer_context_get_primary_region returned a failure which happened when it hadn't been instantiated. However this call is no longer in 1.6. So, in DFB 1.6, how do I prevent only the first drawing operation during the SetActive call until after the user initiates something that requires the surface to get instantiated and flipped? For those that are already thinking about "no-init-layers" (a directfbrc option), that is used later during IDirectFB_InitLayers. It doesn't affect the window manager. Thanks, Bryce Poole
_______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev