XDARWIN: fixes to make Xquartz build again

This commit is contained in:
Ben Byer 2007-09-06 18:52:26 -07:00 committed by Ben Byer
parent f8637137ab
commit 0ff273fd1e
5 changed files with 30 additions and 101 deletions

View File

@ -41,7 +41,7 @@
# include "micmap.h"
#undef BOOL
#include "xf86Version.h"
//#include "xf86Version.h"
#include <mach/mach.h>
#include <unistd.h>

View File

@ -6,6 +6,7 @@
**************************************************************/
/*
* Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
* Copyright (c) 2007 Apple Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -46,8 +47,6 @@
#include "fb.h" // fb framebuffer code
#include "site.h"
#include "globals.h"
#include "xorgVersion.h"
#include "xf86Date.h"
#include "dix.h"
#ifdef XINPUT
@ -83,7 +82,7 @@ int darwinScreenIndex = 0;
io_connect_t darwinParamConnect = 0;
int darwinEventReadFD = -1;
int darwinEventWriteFD = -1;
int darwinMouseAccelChange = 1;
// int darwinMouseAccelChange = 1;
int darwinFakeButtons = 0;
// location of X11's (0,0) point in global screen coordinates
@ -127,86 +126,23 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]);
#ifndef PRE_RELEASE
#define PRE_RELEASE XORG_VERSION_SNAP
#endif
void
DarwinPrintBanner()
{
#if PRE_RELEASE
ErrorF("\n"
"This is a pre-release version of the " XVENDORNAME " X11.\n"
"Portions of this release are based on XFree86 4.4RC2 and selected\n"
"files from XFree86 4.4RC3. It is not supported in any way.\n"
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
"Select the \"xorg\" product for bugs you find in this release.\n"
"Before reporting bugs in pre-release versions please check the\n"
"latest version in the " XVENDORNAME " \"monolithic tree\" CVS\n"
"repository hosted at http://www.freedesktop.org/Software/xorg/");
#ifndef BUILD_DATE
#define BUILD_DATE ""
#endif
#if XORG_VERSION_SNAP > 0
ErrorF(".%d", XORG_VERSION_SNAP);
#ifndef XORG_RELEASE
#define XORG_RELEASE "?"
#endif
#if XORG_VERSION_SNAP >= 900
ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1,
XORG_VERSION_SNAP - 900);
#endif
#ifdef XORG_CUSTOM_VERSION
ErrorF(" (%s)", XF86_CUSTOM_VERSION);
#endif
ErrorF("\nRelease Date: %s\n", XF86_DATE);
ErrorF("X Protocol Version %d, Revision %d, %s\n",
X_PROTOCOL, X_PROTOCOL_REVISION, XORG_VERSION_CURRENT );
ErrorF("Build Operating System: %s %s\n", OSNAME, OSVENDOR);
#ifdef HAS_UTSNAME
{
struct utsname name;
if (uname(&name) == 0) {
ErrorF("Current Operating System: %s %s %s %s %s\n",
name.sysname, name.nodename, name.release, name.version, name.machine);
}
}
#endif
#if defined(BUILD_DATE) && (BUILD_DATE > 19000000)
{
struct tm t;
char buf[100];
bzero(&t, sizeof(t));
bzero(buf, sizeof(buf));
t.tm_mday = BUILD_DATE % 100;
t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
t.tm_year = BUILD_DATE / 10000 - 1900;
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
ErrorF("Build Date: %s\n", buf);
}
#endif
#if defined(CLOG_DATE) && (CLOG_DATE > 19000000)
{
struct tm t;
char buf[100];
bzero(&t, sizeof(t));
bzero(buf, sizeof(buf));
t.tm_mday = CLOG_DATE % 100;
t.tm_mon = (CLOG_DATE / 100) % 100 - 1;
t.tm_year = CLOG_DATE / 10000 - 1900;
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
ErrorF("Changelog Date: %s\n", buf);
}
#endif
#if defined(BUILDERSTRING)
ErrorF("%s \n",BUILDERSTRING);
#endif
ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n"
"\tto make sure that you have the latest version.\n");
void DDXRingBell(int volume, int pitch, int duration) {
// FIXME -- make some noise, yo
}
void DDXRingBell(int volume, int pitch, int duration)
{
// FIXME -- make some noise, yo
void
DarwinPrintBanner(void)
{
// this should change depending on which specific server we are building
ErrorF("X11.app starting:\n");
ErrorF("Xquartz server based on X.org %s, built on %s\n", XORG_RELEASE, BUILD_DATE );
}
@ -359,8 +295,8 @@ static Bool DarwinAddScreen(
dixScreenOrigins[index].x = dfb->x;
dixScreenOrigins[index].y = dfb->y;
ErrorF("Screen %d added: %dx%d @ (%d,%d)\n",
index, dfb->width, dfb->height, dfb->x, dfb->y);
/* ErrorF("Screen %d added: %dx%d @ (%d,%d)\n",
index, dfb->width, dfb->height, dfb->x, dfb->y); */
return TRUE;
}
@ -373,6 +309,7 @@ static Bool DarwinAddScreen(
=============================================================================
*/
#if 0
/*
* DarwinChangePointerControl
* Set mouse acceleration and thresholding
@ -393,7 +330,7 @@ static void DarwinChangePointerControl(
if (kr != KERN_SUCCESS)
ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr );
}
#endif
/*
* DarwinMouseProc
@ -416,12 +353,11 @@ static int DarwinMouseProc(
map[3] = 3;
map[4] = 4;
map[5] = 5;
InitPointerDeviceStruct( (DevicePtr)pPointer,
map,
5, // numbuttons (4 & 5 are scroll wheel)
GetMotionHistory,
DarwinChangePointerControl,
GetMotionHistorySize(), 2 );
InitPointerDeviceStruct( (DevicePtr)pPointer, map, 5,
GetMotionHistory,
(PtrCtrlProcPtr)NoopDDA,
GetMotionHistorySize(), 2);
#ifdef XINPUT
InitValuatorAxisStruct( pPointer,
0, // X axis
@ -643,8 +579,8 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
for (i = 0; i < pScreenInfo->numScreens; i++) {
dixScreenOrigins[i].x -= darwinMainScreenX;
dixScreenOrigins[i].y -= darwinMainScreenY;
ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n",
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y);
/* ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n",
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); */
}
}
}
@ -725,10 +661,6 @@ void OsVendorInit(void)
}
darwinKeymapFile = tempStr;
}
if ( !darwinKeymapFile ) {
ErrorF("Reading keymap from the system.\n");
}
}
@ -926,7 +858,7 @@ void ddxUseMsg( void )
*/
void ddxGiveUp( void )
{
ErrorF( "Quitting XDarwin...\n" );
ErrorF( "Quitting XQuartz...\n" );
DarwinModeGiveUp();
}
@ -949,7 +881,6 @@ void AbortDDX( void )
}
#ifdef DPMSExtension
/*
* DPMS extension stubs
*/
@ -966,8 +897,6 @@ int DPMSGet(int *level)
{
return -1;
}
#endif
#include "mivalidate.h" // for union _Validate used by windowstr.h
#include "windowstr.h" // for struct _Window

View File

@ -48,7 +48,7 @@ typedef struct {
// From darwin.c
void DarwinPrintBanner();
void DarwinPrintBanner(void);
int DarwinParseModifierList(const char *constmodifiers);
void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);

View File

@ -356,7 +356,7 @@ static NSString *X11EnableKeyEquivalentsKey = @"EnableKeyEquivalents";
[[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange
forKey:@"AllowMouseAccelChange"];
// Update the setting used by the X server thread
darwinMouseAccelChange = newMouseAccelChange;
// darwinMouseAccelChange = newMouseAccelChange;
}
+ (void)setUseQDCursor:(int)newUseQDCursor

View File

@ -66,7 +66,7 @@ void QuartzReadPreferences(void)
darwinFakeButtons = [Preferences fakeButtons];
darwinFakeMouse2Mask = [Preferences button2Mask];
darwinFakeMouse3Mask = [Preferences button3Mask];
darwinMouseAccelChange = [Preferences mouseAccelChange];
// darwinMouseAccelChange = [Preferences mouseAccelChange];
quartzUseSysBeep = [Preferences systemBeep];
quartzEnableKeyEquivalents = [Preferences enableKeyEquivalents];