Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/./xserver

This commit is contained in:
Alex Deucher 2008-11-13 15:04:18 -05:00
commit ba4e08244e
3 changed files with 33 additions and 13 deletions

View File

@ -149,12 +149,30 @@ void setVisualConfigs(void) {
visualConfigs[i].redSize = conf->color_buffers[color].r; visualConfigs[i].redSize = conf->color_buffers[color].r;
visualConfigs[i].greenSize = conf->color_buffers[color].g; visualConfigs[i].greenSize = conf->color_buffers[color].g;
visualConfigs[i].blueSize = conf->color_buffers[color].b; visualConfigs[i].blueSize = conf->color_buffers[color].b;
visualConfigs[i].alphaSize = conf->color_buffers[color].a;
if(GLCAPS_COLOR_BUF_INVALID_VALUE == conf->color_buffers[color].a) {
visualConfigs[i].bufferSize = conf->color_buffers[color].r + /* This visual has no alpha. */
conf->color_buffers[color].g + conf->color_buffers[color].b + visualConfigs[i].alphaSize = 0;
conf->color_buffers[color].a; } 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'm uncertain about these masks.
* I don't think we actually care what the values are in our * I don't think we actually care what the values are in our

View File

@ -178,17 +178,15 @@ static void send_fd_handoff(int connected_fd, int launchd_fd) {
*((int*)CMSG_DATA(cmsg)) = 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) { 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; return;
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "Xquartz: Message sent. Closing.\n"); fprintf(stderr, "Xquartz: Message sent. Closing handoff fd.\n");
#endif #endif
close(connected_fd); 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); 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; continue;
} }
handoff_fd = connect_to_socket(handoff_socket_filename); handoff_fd = connect_to_socket(handoff_socket_filename);
if(handoff_fd == -1) { if(handoff_fd == -1) {
fprintf(stderr, "Xquartz: Failed to connect to socket (try %d of %d)\n", (int)try+1, (int)try_max); fprintf(stderr, "Xquartz: Failed to connect to socket (try %d of %d)\n", (int)try+1, (int)try_max);
continue; 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); send_fd_handoff(handoff_fd, launchd_fd);
close(handoff_fd); close(handoff_fd);
break; break;

View File

@ -338,7 +338,7 @@ void QuartzAudioInit(void)
// Prepare for playback // Prepare for playback
AudioDeviceIOProcID sInputIOProcID = NULL; AudioDeviceIOProcID sInputIOProcID = NULL;
status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, NULL, &sInputIOProcID ); status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, &data, &sInputIOProcID );
if (status) { if (status) {
ErrorF("QuartzAudioInit: AddIOProc returned %ld\n", (long)status); ErrorF("QuartzAudioInit: AddIOProc returned %ld\n", (long)status);
return; return;