diff --git a/ChangeLog b/ChangeLog index 7bca2a7..7d68c8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-26 Fred Kiefer + + * Source/x11/XWindowBuffer.m (test_xshm): Check whether the X + server supports shm pixmaps. + 2008-10-24 Fred Kiefer * Source/win32/WIN32Server.m (-setalpha::): Implement transparent diff --git a/Source/x11/XWindowBuffer.m b/Source/x11/XWindowBuffer.m index 544557c..460d322 100644 --- a/Source/x11/XWindowBuffer.m +++ b/Source/x11/XWindowBuffer.m @@ -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