diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index 542bfdb24..560cc3a9f 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -1,52 +1,314 @@ +noinst_LIBRARIES = libdarwinShared.a +libdarwin_XINPUT_SRCS = darwinXinput.c + +AM_CFLAGS = @XORG_CFLAGS@ +INCLUDES = @XORG_INCS@ -I../../miext/rootless + +DEFS = @DEFS@ -DUSE_NEW_CLUT + +if XQUARTZ +XQUARTZ_SUBDIRS = bundle quartz +endif + +SUBDIRS = \ + iokit \ + $(XQUARTZ_SUBDIRS) \ + utils \ + . + +darwinappdir = /Applications/Utilities/XDarwin.app + +libdarwinShared_a_SOURCES = darwin.c \ + darwinEvents.c \ + darwinKeyboard.c \ + $(darwin_XINPUT_SRCS) + +bin_PROGRAMS = Xquartz +XDarwin_SOURCES = \ + $(top_srcdir)/fb/fbcmap.c \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/Xi/stubs.c + +Xquartz_SOURCES = \ + $(top_srcdir)/fb/fbcmap.c \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/Xi/stubs.c \ + apple/X11Application.m \ + apple/X11Controller.m \ + quartz/applewm.c \ + quartz/keysym2ucs.c \ + quartz/pseudoramiX.c \ + quartz/quartz.c \ + quartz/quartzAudio.c \ + quartz/quartzCocoa.m \ + quartz/quartzKeyboard.c \ + quartz/quartzPasteboard.c \ + quartz/quartzStartup.c \ + 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 + +XDarwin_LDADD = \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(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 \ + $(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@ \ + -lXau -lXdmcp -lXfont -lfreetype + +Xquartz_LDADD = \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(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 \ + $(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@ \ + -lXau -lXdmcp -lXfont -lfreetype -lXplugin + +XDarwin_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,IOKit + +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 \ + -Wl,-framework,IOKit + +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 = +macos_SCRIPTS = x11app + +x11app: + cd apple && xcodebuild + +XDarwinApp_SOURCES = \ + $(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)/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 \ + $(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@ \ + -lXau -lXdmcp -lXfont -lfreetype \ + $(top_builddir)/fb/libfb.la + +XDarwinApp_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,Carbon \ + -Wl,-framework,ApplicationServices \ + -Wl,-framework,Cocoa \ + -Wl,-framework,CoreAudio \ + -Wl,-framework,IOKit + +HOOK_TARGETS = xquartz-install-hook + + +crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS +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 \ + -XCClinker -ObjC \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +cr_la_DEPENDENCIES = XDarwinApp + +fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS +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 \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +fullscreen_la_DEPENDENCIES = XDarwinApp + +if GLX +glxMesaplugindir = $(darwinappdir)/Contents/Resources/glxMesa.bundle/Contents/MacOS +glxMesaplugin_LTLIBRARIES = +glxMesa_la_SOURCES = +glxMesa_la_LIBADD = \ + $(top_builddir)/GL/glx/libglx.la \ + $(top_builddir)/GL/mesa/libGLcore.la +glxMesa_la_LDFLAGS = -shrext '' \ + -Wl,-framework,AGL \ + -Wl,-framework,OpenGL \ + -XCClinker -ObjC \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +glxMesa_la_DEPENDENCIES = XDarwinApp +endif + +endif +if HAVE_X_PLUGIN + +xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS +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 \ + -module -avoid-version -no-undefined +xpr_la_DEPENDENCIES = XDarwinApp + +endif + +if HAVE_AGL_FRAMEWORK +glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS +glxCGLplugin_LTLIBRARIES = +glxCGL_la_SOURCES = +glxCGL_la_LIBADD = \ + $(top_builddir)/GL/glx/glxext.o \ + $(top_builddir)/GL/glx/libglx.a \ + $(top_builddir)/GL/apple/libAGLcore.a +glxCGL_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ + -Wl,-framework,AGL \ + -Wl,-framework,OpenGL \ + -XCClinker -ObjC \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +glxCGL_la_DEPENDENCIES = XDarwinApp + + +glxAGLplugindir = $(darwinappdir)/Contents/Resources/glxAGL.bundle/Contents/MacOS +glxAGLplugin_LTLIBRARIES = +glxAGL_la_SOURCES = +glxAGL_la_LIBADD = \ + $(top_builddir)/GL/glx/glxext.o \ + $(top_builddir)/GL/glx/libglx.a \ + $(top_builddir)/GL/apple/libAGLcore.a +glxAGL_la_LDFLAGS = -shrext '' \ + -Wl,-framework,AGL \ + -Wl,-framework,OpenGL \ + -XCClinker -ObjC \ + -XCClinker -bundle_loader -XCClinker XDarwinApp \ + -module -avoid-version -no-undefined +glxAGL_la_DEPENDENCIES = XDarwinApp + + + +endif + +man1_MANS = XDarwin.man + +uninstall-hook: + rm -rf $(DESTDIR)$(macosdir)/XDarwin + +install-data-hook: $(HOOK_TARGETS) + +xquartz-install-hook: + cd apple && xcodebuild install + cd launcher && xcodebuild install + EXTRA_DIST = \ - bundle/Dutch.lproj/Credits.rtf \ - bundle/Dutch.lproj/Localizable.strings \ - bundle/Dutch.lproj/MainMenu.nib/classes.nib \ - bundle/Dutch.lproj/MainMenu.nib/objects.nib \ - bundle/Dutch.lproj/XDarwinHelp.html.cpp \ - bundle/English.lproj/Credits.rtf \ - bundle/English.lproj/InfoPlist.strings.cpp \ - bundle/English.lproj/Localizable.strings \ - bundle/English.lproj/MainMenu.nib/classes.nib \ - bundle/English.lproj/MainMenu.nib/objects.nib \ - bundle/English.lproj/XDarwinHelp.html.cpp \ - bundle/French.lproj/Credits.rtf \ - bundle/French.lproj/Localizable.strings \ - bundle/French.lproj/MainMenu.nib/classes.nib \ - bundle/French.lproj/MainMenu.nib/objects.nib \ - bundle/French.lproj/XDarwinHelp.html.cpp \ - bundle/German.lproj/Credits.rtf \ - bundle/German.lproj/Localizable.strings \ - bundle/German.lproj/MainMenu.nib/classes.nib \ - bundle/German.lproj/MainMenu.nib/objects.nib \ - bundle/German.lproj/XDarwinHelp.html.cpp \ - bundle/Japanese.lproj/Credits.rtf \ - bundle/Japanese.lproj/Localizable.strings \ - bundle/Japanese.lproj/MainMenu.nib/classes.nib \ - bundle/Japanese.lproj/MainMenu.nib/objects.nib \ - bundle/Japanese.lproj/XDarwinHelp.html.cpp \ - bundle/ko.lproj/Credits.rtf \ - bundle/ko.lproj/Localizable.strings \ - bundle/ko.lproj/MainMenu.nib/classes.nib \ - bundle/ko.lproj/MainMenu.nib/objects.nib \ - bundle/ko.lproj/XDarwinHelp.html.cpp \ - bundle/Portuguese.lproj/Credits.rtf \ - bundle/Portuguese.lproj/Localizable.strings \ - bundle/Portuguese.lproj/MainMenu.nib/classes.nib \ - bundle/Portuguese.lproj/MainMenu.nib/objects.nib \ - bundle/Portuguese.lproj/XDarwinHelp.html.cpp \ - bundle/Spanish.lproj/Credits.rtf \ - bundle/Spanish.lproj/Localizable.strings \ - bundle/Spanish.lproj/MainMenu.nib/classes.nib \ - bundle/Spanish.lproj/MainMenu.nib/objects.nib \ - bundle/Spanish.lproj/XDarwinHelp.html.cpp \ - bundle/startXClients.cpp \ - bundle/Swedish.lproj/Credits.rtf \ - bundle/Swedish.lproj/Localizable.strings \ - bundle/Swedish.lproj/MainMenu.nib/classes.nib \ - bundle/Swedish.lproj/MainMenu.nib/objects.nib \ - bundle/Swedish.lproj/XDarwinHelp.html.cpp \ - bundle/XDarwin.icns \ darwin.c \ darwinClut8.h \ darwinEvents.c \ @@ -54,64 +316,4 @@ EXTRA_DIST = \ darwinKeyboard.c \ darwinKeyboard.h \ darwinXinput.c \ - iokit/xfIOKit.c \ - iokit/xfIOKitCursor.c \ - iokit/xfIOKit.h \ - iokit/xfIOKitStartup.c \ - Makefile.am \ - quartz/applewm.c \ - quartz/applewmExt.h \ - quartz/cr/crAppleWM.m \ - quartz/cr/crFrame.m \ - quartz/cr/cr.h \ - quartz/cr/crScreen.m \ - quartz/cr/XView.h \ - quartz/cr/XView.m \ - quartz/fullscreen/fullscreen.c \ - quartz/fullscreen/quartzCursor.c \ - quartz/fullscreen/quartzCursor.h \ - quartz/keysym2ucs.c \ - quartz/keysym2ucs.h \ - quartz/Preferences.h \ - quartz/Preferences.m \ - quartz/pseudoramiX.c \ - quartz/pseudoramiX.h \ - quartz/quartzAudio.c \ - quartz/quartzAudio.h \ - quartz/quartz.c \ - quartz/quartzCocoa.m \ - quartz/quartzCommon.h \ - quartz/quartzCursor.c \ - quartz/quartzCursor.h \ - quartz/quartz.h \ - quartz/quartzKeyboard.c \ - quartz/quartzPasteboard.c \ - quartz/quartzPasteboard.h \ - quartz/quartzStartup.c \ - quartz/XApplication.h \ - quartz/XApplication.m \ - quartz/XDarwin.pbproj/project.pbxproj \ - quartz/XDarwinStartup.c \ - quartz/XDarwinStartup.man \ - quartz/xpr/appledri.c \ - quartz/xpr/dri.c \ - quartz/xpr/dri.h \ - quartz/xpr/dristruct.h \ - quartz/xpr/x-hash.c \ - quartz/xpr/x-hash.h \ - quartz/xpr/x-hook.c \ - quartz/xpr/x-hook.h \ - quartz/xpr/x-list.c \ - quartz/xpr/x-list.h \ - quartz/xpr/Xplugin.h \ - quartz/xpr/xprAppleWM.c \ - quartz/xpr/xprCursor.c \ - quartz/xpr/xprFrame.c \ - quartz/xpr/xpr.h \ - quartz/xpr/xprScreen.c \ - quartz/XServer.h \ - quartz/XServer.m \ - utils/dumpkeymap.c \ - utils/dumpkeymap.man \ - utils/README.txt \ XDarwin.man diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index bd9998976..c3b21c17e 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -30,6 +30,10 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + #include #include #include "os.h" @@ -79,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 @@ -123,81 +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"); -} + ErrorF("X11.app starting:\n"); + ErrorF("Xquartz server based on X.org %s, built on %s\n", XORG_RELEASE, BUILD_DATE ); + } /* @@ -349,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; } @@ -363,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 @@ -410,7 +326,7 @@ static int DarwinMouseProc( map, 5, // numbuttons (4 & 5 are scroll wheel) miPointerGetMotionEvents, - DarwinChangePointerControl, + (PtrCtrlProcPtr)NoopDDA, 0 ); #ifdef XINPUT InitValuatorAxisStruct( pPointer, @@ -633,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); */ } } } @@ -711,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"); } } @@ -916,7 +832,7 @@ void ddxUseMsg( void ) */ void ddxGiveUp( void ) { - ErrorF( "Quitting XDarwin...\n" ); + ErrorF( "Quitting Xquartz...\n" ); DarwinModeGiveUp(); } diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index cd572258c..48a2224f1 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -31,6 +31,7 @@ #include "inputstr.h" #include "scrnintstr.h" #include +#include typedef struct { void *framebuffer; diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 6b902df05..6b4f72721 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -128,23 +128,18 @@ static void DarwinUpdateModifiers( 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) { + // 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); - } - 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); } } diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index c148d96ce..2a10496fd 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -72,7 +72,7 @@ #include // For the NXSwap* #include "darwin.h" #include "darwinKeyboard.h" - +#include #define AltMask Mod1Mask #define MetaMask Mod2Mask #define FunctionMask Mod3Mask diff --git a/hw/darwin/darwinKeyboard.h b/hw/darwin/darwinKeyboard.h index f4a861186..368aee954 100644 --- a/hw/darwin/darwinKeyboard.h +++ b/hw/darwin/darwinKeyboard.h @@ -29,7 +29,7 @@ #define XK_TECHNICAL // needed to get XK_Escape #define XK_PUBLISHING -#include "keysym.h" +#include "X11/keysym.h" #include "inputstr.h" // Each key can generate 4 glyphs. They are, in order: diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c index 95a7fb32c..7f126c7dc 100644 --- a/hw/darwin/iokit/xfIOKit.c +++ b/hw/darwin/iokit/xfIOKit.c @@ -34,6 +34,10 @@ * use or other dealings in this Software without prior written authorization. */ +#if HAVE_XORG_CONFIG_H +#include +#endif + #include #include #include "os.h" @@ -51,6 +55,7 @@ #include #include #include +#include #include @@ -58,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/xfIOKitCursor.c b/hw/darwin/iokit/xfIOKitCursor.c index ef3e254d7..8388513a3 100644 --- a/hw/darwin/iokit/xfIOKitCursor.c +++ b/hw/darwin/iokit/xfIOKitCursor.c @@ -58,6 +58,9 @@ * use or other dealings in this Software without prior written authorization. */ +#if HAVE_XORG_CONFIG_H +#include +#endif #include "scrnintstr.h" #include "cursorstr.h" #include "mipointrst.h" @@ -67,7 +70,7 @@ #include #include "darwin.h" #include "xfIOKit.h" - +#include #define DUMP_DARWIN_CURSOR FALSE #define CURSOR_PRIV(pScreen) \ diff --git a/hw/darwin/iokit/xfIOKitStartup.c b/hw/darwin/iokit/xfIOKitStartup.c index 512793aa5..413d0625d 100644 --- a/hw/darwin/iokit/xfIOKitStartup.c +++ b/hw/darwin/iokit/xfIOKitStartup.c @@ -29,6 +29,10 @@ * use or other dealings in this Software without prior written authorization. */ +#if HAVE_XORG_CONFIG_H +#include +#endif + #include "darwin.h" #include "darwinKeyboard.h" #include "micmap.h" @@ -57,7 +61,9 @@ void DarwinHandleGUI( */ void DarwinGlxExtensionInit(void) { - GlxExtensionInit(); +#ifdef GLXEXT + GlxExtensionInit(); +#endif } @@ -67,7 +73,9 @@ void DarwinGlxExtensionInit(void) void DarwinGlxWrapInitVisuals( miInitVisualsProcPtr *procPtr) { +#ifdef GLXEXT GlxWrapInitVisuals(procPtr); +#endif } diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m index 6c14f4982..eb78fd32a 100644 --- a/hw/darwin/quartz/Preferences.m +++ b/hw/darwin/quartz/Preferences.m @@ -31,7 +31,9 @@ * authorization. */ /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */ - +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #import "quartzCommon.h" #define BOOL xBOOL @@ -44,7 +46,7 @@ // Macros to build the path name #ifndef XBINDIR -#define XBINDIR /usr/X11R6/bin +#define XBINDIR /usr/X11/bin #endif #define STR(s) #s #define XSTRPATH(s) STR(s) diff --git a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj index 90002db56..0ad831423 100644 --- a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj +++ b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj @@ -387,7 +387,7 @@ CFBundleIconFile XDarwin.icns CFBundleIdentifier - org.xfree86.XDarwin + org.x.x11 CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/hw/darwin/quartz/XDarwinStartup.c b/hw/darwin/quartz/XDarwinStartup.c index 8697776bf..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 @@ -48,7 +51,7 @@ // Macros to build the path name #ifndef XBINDIR -#define XBINDIR /usr/X11R6/bin +#define XBINDIR /usr/X11/bin #endif #define STR(s) #s #define XSTRPATH(s) STR(s) "/" @@ -124,7 +127,7 @@ int main( // Otherwise query LaunchServices for the location of the XDarwin application theStatus = LSFindApplicationForInfo(kLSUnknownCreator, - CFSTR("org.xfree86.XDarwin"), + CFSTR("org.x.x11"), NULL, NULL, &appURL); if (theStatus) { fprintf(stderr, "Could not find the XDarwin application. (Error = 0x%lx)\n", theStatus); diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m index a5a1011e9..058741522 100644 --- a/hw/darwin/quartz/XServer.m +++ b/hw/darwin/quartz/XServer.m @@ -34,20 +34,20 @@ * 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 #include "quartzCommon.h" #define BOOL xBOOL -#include "X.h" -#include "Xproto.h" +#include "X11/X.h" +#include "X11/Xproto.h" #include "os.h" #include "opaque.h" #include "darwin.h" #include "quartz.h" #define _APPLEWM_SERVER_ -#include "applewm.h" +#include "X11/extensions/applewm.h" #include "applewmExt.h" #undef BOOL @@ -830,13 +830,13 @@ static io_connect_t root_port; chdir(tem); /* Setup environment */ - snprintf(buf, sizeof(buf), ":%s", display); - setenv("DISPLAY", buf, TRUE); +// snprintf(buf, sizeof(buf), ":%s", display); +// setenv("DISPLAY", buf, TRUE); tem = getenv("PATH"); if (tem != NULL && tem[0] != NULL) - snprintf(buf, sizeof(buf), "%s:/usr/X11R6/bin", tem); + snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", tem); else - snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11R6/bin"); + snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11/bin"); setenv("PATH", buf, TRUE); execvp(argv[0], (char **const) argv); diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index 6db036f1b..78cf9df13 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 @@ -24,7 +24,9 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ - +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #include "quartzCommon.h" #define NEED_REPLIES @@ -43,7 +45,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "darwin.h" #define _APPLEWM_SERVER_ -#include "applewmstr.h" +#include "X11/extensions/applewmstr.h" #include "applewmExt.h" #define DEFINE_ATOM_HELPER(func,atom_name) \ @@ -443,9 +445,11 @@ ProcAppleWMSetWindowMenu( break; } } - +#ifdef INXQUARTZ + X11ApplicationSetWindowMenu (nitems, items, shortcuts); +#else QuartzSetWindowMenu (nitems, items, shortcuts); - +#endif free(items); free(shortcuts); @@ -460,10 +464,12 @@ ProcAppleWMSetWindowMenuCheck( REQUEST(xAppleWMSetWindowMenuCheckReq); REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); - +#ifdef INXQUARTZ + X11ApplicationSetWindowMenuCheck (stuff->index); +#else QuartzMessageMainThread(kQuartzSetWindowMenuCheck, &stuff->index, sizeof(stuff->index)); - +#endif return (client->noClientException); } @@ -474,8 +480,11 @@ ProcAppleWMSetFrontProcess( { REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq); +#ifdef INXQUARTZ + X11ApplicationSetFrontProcess(); +#else QuartzMessageMainThread(kQuartzSetFrontProcess, NULL, 0); - +#endif return (client->noClientException); } @@ -517,9 +526,12 @@ ProcAppleWMSetCanQuit( 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/XView.m b/hw/darwin/quartz/cr/XView.m index 5feac6b42..8bcd1a76f 100644 --- a/hw/darwin/quartz/cr/XView.m +++ b/hw/darwin/quartz/cr/XView.m @@ -30,7 +30,9 @@ * use or other dealings in this Software without prior written authorization. */ /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/XView.m,v 1.1 2003/06/07 05:49:07 torrey Exp $ */ - +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #import "XView.h" diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m index a2e97ff81..259c2d879 100644 --- a/hw/darwin/quartz/cr/crAppleWM.m +++ b/hw/darwin/quartz/cr/crAppleWM.m @@ -27,16 +27,18 @@ * 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 #include "quartzCommon.h" #include "cr.h" #undef BOOL #define BOOL xBOOL #include "rootless.h" -#include "X.h" +#include "X11/X.h" #define _APPLEWM_SERVER_ -#include "applewm.h" +#include "X11/extensions/applewm.h" #include "applewmExt.h" #undef BOOL diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m index 79d55a4d1..326910b68 100644 --- a/hw/darwin/quartz/cr/crFrame.m +++ b/hw/darwin/quartz/cr/crFrame.m @@ -27,9 +27,11 @@ * 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 "quartzCommon.h" #include "cr.h" diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m index 21a79e006..b78d1ea27 100644 --- a/hw/darwin/quartz/cr/crScreen.m +++ b/hw/darwin/quartz/cr/crScreen.m @@ -29,7 +29,9 @@ * use or other dealings in this Software without prior written authorization. */ /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */ - +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #include "quartzCommon.h" #include "cr.h" diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c index a4881f9d9..ed7f4c841 100644 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ b/hw/darwin/quartz/fullscreen/fullscreen.c @@ -25,7 +25,11 @@ * 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 "quartzCommon.h" #include "darwin.h" #include "quartz.h" diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index e2333e2ea..60a4c4d8a 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -29,7 +29,10 @@ * 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 "quartzCommon.h" #include "quartzCursor.h" #include "darwin.h" 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 ab57827d3..66b96624b 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -32,15 +32,21 @@ 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 +#include +#endif #include "extnsionst.h" #include "dixstruct.h" #include "window.h" #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 36a8bea08..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,14 +30,17 @@ * 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 #include "quartzCommon.h" #include "quartz.h" #include "darwin.h" #include "quartzAudio.h" #include "pseudoramiX.h" #define _APPLEWM_SERVER_ -#include "applewm.h" +#include "X11/extensions/applewm.h" #include "applewmExt.h" // X headers @@ -158,8 +162,11 @@ void DarwinModeInitInput( int argc, char **argv ) { +#ifdef INXQUARTZ + X11ApplicationServerReady(); +#else QuartzMessageMainThread(kQuartzServerStarted, NULL, 0); - +#endif // Do final display mode specific initialization before handling events if (quartzProcs->InitInput) quartzProcs->InitInput(argc, argv); @@ -272,7 +279,9 @@ static void QuartzHide(void) } } quartzServerVisible = FALSE; +#ifndef INXQUARTZ QuartzMessageMainThread(kQuartzServerHidden, NULL, 0); +#endif } 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 b477b037b..03f9cca9f 100644 --- a/hw/darwin/quartz/quartzAudio.c +++ b/hw/darwin/quartz/quartzAudio.c @@ -35,7 +35,10 @@ * 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 #include "quartzCommon.h" #include "quartzAudio.h" @@ -44,6 +47,7 @@ #include "inputstr.h" #include +#include void NSBeep(); 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 3cb191f22..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 @@ -35,6 +35,9 @@ * use or other dealings in this Software without prior written authorization. */ /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #include "quartzCommon.h" @@ -44,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. @@ -97,7 +102,7 @@ void QuartzReadPreferences(void) darwinDesiredDepth = [Preferences depth] - 1; } - +#endif /* * QuartzWriteCocoaPasteboard @@ -162,6 +167,7 @@ char *QuartzReadCocoaPasteboard(void) int QuartzFSUseQDCursor( int depth) // screen depth { +#ifndef INXQUARTZ switch ([Preferences useQDCursor]) { case qdCursor_Always: return TRUE; @@ -173,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 e2333e2ea..2f39887da 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -29,7 +29,11 @@ * 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 +#endif #include "quartzCommon.h" #include "quartzCursor.h" #include "darwin.h" diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/darwin/quartz/quartzCursor.h index 56cc94d49..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 @@ -36,6 +37,7 @@ #include "screenint.h" Bool QuartzInitCursor(ScreenPtr pScreen); +void QuartzReallySetCursor(void); void QuartzSuspendXCursor(ScreenPtr pScreen); void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y); diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index fc12522be..d23b68e39 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -32,14 +32,18 @@ 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 +#endif #include "quartzCommon.h" #include #include #include "darwinKeyboard.h" -#include "keysym.h" +#include "X11/keysym.h" #include "keysym2ucs.h" #ifdef HAS_KL_API @@ -214,35 +218,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 @@ -366,6 +379,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 e92fe5c79..7ae2e33a7 100644 --- a/hw/darwin/quartz/quartzPasteboard.c +++ b/hw/darwin/quartz/quartzPasteboard.c @@ -29,7 +29,11 @@ * 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 +#endif #include "quartzPasteboard.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 277e5935f..4df8f9443 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 @@ -37,21 +38,35 @@ #include "quartz.h" #include "opaque.h" #include "micmap.h" - -int NSApplicationMain(int argc, char *argv[]); - +#include char **envpGlobal; // argcGlobal and argvGlobal // are from dix/globals.c + +#ifndef INXQUARTZ +int NSApplicationMain(int argc, char *argv[]); + // GLX bundle function pointers +void * __DarwinglXMesaProvider = NULL; +typedef void (*GlxPushProviderPtr)(void *); +GlxPushProviderPtr GlxPushProvider = NULL; typedef void (*GlxExtensionInitPtr)(void); -static GlxExtensionInitPtr GlxExtensionInit = NULL; - typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *); -static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL; - 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 /* * DarwinHandleGUI @@ -71,7 +86,9 @@ void DarwinHandleGUI( int fd[2]; if (been_here) { +#ifndef INXQUARTZ QuartzReadPreferences(); +#endif return; } been_here = TRUE; @@ -106,11 +123,17 @@ void DarwinHandleGUI( } } +#ifndef INXQUARTZ main_exit = NSApplicationMain(argc, argv); +#else + extern void _InitHLTB(void); + + _InitHLTB(); + X11ControllerMain(argc, argv, server_thread, NULL); +#endif exit(main_exit); } - /* * QuartzLoadDisplayBundle * Try to load the appropriate bundle containing the back end display code. @@ -118,6 +141,7 @@ void DarwinHandleGUI( Bool QuartzLoadDisplayBundle( const char *dpyBundleName) { +#ifndef INXQUARTZ CFBundleRef mainBundle; CFStringRef bundleName; CFURLRef bundleURL; @@ -164,7 +188,7 @@ Bool QuartzLoadDisplayBundle( // Release the CF objects CFRelease(bundleName); CFRelease(bundleURL); - +#endif return TRUE; } @@ -186,7 +210,7 @@ static void LoadGlxBundle(void) // Choose the bundle to load ErrorF("Loading GLX bundle "); - if (quartzUseAGL) { + if (/*quartzUseAGL*/0) { bundleName = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, quartzOpenGLBundle, kCFStringEncodingASCII, @@ -213,12 +237,20 @@ static void LoadGlxBundle(void) } // Find the GLX init functions + +#ifndef INXQUARTZ + __DarwinglXMesaProvider = (void *) CFBundleGetDataPointerForName( + glxBundle, CFSTR("__glXMesaProvider")); + + GlxPushProvider = (void *) CFBundleGetFunctionPointerForName( + glxBundle, CFSTR("GlxPushProvider")); + GlxExtensionInit = (void *) CFBundleGetFunctionPointerForName( glxBundle, CFSTR("GlxExtensionInit")); GlxWrapInitVisuals = (void *) CFBundleGetFunctionPointerForName( glxBundle, CFSTR("GlxWrapInitVisuals")); - +#endif if (!GlxExtensionInit || !GlxWrapInitVisuals) { FatalError("Could not initialize GLX bundle."); } @@ -233,11 +265,25 @@ static void LoadGlxBundle(void) * DarwinGlxExtensionInit * Initialize the GLX extension. */ -void DarwinGlxExtensionInit(void) +void DarwinGlxPushProvider(void *impl) { +#ifndef INXQUARTZ if (!GlxExtensionInit) LoadGlxBundle(); +#endif + GlxPushProvider(impl); +} +/* + * DarwinGlxExtensionInit + * Initialize the GLX extension. + */ +void DarwinGlxExtensionInit(void) +{ +#ifndef INXQUARTZ + if (!GlxExtensionInit) + LoadGlxBundle(); +#endif GlxExtensionInit(); } @@ -248,9 +294,10 @@ void DarwinGlxExtensionInit(void) void DarwinGlxWrapInitVisuals( miInitVisualsProcPtr *procPtr) { +#ifdef INXQUARTZ if (!GlxWrapInitVisuals) LoadGlxBundle(); - +#endif GlxWrapInitVisuals(procPtr); } diff --git a/hw/darwin/quartz/xpr/Xplugin.h b/hw/darwin/quartz/xpr/Xplugin.h index fb6842c87..e2e97b4c8 100644 --- a/hw/darwin/quartz/xpr/Xplugin.h +++ b/hw/darwin/quartz/xpr/Xplugin.h @@ -30,6 +30,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 6d9bae10f..329c0d845 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. @@ -35,6 +36,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #define NEED_REPLIES #define NEED_EVENTS #include diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index 9aeaaa588..c788c202b 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. @@ -34,8 +35,17 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#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 @@ -234,7 +244,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 a7024b2da..0491a5a4f 100644 --- a/hw/darwin/quartz/xpr/x-hash.c +++ b/hw/darwin/quartz/xpr/x-hash.c @@ -1,5 +1,5 @@ /* x-hash.c - basic hash tables - $Id$ + $Id: x-hash.c,v 1.7 2003/07/17 05:25:44 jharper Exp $ Copyright (c) 2002 Apple Computer, Inc. All rights reserved. @@ -27,7 +27,10 @@ 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 #include "x-hash.h" #include "x-list.h" #include diff --git a/hw/darwin/quartz/xpr/x-hash.h b/hw/darwin/quartz/xpr/x-hash.h index 5d4f7f93a..97d4cc40c 100644 --- a/hw/darwin/quartz/xpr/x-hash.h +++ b/hw/darwin/quartz/xpr/x-hash.h @@ -27,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.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 dcd34fdc5..7a0496763 100644 --- a/hw/darwin/quartz/xpr/x-hook.c +++ b/hw/darwin/quartz/xpr/x-hook.c @@ -28,7 +28,9 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ /* $XFree86: $ */ - +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #include "x-hook.h" #include #include diff --git a/hw/darwin/quartz/xpr/x-list.c b/hw/darwin/quartz/xpr/x-list.c index b9f23928b..c87045ee3 100644 --- a/hw/darwin/quartz/xpr/x-list.c +++ b/hw/darwin/quartz/xpr/x-list.c @@ -1,5 +1,5 @@ /* x-list.c - $Id$ + $Id: x-list.c,v 1.16 2003/07/18 00:52:19 jharper Exp $ Copyright (c) 2002 Apple Computer, Inc. All rights reserved. @@ -27,7 +27,10 @@ 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 #include "x-list.h" #include #include diff --git a/hw/darwin/quartz/xpr/x-list.h b/hw/darwin/quartz/xpr/x-list.h index bd55a53d0..2b710703a 100644 --- a/hw/darwin/quartz/xpr/x-list.h +++ b/hw/darwin/quartz/xpr/x-list.h @@ -1,5 +1,5 @@ /* x-list.h -- simple list type - $Id$ + $Id: x-list.h,v 1.10 2003/07/18 00:52:19 jharper Exp $ Copyright (c) 2002 Apple Computer, Inc. All rights reserved. @@ -27,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 21746f6e9..3f5af2c22 100644 --- a/hw/darwin/quartz/xpr/xprAppleWM.c +++ b/hw/darwin/quartz/xpr/xprAppleWM.c @@ -27,9 +27,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/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif #include "xpr.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #include "rootless.h" #include "Xplugin.h" #include diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index cb949dadc..9f9abc2a9 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -30,8 +30,11 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ - -#include "quartzCommon.h" +/* $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 +#include "quartz/quartzCommon.h" #include "xpr.h" #include "darwin.h" #include "Xplugin.h" diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index ed02d4b62..b141e6285 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -27,13 +27,17 @@ * 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 #include "xpr.h" #include "rootlessCommon.h" #include "Xplugin.h" #include "x-hash.h" #include "x-list.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #include "propertyst.h" #include "dix.h" diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 1755ca6f7..1aebefed3 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,18 +28,21 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ - -#include "quartzCommon.h" -#include "quartz.h" +/* $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 +#include "quartz/quartzCommon.h" +#include "quartz/quartz.h" #include "xpr.h" -#include "pseudoramiX.h" +#include "quartz/pseudoramiX.h" #include "darwin.h" #include "rootless.h" -#include "safeAlpha.h" +#include "safeAlpha/safeAlpha.h" #include "dri.h" #include "globals.h" #include "Xplugin.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #ifdef DAMAGE # include "damage.h" @@ -179,15 +183,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); @@ -206,7 +210,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"