merged the rest of Apple patches to xserver

This commit is contained in:
Ben Byer 2007-10-27 01:38:31 -07:00 committed by Jeremy Huddleston
parent d300f631fc
commit e6253d49e0
51 changed files with 641 additions and 331 deletions

View File

@ -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

View File

@ -30,6 +30,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <X11/X.h>
#include <X11/Xproto.h>
#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();
}

View File

@ -31,6 +31,7 @@
#include "inputstr.h"
#include "scrnintstr.h"
#include <X11/extensions/XKB.h>
#include <assert.h>
typedef struct {
void *framebuffer;

View File

@ -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);
}
}

View File

@ -72,7 +72,7 @@
#include <architecture/byte_order.h> // For the NXSwap*
#include "darwin.h"
#include "darwinKeyboard.h"
#include <assert.h>
#define AltMask Mod1Mask
#define MetaMask Mod2Mask
#define FunctionMask Mod3Mask

View File

@ -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:

View File

@ -34,6 +34,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#if HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <X11/X.h>
#include <X11/Xproto.h>
#include "os.h"
@ -51,6 +55,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <pthread.h>
#include <assert.h>
#include <mach/mach_interface.h>
@ -58,7 +63,6 @@
#include <IOKit/IOKitLib.h>
#include <IOKit/hidsystem/IOHIDShared.h>
#include <IOKit/graphics/IOGraphicsLib.h>
#include <drivers/event_status_driver.h>
// Define this to work around bugs in the display drivers for
// older PowerBook G3's. If the X server starts without this

View File

@ -58,6 +58,9 @@
* use or other dealings in this Software without prior written authorization.
*/
#if HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "scrnintstr.h"
#include "cursorstr.h"
#include "mipointrst.h"
@ -67,7 +70,7 @@
#include <IOKit/hidsystem/IOHIDLib.h>
#include "darwin.h"
#include "xfIOKit.h"
#include <assert.h>
#define DUMP_DARWIN_CURSOR FALSE
#define CURSOR_PRIV(pScreen) \

View File

@ -29,6 +29,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#if HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#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
}

View File

@ -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 <xorg-config.h>
#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)

View File

@ -387,7 +387,7 @@
<key>CFBundleIconFile</key>
<string>XDarwin.icns</string>
<key>CFBundleIdentifier</key>
<string>org.xfree86.XDarwin</string>
<string>org.x.x11</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@ -38,6 +38,9 @@
* dealings in this Software without prior written authorization from
* Torrey T. Lyons.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <unistd.h>
#include <stdio.h>
@ -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);

View File

@ -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 <xorg-config.h>
#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);

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
#define NEED_REPLIES
@ -43,7 +45,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <X11/Xatom.h>
#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);
}

View File

@ -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 <xorg-config.h>
#endif
#import "XView.h"

View File

@ -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 <xorg-config.h>
#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

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "cr.h"

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "cr.h"

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "darwin.h"
#include "quartz.h"

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "quartzCursor.h"
#include "darwin.h"

View File

@ -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

View File

@ -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 <xorg-config.h>
#endif
#include "extnsionst.h"
#include "dixstruct.h"
#include "window.h"
#include <X11/extensions/panoramiXproto.h>
#include "globals.h"
extern int noPseudoramiXExtension;
extern int noPanoramiXExtension;
extern int ProcPanoramiXQueryVersion (ClientPtr client);
static void PseudoramiXResetProc(ExtensionEntry *extEntry);

View File

@ -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;

View File

@ -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 <xorg-config.h>
#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
}

View File

@ -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

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "quartzAudio.h"
@ -44,6 +47,7 @@
#include "inputstr.h"
#include <X11/extensions/XI.h>
#include <assert.h>
void NSBeep();

View File

@ -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

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
@ -44,14 +47,16 @@
#include <Cocoa/Cocoa.h>
#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;
}

View File

@ -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

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "quartzCursor.h"
#include "darwin.h"

View File

@ -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);

View File

@ -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 <xorg-config.h>
#endif
#include "quartzCommon.h"
#include <CoreServices/CoreServices.h>
#include <Carbon/Carbon.h>
#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;
}

View File

@ -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 <xorg-config.h>
#endif
#include "quartzPasteboard.h"
#include <X11/Xatom.h>

View File

@ -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 */

View File

@ -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 <fcntl.h>
#include <unistd.h>
@ -37,21 +38,35 @@
#include "quartz.h"
#include "opaque.h"
#include "micmap.h"
int NSApplicationMain(int argc, char *argv[]);
#include <assert.h>
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);
}

View File

@ -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

View File

@ -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 <xorg-config.h>
#endif
#define NEED_REPLIES
#define NEED_EVENTS
#include <X11/X.h>

View File

@ -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 <xorg-config.h>
#endif
#ifdef XFree86LOADER
#include "xf86.h"
#include "xf86_ansic.h"
#else
#include <sys/time.h>
#include <unistd.h>
#endif
#include <dix-config.h>
#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;
}

View File

@ -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.

View File

@ -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.

View File

@ -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 <xorg-config.h>
#endif
#include "x-hash.h"
#include "x-list.h"
#include <stdlib.h>

View File

@ -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

View File

@ -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 <xorg-config.h>
#endif
#include "x-hook.h"
#include <stdlib.h>
#include <assert.h>

View File

@ -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 <xorg-config.h>
#endif
#include "x-list.h"
#include <stdlib.h>
#include <assert.h>

View File

@ -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

View File

@ -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

View File

@ -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 <xorg-config.h>
#endif
#include "xpr.h"
#include "applewmExt.h"
#include "quartz/applewmExt.h"
#include "rootless.h"
#include "Xplugin.h"
#include <X11/X.h>

View File

@ -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 <xorg-config.h>
#endif
#include "quartz/quartzCommon.h"
#include "xpr.h"
#include "darwin.h"
#include "Xplugin.h"

View File

@ -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 <xorg-config.h>
#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"

View File

@ -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 <xorg-config.h>
#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);

View File

@ -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 <sunshine@sunshineco.com>
@ -143,7 +144,7 @@
#include <string.h>
#include <sys/stat.h>
#if !defined(DUMPKEYMAP_FILE_ONLY)
#include <drivers/event_status_driver.h>
#include "event_status_driver.h"
#endif
#define PROG_NAME "dumpkeymap"