summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-06-25 11:51:27 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-07-11 10:13:13 -0700
commite69b9f9ca45c0c6bfb93ea9143737116bf1f2453 (patch)
tree797a6017cc7137c658e20c40bc37390800ca2edb
parent8d2e2e1d856efec4459de2a20af642dc1ec9b8a5 (diff)
XQuartz: Set noPanoramixExtension earlier to avoid a possible race.
(cherry picked from commit 49668e8a88137e9f258eae970826883b88b7d8ba)
-rw-r--r--hw/xquartz/mach-startup/bundle-main.c5
-rw-r--r--hw/xquartz/pseudoramiX.c4
-rw-r--r--hw/xquartz/quartzCocoa.m4
3 files changed, 5 insertions, 8 deletions
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index d2bc9d382..de92361e8 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -51,6 +51,8 @@
/* From darwinEvents.c ... but don't want to pull in all the server cruft */
void DarwinListenOnOpenFD(int fd);
+extern int noPanoramiXExtension;
+
#define DEFAULT_CLIENT "/usr/X11/bin/xterm"
#define DEFAULT_STARTX "/usr/X11/bin/startx"
#define DEFAULT_SHELL "/bin/sh"
@@ -359,6 +361,9 @@ int main(int argc, char **argv, char **envp) {
mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE;
mach_port_t mp;
kern_return_t kr;
+
+ // The server must not run the PanoramiX operations.
+ noPanoramiXExtension = TRUE;
fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
for(i=1; i < argc; i++) {
diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index aafaa26ef..f4ceff32b 100644
--- a/hw/xquartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -46,7 +46,6 @@ Equipment Corporation.
#include "globals.h"
Bool noPseudoramiXExtension = FALSE;
-extern int noPanoramiXExtension;
extern int ProcPanoramiXQueryVersion (ClientPtr client);
@@ -131,9 +130,6 @@ void PseudoramiXExtensionInit(int argc, char *argv[])
}
#endif
- // The server must not run the PanoramiX operations.
- noPanoramiXExtension = TRUE;
-
if (pseudoramiXGeneration != serverGeneration) {
extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0,
ProcPseudoramiXDispatch,
diff --git a/hw/xquartz/quartzCocoa.m b/hw/xquartz/quartzCocoa.m
index 2890d34f1..0ab94936c 100644
--- a/hw/xquartz/quartzCocoa.m
+++ b/hw/xquartz/quartzCocoa.m
@@ -44,10 +44,6 @@
#include "darwin.h"
-extern void FatalError(const char *, ...);
-extern char *display;
-extern int noPanoramiXExtension;
-
/*
* QuartzWriteCocoaPasteboard
* Write text to the Mac OS X pasteboard.