1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-ae,v 1.1 2006/06/13 13:24:36 dsainty Exp $
Don't fail if the display has multiple visuals. Just default to the default
one and don't concern ourselves with the others.
Check if MIT-SHM is available before trying XShmQueryVersion(), since
XShmQueryVersion() will abort outright if MIT-SHM isn't available.
--- src/Screen.c.orig 2002-01-16 04:46:43.000000000 +1300
+++ src/Screen.c 2006-06-03 19:08:48.000000000 +1200
@@ -286,11 +286,6 @@
VisualTmpl.depth = DefDepth;
MyVisual = XGetVisualInfo ( dpy, VisualScreenMask | VisualDepthMask,
&VisualTmpl, &visuals );
- if ( visuals != 1 ) {
- fprintf ( stderr, "can't handle default screen with multiple "
- "visuals\n" );
- exit ( 1 );
- }
VisualClass = MyVisual->class;
XFree ( MyVisual );
@@ -381,7 +376,8 @@
* See if we can use shared memory
*/
- if ( XShmQueryVersion ( dpy, &dummy, &dummy, &SharedPixmapSupport ))
+ if ( XShmQueryExtension ( dpy ) &&
+ XShmQueryVersion ( dpy, &dummy, &dummy, &SharedPixmapSupport ))
{
if ( SharedPixmapSupport )
{
|