Merge remote branch 'jeremyhu/master'
This commit is contained in:
commit
0fc02c0bf9
|
@ -19,9 +19,9 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.5.1</string>
|
<string>2.6.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2.5.1</string>
|
<string>2.6.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>x11a</string>
|
<string>x11a</string>
|
||||||
<key>CSResourcesFileMapped</key>
|
<key>CSResourcesFileMapped</key>
|
||||||
|
|
|
@ -67,12 +67,8 @@
|
||||||
#define FAKE_RANDR 1
|
#define FAKE_RANDR 1
|
||||||
|
|
||||||
// Shared global variables for Quartz modes
|
// Shared global variables for Quartz modes
|
||||||
int quartzEventWriteFD = -1;
|
|
||||||
int quartzUseSysBeep = 0;
|
int quartzUseSysBeep = 0;
|
||||||
int quartzUseAGL = 1;
|
|
||||||
int quartzEnableKeyEquivalents = 1;
|
|
||||||
int quartzServerVisible = FALSE;
|
int quartzServerVisible = FALSE;
|
||||||
int quartzServerQuitting = FALSE;
|
|
||||||
DevPrivateKeyRec quartzScreenKeyRec;
|
DevPrivateKeyRec quartzScreenKeyRec;
|
||||||
int aquaMenuBarHeight = 0;
|
int aquaMenuBarHeight = 0;
|
||||||
QuartzModeProcsPtr quartzProcs = NULL;
|
QuartzModeProcsPtr quartzProcs = NULL;
|
||||||
|
|
|
@ -43,17 +43,6 @@
|
||||||
|
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
|
|
||||||
/*
|
|
||||||
* QuartzFSUseQDCursor
|
|
||||||
* Return whether the screen should use a QuickDraw cursor.
|
|
||||||
*/
|
|
||||||
int QuartzFSUseQDCursor(
|
|
||||||
int depth) // screen depth
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* QuartzBlockHandler
|
* QuartzBlockHandler
|
||||||
* Clean out any autoreleased objects.
|
* Clean out any autoreleased objects.
|
||||||
|
|
|
@ -51,20 +51,13 @@ typedef struct {
|
||||||
#define QUARTZ_PRIV(pScreen) \
|
#define QUARTZ_PRIV(pScreen) \
|
||||||
((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey))
|
((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey))
|
||||||
|
|
||||||
// Data stored at startup for Cocoa front end
|
|
||||||
extern int quartzEventWriteFD;
|
|
||||||
|
|
||||||
// User preferences used by Quartz modes
|
// User preferences used by Quartz modes
|
||||||
extern int quartzUseSysBeep;
|
extern int quartzUseSysBeep;
|
||||||
extern int focusOnNewWindow;
|
|
||||||
extern int quartzUseAGL;
|
|
||||||
extern int quartzEnableKeyEquivalents;
|
|
||||||
extern int quartzFullscreenDisableHotkeys;
|
extern int quartzFullscreenDisableHotkeys;
|
||||||
extern int quartzOptionSendsAlt;
|
extern int quartzOptionSendsAlt;
|
||||||
|
|
||||||
// Other shared data
|
// Other shared data
|
||||||
extern int quartzServerVisible;
|
extern int quartzServerVisible;
|
||||||
extern int quartzServerQuitting;
|
|
||||||
extern DevPrivateKeyRec quartzScreenKeyRec;
|
extern DevPrivateKeyRec quartzScreenKeyRec;
|
||||||
#define quartzScreenKey (&quartzScreenKeyRec)
|
#define quartzScreenKey (&quartzScreenKeyRec)
|
||||||
extern int aquaMenuBarHeight;
|
extern int aquaMenuBarHeight;
|
||||||
|
@ -72,14 +65,6 @@ extern int aquaMenuBarHeight;
|
||||||
// Name of GLX bundle for native OpenGL
|
// Name of GLX bundle for native OpenGL
|
||||||
extern const char *quartzOpenGLBundle;
|
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 QuartzBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask);
|
||||||
void QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask);
|
void QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask);
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ static Bool
|
||||||
load_cursor(CursorPtr src, int screen)
|
load_cursor(CursorPtr src, int screen)
|
||||||
{
|
{
|
||||||
uint32_t *data;
|
uint32_t *data;
|
||||||
|
Bool free_data = FALSE;
|
||||||
uint32_t rowbytes;
|
uint32_t rowbytes;
|
||||||
int width, height;
|
int width, height;
|
||||||
int hot_x, hot_y;
|
int hot_x, hot_y;
|
||||||
|
@ -95,6 +96,7 @@ load_cursor(CursorPtr src, int screen)
|
||||||
unsigned i;
|
unsigned i;
|
||||||
rowbytes = src->bits->width * sizeof (CARD32);
|
rowbytes = src->bits->width * sizeof (CARD32);
|
||||||
data = malloc(rowbytes * src->bits->height);
|
data = malloc(rowbytes * src->bits->height);
|
||||||
|
free_data = TRUE;
|
||||||
if(!data) {
|
if(!data) {
|
||||||
FatalError("Failed to allocate memory in %s\n", __func__);
|
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 */
|
/* round up to 8 pixel boundary so we can convert whole bytes */
|
||||||
rowbytes = ((src->bits->width * 4) + 31) & ~31;
|
rowbytes = ((src->bits->width * 4) + 31) & ~31;
|
||||||
data = malloc(rowbytes * src->bits->height);
|
data = malloc(rowbytes * src->bits->height);
|
||||||
|
free_data = TRUE;
|
||||||
if(!data) {
|
if(!data) {
|
||||||
FatalError("Failed to allocate memory in %s\n", __func__);
|
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);
|
err = xp_set_cursor(width, height, hot_x, hot_y, data, rowbytes);
|
||||||
free(data);
|
if(free_data)
|
||||||
|
free(data);
|
||||||
return err == Success;
|
return err == Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue