aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xquartz')
-rw-r--r--xorg-server/hw/xquartz/bundle/Info.plist.cpp94
-rw-r--r--xorg-server/hw/xquartz/quartz.c4
-rw-r--r--xorg-server/hw/xquartz/quartzCocoa.m153
-rw-r--r--xorg-server/hw/xquartz/quartzCommon.h15
-rw-r--r--xorg-server/hw/xquartz/xpr/xprCursor.c6
5 files changed, 123 insertions, 149 deletions
diff --git a/xorg-server/hw/xquartz/bundle/Info.plist.cpp b/xorg-server/hw/xquartz/bundle/Info.plist.cpp
index 91c8c0393..892eb5c19 100644
--- a/xorg-server/hw/xquartz/bundle/Info.plist.cpp
+++ b/xorg-server/hw/xquartz/bundle/Info.plist.cpp
@@ -1,47 +1,47 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>X11</string>
- <key>CFBundleGetInfoString</key>
- <string>LAUNCHD_ID_PREFIX.X11</string>
- <key>CFBundleIconFile</key>
- <string>X11.icns</string>
- <key>CFBundleIdentifier</key>
- <string>LAUNCHD_ID_PREFIX.X11</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>APPLE_APPLICATION_NAME</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>2.5.1</string>
- <key>CFBundleVersion</key>
- <string>2.5.1</string>
- <key>CFBundleSignature</key>
- <string>x11a</string>
- <key>CSResourcesFileMapped</key>
- <true/>
-#ifdef XQUARTZ_SPARKLE
- <key>SUEnableAutomaticChecks</key>
- <true/>
- <key>SUPublicDSAKeyFile</key>
- <string>sparkle.pem</string>
- <key>SUFeedURL</key>
- <string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>
-#endif
- <key>NSHumanReadableCopyright</key>
- <string>© 2003-2010 Apple Inc.
-© 2003 XFree86 Project, Inc.
-© 2003-2010 X.org Foundation, Inc.
-</string>
- <key>NSMainNibFile</key>
- <string>main</string>
- <key>NSPrincipalClass</key>
- <string>X11Application</string>
-</dict>
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>X11</string>
+ <key>CFBundleGetInfoString</key>
+ <string>LAUNCHD_ID_PREFIX.X11</string>
+ <key>CFBundleIconFile</key>
+ <string>X11.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>LAUNCHD_ID_PREFIX.X11</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>APPLE_APPLICATION_NAME</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>2.6.0</string>
+ <key>CFBundleVersion</key>
+ <string>2.6.0</string>
+ <key>CFBundleSignature</key>
+ <string>x11a</string>
+ <key>CSResourcesFileMapped</key>
+ <true/>
+#ifdef XQUARTZ_SPARKLE
+ <key>SUEnableAutomaticChecks</key>
+ <true/>
+ <key>SUPublicDSAKeyFile</key>
+ <string>sparkle.pem</string>
+ <key>SUFeedURL</key>
+ <string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>
+#endif
+ <key>NSHumanReadableCopyright</key>
+ <string>© 2003-2010 Apple Inc.
+© 2003 XFree86 Project, Inc.
+© 2003-2010 X.org Foundation, Inc.
+</string>
+ <key>NSMainNibFile</key>
+ <string>main</string>
+ <key>NSPrincipalClass</key>
+ <string>X11Application</string>
+</dict>
+</plist>
diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c
index c7a4d018a..de54290ab 100644
--- a/xorg-server/hw/xquartz/quartz.c
+++ b/xorg-server/hw/xquartz/quartz.c
@@ -67,12 +67,8 @@
#define FAKE_RANDR 1
// Shared global variables for Quartz modes
-int quartzEventWriteFD = -1;
int quartzUseSysBeep = 0;
-int quartzUseAGL = 1;
-int quartzEnableKeyEquivalents = 1;
int quartzServerVisible = FALSE;
-int quartzServerQuitting = FALSE;
DevPrivateKeyRec quartzScreenKeyRec;
int aquaMenuBarHeight = 0;
QuartzModeProcsPtr quartzProcs = NULL;
diff --git a/xorg-server/hw/xquartz/quartzCocoa.m b/xorg-server/hw/xquartz/quartzCocoa.m
index 450147207..d1087015b 100644
--- a/xorg-server/hw/xquartz/quartzCocoa.m
+++ b/xorg-server/hw/xquartz/quartzCocoa.m
@@ -1,82 +1,71 @@
-/**************************************************************
- *
- * Quartz-specific support for the Darwin X Server
- * that requires Cocoa and Objective-C.
- *
- * This file is separate from the parts of Quartz support
- * that use X include files to avoid symbol collisions.
- *
- * Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include "sanitizedCocoa.h"
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "quartzCommon.h"
-#include "inputstr.h"
-
-#include "darwin.h"
-
-/*
- * QuartzFSUseQDCursor
- * Return whether the screen should use a QuickDraw cursor.
- */
-int QuartzFSUseQDCursor(
- int depth) // screen depth
-{
- return TRUE;
-}
-
-
-/*
- * QuartzBlockHandler
- * Clean out any autoreleased objects.
- */
-void QuartzBlockHandler(
- pointer blockData,
- OSTimePtr pTimeout,
- pointer pReadmask)
-{
- static NSAutoreleasePool *aPool = nil;
-
- [aPool release];
- aPool = [[NSAutoreleasePool alloc] init];
-}
-
-
-/*
- * QuartzWakeupHandler
- */
-void QuartzWakeupHandler(
- pointer blockData,
- int result,
- pointer pReadmask)
-{
- // nothing here
-}
+/**************************************************************
+ *
+ * Quartz-specific support for the Darwin X Server
+ * that requires Cocoa and Objective-C.
+ *
+ * This file is separate from the parts of Quartz support
+ * that use X include files to avoid symbol collisions.
+ *
+ * Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#include "sanitizedCocoa.h"
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "quartzCommon.h"
+#include "inputstr.h"
+
+#include "darwin.h"
+
+/*
+ * QuartzBlockHandler
+ * Clean out any autoreleased objects.
+ */
+void QuartzBlockHandler(
+ pointer blockData,
+ OSTimePtr pTimeout,
+ pointer pReadmask)
+{
+ static NSAutoreleasePool *aPool = nil;
+
+ [aPool release];
+ aPool = [[NSAutoreleasePool alloc] init];
+}
+
+
+/*
+ * QuartzWakeupHandler
+ */
+void QuartzWakeupHandler(
+ pointer blockData,
+ int result,
+ pointer pReadmask)
+{
+ // nothing here
+}
diff --git a/xorg-server/hw/xquartz/quartzCommon.h b/xorg-server/hw/xquartz/quartzCommon.h
index 12ed4057e..8c7b14faa 100644
--- a/xorg-server/hw/xquartz/quartzCommon.h
+++ b/xorg-server/hw/xquartz/quartzCommon.h
@@ -51,20 +51,13 @@ typedef struct {
#define QUARTZ_PRIV(pScreen) \
((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey))
-// Data stored at startup for Cocoa front end
-extern int quartzEventWriteFD;
-
// User preferences used by Quartz modes
extern int quartzUseSysBeep;
-extern int focusOnNewWindow;
-extern int quartzUseAGL;
-extern int quartzEnableKeyEquivalents;
extern int quartzFullscreenDisableHotkeys;
extern int quartzOptionSendsAlt;
// Other shared data
extern int quartzServerVisible;
-extern int quartzServerQuitting;
extern DevPrivateKeyRec quartzScreenKeyRec;
#define quartzScreenKey (&quartzScreenKeyRec)
extern int aquaMenuBarHeight;
@@ -72,14 +65,6 @@ extern int aquaMenuBarHeight;
// Name of GLX bundle for native OpenGL
extern const char *quartzOpenGLBundle;
-void QuartzReadPreferences(void);
-void QuartzMessageMainThread(unsigned msg, void *data, unsigned length);
-void QuartzMessageServerThread(int type, int argc, ...);
-void QuartzSetWindowMenu(int nitems, const char **items,
- const char *shortcuts);
-void QuartzFSCapture(void);
-void QuartzFSRelease(void);
-int QuartzFSUseQDCursor(int depth);
void QuartzBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask);
void QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask);
diff --git a/xorg-server/hw/xquartz/xpr/xprCursor.c b/xorg-server/hw/xquartz/xpr/xprCursor.c
index 9c7890647..07dd5c8fb 100644
--- a/xorg-server/hw/xquartz/xpr/xprCursor.c
+++ b/xorg-server/hw/xquartz/xpr/xprCursor.c
@@ -67,6 +67,7 @@ static Bool
load_cursor(CursorPtr src, int screen)
{
uint32_t *data;
+ Bool free_data = FALSE;
uint32_t rowbytes;
int width, height;
int hot_x, hot_y;
@@ -95,6 +96,7 @@ load_cursor(CursorPtr src, int screen)
unsigned i;
rowbytes = src->bits->width * sizeof (CARD32);
data = malloc(rowbytes * src->bits->height);
+ free_data = TRUE;
if(!data) {
FatalError("Failed to allocate memory in %s\n", __func__);
}
@@ -121,6 +123,7 @@ load_cursor(CursorPtr src, int screen)
/* round up to 8 pixel boundary so we can convert whole bytes */
rowbytes = ((src->bits->width * 4) + 31) & ~31;
data = malloc(rowbytes * src->bits->height);
+ free_data = TRUE;
if(!data) {
FatalError("Failed to allocate memory in %s\n", __func__);
}
@@ -173,7 +176,8 @@ load_cursor(CursorPtr src, int screen)
}
err = xp_set_cursor(width, height, hot_x, hot_y, data, rowbytes);
- free(data);
+ if(free_data)
+ free(data);
return err == Success;
}