This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin/X developement: -EMULATEPSEUDO


On Tue, 14 Sep 2004, Sebastian Haby wrote:

> I started to try out Cygwin/X to remotely use a Solaris app, however, the 
> app uses 8bpp Pseudocolor visual which is only
> supported in Cygwin/X when running the windows desktop in 8bpp aswell or 
> fullscreen, ie. the app works just fine in these two cases.
> However I can't use any of these options and therefor need to get the 
> -emulatepseudo option to work.

Unfortunatly there has been no activity in this field for some time and 
after Harold left the project there is noone left with sufficient knowledge
of the problem to start again. I can only try to outline my general knowledge  
of the xserver internals.

> I've got the option to compile into XWin but my problem still remains, 
> menys and certain areas are fine but parts that are suppose to be white 
> and have lines, rectangles etc.. drawn into them are black.
> From what I've worked out from looking at the sources the -emulatepseudo 
> option does setup a 8bpp pseudocolor visual aswell as a normal
> truecolor visual, but how can i verify that my app draws into the 
> pseudocolor visual, does the app supply the correct visual ID to my 
> Xserver?

If it fails without -emulatepseudo then it requests a 8 bit visual. Any
visual matching is done inside libX11.

> I've also tried telling XWin to use PseudoColor visual as default visual 
> id by supplying the -cc option. (-cc 0x27 or -cc 27) but it is ignored.
 
> One thing i haven't figured out yet is with ShadowGDI, it allocates one 
> screen and one shadow bitmap and blits changes between the shadow and 
> screen bitmap, also I assume
> that the truecolor visual somehow points to the shadow bitmap, but where 
> does the pseudocolor visual point to? shadow bitmap aswell?

All drawing and conversion between the visuals should be handled in the
shadow layer. The shadow layer provides all the X11 drawing operation 
and creates a  bitmap we can use for copying to screen. 

I'm nost sure if it is possible to let the shadow layer do all color 
transformations and use the same shadowbuffer. I remember Harold Hunt
told something about using the XRandR extension to emulate the pseudo 
color visual, but this is currently not an active field.

> why not 
> allocate another 8bpp bitmap DIB(is this possible?) or in system ram? and 
> then do some color conversion and blit between that and screen bitmap? 

All drawing of the visuals should be done to the shadow bitmap.

> I've got lots of payed time to work on this problem so any pointers / tips 
> from other developers where to start / where the problems are etc...
> are greatly appreciated. 

Maybe the Xserver is doing the right thing but fails only in a few functions.
You told you have output from that window and only a few areas are black? 
Try starting there. Maybe it's only the line drawing code which has problems.  

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]