Check whether the X server supports shm pixmaps.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26970 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-10-26 20:12:43 +00:00
parent 666ead1082
commit b72dff41ff
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-10-26 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XWindowBuffer.m (test_xshm): Check whether the X
server supports shm pixmaps.
2008-10-24 Fred Kiefer <FredKiefer@gmx.de>
* Source/win32/WIN32Server.m (-setalpha::): Implement transparent

View file

@ -81,6 +81,19 @@ static void test_xshm(Display *display, Visual *visual, int drawing_depth)
return;
}
{
int major, minor;
Bool pixmaps;
if (!XShmQueryVersion(display, &major, &minor, &pixmaps) || !pixmaps)
{
NSLog(@"XShm pixmaps not supported by X server.");
NSLog(xshm_warning);
use_xshm = 0;
return;
}
}
/* ... so we check that it actually works here. To do this, we need to
set up our own error handler (because the xlib calls never fail, they
just cause error events to be sent to us), explicitly synchronize