diff options
Diffstat (limited to 'hw/darwin/quartz')
-rw-r--r-- | hw/darwin/quartz/Preferences.m | 1 | ||||
-rw-r--r-- | hw/darwin/quartz/XApplication.m | 3 | ||||
-rw-r--r-- | hw/darwin/quartz/XDarwinStartup.man | 1 | ||||
-rw-r--r-- | hw/darwin/quartz/XServer.m | 1 | ||||
-rw-r--r-- | hw/darwin/quartz/applewm.c | 2 | ||||
-rw-r--r-- | hw/darwin/quartz/cr/XView.m | 1 | ||||
-rw-r--r-- | hw/darwin/quartz/cr/crAppleWM.m | 4 | ||||
-rw-r--r-- | hw/darwin/quartz/cr/crFrame.m | 4 | ||||
-rw-r--r-- | hw/darwin/quartz/cr/crScreen.m | 5 | ||||
-rw-r--r-- | hw/darwin/quartz/fullscreen/quartzCursor.h | 3 | ||||
-rw-r--r-- | hw/darwin/quartz/keysym2ucs.c | 3 | ||||
-rw-r--r-- | hw/darwin/quartz/quartz.c | 23 | ||||
-rw-r--r-- | hw/darwin/quartz/quartz.h | 3 | ||||
-rw-r--r-- | hw/darwin/quartz/quartzCocoa.m | 13 | ||||
-rw-r--r-- | hw/darwin/quartz/quartzCursor.h | 3 | ||||
-rw-r--r-- | hw/darwin/quartz/quartzKeyboard.c | 62 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/dri.c | 2 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/xprCursor.c | 13 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/xprFrame.c | 5 | ||||
-rw-r--r-- | hw/darwin/quartz/xpr/xprScreen.c | 31 |
20 files changed, 98 insertions, 85 deletions
diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m index 6fca3b655..0425392ae 100644 --- a/hw/darwin/quartz/Preferences.m +++ b/hw/darwin/quartz/Preferences.m @@ -30,7 +30,6 @@ * sale, use or other dealings in this Software without prior written * authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */ #include <dix-config.h> diff --git a/hw/darwin/quartz/XApplication.m b/hw/darwin/quartz/XApplication.m index e0ee8d9c6..c18d9a570 100644 --- a/hw/darwin/quartz/XApplication.m +++ b/hw/darwin/quartz/XApplication.m @@ -2,7 +2,7 @@ // XApplication.m // // Created by Andreas Monitzer on January 6, 2001. -// + /* * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. * @@ -30,7 +30,6 @@ * sale, use or other dealings in this Software without prior written * authorization. */ -/* $XFree86: $ */ #import "XApplication.h" diff --git a/hw/darwin/quartz/XDarwinStartup.man b/hw/darwin/quartz/XDarwinStartup.man index 9bf7dfabd..1ad3bbced 100644 --- a/hw/darwin/quartz/XDarwinStartup.man +++ b/hw/darwin/quartz/XDarwinStartup.man @@ -1,4 +1,3 @@ -.\" $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.man,v 1.1 2002/02/05 19:16:14 torrey Exp $ .TH XDarwinStartup 1 .SH NAME XDarwinStartup - Startup program for the XDarwin X window server diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m index 14776f888..f8173cb7f 100644 --- a/hw/darwin/quartz/XServer.m +++ b/hw/darwin/quartz/XServer.m @@ -34,7 +34,6 @@ * sale, use or other dealings in this Software without prior written * authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */ #include <dix-config.h> #include "quartzCommon.h" diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index 8b9f1ee81..fecafe8fb 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 diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m index 0cea250bb..8379f9476 100644 --- a/hw/darwin/quartz/cr/XView.m +++ b/hw/darwin/quartz/cr/XView.m @@ -29,7 +29,6 @@ * 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/cr/XView.m,v 1.1 2003/06/07 05:49:07 torrey Exp $ */ #include <dix-config.h> diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m index a583581dc..a0259c3f8 100644 --- a/hw/darwin/quartz/cr/crAppleWM.m +++ b/hw/darwin/quartz/cr/crAppleWM.m @@ -1,7 +1,6 @@ /* * Cocoa rootless implementation functions for AppleWM extension - */ -/* + * * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -26,7 +25,6 @@ * 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 $ */ #include <dix-config.h> diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m index 3c1f0bb28..79697fbac 100644 --- a/hw/darwin/quartz/cr/crFrame.m +++ b/hw/darwin/quartz/cr/crFrame.m @@ -1,7 +1,6 @@ /* * Cocoa rootless implementation frame functions - */ -/* + * * Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved. * @@ -27,7 +26,6 @@ * 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 $ */ #include <dix-config.h> diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m index 8c0966578..504e7b37a 100644 --- a/hw/darwin/quartz/cr/crScreen.m +++ b/hw/darwin/quartz/cr/crScreen.m @@ -1,8 +1,6 @@ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.4 2004/08/12 20:24:36 torrey Exp $ */ /* * Cocoa rootless implementation initialization - */ -/* + * * Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved. * @@ -28,7 +26,6 @@ * 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/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */ #include <dix-config.h> diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.h b/hw/darwin/quartz/fullscreen/quartzCursor.h index 57fac68a5..56a02098d 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.h +++ b/hw/darwin/quartz/fullscreen/quartzCursor.h @@ -2,8 +2,7 @@ * quartzCursor.h * * External interface for Quartz hardware cursor - */ -/* + * * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. * All Rights Reserved. * diff --git a/hw/darwin/quartz/keysym2ucs.c b/hw/darwin/quartz/keysym2ucs.c index 3be59df33..8626ebc4e 100644 --- a/hw/darwin/quartz/keysym2ucs.c +++ b/hw/darwin/quartz/keysym2ucs.c @@ -1,4 +1,5 @@ -/* +/* + * * This module converts keysym values into the corresponding ISO 10646 * (UCS, Unicode) values. * diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 2899bc2ca..61a752026 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -1,9 +1,7 @@ -/************************************************************** +/* * * Quartz-specific support for the Darwin X Server * - **************************************************************/ -/* * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons. * All Rights Reserved. * @@ -64,7 +62,7 @@ int quartzServerVisible = TRUE; int quartzServerQuitting = FALSE; DevPrivateKey quartzScreenKey = &quartzScreenKey; int aquaMenuBarHeight = 0; -int noPseudoramiXExtension = TRUE; +int noPseudoramiXExtension = FALSE; QuartzModeProcsPtr quartzProcs = NULL; const char *quartzOpenGLBundle = NULL; @@ -389,11 +387,22 @@ void DarwinModeProcessEvent( QuartzUpdateScreens(); break; - case kXDarwinWindowState: - case kXDarwinWindowMoved: - // FIXME: Not implemented yet + case kXDarwinBringAllToFront: + RootlessOrderAllWindows(); break; + case kXDarwinWindowState: + ErrorF("kXDarwinWindowState\n"); + break; + case kXDarwinWindowMoved: { + WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0; + short x = xe->u.clientMessage.u.l.longs1, + y = xe->u.clientMessage.u.l.longs2; + ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y); + RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove); + } + break; + default: ErrorF("Unknown application defined event type %d.\n", xe->u.u.type); diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h index f1b36b6b1..fa7499df1 100644 --- a/hw/darwin/quartz/quartz.h +++ b/hw/darwin/quartz/quartz.h @@ -3,8 +3,7 @@ * * External interface of the Quartz display modes seen by the generic, mode * independent parts of the Darwin X server. - */ -/* + * * Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons. * All Rights Reserved. * diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m index 5bc1501a6..3987cd2c2 100644 --- a/hw/darwin/quartz/quartzCocoa.m +++ b/hw/darwin/quartz/quartzCocoa.m @@ -1,4 +1,3 @@ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.2 2004/04/23 19:15:17 eich Exp $ */ /************************************************************** * * Quartz-specific support for the Darwin X Server @@ -7,8 +6,6 @@ * This file is separate from the parts of Quartz support * that use X include files to avoid symbol collisions. * - **************************************************************/ -/* * Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker. * All Rights Reserved. * @@ -34,7 +31,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/quartzCocoa.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */ + #include <dix-config.h> #include "quartzCommon.h" @@ -45,14 +42,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. @@ -98,7 +97,7 @@ void QuartzReadPreferences(void) darwinDesiredDepth = [Preferences depth] - 1; } - +#endif /* * QuartzWriteCocoaPasteboard @@ -163,6 +162,7 @@ char *QuartzReadCocoaPasteboard(void) int QuartzFSUseQDCursor( int depth) // screen depth { +#ifndef INXQUARTZ switch ([Preferences useQDCursor]) { case qdCursor_Always: return TRUE; @@ -174,6 +174,7 @@ int QuartzFSUseQDCursor( else return FALSE; } +#endif return TRUE; } diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/darwin/quartz/quartzCursor.h index 57fac68a5..56a02098d 100644 --- a/hw/darwin/quartz/quartzCursor.h +++ b/hw/darwin/quartz/quartzCursor.h @@ -2,8 +2,7 @@ * quartzCursor.h * * External interface for Quartz hardware cursor - */ -/* + * * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. * All Rights Reserved. * diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index f81ef0abc..b580a8e84 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -217,42 +217,41 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) const void *chr_data = NULL; int num_keycodes = NUM_KEYCODES; UInt32 keyboard_type = 0; - int is_uchr, i, j; + int is_uchr = 1, i, j; OSStatus err; KeySym *k; 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) + if (currentKeyLayoutRef) { - is_uchr = 1; - keyboard_type = LMGetKbdType (); + 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) + { + ErrorF ( "Couldn't get uchr or kchr resource\n"); + return FALSE; + } + + is_uchr = 0; + num_keycodes = 128; + } } - 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; - } - } /* Scan the keycode range for the Unicode character that each key produces in the four shift states. Then convert that to @@ -376,8 +375,7 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) } } } - - if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef); + if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef); return TRUE; } diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index 22dc21850..379d3c0e9 100644 --- a/hw/darwin/quartz/xpr/dri.c +++ b/hw/darwin/quartz/xpr/dri.c @@ -229,7 +229,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/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index 776dc005d..e3ae9e977 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -2,8 +2,6 @@ * * Xplugin cursor support * - **************************************************************/ -/* * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. * Copyright (c) 2002 Apple Computer, Inc. * All Rights Reserved. @@ -83,8 +81,17 @@ load_cursor(CursorPtr src, int screen) #ifdef ARGB_CURSOR if (src->bits->argb != NULL) { - rowbytes = src->bits->width * sizeof(CARD32); +#if BITMAP_BIT_ORDER == MSBFirst + rowbytes = src->bits->width * sizeof (CARD32); data = (uint32_t *) src->bits->argb; +#else + const uint32_t *be_data=(uint32_t *) src->bits->argb; + unsigned i; + rowbytes = src->bits->width * sizeof (CARD32); + data=alloca (rowbytes * src->bits->height); + for(i=0;i<(src->bits->width*src->bits->height);i++) + data[i]=ntohl(be_data[i]); +#endif } else #endif diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index c5b84f08b..0d12bf9ef 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -1,7 +1,6 @@ /* * Xplugin rootless implementation frame functions - */ -/* + * * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * @@ -411,7 +410,7 @@ xprInit(ScreenPtr pScreen) * Given the id of a physical window, try to find the top-level (or root) * X window that it represents. */ -static WindowPtr +WindowPtr xprGetXWindow(xp_window_id wid) { RootlessWindowRec *winRec; diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index b0ddece3f..709e6e8cc 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -1,7 +1,6 @@ /* * Xplugin rootless implementation screen functions - */ -/* + * * Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved. * @@ -46,6 +45,10 @@ # include "damage.h" #endif +/* 10.4's deferred update makes X slower.. have to live with the tearing + for now.. */ +#define XP_NO_DEFERRED_UPDATES 8 + // Name of GLX bundle for native OpenGL static const char *xprOpenGLBundle = "glxCGL.bundle"; @@ -60,10 +63,12 @@ eventHandler(unsigned int type, const void *arg, switch (type) { case XP_EVENT_DISPLAY_CHANGED: + // ErrorF("XP_EVENT_DISPLAY_MOVED\n"); QuartzMessageServerThread(kXDarwinDisplayChanged, 0); break; case XP_EVENT_WINDOW_STATE_CHANGED: + // ErrorF("XP_EVENT_WINDOW_STATE_CHANGED\n"); if (arg_size >= sizeof(xp_window_state_event)) { const xp_window_state_event *ws_arg = arg; @@ -74,16 +79,24 @@ eventHandler(unsigned int type, const void *arg, break; case XP_EVENT_WINDOW_MOVED: + // ErrorF("XP_EVENT_WINDOW_MOVED\n"); if (arg_size == sizeof(xp_window_id)) { xp_window_id id = * (xp_window_id *) arg; - - QuartzMessageServerThread(kXDarwinWindowMoved, 1, id); + WindowPtr pWin = xprGetXWindow(id); + BoxRec box; + xp_error retval = xp_get_window_bounds(id, &box); + if (retval != Success) { + ErrorF("Unable to find new bounds for window\n"); + break; + } + QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1); } break; case XP_EVENT_SURFACE_DESTROYED: case XP_EVENT_SURFACE_CHANGED: + // ErrorF("XP_EVENT_SURFACE_MOVED\n"); if (arg_size == sizeof(xp_surface_id)) { int kind; @@ -177,15 +190,15 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height) frame = displayScreenBounds(dpy); - ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, + /* ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, (int)frame.size.width, (int)frame.size.height, - (int)frame.origin.x, (int)frame.origin.y); + (int)frame.origin.x, (int)frame.origin.y); */ frame.origin.x -= unionRect.origin.x; frame.origin.y -= unionRect.origin.y; - ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", - i, (int)frame.origin.x, (int)frame.origin.y); + /* ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", + i, (int)frame.origin.x, (int)frame.origin.y); */ PseudoramiXAddScreen(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); @@ -203,7 +216,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); |