Fix for rendering problem where everything goes black AFTER the first paint on non-8 bit displays

git-svn-id: svn://10.0.0.236/trunk@3700 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
spider
1998-06-12 01:30:52 +00:00
parent 32186c46a1
commit ce8a77d383

View File

@@ -67,6 +67,8 @@ nsDeviceContextUnix :: nsDeviceContextUnix()
mNativeDisplay = nsnull;
mDepth = 0 ;
mColormap = 0 ;
}
nsDeviceContextUnix :: ~nsDeviceContextUnix()
@@ -110,7 +112,6 @@ nsresult nsDeviceContextUnix :: Init(nsNativeDeviceContext aNativeDeviceContext)
if (mNativeDisplay == nsnull) {
mNativeDisplay = gNativeDeviceContext;
}
fprintf(stderr, "mNativeDisplay 0x%x\n", mNativeDisplay);
mTwipsToPixels = (((float)::XDisplayWidth((Display *)mNativeDisplay, DefaultScreen((Display *)mNativeDisplay))) /
((float)::XDisplayWidthMM((Display *)mNativeDisplay,DefaultScreen((Display *)mNativeDisplay) )) * 25.4) /
@@ -336,6 +337,11 @@ void nsDeviceContextUnix :: InstallColormap()
XWindowAttributes wa;
/* Already installed? */
if (0 != mColormap)
return;
// Find the depth of this visual
::XGetWindowAttributes(mSurface->display,
mSurface->drawable,