summaryrefslogtreecommitdiff
path: root/hw/darwin
diff options
context:
space:
mode:
Diffstat (limited to 'hw/darwin')
-rw-r--r--hw/darwin/Makefile.am81
-rw-r--r--hw/darwin/apple/X11Application.m2
-rw-r--r--hw/darwin/darwin.c123
-rw-r--r--hw/darwin/darwin.h2
-rw-r--r--hw/darwin/iokit/xfIOKit.c2
-rw-r--r--hw/darwin/quartz/Makefile.am2
-rw-r--r--hw/darwin/quartz/Preferences.m2
-rw-r--r--hw/darwin/quartz/pseudoramiX.c3
-rw-r--r--hw/darwin/quartz/quartz.c2
-rw-r--r--hw/darwin/quartz/quartzCocoa.m2
-rw-r--r--hw/darwin/quartz/xpr/xprScreen.c3
-rw-r--r--hw/darwin/utils/dumpkeymap.c2
12 files changed, 73 insertions, 153 deletions
diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am
index b773910fc..a6f84ee01 100644
--- a/hw/darwin/Makefile.am
+++ b/hw/darwin/Makefile.am
@@ -56,34 +56,29 @@ Xquartz_SOURCES = \
quartz/xpr/x-hook.c \
quartz/xpr/x-list.c
-XDarwin_LDADD = \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/dix/libdix.la \
- $(top_builddir)/config/libconfig.a \
- ./libdarwinShared.a \
- ./iokit/libiokit.a \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(DARWIN_LIBS) \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- @XORG_LIBS@ \
- $(XSERVER_LIBS)
-
-Xquartz_LDADD = \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/dix/libdix.la \
- $(top_builddir)/config/libconfig.a \
- ./libdarwinShared.a \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(DARWIN_LIBS) \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- @XORG_LIBS@ \
- $(XSERVER_LIBS) -lXplugin
+DARWIN_LIBS = \
+ $(top_builddir)/dix/dixfonts.lo \
+ $(top_builddir)/config/libconfig.a \
+ $(top_builddir)/miext/shadow/libshadow.la \
+ $(top_builddir)/miext/cw/libcw.la \
+ @DARWIN_LIBS@ \
+ $(top_builddir)/miext/rootless/librootless.la \
+ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
+ $(top_builddir)/miext/rootless/accel/librlAccel.la \
+ ./libdarwinShared.a \
+ $(XSERVER_LIBS)
+
+XDARWIN_LIBS = \
+ $(DARWIN_LIBS) \
+ ./iokit/libiokit.a
+XQUARTZ_LIBS = \
+ $(DARWIN_LIBS)
+
+XDarwin_DEPENDENCIES = $(XDARWIN_LIBS)
+XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS)
+
+Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS)
+Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
XDarwin_LDFLAGS = \
-XCClinker -Objc \
@@ -95,6 +90,7 @@ Xquartz_LDFLAGS = \
-Wl,-u,_miDCInitialize \
-Wl,-framework,Carbon \
-Wl,-framework,OpenGL \
+ -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib \
-Wl,-framework,Cocoa \
-Wl,-framework,CoreAudio \
-Wl,-framework,IOKit
@@ -118,22 +114,15 @@ XDarwinApp_SOURCES = \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xi/stubs.c
-XDarwinApp_LDADD = \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/dix/libdix.la \
- $(top_builddir)/config/libconfig.a \
- $(top_builddir)/os/libos.la \
- ./quartz/XApplication.o \
- ./libdarwinShared.a \
- ./quartz/libXQuartz.a \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(DARWIN_LIBS) \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- @XORG_LIBS@ \
- $(XSERVER_LIBS)
+XDARWINAPP_LIBS = \
+ $(DARWIN_LIBS) \
+ ./quartz/XApplication.o \
+ ./libdarwinShared.a \
+ ./quartz/libXQuartz.a \
+ $(XSERVER_LIBS)
+
+XDarwinApp_DEPENDENCIES = $(XDARWINAPP_LIBS)
+XDarwinApp_LDADD = $(XDARWINAPP_LIBS) $(XSERVER_SYS_LIBS)
XDarwinApp_LDFLAGS = \
-XCClinker -Objc \
@@ -163,6 +152,7 @@ cr_la_LIBADD = \
$(top_builddir)/miext/rootless/accel/librlAccel.la
cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
+ -lpixman-1 \
-Wl,-framework,Cocoa \
-Wl,-framework,Carbon \
-XCClinker -ObjC \
@@ -201,7 +191,7 @@ glxMesa_la_DEPENDENCIES = XDarwinApp
endif
endif
-if HAVE_X_PLUGIN
+if HAVE_XPLUGIN
xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
xprplugin_LTLIBRARIES = xpr.la
@@ -222,6 +212,7 @@ xpr_la_LIBADD = \
$(top_builddir)/miext/rootless/accel/librlAccel.la
xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
+ -lpixman-1 \
-lXplugin \
-XCClinker -bundle_loader -XCClinker XDarwinApp \
-module -avoid-version -no-undefined
diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m
index 57795f452..2d2132102 100644
--- a/hw/darwin/apple/X11Application.m
+++ b/hw/darwin/apple/X11Application.m
@@ -41,7 +41,7 @@
# include "micmap.h"
#undef BOOL
-#include "xf86Version.h"
+//#include "xf86Version.h"
#include <mach/mach.h>
#include <unistd.h>
diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c
index 7b4836805..0b22141b5 100644
--- a/hw/darwin/darwin.c
+++ b/hw/darwin/darwin.c
@@ -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_RELEASE );
- 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
diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h
index 70101eca5..20f45be93 100644
--- a/hw/darwin/darwin.h
+++ b/hw/darwin/darwin.h
@@ -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);
diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c
index c7ebd1c18..9de33c064 100644
--- a/hw/darwin/iokit/xfIOKit.c
+++ b/hw/darwin/iokit/xfIOKit.c
@@ -62,8 +62,8 @@
#define NO_CFPLUGIN
#include <IOKit/IOKitLib.h>
#include <IOKit/hidsystem/IOHIDShared.h>
+#include <IOKit/hidsystem/event_status_driver.h>
#include <IOKit/graphics/IOGraphicsLib.h>
-#include <drivers/event_status_driver.h>
// Define this to work around bugs in the display drivers for
// older PowerBook G3's. If the X server starts without this
diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am
index 993cdb0ec..f8dc16765 100644
--- a/hw/darwin/quartz/Makefile.am
+++ b/hw/darwin/quartz/Makefile.am
@@ -5,7 +5,7 @@ AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@
AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API
-if HAVE_X_PLUGIN
+if HAVE_XPLUGIN
AM_DEFS += -DBUILD_XPR
endif
DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\"
diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m
index eb78fd32a..a79454b13 100644
--- a/hw/darwin/quartz/Preferences.m
+++ b/hw/darwin/quartz/Preferences.m
@@ -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
diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c
index 7ba6d5a15..e65be69a0 100644
--- a/hw/darwin/quartz/pseudoramiX.c
+++ b/hw/darwin/quartz/pseudoramiX.c
@@ -43,6 +43,9 @@ Equipment Corporation.
#include <X11/extensions/panoramiXproto.h>
#include "globals.h"
+extern int noPseudoramiXExtension;
+extern int noPanoramiXExtension;
+
extern int ProcPanoramiXQueryVersion (ClientPtr client);
static void PseudoramiXResetProc(ExtensionEntry *extEntry);
diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c
index eac765257..0f0351652 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/darwin/quartz/quartz.c
@@ -209,7 +209,7 @@ static void QuartzUpdateScreens(void)
pRoot = WindowTable[pScreen->myNum];
AppleWMSetScreenOrigin(pRoot);
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
- pScreen->PaintWindowBackground(pRoot, &pRoot->borderClip, PW_BACKGROUND);
+ miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
// QuartzIgnoreNextWarpCursor();
DefineInitialRootWindow(pRoot);
diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m
index c54c18acb..42eabcbae 100644
--- a/hw/darwin/quartz/quartzCocoa.m
+++ b/hw/darwin/quartz/quartzCocoa.m
@@ -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];
diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c
index 67a0737ef..034cbac6d 100644
--- a/hw/darwin/quartz/xpr/xprScreen.c
+++ b/hw/darwin/quartz/xpr/xprScreen.c
@@ -306,9 +306,6 @@ static Bool
xprSetupScreen(int index, ScreenPtr pScreen)
{
// Add alpha protecting replacements for fb screen functions
- pScreen->PaintWindowBackground = SafeAlphaPaintWindow;
- pScreen->PaintWindowBorder = SafeAlphaPaintWindow;
-
#ifdef RENDER
{
PictureScreenPtr ps = GetPictureScreen(pScreen);
diff --git a/hw/darwin/utils/dumpkeymap.c b/hw/darwin/utils/dumpkeymap.c
index d2eeca5c2..0c8bdcd01 100644
--- a/hw/darwin/utils/dumpkeymap.c
+++ b/hw/darwin/utils/dumpkeymap.c
@@ -143,7 +143,7 @@
#include <string.h>
#include <sys/stat.h>
#if !defined(DUMPKEYMAP_FILE_ONLY)
-#include <drivers/event_status_driver.h>
+#include <IOKit/hidsystem/event_status_driver.h>
#endif
#define PROG_NAME "dumpkeymap"