From 28ae09f3555f8d07deff4725477f21b50b07abad Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 23 Nov 2007 14:18:04 -0800 Subject: [PATCH] Darwin: Sync-up to master and xorg-server-1.2-apple where appropriate --- configure.ac | 2 - hw/darwin/Makefile.am | 96 ++++++++------- hw/darwin/darwin.c | 11 +- hw/darwin/darwin.h | 4 +- hw/darwin/quartz/Makefile.am | 36 +++--- hw/darwin/quartz/X11Application.h | 1 - hw/darwin/quartz/X11Controller.h | 3 +- hw/darwin/quartz/X11Controller.m | 11 +- hw/darwin/quartz/applewm.c | 8 +- hw/darwin/quartz/cr/Makefile.am | 23 ---- hw/darwin/quartz/cr/XView.m | 6 +- hw/darwin/quartz/cr/crAppleWM.m | 11 +- hw/darwin/quartz/cr/crFrame.m | 9 +- hw/darwin/quartz/cr/crScreen.m | 9 +- hw/darwin/quartz/fullscreen/Makefile.am | 12 -- hw/darwin/quartz/fullscreen/fullscreen.c | 7 +- hw/darwin/quartz/fullscreen/quartzCursor.c | 9 +- hw/darwin/quartz/keysym2ucs.h | 2 +- hw/darwin/quartz/pseudoramiX.c | 6 +- hw/darwin/quartz/quartz.c | 7 +- hw/darwin/quartz/quartzAudio.c | 5 +- hw/darwin/quartz/quartzCocoa.m | 5 +- hw/darwin/quartz/quartzCursor.c | 5 +- hw/darwin/quartz/quartzKeyboard.c | 7 +- hw/darwin/quartz/quartzPasteboard.c | 5 +- hw/darwin/quartz/quartzStartup.c | 13 +- hw/darwin/quartz/xpr/Makefile.am | 9 +- hw/darwin/quartz/xpr/appledri.c | 5 +- hw/darwin/quartz/xpr/dri.c | 6 +- hw/darwin/quartz/xpr/x-hash.c | 5 +- hw/darwin/quartz/xpr/x-hook.c | 5 +- hw/darwin/quartz/xpr/x-list.c | 5 +- hw/darwin/quartz/xpr/xprAppleWM.c | 5 +- hw/darwin/quartz/xpr/xprCursor.c | 5 +- hw/darwin/quartz/xpr/xprFrame.c | 5 +- hw/darwin/quartz/xpr/xprScreen.c | 7 +- hw/darwin/utils/Makefile.am | 2 - hw/darwin/utils/dumpkeymap.c | 2 +- hw/darwin/utils/event_status_driver.h | 133 --------------------- 39 files changed, 156 insertions(+), 351 deletions(-) delete mode 100644 hw/darwin/quartz/cr/Makefile.am delete mode 100644 hw/darwin/quartz/fullscreen/Makefile.am delete mode 100644 hw/darwin/utils/event_status_driver.h diff --git a/configure.ac b/configure.ac index e73d12beb..2cad02156 100644 --- a/configure.ac +++ b/configure.ac @@ -2152,8 +2152,6 @@ hw/xnest/Makefile hw/xwin/Makefile hw/darwin/Makefile hw/darwin/quartz/Makefile -hw/darwin/quartz/cr/Makefile -hw/darwin/quartz/fullscreen/Makefile hw/darwin/quartz/xpr/Makefile hw/darwin/utils/Makefile hw/kdrive/Makefile diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index 4a86fa3f7..62cbecf1d 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -1,61 +1,64 @@ -AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) -AM_CPPFLAGS = $(XORG_INCS) -DUSE_NEW_CLUT -DBUILD_DATE=\"$(BUILD_DATE)\" -DHAVE_XORG_CONFIG_H -DXFree86Server -DINXQUARTZ \ - -I$(top_srcdir)/fb \ - -I$(top_srcdir)/mi \ - -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/render \ - -I$(top_srcdir)/Xext +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) \ + -DINXQUARTZ \ + -DUSE_NEW_CLUT \ + -DXFree86Server \ + -I$(top_srcdir)/miext/rootless SUBDIRS = quartz utils bin_PROGRAMS = Xquartz man1_MANS = Xquartz.man -Xquartz_SOURCES = darwin.c \ - darwinEvents.c \ - darwinKeyboard.c \ - darwinXinput.c \ - $(top_srcdir)/fb/fbcmap_mi.c \ - $(top_srcdir)/mi/miinitext.c +Xquartz_SOURCES = \ + darwin.c \ + darwinEvents.c \ + darwinKeyboard.c \ + darwinXinput.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/mi/miinitext.c # We should probably add these once they're working, or are these obsolete and to be removed? # ./quartz/cr/libcr.a # ./quartz/fullscreen/libfullscreen.a -Xquartz_LDADD = ./quartz/libXquartz.a \ - ./quartz/xpr/libxpr.a \ - $(top_builddir)/dix/dixfonts.lo \ - $(top_builddir)/dix/libdix.la \ - $(top_builddir)/os/libos.la \ - $(top_builddir)/dix/libxpstubs.la \ - $(top_builddir)/miext/shadow/libshadow.la \ - $(top_builddir)/fb/libfb.la \ - $(top_builddir)/mi/libmi.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 \ - $(DARWIN_LIBS) $(XSERVER_LIBS) $(PIXMAN_LIBS) -lXplugin +Xquartz_LDADD = \ + ./quartz/libXquartz.a \ + ./quartz/xpr/libxpr.a \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/config/libconfig.a \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/os/libos.la \ + $(top_builddir)/dix/libxpstubs.la \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/fb/libfb.la \ + $(top_builddir)/mi/libmi.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 \ + $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -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 +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 if X11APP bin_SCRIPTS = x11app x11launcher @@ -80,6 +83,7 @@ x11launcher-clean: install-data-hook: x11app-install x11launcher-install clean-local: x11app-clean x11launcher-clean + endif EXTRA_DIST = \ diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index 80d879bea..b08770c10 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -3,8 +3,6 @@ * Shared code for the Darwin X Server * running with Quartz or IOKit display mode * - **************************************************************/ -/* * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2007 Apple Inc. * @@ -362,10 +360,11 @@ static int DarwinMouseProc( map[3] = 3; map[4] = 4; map[5] = 5; - InitPointerDeviceStruct((DevicePtr)pPointer, map, 5, - GetMotionHistory, - (PtrCtrlProcPtr)NoopDDA, - GetMotionHistorySize(), 2); + InitPointerDeviceStruct( (DevicePtr)pPointer, map, 5, + GetMotionHistory, + (PtrCtrlProcPtr)NoopDDA, + GetMotionHistorySize(), 2); + #ifdef XINPUT InitValuatorAxisStruct( pPointer, 0, // X axis diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index 14443b94f..a8c670b99 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -27,6 +27,8 @@ #ifndef _DARWIN_H #define _DARWIN_H +#include "dix-config.h" + #include #include "inputstr.h" #include "scrnintstr.h" @@ -48,7 +50,7 @@ typedef struct { // From darwin.c -void DarwinPrintBanner(); +void DarwinPrintBanner(void); int DarwinParseModifierList(const char *constmodifiers); void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo); void xf86SetRootClip (ScreenPtr pScreen, BOOL enable); diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am index d90b2bf58..54e6c30a7 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/darwin/quartz/Makefile.am @@ -1,28 +1,26 @@ noinst_LIBRARIES = libXQuartz.a -AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) -AM_OBJCFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) -AM_CPPFLAGS = $(XORG_INCS) -DXBINDIR=\"${bindir}\" -DHAS_KL_API -DHAVE_XORG_CONFIG_H \ +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +AM_OBJCFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) \ + -DHAS_KL_API \ -I$(srcdir) -I$(srcdir)/.. \ - -I$(top_srcdir)/fb \ - -I$(top_srcdir)/mi \ - -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/render + -I$(top_srcdir)/miext/rootless -SUBDIRS = cr fullscreen xpr +SUBDIRS = xpr libXQuartz_a_SOURCES = \ - X11Application.m \ - X11Controller.m \ - applewm.c \ - keysym2ucs.c \ - pseudoramiX.c \ - quartz.c \ - quartzAudio.c \ - quartzCocoa.m \ - quartzKeyboard.c \ - quartzPasteboard.c \ - quartzStartup.c + X11Application.m \ + X11Controller.m \ + applewm.c \ + keysym2ucs.c \ + pseudoramiX.c \ + quartz.c \ + quartzAudio.c \ + quartzCocoa.m \ + quartzKeyboard.c \ + quartzPasteboard.c \ + quartzStartup.c EXTRA_DIST = \ X11Application.h \ diff --git a/hw/darwin/quartz/X11Application.h b/hw/darwin/quartz/X11Application.h index fb153e750..861565798 100644 --- a/hw/darwin/quartz/X11Application.h +++ b/hw/darwin/quartz/X11Application.h @@ -1,5 +1,4 @@ /* X11Application.h -- subclass of NSApplication to multiplex events - $Id: X11Application.h,v 1.26 2003/08/08 19:16:13 jharper Exp $ Copyright (c) 2002-2007 Apple Inc. All rights reserved. diff --git a/hw/darwin/quartz/X11Controller.h b/hw/darwin/quartz/X11Controller.h index 954d0abb9..f1399dc49 100644 --- a/hw/darwin/quartz/X11Controller.h +++ b/hw/darwin/quartz/X11Controller.h @@ -1,5 +1,4 @@ /* X11Controller.h -- connect the IB ui - $Id: X11Controller.h,v 1.21 2003/07/24 17:52:29 jharper Exp $ Copyright (c) 2002 Apple Computer, Inc. All rights reserved. @@ -34,7 +33,7 @@ #if __OBJC__ #import -#include "../quartz/xpr/x-list.h" +#include "xpr/x-list.h" @interface X11Controller : NSObject { diff --git a/hw/darwin/quartz/X11Controller.m b/hw/darwin/quartz/X11Controller.m index df90049cf..6929566f7 100644 --- a/hw/darwin/quartz/X11Controller.m +++ b/hw/darwin/quartz/X11Controller.m @@ -1,5 +1,4 @@ /* X11Controller.m -- connect the IB ui, also the NSApp delegate - $Id: X11Controller.m,v 1.40 2006/09/06 21:19:32 jharper Exp $ Copyright (c) 2002-2007 Apple Inc. All rights reserved. @@ -30,7 +29,7 @@ #define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin" -#include "../quartz/quartzCommon.h" +#include "quartzCommon.h" #import "X11Controller.h" #import "X11Application.h" @@ -38,14 +37,12 @@ /* ouch! */ #define BOOL X_BOOL -//# include "Xproto.h" #include "opaque.h" # include "darwin.h" -# include "../quartz/quartz.h" +# include "quartz.h" # define _APPLEWM_SERVER_ # include "X11/extensions/applewm.h" -# include "../quartz/applewmExt.h" -//# include "X.h" +# include "applewmExt.h" #undef BOOL #include @@ -305,7 +302,7 @@ argv[4] = "-c"; argv[5] = command; argv[6] = NULL; - + /* Do the fork-twice trick to avoid having to reap zombies */ child1 = fork(); diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index 23463036a..20d1b4f82 100644 --- a/hw/darwin/quartz/applewm.c +++ b/hw/darwin/quartz/applewm.c @@ -24,9 +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 + #include "quartzCommon.h" #define NEED_REPLIES @@ -461,7 +461,7 @@ ProcAppleWMSetWindowMenuCheck( REQUEST(xAppleWMSetWindowMenuCheckReq); REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); - X11ApplicationSetWindowMenuCheck (stuff->index); + X11ApplicationSetWindowMenuCheck(stuff->index); return (client->noClientException); } diff --git a/hw/darwin/quartz/cr/Makefile.am b/hw/darwin/quartz/cr/Makefile.am deleted file mode 100644 index 03f2e2457..000000000 --- a/hw/darwin/quartz/cr/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -noinst_LIBRARIES = libcr.a -AM_CFLAGS = $(XORG_CFLAGS) -AM_OBJCFLAGS = $(XORG_CFLAGS) -AM_CPPFLAGS = -DDEFER_NSWINDOW \ - $(XORG_INCS) \ - -I../fullscreen \ - -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ - -I$(top_srcdir)/mi \ - -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/miext/rootless/safeAlpha \ - -I$(top_srcdir)/render \ - $(PIXMAN_CFLAGS) - -libcr_a_SOURCES = crAppleWM.m \ - crFrame.m \ - crScreen.m \ - ../fullscreen/quartzCursor.c \ - XView.m - -EXTRA_DIST = \ - cr.h \ - XView.h - diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m index 488f88a2f..8379f9476 100644 --- a/hw/darwin/quartz/cr/XView.m +++ b/hw/darwin/quartz/cr/XView.m @@ -30,11 +30,9 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif -#import "XView.h" +#include +#import "XView.h" @implementation XView diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m index da05fed60..a0259c3f8 100644 --- a/hw/darwin/quartz/cr/crAppleWM.m +++ b/hw/darwin/quartz/cr/crAppleWM.m @@ -26,11 +26,10 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif -#include "quartzCommon.h" -#include "cr.h" +#include + +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" #undef BOOL #define BOOL xBOOL @@ -38,7 +37,7 @@ #include "X11/X.h" #define _APPLEWM_SERVER_ #include "X11/extensions/applewm.h" -#include "applewmExt.h" +#include "quartz/applewmExt.h" #undef BOOL #define StdDocumentStyleMask (NSTitledWindowMask | \ diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m index f54afc99e..79697fbac 100644 --- a/hw/darwin/quartz/cr/crFrame.m +++ b/hw/darwin/quartz/cr/crFrame.m @@ -27,11 +27,10 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif -#include "quartzCommon.h" -#include "cr.h" +#include + +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" #undef BOOL #define BOOL xBOOL diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m index 0e358ab26..504e7b37a 100644 --- a/hw/darwin/quartz/cr/crScreen.m +++ b/hw/darwin/quartz/cr/crScreen.m @@ -27,11 +27,10 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif -#include "quartzCommon.h" -#include "cr.h" +#include + +#include "quartz/quartzCommon.h" +#include "quartz/cr/cr.h" #undef BOOL #define BOOL xBOOL diff --git a/hw/darwin/quartz/fullscreen/Makefile.am b/hw/darwin/quartz/fullscreen/Makefile.am deleted file mode 100644 index 510c0c28c..000000000 --- a/hw/darwin/quartz/fullscreen/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -noinst_LIBRARIES = libfullscreen.a -AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) -AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ - -I$(top_srcdir)/miext/damage \ - -I$(top_srcdir)/miext/shadow \ - -I$(top_srcdir)/mi - -libfullscreen_a_SOURCES = fullscreen.c \ - quartzCursor.c - -EXTRA_DIST = \ - quartzCursor.h diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c index ce3036fe1..2021ea2d3 100644 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ b/hw/darwin/quartz/fullscreen/fullscreen.c @@ -26,10 +26,9 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif -#include "quartzCommon.h" +#include + +#include "quartz/quartzCommon.h" #include "darwin.h" #include "quartz/quartz.h" #include "quartz/quartzCursor.h" diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index a5483ee00..52477817e 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -28,11 +28,10 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif -#include "quartzCommon.h" -#include "quartzCursor.h" +#include + +#include "quartz/quartzCommon.h" +#include "quartz/quartzCursor.h" #include "darwin.h" #include diff --git a/hw/darwin/quartz/keysym2ucs.h b/hw/darwin/quartz/keysym2ucs.h index e167d6a03..f5b7a18f2 100644 --- a/hw/darwin/quartz/keysym2ucs.h +++ b/hw/darwin/quartz/keysym2ucs.h @@ -1,4 +1,4 @@ -/* +/* * This module converts keysym values into the corresponding ISO 10646 * (UCS, Unicode) values. * diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index e65be69a0..787601b5d 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -34,9 +34,9 @@ Equipment Corporation. ******************************************************************/ #include "pseudoramiX.h" -#ifdef HAVE_XORG_CONFIG_H -#include -#endif + +#include + #include "extnsionst.h" #include "dixstruct.h" #include "window.h" diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index d1eb72431..c95880ceb 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -28,9 +28,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "quartzCommon.h" #include "quartz.h" #include "darwin.h" @@ -292,7 +291,7 @@ static void QuartzUpdateScreens(void) pRoot = WindowTable[pScreen->myNum]; AppleWMSetScreenOrigin(pRoot); pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL); - pScreen->PaintWindowBackground(pRoot, &pRoot->borderClip, PW_BACKGROUND); + miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); // QuartzIgnoreNextWarpCursor(); DefineInitialRootWindow(pRoot); diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c index 1980cd25f..8a337daba 100644 --- a/hw/darwin/quartz/quartzAudio.c +++ b/hw/darwin/quartz/quartzAudio.c @@ -36,9 +36,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "quartzCommon.h" #include "quartzAudio.h" diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m index bff3772d9..48cadc60c 100644 --- a/hw/darwin/quartz/quartzCocoa.m +++ b/hw/darwin/quartz/quartzCocoa.m @@ -6,7 +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. * @@ -33,9 +32,7 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include #include "quartzCommon.h" diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c index a5483ee00..15f555302 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -28,9 +28,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "quartzCommon.h" #include "quartzCursor.h" #include "darwin.h" diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index 79028efe8..49c5bfdcd 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -3,7 +3,7 @@ Code to build a keymap using the Carbon Keyboard Layout API. - Copyright (c) 2003-2007 Apple, Inc. + Copyright (c) 2003-2007 Apple Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files @@ -31,9 +31,8 @@ prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "quartzCommon.h" #include diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c index a3536fc56..213019747 100644 --- a/hw/darwin/quartz/quartzPasteboard.c +++ b/hw/darwin/quartz/quartzPasteboard.c @@ -30,9 +30,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "quartzPasteboard.h" #include diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c index 3c8412f2a..6f45949be 100644 --- a/hw/darwin/quartz/quartzStartup.c +++ b/hw/darwin/quartz/quartzStartup.c @@ -36,6 +36,7 @@ #include "opaque.h" #include "micmap.h" #include + char **envpGlobal; // argcGlobal and argvGlobal // are from dix/globals.c @@ -99,9 +100,19 @@ void DarwinHandleGUI( } } + + /* Initially I ran the X server on the main thread, and received + events on the second thread. But now we may be using Carbon, + that needs to run on the main thread. (Otherwise, when it's + prebound, it will initialize itself on the wrong thread) + + grr.. but doing that means that if the X thread gets scheduled + before the main thread when we're _not_ prebound, things fail, + so initialize by hand. */ + extern void _InitHLTB(void); - _InitHLTB(); + _InitHLTB(); X11ControllerMain(argc, argv, server_thread, NULL); exit(0); } diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/darwin/quartz/xpr/Makefile.am index 444ba5c6b..4fe6e23b6 100644 --- a/hw/darwin/quartz/xpr/Makefile.am +++ b/hw/darwin/quartz/xpr/Makefile.am @@ -1,15 +1,11 @@ noinst_LIBRARIES = libxpr.a -AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) \ -DHAVE_XORG_CONFIG_H \ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ - -I$(top_srcdir)/fb \ - -I$(top_srcdir)/mi \ -I$(top_srcdir)/miext \ - -I$(top_srcdir)/miext/damage \ -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/miext/rootless/safeAlpha \ - -I$(top_srcdir)/render + -I$(top_srcdir)/miext/rootless/safeAlpha libxpr_a_SOURCES = \ appledri.c \ @@ -32,4 +28,3 @@ EXTRA_DIST = \ x-list.h \ Xplugin.h \ xpr.h - diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c index 9b2e7b05e..45d1a7e0e 100644 --- a/hw/darwin/quartz/xpr/appledri.c +++ b/hw/darwin/quartz/xpr/appledri.c @@ -35,9 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #define NEED_REPLIES #define NEED_EVENTS #include diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index 70efca740..4ade24916 100644 --- a/hw/darwin/quartz/xpr/dri.c +++ b/hw/darwin/quartz/xpr/dri.c @@ -34,9 +34,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #ifdef XFree86LOADER #include "xf86.h" #include "xf86_ansic.h" @@ -44,7 +43,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #endif -#include #define NEED_REPLIES #define NEED_EVENTS diff --git a/hw/darwin/quartz/xpr/x-hash.c b/hw/darwin/quartz/xpr/x-hash.c index 62d1a990a..d24e05c1f 100644 --- a/hw/darwin/quartz/xpr/x-hash.c +++ b/hw/darwin/quartz/xpr/x-hash.c @@ -27,9 +27,8 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "x-hash.h" #include "x-list.h" #include diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/darwin/quartz/xpr/x-hook.c index 84bf44416..e38d0edc5 100644 --- a/hw/darwin/quartz/xpr/x-hook.c +++ b/hw/darwin/quartz/xpr/x-hook.c @@ -27,9 +27,8 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #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 2e74ae883..356bb79a4 100644 --- a/hw/darwin/quartz/xpr/x-list.c +++ b/hw/darwin/quartz/xpr/x-list.c @@ -27,9 +27,8 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "x-list.h" #include #include diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/darwin/quartz/xpr/xprAppleWM.c index 17d3600a4..f639b55fe 100644 --- a/hw/darwin/quartz/xpr/xprAppleWM.c +++ b/hw/darwin/quartz/xpr/xprAppleWM.c @@ -27,9 +27,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "xpr.h" #include "quartz/applewmExt.h" #include "rootless.h" diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index e45bd1fb3..9892bcddf 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -29,9 +29,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "quartz/quartzCommon.h" #include "xpr.h" #include "darwin.h" diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index 54b2035e1..ddb6d2dda 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -27,9 +27,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "xpr.h" #include "rootlessCommon.h" #include "Xplugin.h" diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index c8e30051b..b5f382ee5 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -27,9 +27,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif +#include + #include "quartz/quartzCommon.h" #include "quartz/quartz.h" #include "xpr.h" @@ -317,8 +316,6 @@ static Bool xprSetupScreen(int index, ScreenPtr pScreen) { // Add alpha protecting replacements for fb screen functions - pScreen->PaintWindowBackground = SafeAlphaPaintWindow; - pScreen->PaintWindowBorder = SafeAlphaPaintWindow; #ifdef RENDER { diff --git a/hw/darwin/utils/Makefile.am b/hw/darwin/utils/Makefile.am index 76cb7933d..911e14d53 100644 --- a/hw/darwin/utils/Makefile.am +++ b/hw/darwin/utils/Makefile.am @@ -8,6 +8,4 @@ man1_MANS = dumpkeymap.man EXTRA_DIST = \ README.txt \ - event_status_driver.h \ dumpkeymap.man - diff --git a/hw/darwin/utils/dumpkeymap.c b/hw/darwin/utils/dumpkeymap.c index 6a8b8b1fc..0c8bdcd01 100644 --- a/hw/darwin/utils/dumpkeymap.c +++ b/hw/darwin/utils/dumpkeymap.c @@ -143,7 +143,7 @@ #include #include #if !defined(DUMPKEYMAP_FILE_ONLY) -#include "event_status_driver.h" +#include #endif #define PROG_NAME "dumpkeymap" diff --git a/hw/darwin/utils/event_status_driver.h b/hw/darwin/utils/event_status_driver.h deleted file mode 100644 index 8948f3349..000000000 --- a/hw/darwin/utils/event_status_driver.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/****************************************************************************** - event_status_driver.h - API for the events status driver. - This file contains public API. - mpaque 11Oct91 - - Copyright 1991 NeXT Computer, Inc. - - Modified: - -******************************************************************************/ - -#ifndef _DRIVERS_EVENT_STATUS_DRIVER_ -#define _DRIVERS_EVENT_STATUS_DRIVER_ - -__BEGIN_DECLS - -#include -#include -#include -#include - -/* - * Event System Handle: - * - * Information used by the system between calls to NXOpenEventSystem and - * NXCloseEventSystem. The application should not - * access any of the elements of this structure. - */ -typedef mach_port_t NXEventHandle; - -/* Open and Close */ -NXEventHandle NXOpenEventStatus(void); -void NXCloseEventStatus(NXEventHandle handle); - -/* Status */ -extern NXEventSystemInfoType NXEventSystemInfo(NXEventHandle handle, - char *flavor, - int *evs_info, - unsigned int *evs_info_cnt); -/* Keyboard */ -extern void NXSetKeyRepeatInterval(NXEventHandle handle, double seconds); -extern double NXKeyRepeatInterval(NXEventHandle handle); -extern void NXSetKeyRepeatThreshold(NXEventHandle handle, double threshold); -extern double NXKeyRepeatThreshold(NXEventHandle handle); -extern void NXResetKeyboard(NXEventHandle handle); - -/* Mouse */ -extern void NXSetClickTime(NXEventHandle handle, double seconds); -extern double NXClickTime(NXEventHandle handle); -extern void NXSetClickSpace(NXEventHandle handle, _NXSize_ *area); -extern void NXGetClickSpace(NXEventHandle handle, _NXSize_ *area); -extern void NXResetMouse(NXEventHandle handle); - -/* DEPRECATED API */ - -/* NXIdleTime has been deprecated as this API does not take into account - events posted through the CG API set. Instead, we strongly encourage - developers to make use of the CGSSecondsSinceLastInputEvent API. */ -extern double NXIdleTime(NXEventHandle handle) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -/* These methods are NOT supported. */ -extern NXKeyMapping *NXSetKeyMapping(NXEventHandle h, NXKeyMapping *keymap) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern int NXKeyMappingLength(NXEventHandle handle) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern NXKeyMapping *NXGetKeyMapping(NXEventHandle h, NXKeyMapping *keymap) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -/* These methods are NOT supported and will return NULL values. */ -extern void NXSetMouseScaling(NXEventHandle handle, NXMouseScaling *scaling) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern void NXGetMouseScaling(NXEventHandle handle, NXMouseScaling *scaling) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern void NXSetAutoDimThreshold(NXEventHandle handle, double seconds) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern double NXAutoDimThreshold(NXEventHandle handle) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern double NXAutoDimTime(NXEventHandle handle) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern void NXSetAutoDimState(NXEventHandle handle, boolean_t dimmed) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern boolean_t NXAutoDimState(NXEventHandle handle) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern void NXSetAutoDimBrightness(NXEventHandle handle, double level) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern double NXAutoDimBrightness(NXEventHandle handle) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern void NXSetScreenBrightness(NXEventHandle handle, double level) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -extern double NXScreenBrightness(NXEventHandle handle) -AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4; - -/* END DEPRECATED API */ - -__END_DECLS - -#endif /*_DRIVERS_EVENT_STATUS_DRIVER_ */ -