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

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Thu Nov 13 11:34:40 PST 2008


 hw/xquartz/GL/visualConfigs.c  |   30 ++++++++++++++++++++++++------
 hw/xquartz/mach-startup/stub.c |   14 ++++++++------
 hw/xquartz/quartzAudio.c       |    2 +-
 3 files changed, 33 insertions(+), 13 deletions(-)

New commits:
commit 82a03b631c3a301794df4f8d20b845eed4b5e713
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Nov 13 11:32:40 2008 -0800

    XQuartz: Fixed XBell() when not using system alert.
    (cherry picked from commit aa0e9ab1c7a226cdcb3c5e62be159355a290faf8)

diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index 603ca4a..ac9f820 100644
--- a/hw/xquartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -338,7 +338,7 @@ void QuartzAudioInit(void)
 
     // Prepare for playback
     AudioDeviceIOProcID sInputIOProcID = NULL;
-    status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, NULL, &sInputIOProcID );
+    status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, &data, &sInputIOProcID );
     if (status) {
         ErrorF("QuartzAudioInit: AddIOProc returned %ld\n", (long)status);
         return;
commit 628679275fcd3a1ee99ca2d83f5fbce97e330cf8
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Nov 13 11:10:15 2008 -0800

    XQuartz: Added more debugging to handoff spew
    (cherry picked from commit acefa7e3c8706ffedc052effd50b36ce10e72c22)

diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index 8bbd4d9..a011c4e 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -178,17 +178,15 @@ static void send_fd_handoff(int connected_fd, int launchd_fd) {
     
     *((int*)CMSG_DATA(cmsg)) = launchd_fd;
     
-#ifdef DEBUG
-    fprintf(stderr, "Xquartz: Handoff connection established.  Sending message.\n");
-#endif
     if(sendmsg(connected_fd, &msg, 0) < 0) {
-        fprintf(stderr, "Xquartz: Error sending $DISPLAY file descriptor: %s\n", strerror(errno));
+        fprintf(stderr, "Xquartz: Error sending $DISPLAY file descriptor over fd %d: %d -- %s\n", connected_fd, errno, strerror(errno));
         return;
     }
 
 #ifdef DEBUG
-    fprintf(stderr, "Xquartz: Message sent.  Closing.\n");
+    fprintf(stderr, "Xquartz: Message sent.  Closing handoff fd.\n");
 #endif
+
     close(connected_fd);
 }
 
@@ -279,13 +277,17 @@ int main(int argc, char **argv, char **envp) {
                 fprintf(stderr, "Xquartz: Failed to request a socket from the server to send the $DISPLAY fd over (try %d of %d)\n", (int)try+1, (int)try_max);
                 continue;
             }
-            
+
             handoff_fd = connect_to_socket(handoff_socket_filename);
             if(handoff_fd == -1) {
                 fprintf(stderr, "Xquartz: Failed to connect to socket (try %d of %d)\n", (int)try+1, (int)try_max);
                 continue;
             }
 
+#ifdef DEBUG
+            fprintf(stderr, "Xquartz: Handoff connection established (try %d of %d) on fd %d, \"%s\".  Sending message.\n", (int)try+1, (int)try_max, handoff_fd, handoff_socket_filename);
+#endif
+
             send_fd_handoff(handoff_fd, launchd_fd);            
             close(handoff_fd);
             break;
commit 73493d1ce9c99efad78334ab5fb6cf72506ab12d
Author: George Staplin <gstaplin at apple.com>
Date:   Wed Nov 12 17:17:25 2008 -0700

    XQuartz: GL: Handle the alpha differently when the alpha is equal to GLCAPS_COLOR_BUF_INVALID_VALUE.
    
    This prevents visuals with odd sizes.  The machine I use didn't have
    this problem, but it shows up on some others.
    (cherry picked from commit ed181382ddeb77019577d39b9c06b1cd839e18e4)

diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index 2f5c508..81f88fb 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -149,12 +149,30 @@ void setVisualConfigs(void) {
 					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;
-					
+
+					if(GLCAPS_COLOR_BUF_INVALID_VALUE == conf->color_buffers[color].a) {
+					    /* This visual has no alpha. */
+					    visualConfigs[i].alphaSize = 0;
+					} else {
+					    visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+					}
+	
+					/* 
+					 * If the .a/alpha value is unset, then don't add it to the
+					 * bufferSize specification.  The INVALID_VALUE indicates that it
+					 * was unset.
+					 * 
+					 * This prevents odd bufferSizes, such as 14.
+					 */
+					if(GLCAPS_COLOR_BUF_INVALID_VALUE == conf->color_buffers[color].a) {
+					    visualConfigs[i].bufferSize = conf->color_buffers[color].r +
+						conf->color_buffers[color].g + conf->color_buffers[color].b;
+					} else {
+					    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


More information about the xorg-commit mailing list