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,6 +206,16 @@ nsresult nsRenderingContextUnix :: CommonInit()
mContext->GetAppUnitsToDevUnits()); mContext->GetAppUnitsToDevUnits());
#ifdef MITSHM #ifdef MITSHM
// We need to query the extension first using straight XLib since
// the Shared memory invocation prints an error message to stdout
PRInt32 maj, evt, err;
if (::XQueryExtension(mRenderingSurface->display,
"MIT-SHM",
&maj, &evt, &err) == True) {
if (XShmQueryVersion(mRenderingSurface->display, if (XShmQueryVersion(mRenderingSurface->display,
&shmMajor, &shmMajor,
&shmMinor, &shmMinor,
@ -215,6 +225,7 @@ nsresult nsRenderingContextUnix :: CommonInit()
mRenderingSurface->shmImage = nsnull; mRenderingSurface->shmImage = nsnull;
mRenderingSurface->shmInfo.shmaddr = nsnull; mRenderingSurface->shmInfo.shmaddr = nsnull;
} }
}
#endif #endif
return NS_OK; return NS_OK;