Fix for multitude of print statements that SHM is not available when

displaying on Hummingbird PC X Display Server
This commit is contained in:
spider 1998-07-15 17:03:53 +00:00
Родитель e8ab388331
Коммит 19f7a6209a
1 изменённых файлов: 18 добавлений и 7 удалений

Просмотреть файл

@ -206,14 +206,25 @@ nsresult nsRenderingContextUnix :: CommonInit()
mContext->GetAppUnitsToDevUnits()); mContext->GetAppUnitsToDevUnits());
#ifdef MITSHM #ifdef MITSHM
if (XShmQueryVersion(mRenderingSurface->display,
&shmMajor,
&shmMinor,
&mSupportsSharedPixmaps) != 0) {
mHasSharedMemory = PR_TRUE; // We need to query the extension first using straight XLib since
mRenderingSurface->shmImage = nsnull; // the Shared memory invocation prints an error message to stdout
mRenderingSurface->shmInfo.shmaddr = nsnull;
PRInt32 maj, evt, err;
if (::XQueryExtension(mRenderingSurface->display,
"MIT-SHM",
&maj, &evt, &err) == True) {
if (XShmQueryVersion(mRenderingSurface->display,
&shmMajor,
&shmMinor,
&mSupportsSharedPixmaps) != 0) {
mHasSharedMemory = PR_TRUE;
mRenderingSurface->shmImage = nsnull;
mRenderingSurface->shmInfo.shmaddr = nsnull;
}
} }
#endif #endif