diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index b773910fc..560cc3a9f 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -1,8 +1,7 @@ noinst_LIBRARIES = libdarwinShared.a libdarwin_XINPUT_SRCS = darwinXinput.c -AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +AM_CFLAGS = @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ -I../../miext/rootless DEFS = @DEFS@ -DUSE_NEW_CLUT @@ -17,26 +16,25 @@ SUBDIRS = \ utils \ . -darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app +darwinappdir = /Applications/Utilities/XDarwin.app libdarwinShared_a_SOURCES = darwin.c \ darwinEvents.c \ darwinKeyboard.c \ $(darwin_XINPUT_SRCS) -bin_PROGRAMS = XDarwin Xquartz +bin_PROGRAMS = Xquartz XDarwin_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/fb/fbcmap.c \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/Xi/stubs.c Xquartz_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/fb/fbcmap.c \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/Xi/stubs.c \ apple/X11Application.m \ apple/X11Controller.m \ - quartz/Preferences.m \ quartz/applewm.c \ quartz/keysym2ucs.c \ quartz/pseudoramiX.c \ @@ -59,31 +57,56 @@ Xquartz_SOURCES = \ XDarwin_LDADD = \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/dix/libdix.la \ - $(top_builddir)/config/libconfig.a \ + $(top_builddir)/os/libos.la \ ./libdarwinShared.a \ ./iokit/libiokit.a \ + $(top_builddir)/dix/libxpstubs.la \ $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/fb/libfb.la \ + $(top_builddir)/composite/libcomposite.la \ + $(top_builddir)/damageext/libdamageext.la \ + $(top_builddir)/miext/damage/libdamage.la \ + $(top_builddir)/xfixes/libxfixes.la \ $(top_builddir)/miext/cw/libcw.la \ - $(DARWIN_LIBS) \ + $(top_builddir)/Xext/libXext.la \ + $(top_builddir)/xkb/libxkb.la \ + $(top_builddir)/xkb/libxkbstubs.la \ + $(top_builddir)/Xi/libXi.la \ + $(top_builddir)/dbe/libdbe.la \ + $(top_builddir)/record/librecord.la \ + $(top_builddir)/XTrap/libxtrap.la \ + $(XGLX_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) + -lXau -lXdmcp -lXfont -lfreetype Xquartz_LDADD = \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/dix/libdix.la \ - $(top_builddir)/config/libconfig.a \ + $(top_builddir)/os/libos.la \ ./libdarwinShared.a \ + $(top_builddir)/dix/libxpstubs.la \ $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/fb/libfb.la \ + $(top_builddir)/composite/libcomposite.la \ + $(top_builddir)/damageext/libdamageext.la \ + $(top_builddir)/miext/damage/libdamage.la \ + $(top_builddir)/xfixes/libxfixes.la \ $(top_builddir)/miext/cw/libcw.la \ - $(DARWIN_LIBS) \ + $(top_builddir)/Xext/libXext.la \ + $(top_builddir)/xkb/libxkb.la \ + $(top_builddir)/xkb/libxkbstubs.la \ + $(top_builddir)/Xi/libXi.la \ + $(top_builddir)/dbe/libdbe.la \ + $(top_builddir)/record/librecord.la \ + $(top_builddir)/XTrap/libxtrap.la \ $(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 + -lXau -lXdmcp -lXfont -lfreetype -lXplugin XDarwin_LDFLAGS = \ -XCClinker -Objc \ @@ -94,6 +117,7 @@ Xquartz_LDFLAGS = \ -XCClinker -Objc \ -Wl,-u,_miDCInitialize \ -Wl,-framework,Carbon \ + -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \ -Wl,-framework,OpenGL \ -Wl,-framework,Cocoa \ -Wl,-framework,CoreAudio \ @@ -101,39 +125,53 @@ Xquartz_LDFLAGS = \ XDarwin_CFLAGS = -DINXDARWIN Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H +Xquartz_OBJCFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H if XQUARTZ macosdir = $(darwinappdir)/Contents/MacOS DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server -macos_PROGRAMS = XDarwinApp +macos_PROGRAMS = macos_SCRIPTS = x11app x11app: - cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)" + cd apple && xcodebuild XDarwinApp_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c \ - $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap.c \ + $(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)/dix/libxpstubs.la \ $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/fb/libfb.la \ + $(top_builddir)/composite/libcomposite.la \ + $(top_builddir)/damageext/libdamageext.la \ + $(top_builddir)/miext/damage/libdamage.la \ + $(top_builddir)/xfixes/libxfixes.la \ $(top_builddir)/miext/cw/libcw.la \ - $(DARWIN_LIBS) \ + $(top_builddir)/Xext/libXext.la \ + $(top_builddir)/xkb/libxkb.la \ + $(top_builddir)/xkb/libxkbstubs.la \ + $(top_builddir)/Xi/libXi.la \ + $(top_builddir)/dbe/libdbe.la \ + $(top_builddir)/record/librecord.la \ + $(top_builddir)/XTrap/libxtrap.la \ + $(XGLX_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) + -lXau -lXdmcp -lXfont -lfreetype \ + $(top_builddir)/fb/libfb.la XDarwinApp_LDFLAGS = \ -XCClinker -Objc \ @@ -144,24 +182,21 @@ XDarwinApp_LDFLAGS = \ -Wl,-framework,CoreAudio \ -Wl,-framework,IOKit -XDarwinApp_CFLAGS = -DINXDARWINAPP HOOK_TARGETS = xquartz-install-hook crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS -crplugin_LTLIBRARIES = cr.la -cr_la_SOURCES = \ - quartz/cr/crAppleWM.m \ - quartz/cr/crFrame.m \ - quartz/cr/crScreen.m \ - quartz/fullscreen/quartzCursor.c \ - quartz/cr/XView.m - +crplugin_LTLIBRARIES = +cr_la_SOURCES = cr_la_LIBADD = \ + quartz/cr/crAppleWM.o \ + quartz/cr/crFrame.o \ + quartz/cr/crScreen.o \ + quartz/fullscreen/quartzCursor.o \ + quartz/cr/XView.o \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ $(top_builddir)/miext/rootless/accel/librlAccel.la - cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ -Wl,-framework,Cocoa \ -Wl,-framework,Carbon \ @@ -171,12 +206,11 @@ cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ cr_la_DEPENDENCIES = XDarwinApp fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS -fullscreenplugin_LTLIBRARIES = fullscreen.la -fullscreen_la_SOURCES = \ - quartz/fullscreen/fullscreen.c \ - quartz/fullscreen/quartzCursor.c - +fullscreenplugin_LTLIBRARIES = +fullscreen_la_SOURCES = fullscreen_la_LIBADD = \ + quartz/fullscreen/fullscreen.o \ + quartz/fullscreen/quartzCursor.o \ $(top_builddir)/miext/shadow/libshadow.la fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ @@ -186,7 +220,7 @@ fullscreen_la_DEPENDENCIES = XDarwinApp if GLX glxMesaplugindir = $(darwinappdir)/Contents/Resources/glxMesa.bundle/Contents/MacOS -glxMesaplugin_LTLIBRARIES = glxMesa.la +glxMesaplugin_LTLIBRARIES = glxMesa_la_SOURCES = glxMesa_la_LIBADD = \ $(top_builddir)/GL/glx/libglx.la \ @@ -204,23 +238,21 @@ endif if HAVE_X_PLUGIN xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS -xprplugin_LTLIBRARIES = xpr.la -xpr_la_SOURCES = \ - quartz/xpr/appledri.c \ - quartz/xpr/dri.c \ - quartz/xpr/xprAppleWM.c \ - quartz/xpr/xprCursor.c \ - quartz/xpr/xprFrame.c \ - quartz/xpr/xprScreen.c \ - quartz/xpr/x-hash.c \ - quartz/xpr/x-hook.c \ - quartz/xpr/x-list.c - +xprplugin_LTLIBRARIES = +xpr_la_SOURCES = xpr_la_LIBADD = \ + quartz/xpr/appledri.o \ + quartz/xpr/dri.o \ + quartz/xpr/xprAppleWM.o \ + quartz/xpr/xprCursor.o \ + quartz/xpr/xprFrame.o \ + quartz/xpr/xprScreen.o \ + quartz/xpr/x-hash.o \ + quartz/xpr/x-hook.o \ + quartz/xpr/x-list.o \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ $(top_builddir)/miext/rootless/accel/librlAccel.la - xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ -lXplugin \ -XCClinker -bundle_loader -XCClinker XDarwinApp \ @@ -231,7 +263,7 @@ endif if HAVE_AGL_FRAMEWORK glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS -glxCGLplugin_LTLIBRARIES = glxCGL.la +glxCGLplugin_LTLIBRARIES = glxCGL_la_SOURCES = glxCGL_la_LIBADD = \ $(top_builddir)/GL/glx/glxext.o \ @@ -247,7 +279,7 @@ glxCGL_la_DEPENDENCIES = XDarwinApp glxAGLplugindir = $(darwinappdir)/Contents/Resources/glxAGL.bundle/Contents/MacOS -glxAGLplugin_LTLIBRARIES = glxAGL.la +glxAGLplugin_LTLIBRARIES = glxAGL_la_SOURCES = glxAGL_la_LIBADD = \ $(top_builddir)/GL/glx/glxext.o \ @@ -273,8 +305,8 @@ uninstall-hook: install-data-hook: $(HOOK_TARGETS) xquartz-install-hook: - mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin cd apple && xcodebuild install + cd launcher && xcodebuild install EXTRA_DIST = \ darwin.c \ diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index 7da8626ab..c3b21c17e 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -83,7 +83,6 @@ int darwinScreenIndex = 0; io_connect_t darwinParamConnect = 0; int darwinEventReadFD = -1; int darwinEventWriteFD = -1; -int darwinMouseAccelChange = 1; int darwinFakeButtons = 0; // location of X11's (0,0) point in global screen coordinates @@ -127,87 +126,16 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]); #ifndef PRE_RELEASE #define PRE_RELEASE XORG_VERSION_SNAP #endif +#ifndef BUILD_DATE +#define BUILD_DATE "" +#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/"); -#endif -#if XORG_VERSION_SNAP > 0 - ErrorF(".%d", XORG_VERSION_SNAP); -#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 -} + ErrorF("X11.app starting:\n"); + ErrorF("Xquartz server based on X.org %s, built on %s\n", XORG_RELEASE, BUILD_DATE ); + } /* @@ -359,8 +287,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,28 +301,6 @@ static Bool DarwinAddScreen( ============================================================================= */ -/* - * DarwinChangePointerControl - * Set mouse acceleration and thresholding - * FIXME: We currently ignore the threshold in ctrl->threshold. - */ -static void DarwinChangePointerControl( - DeviceIntPtr device, - PtrCtrl *ctrl ) -{ - kern_return_t kr; - double acceleration; - - if (!darwinMouseAccelChange) - return; - - acceleration = ctrl->num / ctrl->den; - kr = IOHIDSetMouseAcceleration( darwinParamConnect, acceleration ); - if (kr != KERN_SUCCESS) - ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr ); -} - - /* * DarwinMouseProc * Handle the initialization, etc. of a mouse @@ -419,9 +325,9 @@ static int DarwinMouseProc( InitPointerDeviceStruct( (DevicePtr)pPointer, map, 5, // numbuttons (4 & 5 are scroll wheel) - GetMotionHistory, - DarwinChangePointerControl, - GetMotionHistorySize(), 2 ); + miPointerGetMotionEvents, + (PtrCtrlProcPtr)NoopDDA, + 0 ); #ifdef XINPUT InitValuatorAxisStruct( pPointer, 0, // X axis @@ -643,8 +549,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); */ } } } @@ -721,13 +627,13 @@ void OsVendorInit(void) if ( !tempStr ) { ErrorF("Could not find keymapping file %s.\n", darwinKeymapFile); } else { - ErrorF("Using keymapping provided in %s.\n", tempStr); + ErrorF("Using keymapping provided in %s.\n", tempStr); } darwinKeymapFile = tempStr; } if ( !darwinKeymapFile ) { - ErrorF("Reading keymap from the system.\n"); + // ErrorF("Reading keymap from the system.\n"); } } @@ -926,7 +832,7 @@ void ddxUseMsg( void ) */ void ddxGiveUp( void ) { - ErrorF( "Quitting XDarwin...\n" ); + ErrorF( "Quitting Xquartz...\n" ); DarwinModeGiveUp(); } diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 3d7f268ca..d3abcc593 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -127,23 +127,19 @@ static void DarwinUpdateModifiers( int pressed, // KeyPress or KeyRelease int flags ) // modifier flags that have changed { + xe->u.u.type = pressed; + if (flags & NX_COMMANDMASK) DarwinPressModifierMask(xe, COMMAND_MASK(flags)); + if (flags & NX_CONTROLMASK) DarwinPressModifierMask(xe, CONTROL_MASK(flags)); + if (flags & NX_ALTERNATEMASK) DarwinPressModifierMask(xe, ALTERNATE_MASK(flags)); + if (flags & NX_SHIFTMASK) DarwinPressModifierMask(xe, SHIFT_MASK(flags)); + if (flags & NX_SECONDARYFNMASK) DarwinPressModifierMask(xe, NX_SECONDARYFNMASK); if (flags & NX_ALPHASHIFTMASK) { - DarwinPressModifierMask(pressed, NX_ALPHASHIFTMASK); - } - if (flags & NX_COMMANDMASK) { - DarwinPressModifierMask(pressed, COMMAND_MASK(flags)); - } - if (flags & NX_CONTROLMASK) { - DarwinPressModifierMask(pressed, CONTROL_MASK(flags)); - } - if (flags & NX_ALTERNATEMASK) { - DarwinPressModifierMask(pressed, ALTERNATE_MASK(flags)); - } - if (flags & NX_SHIFTMASK) { - DarwinPressModifierMask(pressed, SHIFT_MASK(flags)); - } - if (flags & NX_SECONDARYFNMASK) { - DarwinPressModifierMask(pressed, NX_SECONDARYFNMASK); + // Alpha shift only sees KeyDown when enabled and KeyUp when disabled, + // but X11 wants to see a up/down pair to enable, and again to disable + xe->u.u.type = KeyPress; + DarwinPressModifierMask(xe, NX_ALPHASHIFTMASK); + xe->u.u.type = KeyRelease; + DarwinPressModifierMask(xe, NX_ALPHASHIFTMASK); } } diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c index c7ebd1c18..7f126c7dc 100644 --- a/hw/darwin/iokit/xfIOKit.c +++ b/hw/darwin/iokit/xfIOKit.c @@ -63,7 +63,6 @@ #include #include #include -#include // 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/iokit/xfIOKitStartup.c b/hw/darwin/iokit/xfIOKitStartup.c index 07e8c2181..413d0625d 100644 --- a/hw/darwin/iokit/xfIOKitStartup.c +++ b/hw/darwin/iokit/xfIOKitStartup.c @@ -29,7 +29,6 @@ * use or other dealings in this Software without prior written authorization. */ - #if HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/XDarwinStartup.c b/hw/darwin/quartz/XDarwinStartup.c index 8041e32d5..3ad4898a6 100644 --- a/hw/darwin/quartz/XDarwinStartup.c +++ b/hw/darwin/quartz/XDarwinStartup.c @@ -38,6 +38,9 @@ * dealings in this Software without prior written authorization from * Torrey T. Lyons. */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #include #include diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m index 32bfbf58f..058741522 100644 --- a/hw/darwin/quartz/XServer.m +++ b/hw/darwin/quartz/XServer.m @@ -34,8 +34,6 @@ * sale, use or other dealings in this Software without prior written * authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.19 2003/11/24 05:39:01 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index cc11cfa4c..f064dbac1 100644 --- a/hw/darwin/quartz/applewm.c +++ b/hw/darwin/quartz/applewm.c @@ -1,6 +1,6 @@ /************************************************************************** -Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. +Copyright (c) 2002-2007 Apple Inc. All Rights Reserved. Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a @@ -445,13 +445,11 @@ ProcAppleWMSetWindowMenu( break; } } - #ifdef INXQUARTZ X11ApplicationSetWindowMenu (nitems, items, shortcuts); #else QuartzSetWindowMenu (nitems, items, shortcuts); #endif - free(items); free(shortcuts); @@ -467,7 +465,7 @@ ProcAppleWMSetWindowMenuCheck( REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); #ifdef INXQUARTZ - X11ApplicationSetWindowMenuCheck(stuff->index); + X11ApplicationSetWindowMenuCheck (stuff->index); #else QuartzMessageMainThread(kQuartzSetWindowMenuCheck, &stuff->index, sizeof(stuff->index)); @@ -481,6 +479,7 @@ ProcAppleWMSetFrontProcess( ) { REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq); + #ifdef INXQUARTZ X11ApplicationSetFrontProcess(); #else @@ -524,13 +523,13 @@ ProcAppleWMSetCanQuit( REQUEST(xAppleWMSetCanQuitReq); REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq); + #ifdef INXQUARTZ X11ApplicationSetCanQuit(stuff->state); #else QuartzMessageMainThread(kQuartzSetCanQuit, &stuff->state, sizeof(stuff->state)); #endif - return (client->noClientException); } diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m index 0741d4e58..259c2d879 100644 --- a/hw/darwin/quartz/cr/crAppleWM.m +++ b/hw/darwin/quartz/cr/crAppleWM.m @@ -30,8 +30,8 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif -#include "quartz/quartzCommon.h" -#include "quartz/cr/cr.h" +#include "quartzCommon.h" +#include "cr.h" #undef BOOL #define BOOL xBOOL @@ -39,7 +39,7 @@ #include "X11/X.h" #define _APPLEWM_SERVER_ #include "X11/extensions/applewm.h" -#include "quartz/applewmExt.h" +#include "applewmExt.h" #undef BOOL #define StdDocumentStyleMask (NSTitledWindowMask | \ diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m index 2b8e57d0a..5f04ab224 100644 --- a/hw/darwin/quartz/cr/crFrame.m +++ b/hw/darwin/quartz/cr/crFrame.m @@ -27,13 +27,13 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.2 2004/04/23 19:15:51 eich Exp $ */ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/cr/crFrame.m,v 1.3 2004/10/08 00:35:05 torrey Exp $ */ /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.9 2004/03/19 02:05:29 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif -#include "quartz/quartzCommon.h" -#include "quartz/cr/cr.h" +#include "quartzCommon.h" +#include "cr.h" #undef BOOL #define BOOL xBOOL diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m index 9dd130e01..c17f294bf 100644 --- a/hw/darwin/quartz/cr/crScreen.m +++ b/hw/darwin/quartz/cr/crScreen.m @@ -32,8 +32,8 @@ #ifdef HAVE_XORG_CONFIG_H #include #endif -#include "quartz/quartzCommon.h" -#include "quartz/cr/cr.h" +#include "quartzCommon.h" +#include "cr.h" #undef BOOL #define BOOL xBOOL diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c index 02f6e89a8..5e60ac6a6 100644 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ b/hw/darwin/quartz/fullscreen/fullscreen.c @@ -25,10 +25,12 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/fullscreen/fullscreen.c,v 1.4 2005/07/01 22:43:08 daniels Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/fullscreen/fullscreen.c,v 1.3 2003/11/27 01:59:53 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif -#include "quartz/quartzCommon.h" +#include "quartzCommon.h" #include "darwin.h" #include "quartz/quartz.h" #include "quartz/quartzCursor.h" diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index 77fa008f2..60a4c4d8a 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -29,11 +29,12 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.c,v 1.5 2003/01/23 00:34:26 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif -#include "quartz/quartzCommon.h" -#include "quartz/quartzCursor.h" +#include "quartzCommon.h" +#include "quartzCursor.h" #include "darwin.h" #include diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.h b/hw/darwin/quartz/fullscreen/quartzCursor.h index 57fac68a5..efcc4435e 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.h +++ b/hw/darwin/quartz/fullscreen/quartzCursor.h @@ -29,6 +29,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.h,v 1.1 2002/03/28 02:21:19 torrey Exp $ */ #ifndef QUARTZCURSOR_H #define QUARTZCURSOR_H diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index 7ba6d5a15..f02867c38 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -32,6 +32,7 @@ shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c,v 1.4 2004/07/02 01:30:33 torrey Exp $ */ #include "pseudoramiX.h" #ifdef HAVE_XORG_CONFIG_H @@ -43,6 +44,9 @@ Equipment Corporation. #include #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/pseudoramiX.h b/hw/darwin/quartz/pseudoramiX.h index df5010d1d..c2943369d 100644 --- a/hw/darwin/quartz/pseudoramiX.h +++ b/hw/darwin/quartz/pseudoramiX.h @@ -1,6 +1,7 @@ /* * Minimal implementation of PanoramiX/Xinerama */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.3 2004/07/02 01:30:33 torrey Exp $ */ extern int noPseudoramiXExtension; diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 038b21eff..baeba8f90 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -1,3 +1,4 @@ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/quartz.c,v 1.4 2005/07/01 22:43:07 daniels Exp $ */ /************************************************************** * * Quartz-specific support for the Darwin X Server @@ -29,6 +30,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.16 2004/07/02 01:30:33 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif @@ -161,11 +163,10 @@ void DarwinModeInitInput( char **argv ) { #ifdef INXQUARTZ - X11ApplicationServerReady(); + X11ApplicationServerReady(); #else QuartzMessageMainThread(kQuartzServerStarted, NULL, 0); #endif - // Do final display mode specific initialization before handling events if (quartzProcs->InitInput) quartzProcs->InitInput(argc, argv); diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h index f1b36b6b1..c83579cae 100644 --- a/hw/darwin/quartz/quartz.h +++ b/hw/darwin/quartz/quartz.h @@ -30,6 +30,8 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/quartz.h,v 1.4 2005/07/01 22:43:07 daniels Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.7 2003/11/12 20:21:51 torrey Exp $ */ #ifndef _QUARTZ_H #define _QUARTZ_H diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c index 16b9c2ba8..03f9cca9f 100644 --- a/hw/darwin/quartz/quartzAudio.c +++ b/hw/darwin/quartz/quartzAudio.c @@ -35,6 +35,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzAudio.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/quartzAudio.h b/hw/darwin/quartz/quartzAudio.h index c406bbc2a..e20c21ad2 100644 --- a/hw/darwin/quartz/quartzAudio.h +++ b/hw/darwin/quartz/quartzAudio.h @@ -28,6 +28,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzAudio.h,v 1.2 2001/04/01 20:45:43 tsi Exp $ */ #ifndef _QUARTZAUDIO_H #define _QUARTZAUDIO_H diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m index c54c18acb..a9c89c04c 100644 --- a/hw/darwin/quartz/quartzCocoa.m +++ b/hw/darwin/quartz/quartzCocoa.m @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.2 2004/04/23 19:15:17 eich Exp $ */ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/quartzCocoa.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */ /************************************************************** * * Quartz-specific support for the Darwin X Server @@ -47,14 +47,16 @@ #include +#ifndef INXQUARTZ #import "Preferences.h" +#endif #include "pseudoramiX.h" extern void FatalError(const char *, ...); extern char *display; extern int noPanoramiXExtension; - +#ifndef INXQUARTZ /* * QuartzReadPreferences * Read the user preferences from the Cocoa front end. @@ -100,7 +102,7 @@ void QuartzReadPreferences(void) darwinDesiredDepth = [Preferences depth] - 1; } - +#endif /* * QuartzWriteCocoaPasteboard @@ -165,6 +167,7 @@ char *QuartzReadCocoaPasteboard(void) int QuartzFSUseQDCursor( int depth) // screen depth { +#ifndef INXQUARTZ switch ([Preferences useQDCursor]) { case qdCursor_Always: return TRUE; @@ -176,6 +179,7 @@ int QuartzFSUseQDCursor( else return FALSE; } +#endif return TRUE; } diff --git a/hw/darwin/quartz/quartzCommon.h b/hw/darwin/quartz/quartzCommon.h index f5dff662c..2fd79ebaf 100644 --- a/hw/darwin/quartz/quartzCommon.h +++ b/hw/darwin/quartz/quartzCommon.h @@ -1,3 +1,4 @@ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/quartzCommon.h,v 1.4 2005/07/01 22:43:07 daniels Exp $ */ /* * quartzCommon.h * @@ -31,6 +32,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCommon.h,v 1.15 2004/06/08 22:58:10 torrey Exp $ */ #ifndef _QUARTZCOMMON_H #define _QUARTZCOMMON_H diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c index 6ed6a7677..dd183dbb1 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -29,6 +29,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.c,v 1.4 2002/11/19 23:01:30 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/darwin/quartz/quartzCursor.h index 57fac68a5..e847f8c60 100644 --- a/hw/darwin/quartz/quartzCursor.h +++ b/hw/darwin/quartz/quartzCursor.h @@ -29,6 +29,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h,v 1.2 2001/09/23 04:04:49 torrey Exp $ */ #ifndef QUARTZCURSOR_H #define QUARTZCURSOR_H diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index bdd541663..80e22aa21 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -31,6 +31,7 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzKeyboard.c,v 1.1 2003/11/01 08:13:08 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include @@ -216,35 +217,44 @@ Bool DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) { KeyboardLayoutRef key_layout; - const void *chr_data; + const void *chr_data = NULL; int num_keycodes = NUM_KEYCODES; UInt32 keyboard_type = 0; int is_uchr, i, j; OSStatus err; KeySym *k; - KLGetCurrentKeyboardLayout (&key_layout); - KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data); + TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource(); + if (currentKeyLayoutRef) + { + CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData); + if (currentKeyLayoutDataRef) + chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef); + } + + if(chr_data == NULL) { + KLGetCurrentKeyboardLayout (&key_layout); + KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data); - if (chr_data != NULL) - { - is_uchr = 1; - keyboard_type = LMGetKbdType (); - } - else - { - KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data); + if (chr_data != NULL) + { + is_uchr = 1; + keyboard_type = LMGetKbdType (); + } + else + { + KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data); - if (chr_data == NULL) - { - ErrorF ( "Couldn't get uchr or kchr resource\n"); - return FALSE; - } - - is_uchr = 0; - num_keycodes = 128; - } + if (chr_data == NULL) + { + ErrorF ( "Couldn't get uchr or kchr resource\n"); + return FALSE; + } + is_uchr = 0; + num_keycodes = 128; + } + } /* Scan the keycode range for the Unicode character that each key produces in the four shift states. Then convert that to @@ -368,6 +378,7 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) } } } + if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef); return TRUE; } diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c index a3536fc56..7ae2e33a7 100644 --- a/hw/darwin/quartz/quartzPasteboard.c +++ b/hw/darwin/quartz/quartzPasteboard.c @@ -29,6 +29,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c,v 1.3 2001/09/23 04:04:49 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include diff --git a/hw/darwin/quartz/quartzPasteboard.h b/hw/darwin/quartz/quartzPasteboard.h index afcb6e587..296c52c17 100644 --- a/hw/darwin/quartz/quartzPasteboard.h +++ b/hw/darwin/quartz/quartzPasteboard.h @@ -29,6 +29,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.h,v 1.1 2001/03/15 22:24:27 torrey Exp $ */ #ifndef _QUARTZPASTEBOARD_H #define _QUARTZPASTEBOARD_H @@ -41,4 +42,4 @@ char * QuartzReadCocoaPasteboard(void); // caller must free string void QuartzWritePasteboard(); void QuartzWriteCocoaPasteboard(char *text); -#endif /* _QUARTZPASTEBOARD_H */ +#endif /* _QUARTZPASTEBOARD_H */ \ No newline at end of file diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c index 76392e44c..34176c54f 100644 --- a/hw/darwin/quartz/quartzStartup.c +++ b/hw/darwin/quartz/quartzStartup.c @@ -28,6 +28,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzStartup.c,v 1.8 2003/11/05 00:15:00 torrey Exp $ */ #include #include @@ -38,35 +39,33 @@ #include "opaque.h" #include "micmap.h" #include - char **envpGlobal; // argcGlobal and argvGlobal // are from dix/globals.c -#ifdef INXQUARTZ -void X11ControllerMain(int argc, char *argv[], void (*server_thread) (void *), void *server_arg); -# ifdef GLXEXT -void GlxExtensionInit(void); -void GlxWrapInitVisuals(miInitVisualsProcPtr *); -# endif -static void server_thread (void *arg) { - extern int main (int argc, char **argv, char **envp); - exit (main (argcGlobal, argvGlobal, envpGlobal)); -} -#else +#ifndef INXQUARTZ int NSApplicationMain(int argc, char *argv[]); -typedef Bool (*QuartzModeBundleInitPtr)(void); -# ifdef GLXEXT // GLX bundle function pointers -typedef void (*GlxExtensionInitPtr)(void); -static GlxExtensionInitPtr GlxExtensionInit = NULL; -typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *); -static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL; void * __DarwinglXMesaProvider = NULL; typedef void (*GlxPushProviderPtr)(void *); GlxPushProviderPtr GlxPushProvider = NULL; -# endif +typedef void (*GlxExtensionInitPtr)(void); +typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *); +typedef Bool (*QuartzModeBundleInitPtr)(void); +static GlxExtensionInitPtr GlxExtensionInit = NULL; +static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL; +#else +void X11ControllerMain(int argc, char *argv[], + void (*server_thread) (void *), void *server_arg); +void GlxExtensionInit(void); +void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr); + +static void server_thread (void *arg) { + extern int main(int argc, char **argv, char **envp); + + exit (main (argcGlobal, argvGlobal, envpGlobal)); +} #endif /* @@ -87,7 +86,7 @@ void DarwinHandleGUI( int fd[2]; if (been_here) { -#ifdef INXDARWINAPP +#ifndef INXQUARTZ QuartzReadPreferences(); #endif return; @@ -124,27 +123,17 @@ void DarwinHandleGUI( } } -#ifdef INXQUARTZ - /* Initially I ran the X server on the main thread, and received - events on the second thread. But now we may be using Carbon, - that needs to run on the main thread. (Otherwise, when it's - prebound, it will initialize itself on the wrong thread) - - grr.. but doing that means that if the X thread gets scheduled - before the main thread when we're _not_ prebound, things fail, - so initialize by hand. */ +#ifndef INXQUARTZ + main_exit = NSApplicationMain(argc, argv); +#else extern void _InitHLTB(void); _InitHLTB(); - X11ControllerMain(argc, argv, server_thread, NULL); -#else - main_exit = NSApplicationMain(argc, argv); #endif exit(main_exit); } -#ifndef INXQUARTZ /* * QuartzLoadDisplayBundle * Try to load the appropriate bundle containing the back end display code. @@ -152,6 +141,7 @@ void DarwinHandleGUI( Bool QuartzLoadDisplayBundle( const char *dpyBundleName) { +#ifndef INXQUARTZ CFBundleRef mainBundle; CFStringRef bundleName; CFURLRef bundleURL; @@ -198,7 +188,7 @@ Bool QuartzLoadDisplayBundle( // Release the CF objects CFRelease(bundleName); CFRelease(bundleURL); - +#endif return TRUE; } @@ -248,7 +238,7 @@ static void LoadGlxBundle(void) // Find the GLX init functions - +#ifndef INXQUARTZ __DarwinglXMesaProvider = (void *) CFBundleGetDataPointerForName( glxBundle, CFSTR("__glXMesaProvider")); @@ -260,7 +250,7 @@ static void LoadGlxBundle(void) GlxWrapInitVisuals = (void *) CFBundleGetFunctionPointerForName( glxBundle, CFSTR("GlxWrapInitVisuals")); - +#endif if (!GlxExtensionInit || !GlxWrapInitVisuals) { FatalError("Could not initialize GLX bundle."); } @@ -277,16 +267,16 @@ Bool QuartzLoadDisplayBundle(const char *dpyBundleName) return TRUE; } -#endif - -#ifdef GLXEXT +/* + * DarwinGlxExtensionInit + * Initialize the GLX extension. + */ void DarwinGlxPushProvider(void *impl) { #ifndef INXQUARTZ if (!GlxExtensionInit) LoadGlxBundle(); #endif - GlxPushProvider(impl); } @@ -310,7 +300,7 @@ void DarwinGlxExtensionInit(void) void DarwinGlxWrapInitVisuals( miInitVisualsProcPtr *procPtr) { -#ifndef INXQUARTZ +#ifdef INXQUARTZ if (!GlxWrapInitVisuals) LoadGlxBundle(); #endif diff --git a/hw/darwin/quartz/xpr/Xplugin.h b/hw/darwin/quartz/xpr/Xplugin.h index a10b1b8e1..ff74e37d2 100644 --- a/hw/darwin/quartz/xpr/Xplugin.h +++ b/hw/darwin/quartz/xpr/Xplugin.h @@ -29,6 +29,7 @@ Note that these interfaces are provided solely for the use of the X11 server. Any other uses are unsupported and strongly discouraged. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/Xplugin.h,v 1.2 2003/05/02 00:08:49 torrey Exp $ */ #ifndef XPLUGIN_H #define XPLUGIN_H 1 diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c index ef68c867b..159ee726e 100644 --- a/hw/darwin/quartz/xpr/appledri.c +++ b/hw/darwin/quartz/xpr/appledri.c @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.10 2000/12/07 20:26:14 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index 08ee38221..acc152ef8 100644 --- a/hw/darwin/quartz/xpr/dri.c +++ b/hw/darwin/quartz/xpr/dri.c @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.34 2001/12/10 19:07:19 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -37,8 +38,17 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #endif +#ifdef HAVE_XORG_CONFIG_H +#include +#endif +#ifdef XFree86LOADER +#include "xf86.h" +#include "xf86_ansic.h" +#else #include #include +#endif +#include #define NEED_REPLIES #define NEED_EVENTS @@ -237,7 +247,7 @@ DRIFinishScreenInit(ScreenPtr pScreen) pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = DRIClipNotify; - ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum); + // ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum); return TRUE; } diff --git a/hw/darwin/quartz/xpr/dri.h b/hw/darwin/quartz/xpr/dri.h index cf2638a9f..f826167f6 100644 --- a/hw/darwin/quartz/xpr/dri.h +++ b/hw/darwin/quartz/xpr/dri.h @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/hw/darwin/quartz/xpr/dristruct.h b/hw/darwin/quartz/xpr/dristruct.h index 9a3d01c9b..0df8f1890 100644 --- a/hw/darwin/quartz/xpr/dristruct.h +++ b/hw/darwin/quartz/xpr/dristruct.h @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.10 2001/03/21 16:21:40 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/hw/darwin/quartz/xpr/x-hash.c b/hw/darwin/quartz/xpr/x-hash.c index 6bbeacfab..0491a5a4f 100644 --- a/hw/darwin/quartz/xpr/x-hash.c +++ b/hw/darwin/quartz/xpr/x-hash.c @@ -1,4 +1,5 @@ /* x-hash.c - basic hash tables + $Id: x-hash.c,v 1.7 2003/07/17 05:25:44 jharper Exp $ Copyright (c) 2002 Apple Computer, Inc. All rights reserved. @@ -26,6 +27,7 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/x-hash.c,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/xpr/x-hash.h b/hw/darwin/quartz/xpr/x-hash.h index 3456dbedf..599366ed9 100644 --- a/hw/darwin/quartz/xpr/x-hash.h +++ b/hw/darwin/quartz/xpr/x-hash.h @@ -26,6 +26,7 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/x-hash.h,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #ifndef X_HASH_H #define X_HASH_H 1 diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/darwin/quartz/xpr/x-hook.c index 42915db6f..215cb154a 100644 --- a/hw/darwin/quartz/xpr/x-hook.c +++ b/hw/darwin/quartz/xpr/x-hook.c @@ -26,6 +26,7 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ +/* $XFree86: $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/xpr/x-list.c b/hw/darwin/quartz/xpr/x-list.c index a5f835d84..c87045ee3 100644 --- a/hw/darwin/quartz/xpr/x-list.c +++ b/hw/darwin/quartz/xpr/x-list.c @@ -1,4 +1,5 @@ /* x-list.c + $Id: x-list.c,v 1.16 2003/07/18 00:52:19 jharper Exp $ Copyright (c) 2002 Apple Computer, Inc. All rights reserved. @@ -26,6 +27,7 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/x-list.c,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/xpr/x-list.h b/hw/darwin/quartz/xpr/x-list.h index 04af024a2..2b710703a 100644 --- a/hw/darwin/quartz/xpr/x-list.h +++ b/hw/darwin/quartz/xpr/x-list.h @@ -1,4 +1,5 @@ /* x-list.h -- simple list type + $Id: x-list.h,v 1.10 2003/07/18 00:52:19 jharper Exp $ Copyright (c) 2002 Apple Computer, Inc. All rights reserved. @@ -26,6 +27,7 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/x-list.h,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #ifndef X_LIST_H #define X_LIST_H 1 diff --git a/hw/darwin/quartz/xpr/xpr.h b/hw/darwin/quartz/xpr/xpr.h index 73a88c03d..5b02c6d39 100644 --- a/hw/darwin/quartz/xpr/xpr.h +++ b/hw/darwin/quartz/xpr/xpr.h @@ -26,6 +26,8 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/xpr/xpr.h,v 1.3 2005/07/01 22:43:08 daniels Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xpr.h,v 1.4 2003/11/12 20:21:52 torrey Exp $ */ #ifndef XPR_H #define XPR_H diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/darwin/quartz/xpr/xprAppleWM.c index fdf404c2d..c528836b4 100644 --- a/hw/darwin/quartz/xpr/xprAppleWM.c +++ b/hw/darwin/quartz/xpr/xprAppleWM.c @@ -27,6 +27,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index e7f23b78b..9f9abc2a9 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -30,6 +30,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprCursor.c,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index b71b2a606..b141e6285 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -27,6 +27,8 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/xpr/xprFrame.c,v 1.5 2005/07/01 22:43:08 daniels Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.4 2003/11/12 20:21:52 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 67a0737ef..73fa6f650 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -1,3 +1,4 @@ +/* $XdotOrg: xserver/xorg/hw/darwin/quartz/xpr/xprScreen.c,v 1.6 2005/07/01 22:43:08 daniels Exp $ */ /* * Xplugin rootless implementation screen functions */ @@ -27,6 +28,7 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.11 2004/07/15 18:53:25 torrey Exp $ */ #ifdef HAVE_XORG_CONFIG_H #include #endif @@ -177,15 +179,15 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height) frame = displayScreenBounds(dpy); - ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, + /* ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, (int)frame.size.width, (int)frame.size.height, - (int)frame.origin.x, (int)frame.origin.y); + (int)frame.origin.x, (int)frame.origin.y); */ frame.origin.x -= unionRect.origin.x; frame.origin.y -= unionRect.origin.y; - ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", - i, (int)frame.origin.x, (int)frame.origin.y); + /* ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", + i, (int)frame.origin.x, (int)frame.origin.y); */ PseudoramiXAddScreen(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); @@ -203,7 +205,7 @@ xprDisplayInit(void) { CGDisplayCount displayCount; - ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n"); + // ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n"); CGGetActiveDisplayList(0, NULL, &displayCount); diff --git a/hw/darwin/utils/dumpkeymap.c b/hw/darwin/utils/dumpkeymap.c index d2eeca5c2..c3e66e39f 100644 --- a/hw/darwin/utils/dumpkeymap.c +++ b/hw/darwin/utils/dumpkeymap.c @@ -1,3 +1,4 @@ +// $XFree86: dumpkeymap.c,v 1.3 2000/12/05 21:18:34 dawes Exp $ //============================================================================= // // Copyright (C) 1999,2000 by Eric Sunshine @@ -143,7 +144,7 @@ #include #include #if !defined(DUMPKEYMAP_FILE_ONLY) -#include +#include "event_status_driver.h" #endif #define PROG_NAME "dumpkeymap"