summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-07-13 15:05:36 -0700
committerKeith Packard <keithp@keithp.com>2010-07-13 15:05:36 -0700
commit0fc02c0bf92f694889589e3648acc08d4684de37 (patch)
treeb8ed6920c59a94cf4a5ad4b504600d023e0cf25e
parent0540c46066f938ad5611c56081cfcd8457a9b718 (diff)
parent9d8ec712a67ce71ea7408f0626cda7e0fa7c3bac (diff)
Merge remote branch 'jeremyhu/master'
-rw-r--r--hw/xquartz/bundle/Info.plist.cpp4
-rw-r--r--hw/xquartz/quartz.c4
-rw-r--r--hw/xquartz/quartzCocoa.m11
-rw-r--r--hw/xquartz/quartzCommon.h15
-rw-r--r--hw/xquartz/xpr/xprCursor.c6
5 files changed, 7 insertions, 33 deletions
diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 91c8c0393..85b439ad4 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.5.1</string>
+ <string>2.6.0</string>
<key>CFBundleVersion</key>
- <string>2.5.1</string>
+ <string>2.6.0</string>
<key>CFBundleSignature</key>
<string>x11a</string>
<key>CSResourcesFileMapped</key>
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 2828c57ed..bdaa26242 100644
--- a/hw/xquartz/quartz.c
+++ b/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/hw/xquartz/quartzCocoa.m b/hw/xquartz/quartzCocoa.m
index 450147207..54c900dfa 100644
--- a/hw/xquartz/quartzCocoa.m
+++ b/hw/xquartz/quartzCocoa.m
@@ -44,17 +44,6 @@
#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.
*/
diff --git a/hw/xquartz/quartzCommon.h b/hw/xquartz/quartzCommon.h
index c038ed026..eb761ed04 100644
--- a/hw/xquartz/quartzCommon.h
+++ b/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/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c
index 67fcbe76e..a106e7241 100644
--- a/hw/xquartz/xpr/xprCursor.c
+++ b/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;
}