summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/darwin/darwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/darwin/darwin.c')
-rw-r--r--xc/programs/Xserver/hw/darwin/darwin.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/xc/programs/Xserver/hw/darwin/darwin.c b/xc/programs/Xserver/hw/darwin/darwin.c
index ff82621cc..ff5ae1b33 100644
--- a/xc/programs/Xserver/hw/darwin/darwin.c
+++ b/xc/programs/Xserver/hw/darwin/darwin.c
@@ -29,7 +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/darwin.c,v 1.46 2002/10/12 00:32:43 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.50 2003/02/26 09:21:33 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -44,6 +44,7 @@
#include "site.h"
#include "globals.h"
#include "xf86Version.h"
+#include "xf86Date.h"
#include "dix.h"
#include <sys/types.h>
@@ -67,7 +68,7 @@
*/
int darwinScreensFound = 0;
int darwinScreenIndex = 0;
-DarwinInputRec hid;
+io_connect_t darwinParamConnect = 0;
int darwinEventFD = -1;
Bool quartz = FALSE;
int quartzMouseAccelChange = 1;
@@ -201,26 +202,25 @@ static Bool DarwinAddScreen(
if (! ret)
return FALSE;
- bitsPerRGB = dfb->pixelInfo.bitsPerComponent;
+ bitsPerRGB = dfb->bitsPerComponent;
// reset the visual list
miClearVisualTypes();
// setup a single visual appropriate for our pixel type
- // Note: Darwin kIORGBDirectPixels = X TrueColor, not DirectColor
- if (dfb->pixelInfo.pixelType == kIORGBDirectPixels) {
+ if (dfb->colorType == TrueColor) {
if (!miSetVisualTypes( dfb->colorBitsPerPixel, TrueColorMask,
- bitsPerRGB, TrueColor )) {
+ bitsPerRGB, TrueColor )) {
return FALSE;
}
- } else if (dfb->pixelInfo.pixelType == kIOCLUTPixels) {
+ } else if (dfb->colorType == PseudoColor) {
if (!miSetVisualTypes( dfb->colorBitsPerPixel, PseudoColorMask,
- bitsPerRGB, PseudoColor )) {
+ bitsPerRGB, PseudoColor )) {
return FALSE;
}
- } else if (dfb->pixelInfo.pixelType == kIOFixedCLUTPixels) {
+ } else if (dfb->colorType == StaticColor) {
if (!miSetVisualTypes( dfb->colorBitsPerPixel, StaticColorMask,
- bitsPerRGB, StaticColor )) {
+ bitsPerRGB, StaticColor )) {
return FALSE;
}
} else {
@@ -255,15 +255,9 @@ static Bool DarwinAddScreen(
visual->offsetRed = bitsPerRGB * 2;
visual->offsetGreen = bitsPerRGB;
visual->offsetBlue = 0;
-#if TRUE
visual->redMask = ((1<<bitsPerRGB)-1) << visual->offsetRed;
visual->greenMask = ((1<<bitsPerRGB)-1) << visual->offsetGreen;
visual->blueMask = ((1<<bitsPerRGB)-1) << visual->offsetBlue;
-#else
- visual->redMask = dfb->pixelInfo.componentMasks[0];
- visual->greenMask = dfb->pixelInfo.componentMasks[1];
- visual->blueMask = dfb->pixelInfo.componentMasks[2];
-#endif
}
}
}
@@ -303,7 +297,7 @@ static Bool DarwinAddScreen(
* to Darwin/x86 in 8-bit mode.
*/
if( (dfb->colorBitsPerPixel == 8) &&
- (dfb->pixelInfo.pixelType == kIOFixedCLUTPixels) )
+ (dfb->colorType == StaticColor) )
{
pmap = miInstalledMaps[pScreen->myNum];
visual = pmap->pVisual;
@@ -347,7 +341,7 @@ static void DarwinChangePointerControl(
return;
acceleration = ctrl->num / ctrl->den;
- kr = IOHIDSetMouseAcceleration( hid.paramConnect, acceleration );
+ kr = IOHIDSetMouseAcceleration( darwinParamConnect, acceleration );
if (kr != KERN_SUCCESS)
ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr );
}
@@ -536,6 +530,12 @@ void InitInput( int argc, char **argv )
RegisterKeyboardDevice( darwinKeyboard );
DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer );
+
+ if (quartz) {
+ QuartzInitInput(argc, argv);
+ } else {
+ XFIOKitInitInput(argc, argv);
+ }
}