Merge remote branch 'jeremyhu/master'

This commit is contained in:
Keith Packard 2010-07-13 15:05:36 -07:00
commit 0fc02c0bf9
5 changed files with 7 additions and 33 deletions

View File

@ -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>

View File

@ -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;

View File

@ -43,17 +43,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.

View File

@ -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);

View File

@ -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;
}