xserver: Branch 'xorg-server-1.5-apple' - 21 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Wed Nov 5 19:23:53 PST 2008


 config/hal.c                           |   27 ++
 configure.ac                           |    5 
 exa/exa.h                              |    4 
 exa/exa_migration.c                    |    6 
 exa/exa_priv.h                         |    3 
 glx/glxcmds.c                          |    5 
 glx/glxdri.c                           |    2 
 hw/kdrive/vesa/vm86.h                  |    7 
 hw/xfree86/common/Makefile.am          |    3 
 hw/xfree86/common/xf86.h               |    1 
 hw/xfree86/common/xf86Config.c         |   39 +++
 hw/xfree86/common/xf86Globals.c        |    1 
 hw/xfree86/common/xf86Helper.c         |    2 
 hw/xfree86/common/xf86Init.c           |  359 ++++++++++++++++++++-------------
 hw/xfree86/doc/man/xorg.conf.man.pre   |    1 
 hw/xfree86/os-support/linux/lnx_init.c |   52 ++++
 hw/xquartz/GL/capabilities.c           |  100 +++++++++
 hw/xquartz/GL/capabilities.h           |    6 
 hw/xquartz/GL/indirect.c               |   11 -
 hw/xquartz/GL/visualConfigs.c          |  162 ++++++++------
 hw/xquartz/bundle/Info.plist           |    6 
 hw/xquartz/quartzAudio.c               |    3 
 os/log.c                               |    1 
 randr/rrproperty.c                     |   44 +++-
 24 files changed, 617 insertions(+), 233 deletions(-)

New commits:
commit 7df46d26fdb7044d79f19fff7a1dbb372acafe8d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Nov 5 19:22:42 2008 -0800

    GL/glx: WRITE_PAIR the GLX_SAMPLE_BUFFERS_SGIS, and GLX_SAMPLES_SGIS mode data.
    
    More recent versions of glxcmds.c already do this.
    
    This enables glxinfo to correctly detect the multisampling with output like so
    from glxinfo -v:
     multiSample=6  multiSampleBuffers=1
    (cherry picked from commit 5bc78b9f96a5458747dcc1a69ae625656d23f065)

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 35fc3ef..6db5ee6 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -959,7 +959,7 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
     return Success;
 }
 
-#define __GLX_TOTAL_FBCONFIG_ATTRIBS (36)
+#define __GLX_TOTAL_FBCONFIG_ATTRIBS (38)
 #define __GLX_FBCONFIG_ATTRIBS_LENGTH (__GLX_TOTAL_FBCONFIG_ATTRIBS * 2)
 /**
  * Send the set of GLXFBConfigs to the client.  There is not currently
@@ -1048,6 +1048,9 @@ DoGetFBConfigs(__GLXclientState *cl, unsigned screen)
 	WRITE_PAIR( GLX_BIND_TO_MIPMAP_TEXTURE_EXT, modes->bindToMipmapTexture );
 	WRITE_PAIR( GLX_BIND_TO_TEXTURE_TARGETS_EXT, modes->bindToTextureTargets );
 
+	WRITE_PAIR( GLX_SAMPLE_BUFFERS_SGIS, modes->sampleBuffers );
+	WRITE_PAIR( GLX_SAMPLES_SGIS, modes->samples );
+
 	if (client->swapped) {
 	    __GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH);
 	}
commit 9c76ed49cc4ed66632dcab0bf096f37a769db7f1
Author: George Peter Staplin <gps at Georges-Workstation.local>
Date:   Tue Nov 4 12:53:12 2008 -0700

    XQuartz: GL: Add capability detection for depth buffers, and multisampling.
    
    GL/capabilities.c: Add handleDepthModes(), and extend
    handleRendererDescription() for the various depth and multisampling flags.
    
    Add initialization of the new config options to initConfig().
    
    GL/capabilities.h: Add depth and multisample config members.
    
    GL/visualConfigs.c: Add depth and multisampling support to the visual config
    setup.
    (cherry picked from commit f527381eea6a8ae6cd791475b2060d21fcf8efb2)

diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c
index 23d7c25..bc3966f 100644
--- a/hw/xquartz/GL/capabilities.c
+++ b/hw/xquartz/GL/capabilities.c
@@ -295,11 +295,60 @@ static void handleAccumulationModes(struct glCapabilitiesConfig *c, GLint cmodes
     assert(c->total_accum_buffers < GLCAPS_COLOR_BUFFERS);
 }
 
+static void handleDepthModes(struct glCapabilitiesConfig *c, GLint dmodes) {
+    int offset = 0;
+#define DEPTH(flag,value) do { \
+	if(dmodes & flag) { \
+	    c->depth_buffers[offset++] = value; \
+	} \
+    } while(0)
+
+    /*1*/
+    DEPTH(kCGL0Bit, 0);
+    /*2*/
+    DEPTH(kCGL1Bit, 1);
+    /*3*/
+    DEPTH(kCGL2Bit, 2);
+    /*4*/
+    DEPTH(kCGL3Bit, 3);
+    /*5*/
+    DEPTH(kCGL4Bit, 4);
+    /*6*/
+    DEPTH(kCGL5Bit, 5);
+    /*7*/
+    DEPTH(kCGL6Bit, 6);
+    /*8*/
+    DEPTH(kCGL8Bit, 8);
+    /*9*/
+    DEPTH(kCGL10Bit, 10);
+    /*10*/
+    DEPTH(kCGL12Bit, 12);
+    /*11*/
+    DEPTH(kCGL16Bit, 16);
+    /*12*/
+    DEPTH(kCGL24Bit, 24);
+    /*13*/
+    DEPTH(kCGL32Bit, 32);
+    /*14*/
+    DEPTH(kCGL48Bit, 48);
+    /*15*/
+    DEPTH(kCGL64Bit, 64);
+    /*16*/
+    DEPTH(kCGL96Bit, 96);
+    /*17*/
+    DEPTH(kCGL128Bit, 128);
+
+#undef DEPTH
+
+    c->total_depth_buffer_depths = offset;
+    assert(c->total_depth_buffer_depths < GLCAPS_DEPTH_BUFFERS);
+}
+
 /* Return non-zero if an error occured. */
 static CGLError handleRendererDescriptions(CGLRendererInfoObj info, GLint r, 
 					   struct glCapabilitiesConfig *c) {
     CGLError err;
-    GLint accelerated = 0, flags = 0, aux = 0;
+    GLint accelerated = 0, flags = 0, aux = 0, samplebufs = 0, samples = 0;
 
     err = CGLDescribeRenderer (info, r, kCGLRPAccelerated, &accelerated);
 
@@ -323,7 +372,34 @@ static CGLError handleRendererDescriptions(CGLRendererInfoObj info, GLint r,
 	return err;
     
     c->aux_buffers = aux;
+
     
+    /* Depth buffer size */
+    err = CGLDescribeRenderer(info, r, kCGLRPDepthModes, &flags);
+    
+    if(err)
+	return err;
+
+    handleDepthModes(c, flags);
+
+
+    /* Multisample buffers */
+    err = CGLDescribeRenderer(info, r, kCGLRPMaxSampleBuffers, &samplebufs);
+
+    if(err)
+	return err;
+
+    c->multisample_buffers = samplebufs;
+    
+
+    /* Multisample samples per multisample buffer */
+    err = CGLDescribeRenderer(info, r, kCGLRPMaxSamples, &samples);
+
+    if(err)
+	return err;
+
+    c->multisample_samples = samples;
+
 
     /* Stencil bit depths */
     err = CGLDescribeRenderer(info, r, kCGLRPStencilModes, &flags);
@@ -362,8 +438,18 @@ static void initConfig(struct glCapabilitiesConfig *c) {
 
     c->accelerated = false;
     c->stereo = false;
-    c->buffers = 0;
     c->aux_buffers = 0;
+    c->buffers = 0;
+
+    c->total_depth_buffer_depths = 0;
+
+    for(i = 0; i < GLCAPS_DEPTH_BUFFERS; ++i) {
+	c->depth_buffers[i] = GLCAPS_INVALID_DEPTH_VALUE;
+    }
+
+    c->multisample_buffers = 0;
+    c->multisample_samples = 0;
+
     c->total_stencil_bit_depths = 0;
 
     for(i = 0; i < GLCAPS_STENCIL_BIT_DEPTH_BUFFERS; ++i) {
diff --git a/hw/xquartz/GL/capabilities.h b/hw/xquartz/GL/capabilities.h
index 20be30d..361856b 100644
--- a/hw/xquartz/GL/capabilities.h
+++ b/hw/xquartz/GL/capabilities.h
@@ -29,6 +29,8 @@ enum { GLCAPS_INVALID_STENCIL_DEPTH = -1 };
 enum { GLCAPS_COLOR_BUF_INVALID_VALUE = -1 };
 enum { GLCAPS_COLOR_BUFFERS = 20 };
 enum { GLCAPS_STENCIL_BIT_DEPTH_BUFFERS = 20 };
+enum { GLCAPS_DEPTH_BUFFERS = 20 };
+enum { GLCAPS_INVALID_DEPTH_VALUE = 1 };
 
 struct glColorBufCapabilities {
     char r, g, b, a;
@@ -40,6 +42,10 @@ struct glCapabilitiesConfig {
     bool stereo;
     int aux_buffers;
     int buffers;
+    int total_depth_buffer_depths;
+    int depth_buffers[GLCAPS_DEPTH_BUFFERS];
+    int multisample_buffers;
+    int multisample_samples;
     int total_stencil_bit_depths;
     char stencil_bit_depths[GLCAPS_STENCIL_BIT_DEPTH_BUFFERS];
     int total_color_buffers;
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index f7f253f..2f5c508 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -63,9 +63,9 @@ void setVisualConfigs(void) {
     void **visualPrivates = NULL;
     struct glCapabilities caps;
     struct glCapabilitiesConfig *conf = NULL;
-    int stereo, depth, aux, buffers, stencil, accum, color;
+    int stereo, depth, aux, buffers, stencil, accum, color, msample;
     int i = 0; 
-   
+    
     if(getGlCapabilities(&caps)) {
 	ErrorF("error from getGlCapabilities()!\n");
 	return;
@@ -86,7 +86,12 @@ void setVisualConfigs(void) {
       conf->total_color_buffers indicates the RGB/RGBA color depths.
       
       conf->total_accum_buffers iterations for accum (with at least 1 if equal to 0) 
-	 
+	
+      conf->total_depth_buffer_depths 
+
+      conf->multisample_buffers iterations (with at least 1 if equal to 0).  We add 1
+      for the 0 multisampling config.
+      
      */
 
     assert(NULL != caps.configurations);
@@ -103,7 +108,9 @@ void setVisualConfigs(void) {
 	    * conf->buffers
 	    * ((conf->total_stencil_bit_depths > 0) ? conf->total_stencil_bit_depths : 1)
 	    * conf->total_color_buffers
-	    * ((conf->total_accum_buffers > 0) ? conf->total_accum_buffers : 1);
+	    * ((conf->total_accum_buffers > 0) ? conf->total_accum_buffers : 1)
+	    * conf->total_depth_buffer_depths
+	    * (conf->multisample_buffers + 1);
     }
 
     visualConfigs = xcalloc(sizeof(*visualConfigs), numConfigs);
@@ -133,79 +140,84 @@ void setVisualConfigs(void) {
 			for(color = 0; color < conf->total_color_buffers; ++color) {
 			    for(accum = 0; accum < ((conf->total_accum_buffers > 0) ?
 						    conf->total_accum_buffers : 1); ++accum) {
-				visualConfigs[i].vid = (VisualID)(-1);
-				visualConfigs[i].class = TrueColor;
-				
-				visualConfigs[i].rgba = true;
-				visualConfigs[i].redSize = conf->color_buffers[color].r;
-				visualConfigs[i].greenSize = conf->color_buffers[color].g;
-				visualConfigs[i].blueSize = conf->color_buffers[color].b;
-				visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+				for(depth = 0; depth < conf->total_depth_buffer_depths; ++depth) {
+				    for(msample = 0; msample < (conf->multisample_buffers + 1); ++msample) {
+					visualConfigs[i].vid = (VisualID)(-1);
+					visualConfigs[i].class = TrueColor;
+					
+					visualConfigs[i].rgba = true;
+					visualConfigs[i].redSize = conf->color_buffers[color].r;
+					visualConfigs[i].greenSize = conf->color_buffers[color].g;
+					visualConfigs[i].blueSize = conf->color_buffers[color].b;
+					visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+					
+					visualConfigs[i].bufferSize = conf->color_buffers[color].r +
+					    conf->color_buffers[color].g + conf->color_buffers[color].b +
+					    conf->color_buffers[color].a;
+					
+					/*
+					 * I'm uncertain about these masks.
+					 * I don't think we actually care what the values are in our
+					 * libGL, so it doesn't seem to make a difference.
+					 */
+					visualConfigs[i].redMask = -1;
+					visualConfigs[i].greenMask = -1;
+					visualConfigs[i].blueMask = -1;
+					visualConfigs[i].alphaMask = -1;
+					
+					if(conf->total_accum_buffers > 0) {
+					    visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r;
+					    visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g;
+					    visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b;
+					    if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) {
+						visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a;
+					    } else {
+						visualConfigs[i].accumAlphaSize = 0;
+					    }
+					} else {
+					    visualConfigs[i].accumRedSize = 0;
+					    visualConfigs[i].accumGreenSize = 0;
+					    visualConfigs[i].accumBlueSize = 0;
+					    visualConfigs[i].accumAlphaSize = 0;
+					}
+					
+					visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE;
+					visualConfigs[i].stereo = stereo ? TRUE : FALSE;
+
+  					visualConfigs[i].depthSize = conf->depth_buffers[depth];
 				
-				visualConfigs[i].bufferSize = conf->color_buffers[color].r +
-				    conf->color_buffers[color].g + conf->color_buffers[color].b +
-				    conf->color_buffers[color].a;
+					if(conf->total_stencil_bit_depths > 0) {
+					    visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil];
+					} else {
+					    visualConfigs[i].stencilSize = 0;
+					}
+					visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0;
+					visualConfigs[i].level = 0;
 				
-				/*
-				 * I'm uncertain about these masks.
-				 * I don't think we actually care what the values are in our
-				 * libGL, so it doesn't seem to make a difference.
-				 */
-				visualConfigs[i].redMask = -1;
-				visualConfigs[i].greenMask = -1;
-				visualConfigs[i].blueMask = -1;
-				visualConfigs[i].alphaMask = -1;
-				
-				if(conf->total_accum_buffers > 0) {
-				    visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r;
-				    visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g;
-				    visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b;
-				    if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) {
-					visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a;
-				    } else {
-					visualConfigs[i].accumAlphaSize = 0;
+					if(conf->accelerated) {
+					    visualConfigs[i].visualRating = GLX_NONE;
+					} else {
+					    visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
+					}
+					
+					visualConfigs[i].transparentPixel = GLX_NONE;
+					visualConfigs[i].transparentRed = GLX_NONE;
+					visualConfigs[i].transparentGreen = GLX_NONE;
+					visualConfigs[i].transparentBlue = GLX_NONE;
+					visualConfigs[i].transparentAlpha = GLX_NONE;
+					visualConfigs[i].transparentIndex = GLX_NONE;
+					
+					if(msample > 0) {
+					    visualConfigs[i].multiSampleSize = conf->multisample_samples;
+					    visualConfigs[i].nMultiSampleBuffers = conf->multisample_buffers;
+					} else {
+					    visualConfigs[i].multiSampleSize = 0;
+					    visualConfigs[i].nMultiSampleBuffers = 0;
+					}
+										
+					++i;
 				    }
-				} else {
-				    visualConfigs[i].accumRedSize = 0;
-				    visualConfigs[i].accumGreenSize = 0;
-				    visualConfigs[i].accumBlueSize = 0;
-				    visualConfigs[i].accumAlphaSize = 0;
-				}
-				
-				visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE;
-				visualConfigs[i].stereo = stereo ? TRUE : FALSE;
-				
-				visualConfigs[i].depthSize = 24;
-				
-				if(conf->total_stencil_bit_depths > 0) {
-				    visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil];
-				} else {
-				    visualConfigs[i].stencilSize = 0;
-				}
-				visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0;
-				visualConfigs[i].level = 0;
-				
-				if(conf->accelerated) {
-				    visualConfigs[i].visualRating = GLX_NONE;
-				} else {
-				    visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
 				}
-				
-				visualConfigs[i].transparentPixel = GLX_NONE;
-				visualConfigs[i].transparentRed = GLX_NONE;
-				visualConfigs[i].transparentGreen = GLX_NONE;
-				visualConfigs[i].transparentBlue = GLX_NONE;
-				visualConfigs[i].transparentAlpha = GLX_NONE;
-				visualConfigs[i].transparentIndex = GLX_NONE;
-				
-				/*
-				  TODO possibly handle:
-				  multiSampleSize;
-				  nMultiSampleBuffers;
-				  visualSelectGroup;
-				*/
-				
-				++i;
 			    }
 			}
 		    }
commit caa049246f64f41735ec78b2c12f1b92c6bac22d
Author: George Peter Staplin <gps at Georges-Workstation.local>
Date:   Mon Nov 3 19:52:48 2008 -0700

    XQuartz: GL: Work around problems with really deep visuals.
    
    GL/capabilities.c: #if 0 (for now) any capabilities above 8 bits per channel,
    because they introduce drawing problems.
    
    GL/indirect.c: Comment out some visual setup code that shouldn't be running, and
    actually seemed to cause some problems.  The current visualConfigs.c code seems
    to do a reasonable job of setting up visuals for XQuartz.
    
    GL/visualConfigs.c: Make use of the proper visual .class.   Eliminate depth 0.
    It seems we really just want 24 for now, and 0 I think was a flaw in the original
    code.
    (cherry picked from commit 1e5f63f15e13a40a6e69a1505934d10d6990b6a2)

diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c
index b38dba8..23d7c25 100644
--- a/hw/xquartz/GL/capabilities.c
+++ b/hw/xquartz/GL/capabilities.c
@@ -204,6 +204,15 @@ static int handleColorAndAccumulation(struct glColorBufCapabilities *c,
 	++offset;
     }
 
+#if 0
+    /* 
+     * Disable this path, because some part of libGL, X, or Xplugin 
+     * doesn't work with sizes greater than 8.
+     * When this is enabled and visuals are chosen using depths
+     * such as 16, the result is that the windows don't redraw
+     * and are often white, until a resize.
+     */
+
     /*12*/
     if(kCGLRGB101010Bit & cmodes) {
 	c[offset].r = 10;
@@ -265,6 +274,7 @@ static int handleColorAndAccumulation(struct glColorBufCapabilities *c,
 	c[offset].a = 16;
 	++offset;
     }
+#endif
 
     /* FIXME should we handle the floating point color modes, and if so, how? */
       
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index f24f1fb..1b04888 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -1156,8 +1156,15 @@ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) {
   screen->base.createDrawable = __glXAquaScreenCreateDrawable;
   screen->base.pScreen       = pScreen;
 
-  init_screen_visuals(screen);
-    
+  /* 
+   * These are both commented out, because they cause problems with
+   * the other visual config code, and visuals.
+   * This probe function is called normally on startup in direct
+   * mode too.
+   * They don't seem to be needed now that we have better visual
+   * setup.
+   */
+  //init_screen_visuals(screen);
   //glAquaInitVisualConfigs();
 
   return &screen->base;
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index 12e9777..f7f253f 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -86,6 +86,7 @@ void setVisualConfigs(void) {
       conf->total_color_buffers indicates the RGB/RGBA color depths.
       
       conf->total_accum_buffers iterations for accum (with at least 1 if equal to 0) 
+	 
      */
 
     assert(NULL != caps.configurations);
@@ -98,7 +99,6 @@ void setVisualConfigs(void) {
 	    continue;
 
 	numConfigs += (conf->stereo ? 2 : 1) 
-	    * 2 /*depth*/ 
 	    * (conf->aux_buffers ? 2 : 1) 
 	    * conf->buffers
 	    * ((conf->total_stencil_bit_depths > 0) ? conf->total_stencil_bit_depths : 1)
@@ -126,80 +126,86 @@ void setVisualConfigs(void) {
     i = 0; /* current buffer */
     for(conf = caps.configurations; conf; conf = conf->next) {
 	for(stereo = 0; stereo < (conf->stereo ? 2 : 1); ++stereo) {
-	    for(depth = 0; depth < 2; ++depth) {
-		for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) {
-		    for(buffers = 0; buffers < conf->buffers; ++buffers) {
-			for(stencil = 0; stencil < ((conf->total_stencil_bit_depths > 0) ? 
-						    conf->total_stencil_bit_depths : 1); ++stencil) {
-			    for(color = 0; color < conf->total_color_buffers; ++color) {
-				for(accum = 0; accum < ((conf->total_accum_buffers > 0) ?
-							conf->total_accum_buffers : 1); ++accum) {
-				    visualConfigs[i].vid = -1;
-				    visualConfigs[i].class = -1;
-		     
-				    visualConfigs[i].rgba = true;
-				    visualConfigs[i].redSize = conf->color_buffers[color].r;
-				    visualConfigs[i].greenSize = conf->color_buffers[color].g;
-				    visualConfigs[i].blueSize = conf->color_buffers[color].b;
-				    visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+	    for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) {
+		for(buffers = 0; buffers < conf->buffers; ++buffers) {
+		    for(stencil = 0; stencil < ((conf->total_stencil_bit_depths > 0) ? 
+						conf->total_stencil_bit_depths : 1); ++stencil) {
+			for(color = 0; color < conf->total_color_buffers; ++color) {
+			    for(accum = 0; accum < ((conf->total_accum_buffers > 0) ?
+						    conf->total_accum_buffers : 1); ++accum) {
+				visualConfigs[i].vid = (VisualID)(-1);
+				visualConfigs[i].class = TrueColor;
 				
-				    visualConfigs[i].redMask = -1;
-				    visualConfigs[i].greenMask = -1;
-				    visualConfigs[i].blueMask = -1;
-				    visualConfigs[i].alphaMask = -1;
-
-				    if(conf->total_accum_buffers > 0) {
-					visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r;
-					visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g;
-					visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b;
-					if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) {
-					    visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a;
-					} else {
-					    visualConfigs[i].accumAlphaSize = 0;
-					}
+				visualConfigs[i].rgba = true;
+				visualConfigs[i].redSize = conf->color_buffers[color].r;
+				visualConfigs[i].greenSize = conf->color_buffers[color].g;
+				visualConfigs[i].blueSize = conf->color_buffers[color].b;
+				visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+				
+				visualConfigs[i].bufferSize = conf->color_buffers[color].r +
+				    conf->color_buffers[color].g + conf->color_buffers[color].b +
+				    conf->color_buffers[color].a;
+				
+				/*
+				 * I'm uncertain about these masks.
+				 * I don't think we actually care what the values are in our
+				 * libGL, so it doesn't seem to make a difference.
+				 */
+				visualConfigs[i].redMask = -1;
+				visualConfigs[i].greenMask = -1;
+				visualConfigs[i].blueMask = -1;
+				visualConfigs[i].alphaMask = -1;
+				
+				if(conf->total_accum_buffers > 0) {
+				    visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r;
+				    visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g;
+				    visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b;
+				    if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) {
+					visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a;
 				    } else {
-					visualConfigs[i].accumRedSize = 0;
-					visualConfigs[i].accumGreenSize = 0;
-					visualConfigs[i].accumBlueSize = 0;
 					visualConfigs[i].accumAlphaSize = 0;
 				    }
-
-				    visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE;
-				    visualConfigs[i].stereo = stereo ? TRUE : FALSE;
-				    visualConfigs[i].bufferSize = -1;
-				    
-				    visualConfigs[i].depthSize = depth ? 24 : 0;
-				    
-				    if(conf->total_stencil_bit_depths > 0) {
-					visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil];
-				    } else {
-					visualConfigs[i].stencilSize = 0;
-				    }
-				    visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0;
-				    visualConfigs[i].level = 0;
-
-				    if(conf->accelerated) {
-					visualConfigs[i].visualRating = GLX_NONE;
-				    } else {
-					visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
-				    }
-
-				    visualConfigs[i].transparentPixel = GLX_NONE;
-				    visualConfigs[i].transparentRed = GLX_NONE;
-				    visualConfigs[i].transparentGreen = GLX_NONE;
-				    visualConfigs[i].transparentBlue = GLX_NONE;
-				    visualConfigs[i].transparentAlpha = GLX_NONE;
-				    visualConfigs[i].transparentIndex = GLX_NONE;
-
-				    /*
-				      TODO possibly handle:
-				      multiSampleSize;
-				      nMultiSampleBuffers;
-				      visualSelectGroup;
-				    */
-
-				    ++i;
+				} else {
+				    visualConfigs[i].accumRedSize = 0;
+				    visualConfigs[i].accumGreenSize = 0;
+				    visualConfigs[i].accumBlueSize = 0;
+				    visualConfigs[i].accumAlphaSize = 0;
 				}
+				
+				visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE;
+				visualConfigs[i].stereo = stereo ? TRUE : FALSE;
+				
+				visualConfigs[i].depthSize = 24;
+				
+				if(conf->total_stencil_bit_depths > 0) {
+				    visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil];
+				} else {
+				    visualConfigs[i].stencilSize = 0;
+				}
+				visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0;
+				visualConfigs[i].level = 0;
+				
+				if(conf->accelerated) {
+				    visualConfigs[i].visualRating = GLX_NONE;
+				} else {
+				    visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
+				}
+				
+				visualConfigs[i].transparentPixel = GLX_NONE;
+				visualConfigs[i].transparentRed = GLX_NONE;
+				visualConfigs[i].transparentGreen = GLX_NONE;
+				visualConfigs[i].transparentBlue = GLX_NONE;
+				visualConfigs[i].transparentAlpha = GLX_NONE;
+				visualConfigs[i].transparentIndex = GLX_NONE;
+				
+				/*
+				  TODO possibly handle:
+				  multiSampleSize;
+				  nMultiSampleBuffers;
+				  visualSelectGroup;
+				*/
+				
+				++i;
 			    }
 			}
 		    }
commit a3a4746d25cc05b25c2ace6b7ee5002b57b8d3dc
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sun Nov 2 15:52:22 2008 -0800

    XQuartz: Replace deprecated API usage thanks to Robery Murphy
    (cherry picked from commit 71dd052412400362793f2f0c7c02bf4f4309738c)

diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index 2e8f3a4..603ca4a 100644
--- a/hw/xquartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -337,7 +337,8 @@ void QuartzAudioInit(void)
     // fixme assert fadeLength<framesPerBuffer
 
     // Prepare for playback
-    status = AudioDeviceAddIOProc(outputDevice, QuartzAudioIOProc, &data);
+    AudioDeviceIOProcID sInputIOProcID = NULL;
+    status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, NULL, &sInputIOProcID );
     if (status) {
         ErrorF("QuartzAudioInit: AddIOProc returned %ld\n", (long)status);
         return;
commit f333d0ae6f88896c07220479287a86c8a35b65df
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Oct 31 20:18:27 2008 -0700

    XQuartz: version string updated for 2.3.2_beta3
    (cherry picked from commit 81bb4128570b44d779126a8dffcd3c5620747383)

diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist
index ea37725..208f8e5 100644
--- a/hw/xquartz/bundle/Info.plist
+++ b/hw/xquartz/bundle/Info.plist
@@ -19,11 +19,11 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>2.3.2</string>
+		<string>2.3.1.91.3</string>
 	<key>CFBundleVersion</key>
-		<string>2.3.2</string>
+		<string>2.3.1.91.3</string>
 	<key>CFBundleVersionString</key>
-		<string>2.3.2</string>
+		<string>2.3.1.91.3</string>
 	<key>CFBundleSignature</key>
 		<string>x11a</string>
 	<key>CSResourcesFileMapped</key>
commit fec491e31684bdfb2332ec6285348550cdc15abe
Merge: fa6db0b... 4c6a89e...
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Nov 5 19:20:26 2008 -0800

    Merge branch 'server-1.5-branch' into xorg-server-1.5-apple

commit 4c6a89ee783d62fb75a738339351830c35b19a38
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Nov 5 15:39:01 2008 -0500

    xserver 1.5.3

diff --git a/configure.ac b/configure.ac
index 88749a5..de932f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,9 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.5.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="10 October 2008"
+AC_INIT([xorg-server], 1.5.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="5 November 2008"
+REMEMBER_REMEMBER="The Fifth of November"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit b0c2d009852972f1b085ab5ce2271692dface27f
Author: Julien Cristau <jcristau at debian.org>
Date:   Sun Oct 26 13:13:21 2008 +0100

    xfree86: fix compiler warnings in DoModalias()
    
    The precedence of == is higher than that of &, so that code was
    probably buggy.
    
    xf86Init.c: In function 'DoModalias':
    xf86Init.c:300: warning: suggest parentheses around comparison in operand of &
    xf86Init.c:304: warning: suggest parentheses around comparison in operand of &
    xf86Init.c:308: warning: suggest parentheses around comparison in operand of &
    (cherry picked from commit ffaaa1a198a77eb6800c08d4613ee1cc0b068ba0)

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 8b41d81..fc50caf 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -307,15 +307,15 @@ DoModalias()
                  ErrorF("sd%08X", match->subdevice_id);
 
              /* Class */
-             if (match->device_class_mask >> 16 & 0xFF == 0xFF)
+             if ((match->device_class_mask >> 16 & 0xFF) == 0xFF)
                  ErrorF("bc%02X", match->device_class >> 16 & 0xFF);
              else
                  ErrorF("bc*");
-             if (match->device_class_mask >> 8 & 0xFF == 0xFF)
+             if ((match->device_class_mask >> 8 & 0xFF) == 0xFF)
                  ErrorF("sc%02X", match->device_class >> 8 & 0xFF);
              else
                  ErrorF("sc*");
-             if (match->device_class_mask & 0xFF == 0xFF)
+             if ((match->device_class_mask & 0xFF) == 0xFF)
                  ErrorF("i%02X*", match->device_class & 0xFF);
              else
                  ErrorF("i*");
commit a311fdc04013c678eb506458d6a5d3376f107bf7
Author: Nathaniel McCallum <nathaniel at natemccallum.com>
Date:   Tue Oct 14 09:50:29 2008 -0400

    Xorg: add -modalias option
    
    This scans the installed video drivers and prints a Linux-style modalias
    listing of the devices each driver claims to support.

diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 065102f..e915217 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -56,6 +56,7 @@
 
 /* General parameters */
 extern int xf86DoConfigure;
+extern Bool xf86DoModalias;
 extern Bool xf86DoConfigurePass1;
 extern DevPrivateKey xf86ScreenKey;
 extern DevPrivateKey xf86CreateRootWindowKey;
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 0dc42c6..f5babbc 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -149,6 +149,7 @@ Bool xf86Resetting = FALSE;
 Bool xf86Initialising = FALSE;
 Bool xf86DoProbe = FALSE;
 Bool xf86DoConfigure = FALSE;
+Bool xf86DoModalias = FALSE;
 DriverPtr *xf86DriverList = NULL;
 int xf86NumDrivers = 0;
 InputDriverPtr *xf86InputDriverList = NULL;
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 475628b..282eb49 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1486,6 +1486,8 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
     if (sectlist)
 	*sectlist = NULL;
 
+    if (xf86DoModalias) return 0;
+
     if (xf86DoProbe) return 1;
 
     if (xf86DoConfigure && xf86DoConfigurePass1) return 1;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 68dc387..8b41d81 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -131,6 +131,207 @@ static int numFormats = 6;
 #endif
 static Bool formatsDone = FALSE;
 
+#ifndef OSNAME
+#define OSNAME " unknown"
+#endif
+#ifndef OSVENDOR
+#define OSVENDOR ""
+#endif
+#ifndef PRE_RELEASE
+#define PRE_RELEASE XORG_VERSION_SNAP
+#endif
+
+static void
+xf86PrintBanner()
+{
+#if PRE_RELEASE
+  ErrorF("\n"
+    "This is a pre-release version of the X server from " XVENDORNAME ".\n"
+    "It is not supported in any way.\n"
+    "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
+    "Select the \"xorg\" product for bugs you find in this release.\n"
+    "Before reporting bugs in pre-release versions please check the\n"
+    "latest version in the X.Org Foundation git repository.\n"
+    "See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
+#endif
+  ErrorF("\nX.Org X Server %d.%d.%d",
+	 XORG_VERSION_MAJOR,
+	 XORG_VERSION_MINOR,
+	 XORG_VERSION_PATCH);
+#if XORG_VERSION_SNAP > 0
+  ErrorF(".%d", XORG_VERSION_SNAP);
+#endif
+
+#if XORG_VERSION_SNAP >= 900
+  /* When the minor number is 99, that signifies that the we are making
+   * a release candidate for a major version.  (X.0.0)
+   * When the patch number is 99, that signifies that the we are making
+   * a release candidate for a minor version.  (X.Y.0)
+   * When the patch number is < 99, then we are making a release
+   * candidate for the next point release.  (X.Y.Z)
+   */
+#if XORG_VERSION_MINOR >= 99
+  ErrorF(" (%d.0.0 RC %d)", XORG_VERSION_MAJOR+1, XORG_VERSION_SNAP - 900);
+#elif XORG_VERSION_PATCH == 99
+  ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1,
+				XORG_VERSION_SNAP - 900);
+#else
+  ErrorF(" (%d.%d.%d RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR,
+ 			 XORG_VERSION_PATCH + 1, XORG_VERSION_SNAP - 900);
+#endif
+#endif
+
+#ifdef XORG_CUSTOM_VERSION
+  ErrorF(" (%s)", XORG_CUSTOM_VERSION);
+#endif
+#ifndef XORG_DATE
+#define XORG_DATE XF86_DATE
+#endif
+  ErrorF("\nRelease Date: %s\n", XORG_DATE);
+  ErrorF("X Protocol Version %d, Revision %d\n",
+         X_PROTOCOL, X_PROTOCOL_REVISION);
+  ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR);
+#ifdef HAS_UTSNAME
+  {
+    struct utsname name;
+
+    /* Linux & BSD state that 0 is success, SysV (including Solaris, HP-UX,
+       and Irix) and Single Unix Spec 3 just say that non-negative is success.
+       All agree that failure is represented by a negative number.
+     */
+    if (uname(&name) >= 0) {
+      ErrorF("Current Operating System: %s %s %s %s %s\n",
+	name.sysname, name.nodename, name.release, name.version, name.machine);
+    }
+  }
+#endif
+#if defined(BUILD_DATE) && (BUILD_DATE > 19000000)
+  {
+    struct tm t;
+    char buf[100];
+
+    bzero(&t, sizeof(t));
+    bzero(buf, sizeof(buf));
+    t.tm_mday = BUILD_DATE % 100;
+    t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
+    t.tm_year = BUILD_DATE / 10000 - 1900;
+#if defined(BUILD_TIME)
+    t.tm_sec = BUILD_TIME % 100;
+    t.tm_min = (BUILD_TIME / 100) % 100;
+    t.tm_hour = (BUILD_TIME / 10000) % 100;
+    if (strftime(buf, sizeof(buf), "%d %B %Y  %I:%M:%S%p", &t))
+       ErrorF("Build Date: %s\n", buf);
+#else
+    if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
+       ErrorF("Build Date: %s\n", buf);
+#endif
+  }
+#endif
+#if defined(CLOG_DATE) && (CLOG_DATE > 19000000)
+  {
+    struct tm t;
+    char buf[100];
+
+    bzero(&t, sizeof(t));
+    bzero(buf, sizeof(buf));
+    t.tm_mday = CLOG_DATE % 100;
+    t.tm_mon = (CLOG_DATE / 100) % 100 - 1;
+    t.tm_year = CLOG_DATE / 10000 - 1900;
+    if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
+       ErrorF("Changelog Date: %s\n", buf);
+  }
+#endif
+#if defined(BUILDERSTRING)
+  ErrorF("%s \n",BUILDERSTRING);
+#endif
+  ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n"
+	 "\tto make sure that you have the latest version.\n");
+}
+
+static void
+xf86PrintMarkers()
+{
+  LogPrintMarkers();
+}
+
+static void
+DoModalias()
+{
+    int i = -1;
+    char **vlist;
+
+    /* Get all the drivers */
+    vlist = xf86DriverlistFromCompile();
+    if (!vlist) {
+	ErrorF("Missing output drivers.  PCI Access dump failed.\n");
+	goto bail;
+    }
+
+    /* Load all the drivers that were found. */
+    xf86LoadModules(vlist, NULL);
+
+    xfree(vlist);
+
+    /* Iterate through each driver */
+    for (i = 0; i < xf86NumDrivers; i++) {
+        struct pci_id_match *match;
+
+        /* Iterate through each pci id match data, dumping it to the screen */
+        for (match = (struct pci_id_match *) xf86DriverList[i]->supported_devices ;
+                 match && !(!match->vendor_id && !match->device_id) ; match++) {
+             /* Prefix */
+             ErrorF("alias pci:");
+
+             /* Vendor */
+             if (match->vendor_id == ~0)
+                 ErrorF("v*");
+             else
+                 ErrorF("v%08X", match->vendor_id);
+
+             /* Device */
+             if (match->device_id == ~0)
+                 ErrorF("d*");
+             else
+                 ErrorF("d%08X", match->device_id);
+
+             /* Subvendor */
+             if (match->subvendor_id == ~0)
+                 ErrorF("sv*");
+             else
+                 ErrorF("sv%08X", match->subvendor_id);
+
+             /* Subdevice */
+             if (match->subdevice_id == ~0)
+                 ErrorF("sd*");
+             else
+                 ErrorF("sd%08X", match->subdevice_id);
+
+             /* Class */
+             if (match->device_class_mask >> 16 & 0xFF == 0xFF)
+                 ErrorF("bc%02X", match->device_class >> 16 & 0xFF);
+             else
+                 ErrorF("bc*");
+             if (match->device_class_mask >> 8 & 0xFF == 0xFF)
+                 ErrorF("sc%02X", match->device_class >> 8 & 0xFF);
+             else
+                 ErrorF("sc*");
+             if (match->device_class_mask & 0xFF == 0xFF)
+                 ErrorF("i%02X*", match->device_class & 0xFF);
+             else
+                 ErrorF("i*");
+
+             /* Suffix (driver) */
+             ErrorF(" %s\n", xf86DriverList[i]->driverName);
+        }
+    }
+
+bail:
+    OsCleanup(TRUE);
+    AbortDDX();
+    fflush(stderr);
+    exit(0);
+}
+
 static Bool
 xf86CreateRootWindow(WindowPtr pWin)
 {
@@ -488,19 +689,21 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
     else
       xf86ServerName = argv[0];
 
-    xf86PrintBanner();
-    xf86PrintMarkers();
-    if (xf86LogFile)  {
-	time_t t;
-	const char *ct;
-	t = time(NULL);
-	ct = ctime(&t);
-	xf86MsgVerb(xf86LogFileFrom, 0, "Log file: \"%s\", Time: %s",
-		    xf86LogFile, ct);
+    if (!xf86DoModalias) {
+	xf86PrintBanner();
+	xf86PrintMarkers();
+	if (xf86LogFile)  {
+	    time_t t;
+	    const char *ct;
+	    t = time(NULL);
+	    ct = ctime(&t);
+	    xf86MsgVerb(xf86LogFileFrom, 0, "Log file: \"%s\", Time: %s",
+			xf86LogFile, ct);
+	}
     }
 
     /* Read and parse the config file */
-    if (!xf86DoProbe && !xf86DoConfigure) {
+    if (!xf86DoProbe && !xf86DoConfigure && !xf86DoModalias) {
       switch (xf86HandleConfigFile(FALSE)) {
       case CONFIG_OK:
 	break;
@@ -537,6 +740,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
     if (xf86DoConfigure)
 	DoConfigure();
 
+    /* Do the PCI Access dump */
+    if (xf86DoModalias)
+        DoModalias();
+
     if (autoconfig) {
 	if (!xf86AutoConfig()) {
 	    xf86Msg(X_ERROR, "Auto configuration failed\n");
@@ -1678,6 +1885,12 @@ ddxProcessArgument(int argc, char **argv, int i)
     xf86AllowMouseOpenFail = TRUE;
     return 1;
   }
+  if (!strcmp(argv[i], "-modalias"))
+  {
+    xf86DoModalias = TRUE;
+    xf86AllowMouseOpenFail = TRUE;
+    return 1;
+  }
   if (!strcmp(argv[i], "-isolateDevice"))
   {
     int bus, device, func;
@@ -1722,6 +1935,7 @@ ddxUseMsg()
     ErrorF("-logfile file          specify a log file name\n");
     ErrorF("-configure             probe for devices and write an "__XCONFIGFILE__"\n");
   }
+  ErrorF("-modalias              output a modalias-style filter for each driver installed\n");
   ErrorF("-config file           specify a configuration file, relative to the\n");
   ErrorF("                       "__XCONFIGFILE__" search path, only root can use absolute\n");
   ErrorF("-probeonly             probe for devices, then exit\n");
@@ -1764,131 +1978,6 @@ ddxUseMsg()
   ErrorF("\n");
 }
 
-
-#ifndef OSNAME
-#define OSNAME " unknown"
-#endif
-#ifndef OSVENDOR
-#define OSVENDOR ""
-#endif
-#ifndef PRE_RELEASE
-#define PRE_RELEASE XORG_VERSION_SNAP
-#endif
-
-static void
-xf86PrintBanner()
-{
-#if PRE_RELEASE
-  ErrorF("\n"
-    "This is a pre-release version of the X server from " XVENDORNAME ".\n"
-    "It is not supported in any way.\n"
-    "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
-    "Select the \"xorg\" product for bugs you find in this release.\n"
-    "Before reporting bugs in pre-release versions please check the\n"
-    "latest version in the X.Org Foundation git repository.\n"
-    "See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
-#endif
-  ErrorF("\nX.Org X Server %d.%d.%d",
-	 XORG_VERSION_MAJOR,
-	 XORG_VERSION_MINOR,
-	 XORG_VERSION_PATCH);
-#if XORG_VERSION_SNAP > 0
-  ErrorF(".%d", XORG_VERSION_SNAP);
-#endif
-
-#if XORG_VERSION_SNAP >= 900
-  /* When the minor number is 99, that signifies that the we are making
-   * a release candidate for a major version.  (X.0.0)
-   * When the patch number is 99, that signifies that the we are making
-   * a release candidate for a minor version.  (X.Y.0)
-   * When the patch number is < 99, then we are making a release
-   * candidate for the next point release.  (X.Y.Z)
-   */
-#if XORG_VERSION_MINOR >= 99
-  ErrorF(" (%d.0.0 RC %d)", XORG_VERSION_MAJOR+1, XORG_VERSION_SNAP - 900);
-#elif XORG_VERSION_PATCH == 99
-  ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1,
-				XORG_VERSION_SNAP - 900);
-#else
-  ErrorF(" (%d.%d.%d RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR,
- 			 XORG_VERSION_PATCH + 1, XORG_VERSION_SNAP - 900);
-#endif
-#endif
-
-#ifdef XORG_CUSTOM_VERSION
-  ErrorF(" (%s)", XORG_CUSTOM_VERSION);
-#endif
-#ifndef XORG_DATE
-#define XORG_DATE XF86_DATE
-#endif
-  ErrorF("\nRelease Date: %s\n", XORG_DATE);
-  ErrorF("X Protocol Version %d, Revision %d\n",
-         X_PROTOCOL, X_PROTOCOL_REVISION);
-  ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR);
-#ifdef HAS_UTSNAME
-  {
-    struct utsname name;
-
-    /* Linux & BSD state that 0 is success, SysV (including Solaris, HP-UX,
-       and Irix) and Single Unix Spec 3 just say that non-negative is success.
-       All agree that failure is represented by a negative number.
-     */
-    if (uname(&name) >= 0) {
-      ErrorF("Current Operating System: %s %s %s %s %s\n",
-	name.sysname, name.nodename, name.release, name.version, name.machine);
-    }
-  }
-#endif
-#if defined(BUILD_DATE) && (BUILD_DATE > 19000000)
-  {
-    struct tm t;
-    char buf[100];
-
-    bzero(&t, sizeof(t));
-    bzero(buf, sizeof(buf));
-    t.tm_mday = BUILD_DATE % 100;
-    t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
-    t.tm_year = BUILD_DATE / 10000 - 1900;
-#if defined(BUILD_TIME)
-    t.tm_sec = BUILD_TIME % 100;
-    t.tm_min = (BUILD_TIME / 100) % 100;
-    t.tm_hour = (BUILD_TIME / 10000) % 100;
-    if (strftime(buf, sizeof(buf), "%d %B %Y  %I:%M:%S%p", &t))
-       ErrorF("Build Date: %s\n", buf);
-#else
-    if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
-       ErrorF("Build Date: %s\n", buf);
-#endif
-  }
-#endif
-#if defined(CLOG_DATE) && (CLOG_DATE > 19000000)
-  {
-    struct tm t;
-    char buf[100];
-
-    bzero(&t, sizeof(t));
-    bzero(buf, sizeof(buf));
-    t.tm_mday = CLOG_DATE % 100;
-    t.tm_mon = (CLOG_DATE / 100) % 100 - 1;
-    t.tm_year = CLOG_DATE / 10000 - 1900;
-    if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
-       ErrorF("Changelog Date: %s\n", buf);
-  }
-#endif
-#if defined(BUILDERSTRING)
-  ErrorF("%s \n",BUILDERSTRING);
-#endif
-  ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n"
-	 "\tto make sure that you have the latest version.\n");
-  ErrorF("Module Loader present\n");
-}
-
-static void
-xf86PrintMarkers()
-{
-  LogPrintMarkers();
-}
-
 static void
 xf86PrintDefaultModulePath(void)
 {
commit b8fd8da1ad985988426d0269982751a70535e8d0
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Tue Nov 4 11:27:53 2008 +0100

    AIGLX: Reinstate call to driver texOffsetFinish hook.
    
    It was accidentally lost when factoring out __glXDRIdoReleaseTexImage, so this
    is a regression fix and should probably be backported to server-1.5-branch.
    (cherry picked from commit a4d62bbf215894bad8e19d99f7330c637d3d49e3)

diff --git a/glx/glxdri.c b/glx/glxdri.c
index a87ff13..52a97d4 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -189,6 +189,8 @@ __glXDRIdoReleaseTexImage(__GLXDRIscreen *screen, __GLXDRIdrawable *drawable)
 
 	for (i = 0; i < lastOverride; i++) {
 	    if (texOffsetOverride[i] == drawable) {
+		if (screen->texOffsetFinish)
+		    screen->texOffsetFinish((PixmapPtr)drawable->base.pDraw);
 
 		texOffsetOverride[i] = NULL;
 
commit 377712dbfce73348ad7f2610df51a1a805536392
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Nov 5 11:51:06 2008 -0500

    linux: Drain the console fd of data when using evdev for keyboards
    
    Works around a silly bug in the kernel that causes wakeup storms after
    too many keypresses.  Should fix the kernel bug too, but this at least
    keeps the idle wakeup count below 1000/sec.
    (cherry picked from commit 446d9443cea31e493d05c939d0128a8116788468)

diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 6f68ba5..da5ca57 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -85,6 +85,14 @@ restoreVtPerms(void)
     chown(vtname, vtPermSave[2], vtPermSave[3]);
 }
 
+static void *console_handler;
+
+static void
+drain_console(int fd, void *closure)
+{
+    tcflush(fd, TCIOFLUSH);
+}
+
 void
 xf86OpenConsole(void)
 {
@@ -300,6 +308,10 @@ xf86OpenConsole(void)
 		cfsetispeed(&nTty, 9600);
 		cfsetospeed(&nTty, 9600);
 		tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
+
+		/* need to keep the buffer clean, else the kernel gets angry */
+		console_handler = xf86AddGeneralHandler(xf86Info.consoleFd,
+							drain_console, NULL);
 	    }
 
 	    /* we really should have a InitOSInputDevices() function instead
@@ -346,6 +358,11 @@ xf86CloseConsole()
 
     if (ShareVTs) return;
 
+    if (console_handler) {
+	xf86RemoveGeneralHandler(console_handler);
+	console_handler = NULL;
+    };
+
 #if defined(DO_OS_FONTRESTORE)
     if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts) < 0)
 	xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETSTATE failed: %s\n",
commit 3245bf113619500b7b6cae3a3f31ddd2984cbc05
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Oct 16 11:22:29 2008 +1030

    xfree86: If AEI is on, disable "kbd" and "mouse" devices.
    
    This consists of two parts:
    In the implicit server layout, ignore those drivers when looking for a core
    device.
    
    And after finishing the server layout, run through the list of devices and
    remove any that use mouse or kbd.
    
    AEI is mutually exclusive with the kbd and mouse drivers, so pick either - or.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
    (cherry picked from commit c264826da96ad1859dd112b17eb8aa9e5278478f)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a1c2e34..e91eadd 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1340,7 +1340,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     /* 4. First pointer with 'mouse' as the driver. */
-    if (!foundPointer && (!xf86Info.allowEmptyInput || implicitLayout)) {
+    if (!foundPointer && !xf86Info.allowEmptyInput) {
 	confInput = xf86findInput(CONF_IMPLICIT_POINTER,
 				  xf86configptr->conf_input_lst);
 	if (!confInput) {
@@ -1480,7 +1480,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     /* 4. First keyboard with 'keyboard' or 'kbd' as the driver. */
-    if (!foundKeyboard && (!xf86Info.allowEmptyInput || implicitLayout)) {
+    if (!foundKeyboard && !xf86Info.allowEmptyInput) {
 	confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD,
 				  xf86configptr->conf_input_lst);
 	if (!confInput) {
@@ -2481,6 +2481,41 @@ addDefaultModes(MonPtr monitorp)
 static void
 checkInput(serverLayoutPtr layout, Bool implicit_layout) {
     checkCoreInputDevices(layout, implicit_layout);
+
+    /* AllowEmptyInput and the "kbd" and "mouse" drivers are mutually
+     * exclusive. Trawl the list for mouse/kbd devices and disable them.
+     */
+    if (xf86Info.allowEmptyInput && layout->inputs)
+    {
+        IDevPtr *dev = layout->inputs;
+        BOOL warned = FALSE;
+
+        while(*dev)
+        {
+            if (strcmp((*dev)->driver, "kbd") == 0 ||
+                strcmp((*dev)->driver, "mouse") == 0)
+            {
+                IDevPtr *current;
+                if (!warned)
+                {
+                    xf86Msg(X_WARNING, "AllowEmptyInput is on, devices using "
+                            "drivers 'kbd' or 'mouse' will be disabled.\n");
+                    warned = TRUE;
+                }
+
+                xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->identifier);
+
+                current = dev;
+                xfree(*dev);
+
+                do {
+                    *current = *(current + 1);
+                    current++;
+                } while(*current);
+            } else
+                dev++;
+        }
+    }
 }
 
 /*
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 74f8cef..de93aaf 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -698,6 +698,7 @@ the X server to load. Disabled by default.
 If enabled, don't add the standard keyboard and mouse drivers, if there are no
 input devices in the config file.  Enabled by default if AutoAddDevices and
 AutoEnableDevices is enabled, otherwise disabled.
+If AllowEmptyInput is on, devices using the kbd or mouse driver are ignored.
 .TP 7
 .BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
 If this option is disabled, then no devices will be added from HAL events.
commit 58e6d6afe04189f3c88b9e1998247ff797607ccb
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Sun Oct 12 21:58:30 2008 +1030

    xfree86: if AllowEmptyInput is true, enable RAW mode on the console.
    
    Usually, the console is set to RAW in the kbd driver. If we hotplug all input
    devices (i.e. the evdev driver for keyboards) and the console is left as-is.
    As a result, the evdev driver must put an EVIOCGRAB on the device to avoid
    characters leaking onto the console. This again breaks many things, amongst
    them lirc, in-kernel mouse button emulation and HAL.
    
    This patch sets the console to RAW if AllowEmptyInput is on.
    
    Use-cases:
    1. AEI is off
      1.1. Only kbd driver is used - behaviour as-is.
      1.2. kbd and evdev driver is used: if evdev does not grab the device,
           duplicate events are generated.
    2. AEI is on
      2.1. Only evdev driver is used - behaviour as-is, but evdev does not need
           to grab the device anymore.
      2.2. evdev and kbd are used: duplicate key events are generated if evdev
           does not grab the device.
    
    1.2 is a marginal use-case that can be fixed by adding a "grab" option to the
    evdev driver (update of xorg.conf is needed).
    
    2.2 is an issue. If we have no ServerLayout section, AEI is on, but devices
    specified in the xorg.conf are still added [1], resulting in duplicate events.
    This is a common configuration and needs sorting out.
    
    [1] 2eaed4a10fe5bf727579bca4ab8d4a47c8763a7d
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    (cherry picked from commit d936a4235c9625bd41569cef3452dd086284e0d7)

diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 4c36b7c..6f68ba5 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -53,6 +53,8 @@ static int activeVT = -1;
 
 static int vtPermSave[4];
 static char vtname[11];
+static struct termios tty_attr; /* tty state to restore */
+static int tty_mode; /* kbd mode to restore */
 
 static int
 saveVtPerms(void)
@@ -272,6 +274,34 @@ xf86OpenConsole(void)
 	        FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n",
 		           strerror(errno));
 
+	    /* Set the keyboard to RAW mode. If we're using the keyboard
+	     * driver, the driver does it for us. If we have AEI on, then
+	     * we're expecting the devices to be added (i.e. evdev) and we
+	     * have to set it manually.
+	     */
+	    if (xf86Info.allowEmptyInput)
+	    {
+		struct termios nTty;
+
+		tcgetattr(xf86Info.consoleFd, &tty_attr);
+		ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode);
+
+		if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0)
+		    FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
+			    strerror(errno));
+
+		nTty = tty_attr;
+		nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
+		nTty.c_oflag = 0;
+		nTty.c_cflag = CREAD | CS8;
+		nTty.c_lflag = 0;
+		nTty.c_cc[VTIME]=0;
+		nTty.c_cc[VMIN]=1;
+		cfsetispeed(&nTty, 9600);
+		cfsetospeed(&nTty, 9600);
+		tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
+	    }
+
 	    /* we really should have a InitOSInputDevices() function instead
 	     * of Init?$#*&Device(). So I just place it here */
 	
@@ -328,7 +358,10 @@ xf86CloseConsole()
     if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT) < 0)
 	xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
 		strerror(errno));
-	
+
+    ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
+    tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
+
     if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) 
 	xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n",
 		strerror(errno));
commit bc199fdf79a72275592d325dc034adccc6dd93af
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Mon Oct 20 12:19:55 2008 +1030

    config: don't add duplicate devices through HAL.
    
    If HAL is restarted, the device list is sent to the server again, leading
    first to duplicate devices (and thus duplicate events), and later to a
    FatalError "Too many input devices."
    
    dev->config_info contains the UDI for the device. If the UDI of a new devices
    is equal to one we already have in the device list, just ignore it.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
    (cherry picked from commit 6c451859552e1fc78f6589617482f9ff96d7ed8a)

diff --git a/config/hal.c b/config/hal.c
index 0e0505b..639e0ec 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -166,6 +166,26 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
     return ret;
 }
 
+static BOOL
+device_is_duplicate(char *config_info)
+{
+    DeviceIntPtr dev;
+
+    for (dev = inputInfo.devices; dev; dev = dev->next)
+    {
+        if (dev->config_info && (strcmp(dev->config_info, config_info) == 0))
+            return TRUE;
+    }
+
+    for (dev = inputInfo.off_devices; dev; dev = dev->next)
+    {
+        if (dev->config_info && (strcmp(dev->config_info, config_info) == 0))
+            return TRUE;
+    }
+
+    return FALSE;
+}
+
 static void
 device_added(LibHalContext *hal_ctx, const char *udi)
 {
@@ -227,6 +247,13 @@ device_added(LibHalContext *hal_ctx, const char *udi)
     }
     sprintf(config_info, "hal:%s", udi);
 
+    /* Check for duplicate devices */
+    if (device_is_duplicate(config_info))
+    {
+        LogMessage(X_WARNING, "config/hal: device %s already added. Ignoring.\n", name);
+        goto unwind;
+    }
+
     /* ok, grab options from hal.. iterate through all properties
     * and lets see if any of them are options that we can add */
     set = libhal_device_get_all_properties(hal_ctx, udi, &error);
commit e63ef549bb7a2591d99987c85f414c08dbbf9a6b
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Tue Oct 21 22:32:57 2008 +0200

    Close well known connections in ServerAbort()
    (cherry picked from commit d72cd753b99fae147ef4c189700fc697f1ea7fb0)

diff --git a/os/log.c b/os/log.c
index 0860847..ee14624 100644
--- a/os/log.c
+++ b/os/log.c
@@ -401,6 +401,7 @@ void AbortServer(void) __attribute__((noreturn));
 void
 AbortServer(void)
 {
+    CloseWellKnownConnections();
     OsCleanup(TRUE);
     CloseDownDevices();
     AbortDDX();
commit 5d14e345411dfe4b4fd334e4e54fbf24dcfa65bd
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Oct 21 13:10:44 2008 -0400

    exa: Add exaDrawableIsOffscreen() to the driver API.
    
    (cherry picked from commit 3891dd892449fcdb7a514e3c5e7e763ba7e74003)

diff --git a/exa/exa.h b/exa/exa.h
index 2562094..a3dad69 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -783,6 +783,10 @@ exaGetPixmapSize(PixmapPtr pPix);
 void
 exaEnableDisableFBAccess (int index, Bool enable);
 
+Bool
+exaDrawableIsOffscreen (DrawablePtr pDrawable);
+
+/* in exa_migration.c */
 void
 exaMoveInPixmap (PixmapPtr pPixmap);
 
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index e4b6b54..387e751 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -375,9 +375,6 @@ exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
 		      int *xp, int *yp);
 
 Bool
-exaDrawableIsOffscreen (DrawablePtr pDrawable);
-
-Bool
 exaPixmapIsOffscreen(PixmapPtr p);
 
 PixmapPtr
commit f4c33e2e64ce83c29c3bc79853e421247acfea11
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Oct 20 09:55:24 2008 -0400

    EXA: Avoid excessive syncing in PutImage
    (cherry picked from commit 2188582e5ea90edb432a2f421d0a267439ba08f9)

diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 5f22474..b7cc062 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -132,6 +132,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
     BoxPtr pBox;
     int nbox;
     Bool access_prepared = FALSE;
+    Bool need_sync = FALSE;
 
     /* Damaged bits are valid in current copy but invalid in other one */
     if (exaPixmapIsOffscreen(pPixmap)) {
@@ -223,14 +224,15 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
 	    exaMemcpyBox (pPixmap, pBox,
 			  fallback_src, fallback_srcpitch,
 			  fallback_dst, fallback_dstpitch);
-	}
+	} else
+	    need_sync = TRUE;
 
 	pBox++;
     }
 
     if (access_prepared)
 	exaFinishAccess(&pPixmap->drawable, fallback_index);
-    else
+    else if (need_sync)
 	sync (pPixmap->drawable.pScreen);
 
     pExaPixmap->offscreen = save_offscreen;
commit df22857b34edb9f29ace3800ba99f14c7be8058e
Author: Pierre Willenbrock <pierre at pirsoft.de>
Date:   Thu Oct 16 14:28:14 2008 -0400

    RANDR: Fix output property event delivery.
    (cherry picked from commit 8de26770a41ec87c46eed2eddfde6f867d71fe1f)

diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 446b4cc..8e4103b 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -44,7 +44,13 @@ DeliverPropertyEvent(WindowPtr pWin, void *value)
 	if (!(pRREvent->mask & RROutputPropertyNotifyMask))
 	    continue;
 
+	event->sequenceNumber = client->sequence;
 	event->window = pRREvent->window->drawable.id;
+	if (client->swapped) {
+	    int n;
+	    swaps(&event->sequenceNumber, n);
+	    swapl(&event->window, n);
+	}
 	WriteEventsToClient(pRREvent->client, 1, (xEvent *)event);
     }
 
commit 42429aa3269d68bc7909616ce8b0d0b5ca5624d2
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Oct 6 12:21:20 2008 -0400

    RANDR: Delivery output property events.
    (cherry picked from commit 9187f6ad9ec7ba9569a93d92561aac17eaa83491)

diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 429246c..446b4cc 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -24,10 +24,36 @@
 #include "propertyst.h"
 #include "swaprep.h"
 
-static void
-RRDeliverEvent (ScreenPtr pScreen, xEvent *event, CARD32 mask)
+static int
+DeliverPropertyEvent(WindowPtr pWin, void *value)
 {
+    xRROutputPropertyNotifyEvent *event = value;
+    RREventPtr *pHead, pRREvent;
+    ClientPtr client;
+
+    pHead = LookupIDByType(pWin->drawable.id, RREventType);
+    if (!pHead)
+	return WT_WALKCHILDREN;
+
+    for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next)
+    {
+	client = pRREvent->client;
+	if (client == serverClient || client->clientGone)
+	    continue;
+
+	if (!(pRREvent->mask & RROutputPropertyNotifyMask))
+	    continue;
+
+	event->window = pRREvent->window->drawable.id;
+	WriteEventsToClient(pRREvent->client, 1, (xEvent *)event);
+    }
 
+    return WT_WALKCHILDREN;
+}
+
+static void RRDeliverPropertyEvent(ScreenPtr pScreen, xEvent *event)
+{
+    WalkTree(pScreen, DeliverPropertyEvent, event);
 }
 
 void
@@ -45,7 +71,7 @@ RRDeleteAllOutputProperties (RROutputPtr output)
 	event.state = PropertyDelete;
 	event.atom = prop->propertyName;
 	event.timestamp = currentTime.milliseconds;
-	RRDeliverEvent (output->pScreen, (xEvent *) &event, RROutputPropertyNotifyMask);
+	RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
 	if (prop->current.data)
 	    xfree(prop->current.data);
 	if (prop->pending.data)
@@ -113,7 +139,7 @@ RRDeleteOutputProperty (RROutputPtr output, Atom property)
 	event.state = PropertyDelete;
 	event.atom = prop->propertyName;
 	event.timestamp = currentTime.milliseconds;
-	RRDeliverEvent (output->pScreen, (xEvent *) &event, RROutputPropertyNotifyMask);
+	RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
 	RRDestroyOutputProperty (prop);
     }
 }
@@ -238,7 +264,7 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
 	event.state = PropertyNewValue;
 	event.atom = prop->propertyName;
 	event.timestamp = currentTime.milliseconds;
-	RRDeliverEvent (output->pScreen, (xEvent *) &event, RROutputPropertyNotifyMask);
+	RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
     }
     return(Success);
 }
@@ -700,7 +726,7 @@ ProcRRGetOutputProperty (ClientPtr client)
 	event.state = PropertyDelete;
 	event.atom = prop->propertyName;
 	event.timestamp = currentTime.milliseconds;
-	RRDeliverEvent (output->pScreen, (xEvent *) &event, RROutputPropertyNotifyMask);
+	RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
     }
 
     if (client->swapped) {
commit b28c25b5aeecea22aba997e2b0d24e77a22b6e02
Author: Rémi Cardona <remi at gentoo.org>
Date:   Tue Oct 21 10:07:24 2008 -0400

    Force LC_ALL=C when building xf86DefModeSet.c
    
    Fixes build in not-quite-latin locales.

diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 0f44075..1379f45 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -24,7 +24,8 @@ BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES)
 MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes
 
 xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES)
-	cat $(MODEDEFSOURCES) | $(AWK) -f $(srcdir)/modeline2c.awk > $@
+	cat $(MODEDEFSOURCES) | LC_ALL=C $(AWK) -f $(srcdir)/modeline2c.awk > $@
+	echo >> $@
 
 BUILT_SOURCES = xf86DefModeSet.c
 
commit 992a7168f0db5733fe4a6cbd2f40c6b1f2a150e0
Author: Martin von Gagern <Martin.vGagern at gmx.net>
Date:   Wed Nov 5 11:44:03 2008 -0500

    Bug #17858: Fix Xvesa build on newer kernels.
    
    Not cherry picked from master, Xvesa is gone there.

diff --git a/hw/kdrive/vesa/vm86.h b/hw/kdrive/vesa/vm86.h
index 3b48814..8169308 100644
--- a/hw/kdrive/vesa/vm86.h
+++ b/hw/kdrive/vesa/vm86.h
@@ -67,6 +67,13 @@ static void ErrorF(char*, ...);
 #include "os.h"
 #endif
 
+#ifndef IF_MASK
+#define IF_MASK X86_EFLAGS_IF
+#endif
+#ifndef IOPL_MASK
+#define IOPL_MASK X86_EFLAGS_IOPL
+#endif
+
 typedef unsigned char	U8;
 typedef unsigned short	U16;
 typedef unsigned int	U32;


More information about the xorg-commit mailing list