DirectFB - Home of the pragmatist Roadmap


[directfb-users] Re: Why Windows manager can move my Surface?
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-users] Re: Why Windows manager can move my Surface?



Hi,

"Jack Liu (Shanghai)" <JackLiu@viatech.com.cn> writes:

> 	Now comes the codes, I write it refer to the example"df_window.c".
> 
> 
> 	DirectFBInit (&argc, &argv);
> 	DirectFBCreate (&dfb);
> 
> 	//init display layer
> 	dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer );
> 	layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE );
> 	layer_config.flags = DLCONF_BUFFERMODE;
> 	layer_config.buffermode = DLBM_FRONTONLY;
> 	layer->SetConfiguration( layer, &layer_config );
> 	layer->GetConfiguration( layer, &layer_config );
> 	layer->EnableCursor ( layer, 1 );
> 
> 	//create bg surface
> 	{
> 		DFBSurfaceDescription desc;
> 
> 		desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_CAPS;
> 		desc.width = layer_config.width;
> 		desc.height = layer_config.height;
> 		desc.caps = DSCAPS_PRIMARY |DSCAPS_SYSTEMONLY;
> 		dfb->CreateSurface( dfb, &desc, &bgsurface );
> 
> 		bgsurface->SetFont( bgsurface, font );
> 		bgsurface->SetColor( bgsurface, 0xEE, 0x00, 0xEE, 0xFF );
>           	}
> 	
> 	//Create Window on layer
> 	{
> 		DFBWindowDescription desc;
> 
> 		desc.flags = ( DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH |
> DWDESC_HEIGHT | DWDESC_CAPS);
> 		desc.caps = DWCAPS_INPUTONLY;
> 		desc.posx = 200;
> 		desc.posy = 200;
> 		desc.width = 300;
> 		desc.height = 300;
> 
> 		layer->CreateWindow( layer, &desc, &window1 );
> 		window1->SetOpacity( window1, 0xFF );
> 		window1->GetID( window1, &id1 );
> 		
> 	}
> 
> 	The primary surface is "bgsurface", and the window is "window1" in
> above code.

OK, looks good so far. Now you are trying to tell us that you can move
the layer background using the "window manager key"? I don't see how
that could happen. Are you sure it's not window1 that you are moving?


Sven




Home | Main Index | Thread Index


directfb.org / Development / Old Archives