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: Error with Java program with XFree


Frederic,

You're Java X app only support 8 bits per pixel.  That much is now obvious.
Cygwin/XFree86 supports only one visual type per screen (basically one bit
depth per screen), whereas Exceed can simulate a couple visual types on a
single screen.  We might be able to implement a feature like that in the
future, but it could take a long time.

As I see it, you have to do something like this:

1) In, for example,
xc/programs/Xserver/hw/xwin/winshadddnl.c/winInitVisualsShadowDDNL,
make another call to miSetVisualTypesAndMasks specifying an 8 bit
frame buffer.  (Only when in 15 bpp or higher.)

2) In hw/xwin/winshadddnl.c/winAllocateFBShadowDDNL, for example,
allocate an 8 bit frame buffer (DirectDraw Surface) in addition
to the surface that has the same bit depth as the screen.

3) In hw/xwin/winscrinit.c/winFinishScreenInitFB,
make two calls to fbSetupScreen, one with the normal frame buffer
and one with the 8 bits per pixel framebuffer. I don't know if calling
fbSetupScreen twice is supported.  You may have to give the
8 bit per pixel screen a dummy screen number (just pick one that isn't
being used).  Hopefully you wouldn't have to give a dummy screen
number, cause then you'd have to explicity tell all 8 bit clients
to connect to the other screen number.  If fbSetupScreen doesn't
support two calls for the same screen then we may have to see if
we can change that or get that changed.

4) In hw/xwin/winshadddnl.c/winShadowUpdateDDNL, for example,
blit the two different framebuffers to the screen.  Heh, sounds
easy, right?  :)

5) You may want to look into the LAYER extension,
xc/programs/Xserver/miext/layer, which seems to be designed
to allow multiple visual types.  I was unsuccessful at understanding
how to work with it, but you may have better luck.


That's a really rough outline, I'd be surprise if anyone could use it to get
started,

Harold


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