XQuartz: use a condition variable to signal when darwinEvents is ready rather than polling

(cherry picked from commit ff1c443cadf11d12a7d939e51194f6105153870e)
This commit is contained in:
Jeremy Huddleston 2008-06-04 12:01:19 -07:00
commit ee86b75119
2 changed files with 34 additions and 24 deletions

View file

@ -412,11 +412,6 @@ int main(int argc, char **argv, char **envp) {
}
#else
void *add_launchd_display_thread(void *data) {
/* TODO: Really fix this race... we want xinitrc to finish before connections
* are accepted on the launchd socket.
*/
sleep(2);
/* Start listening on the launchd fd */
int launchd_fd = launchd_display_fd();
if(launchd_fd != -1) {