Rootless solves (or attempts to solve) this problem with the SetPixmapBaseToScreen() macro in rootlessCommon.h. The idea is that the unaligned window's pixmap is moved backwards in memory to align it and then a positive offset it given to fb to indicate where the window resides in the pixmap.
If there is an edge case where rootless does not work in 16-bits it would be good to track down. This mode is sometimes used on Mac OS X.
Hopefully that is helpful. I've got a review today but I can look at this in more detail tomorrow.
--Torrey
At 4:45 PM +0100 11/30/04, Alexander Gottwald wrote:
Hi all,
After many days of debugging the internalwm code i finally found the actual problem.
The rootless code wants the pixmap buffer aligned to 32bit boundaries. If the window width is odd and the xserver is run in 16bpp mode then this is no guaranteed and this leads the strange errors.
Internalwm is only usable in 32bit mode.
This is not an actual problem. The goal should be anyway to work with 32 bit visuals only and have real transparancy. I'm still searching for a clean method to blit 32 bit bitmaps to 16 bit ones. The simple aproach of allocating the bitmap with
CreateCompatibleBitmap() bitmap->width = width bitmap->height = height bitmap->bpp = dbBPP CreateDIBSection()
BitBlt(windowdc, ..., shadowdc, ...)
was not working properly. Is CreateCompatibleBitmap reusing the DC from the screen? How can I create a 32bit bitmap if the desktop is running in 16bit?
Anyway. Setting the bitmap depth to 32bit fixed the crashes I had the last weeks with rootless but garbled the output. So the goal is to have everything inside the server running at 32bit and let GDI do the colorspace translation from 32 to 16 or 24 bit.
@zakki: I've found this in the code
if (winIsInternalWMRunning(pScreenInfo)) winAdjustXWindow (pWin, hwnd);
winMWExtWMMoveResizeXWindow (pWin,
shouldn't that be
if (winIsInternalWMRunning(pScreenInfo)) winAdjustXWindow (pWin, hwnd); else winMWExtWMMoveResizeXWindow (pWin,
bye ago -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
