xserver: Branch 'glucose-2' - 130 commits

Alan Hourihane alanh at kemper.freedesktop.org
Wed Aug 20 02:54:21 PDT 2008


 Xext/panoramiX.c                                                  |   12 
 Xi/exglobals.h                                                    |    2 
 Xi/extinit.c                                                      |   93 
 Xi/querydp.c                                                      |    6 
 Xi/xiproperty.c                                                   |   80 
 configure.ac                                                      |   30 
 dix/devices.c                                                     |    3 
 dix/getevents.c                                                   |    1 
 dix/main.c                                                        |    2 
 dix/window.c                                                      |  159 -
 exa/exa.c                                                         |   47 
 exa/exa_glyphs.c                                                  |    5 
 exa/exa_priv.h                                                    |    6 
 glx/glxcmds.c                                                     |   12 
 hw/kdrive/src/kdrive.c                                            |   13 
 hw/xfree86/common/Makefile.am                                     |    2 
 hw/xfree86/common/xf86.h                                          |    1 
 hw/xfree86/common/xf86Config.c                                    |   50 
 hw/xfree86/common/xf86Events.c                                    |   46 
 hw/xfree86/common/xf86Globals.c                                   |    8 
 hw/xfree86/common/xf86Helper.c                                    |   20 
 hw/xfree86/common/xf86Init.c                                      |   70 
 hw/xfree86/common/xf86Module.h                                    |    1 
 hw/xfree86/common/xf86Priv.h                                      |    4 
 hw/xfree86/common/xf86Privstr.h                                   |   30 
 hw/xfree86/common/xf86Version.h                                   |   56 
 hw/xfree86/common/xf86str.h                                       |    2 
 hw/xfree86/common/xisb.c                                          |    1 
 hw/xfree86/dixmods/xkbPrivate.c                                   |    4 
 hw/xfree86/int10/xf86int10.c                                      |   28 
 hw/xfree86/loader/dixsym.c                                        |    2 
 hw/xfree86/loader/xf86sym.c                                       |    1 
 hw/xfree86/os-support/Makefile.am                                 |    5 
 hw/xfree86/os-support/assyntax.h                                  |  749 -------
 hw/xfree86/os-support/bsd/Makefile.am                             |    1 
 hw/xfree86/os-support/bsd/bsdResource.c                           |   92 
 hw/xfree86/os-support/bus/Makefile.am                             |    8 
 hw/xfree86/os-support/bus/Pci.c                                   |   24 
 hw/xfree86/os-support/bus/Pci.h                                   |   37 
 hw/xfree86/os-support/bus/bsd_pci.c                               |    2 
 hw/xfree86/os-support/bus/ix86Pci.c                               |  468 +---
 hw/xfree86/os-support/bus/linuxPci.c                              |   17 
 hw/xfree86/os-support/bus/ppcPci.c                                |   82 
 hw/xfree86/os-support/bus/sparcPci.c                              |  979 ----------
 hw/xfree86/os-support/linux/Makefile.am                           |    3 
 hw/xfree86/os-support/linux/lnxResource.c                         |  105 -
 hw/xfree86/os-support/misc/BUSmemcpy.S                            |  153 -
 hw/xfree86/os-support/misc/IODelay.S                              |   53 
 hw/xfree86/os-support/misc/Makefile.am                            |   15 
 hw/xfree86/os-support/misc/PortIO.S                               |   57 
 hw/xfree86/os-support/misc/SlowBcopy.S                            |  108 -
 hw/xfree86/os-support/misc/xf86_IlHack.c                          |   16 
 hw/xfree86/os-support/shared/inout.S                              |  111 -
 hw/xfree86/xaa/Makefile.am                                        |    2 
 hw/xfree86/xaa/xaaTEGlyphBlt.S                                    |  964 ---------
 hw/xquartz/X11Application.m                                       |    2 
 hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib |   10 
 hw/xquartz/darwin.c                                               |   13 
 hw/xquartz/darwinEvents.c                                         |  114 -
 include/opaque.h                                                  |    1 
 include/windowstr.h                                               |   19 
 mi/mi.h                                                           |   10 
 mi/miexpose.c                                                     |    4 
 mi/mioverlay.c                                                    |   44 
 mi/miscrinit.c                                                    |    4 
 mi/misprite.c                                                     |   44 
 mi/mispritest.h                                                   |   20 
 mi/miwindow.c                                                     |  257 --
 os/connection.c                                                   |    4 
 os/utils.c                                                        |    3 
 70 files changed, 426 insertions(+), 4971 deletions(-)

New commits:
commit 9e7b29987fb6370333f4da2d4b91912fd8a29fb9
Merge: 2846c38... bc4cef1...
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Wed Aug 20 10:54:07 2008 +0100

    Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into glucose-2
    
    Conflicts:
    
    	configure.ac
    	glx/glxcmds.c
    	hw/xfree86/Makefile.am
    	hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
    	hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib

commit bc4cef1d0ae7cbb8f5fe16d576db45abd4330370
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Mon Aug 18 16:28:33 2008 +0200

    exa: remove useless cache{X,Y}off from UploadToScreen() arguments.

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index ff665d5..59ef394 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -389,9 +389,10 @@ exaGlyphCacheUploadGlyph(ScreenPtr         pScreen,
     if (!pCachePixmap)
 	return FALSE;
 
+    /* CACHE_{X,Y} are in pixmap coordinates, no need for cache{X,Y}off */
     if (!pExaScr->info->UploadToScreen(pCachePixmap,
-				       CACHE_X(pos) + cacheXoff,
-				       CACHE_Y(pos) + cacheYoff,
+				       CACHE_X(pos),
+				       CACHE_Y(pos),
 				       pGlyph->info.width,
 				       pGlyph->info.height,
 				       (char *)pExaPixmap->sys_ptr,
commit 38bdc34d555f956a1ff1e1bb8eef95e3ba2bac64
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 15:12:39 2008 -0400

    Remove redundant check.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 88c5a87..01f2395 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -878,15 +878,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
       }
     }
 
-    /*
-     * If no screens left, return now.
-     */
-
-    if (xf86NumScreens == 0) {
-      xf86Msg(X_ERROR, "Screen(s) found, but drivers were unusable.\n");
-      return;
-    }
-
     /* XXX Should this be before or after loading dependent modules? */
     if (xf86ProbeOnly)
     {
commit 47b31233c26f710be70ffcca17e5402d03d5733f
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 15:10:12 2008 -0400

    Simplify driver setup.
    
    No point warning about missing driver hooks, that just means the person
    who gave you the driver is inept.  Might as well just crash.  Also,
    just name anonymous screens as screen%d instead of failing after the 36th
    screen.  Bonus points if you can figure out what the failure mode would
    be on the 36th screen, and what the effective screen limit was.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index cb7b898..88c5a87 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -868,37 +868,14 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
       return;
     }
 
-    /* This could be moved into a separate function */
-
-    /*
-     * Check that all screens have initialised the mandatory function
-     * entry points.  Delete those which have not.
-     */
-
-#define WARN_SCREEN(func) \
-    xf86Msg(X_ERROR, "Driver `%s' has no %s function, deleting.\n", \
-	   xf86Screens[i]->name, (warned++, func))
-
     for (i = 0; i < xf86NumScreens; i++) {
-      int warned = 0;
       if (xf86Screens[i]->name == NULL) {
-	xf86Screens[i]->name = xnfalloc(strlen("screen") + 1 + 1);
-	if (i < 10)
-	  sprintf(xf86Screens[i]->name, "screen%c", i + '0');
-	else
-	  sprintf(xf86Screens[i]->name, "screen%c", i - 10 + 'A');
+	xf86Screens[i]->name = xnfalloc(strlen("screen") + 10 + 1);
+	sprintf(xf86Screens[i]->name, "screen%d", i);
 	xf86MsgVerb(X_WARNING, 0,
 		    "Screen driver %d has no name set, using `%s'.\n",
 		    i, xf86Screens[i]->name);
       }
-      if (xf86Screens[i]->ScreenInit == NULL)
-	WARN_SCREEN("ScreenInit");
-      if (xf86Screens[i]->EnterVT == NULL)
-	WARN_SCREEN("EnterVT");
-      if (xf86Screens[i]->LeaveVT == NULL)
-	WARN_SCREEN("LeaveVT");
-      if (warned)
-	xf86DeleteScreen(i--, 0);
     }
 
     /*
commit b99fc65b53769400821a2bd8f691ece35a5b8847
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 15:06:53 2008 -0400

    Simplify calling xf86EnableIO() a bit.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 9a9ec34..cb7b898 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -730,11 +730,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
     }
 
     /* Enable full I/O access */
-    if (xorgHWAccess) {
-	if(!xf86EnableIO())
-	    /* oops, we have failed */
-	    xorgHWAccess = FALSE;
-    }
+    if (xorgHWAccess)
+	xorgHWAccess = xf86EnableIO();
 
     /*
      * Locate bus slot that had register IO enabled at server startup
commit b1f2c7a89ace1f6e5750783f3c43c4c5a6d24374
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 15:06:11 2008 -0400

    The ->Identify hook is not mandatory.
    
    Best comment ever though.  Mad props.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 0db6776..9a9ec34 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -716,14 +716,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
 
     for (i = 0; i < xf86NumDrivers; i++) {
 	xorgHWFlags flags;
-      /* The Identify function is mandatory, but if it isn't there continue */
+
 	if (xf86DriverList[i]->Identify != NULL)
 	    xf86DriverList[i]->Identify(0);
-	else {
-	    xf86Msg(X_WARNING, "Driver `%s' has no Identify function\n",
-		  xf86DriverList[i]->driverName ? xf86DriverList[i]->driverName
-					     : "noname");
-	}
+
 	if (!xorgHWAccess
 	    && (!xf86DriverList[i]->driverFunc
 		|| !xf86DriverList[i]->driverFunc(NULL,
commit af5125968a738ec8f496d04eb65acb7c8f812115
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 14:47:10 2008 -0400

    Refactor misprite a bit.
    
    No variable declarations in header files, please.

diff --git a/mi/misprite.c b/mi/misprite.c
index 122cea4..85755b7 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -4,7 +4,6 @@
  * machine independent software sprite routines
  */
 
-
 /*
 
 Copyright 1989, 1998  The Open Group
@@ -72,6 +71,39 @@ in this Software without prior written authorization from The Open Group.
        (miCursorInfoPtr)dixLookupPrivate(&dev->devPrivates, miSpriteDevPrivatesKey) : \
        (miCursorInfoPtr)dixLookupPrivate(&dev->u.master->devPrivates, miSpriteDevPrivatesKey))
 
+static int damageRegister = 0;
+
+static void
+miSpriteDisableDamage(ScreenPtr pScreen, miSpriteScreenPtr pScreenPriv)
+{
+    if (damageRegister) {
+	DamageUnregister (&(pScreen->GetScreenPixmap(pScreen)->drawable),
+			  pScreenPriv->pDamage);
+	damageRegister = 0;
+    }
+}
+
+static void
+miSpriteEnableDamage(ScreenPtr pScreen, miSpriteScreenPtr pScreenPriv)
+{
+    if (!damageRegister) {
+	damageRegister = 1;
+	DamageRegister (&(pScreen->GetScreenPixmap(pScreen)->drawable),
+			pScreenPriv->pDamage);
+    }
+}
+
+static void
+miSpriteIsUp(miCursorInfoPtr pDevCursor)
+{
+    pDevCursor->isUp = TRUE;
+}
+
+static void
+miSpriteIsDown(miCursorInfoPtr pDevCursor)
+{
+    pDevCursor->isUp = FALSE;
+}
 
 /*
  * screen wrappers
@@ -749,7 +781,7 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
 	    )
 	{
 	    DamageDrawInternal (pScreen, TRUE);
-	    miSpriteIsUpFALSE (pScreen, pScreenPriv);
+	    miSpriteIsDown(pCursorInfo);
 	    if (!(sx >= pointer->saved.x1 &&
                   sx + (int)pCursor->bits->width < pointer->saved.x2
                   && sy >= pointer->saved.y1 &&
@@ -786,7 +818,7 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
 				  sy - pointer->saved.y1,
 				  pointer->colors[SOURCE_COLOR].pixel,
 				  pointer->colors[MASK_COLOR].pixel);
-	    miSpriteIsUpTRUE (pScreen, pScreenPriv);
+	    miSpriteIsUp(pCursorInfo);
 	    DamageDrawInternal (pScreen, FALSE);
 	}
 	else
@@ -893,7 +925,7 @@ miSpriteRemoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen)
 						      miSpriteScreenKey);
     pCursorInfo = MISPRITE(pDev);
 
-    miSpriteIsUpFALSE (pCursorInfo, pScreen, pScreenPriv);
+    miSpriteIsDown(pCursorInfo);
     pCursorInfo->pCacheWin = NullWindow;
     miSpriteDisableDamage(pScreen, pScreenPriv);
     if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pDev,
@@ -905,7 +937,7 @@ miSpriteRemoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen)
                                          pCursorInfo->saved.y2 -
                                          pCursorInfo->saved.y1))
     {
-	miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv);
+	miSpriteIsUp(pCursorInfo);
     }
     miSpriteEnableDamage(pScreen, pScreenPriv);
     DamageDrawInternal (pScreen, FALSE);
@@ -993,7 +1025,7 @@ miSpriteRestoreCursor (DeviceIntPtr pDev, ScreenPtr pScreen)
                 pScreenPriv->colors[SOURCE_COLOR].pixel,
                 pScreenPriv->colors[MASK_COLOR].pixel))
     {
-        miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv);
+        miSpriteIsUp(pCursorInfo);
         pCursorInfo->pScreen = pScreen;
     }
     miSpriteEnableDamage(pScreen, pScreenPriv);
diff --git a/mi/mispritest.h b/mi/mispritest.h
index f303513..232cdaf 100644
--- a/mi/mispritest.h
+++ b/mi/mispritest.h
@@ -92,26 +92,6 @@ typedef struct {
 #define SOURCE_COLOR	0
 #define MASK_COLOR	1
 
-static int damageRegister = 0;
-
-#define miSpriteDisableDamage(pScreen, pScreenPriv) \
-    if (damageRegister) { \
-    DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage);  \
-    damageRegister = 0; \
-}
-
-#define miSpriteEnableDamage(pScreen, pScreenPriv) \
-    if (!damageRegister) {\
-    damageRegister = 1; \
-    DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \
-    }
-
-#define miSpriteIsUpTRUE(pDevCursor, pScreen, pScreenPriv) if (!pDevCursor->isUp)  \
-    pDevCursor->isUp = TRUE; 
-
-#define miSpriteIsUpFALSE(pDevCursor, pScreen, pScreenPriv) if (pDevCursor->isUp)  \
-    pDevCursor->isUp = FALSE; 
-
 /*
  * Overlap BoxPtr and Box elements
  */
commit 41b68e0dea9305d66bca2fc4ad96db01f5342c6d
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 11:02:31 2008 -0400

    Remove unused -co option.
    
    What did this even do anyway?

diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index cc568d6..2362629 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -159,7 +159,6 @@ const char *xf86VisualNames[] = {
 /* Parameters set only from the command line */
 char *xf86ServerName = "no-name";
 Bool xf86fpFlag = FALSE;
-Bool xf86coFlag = FALSE;
 Bool xf86sFlag = FALSE;
 Bool xf86bsEnableFlag = FALSE;
 Bool xf86bsDisableFlag = FALSE;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 7e027e3..0db6776 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1579,12 +1579,6 @@ ddxProcessArgument(int argc, char **argv, int i)
     xf86fpFlag = TRUE;
     return 0;
   }
-  /* Notice the -co flag, but allow it to pass to the dix layer */
-  if (!strcmp(argv[i], "-co"))
-  {
-    xf86coFlag = TRUE;
-    return 0;
-  }
   /* Notice the -bs flag, but allow it to pass to the dix layer */
   if (!strcmp(argv[i], "-bs"))
   {
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index e40c951..159dfb2 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -52,7 +52,6 @@ extern Bool xf86VidModeDisabled;
 extern Bool xf86VidModeAllowNonLocal; 
 #endif 
 extern Bool xf86fpFlag;
-extern Bool xf86coFlag;
 extern Bool xf86sFlag;
 extern Bool xf86bsEnableFlag;
 extern Bool xf86bsDisableFlag;
commit 1f416fba994ed7a7e072a9f0a86b515855ea3bac
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 10:56:45 2008 -0400

    Remove unused -bestRefresh option.

diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index e2c8313..cc568d6 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -180,7 +180,6 @@ int xf86Depth = -1;
 rgb xf86Weight = {0, 0, 0};
 Bool xf86FlipPixels = FALSE;
 Gamma xf86Gamma = {0.0, 0.0, 0.0};
-Bool xf86BestRefresh = DEFAULT_BEST_REFRESH;
 Bool xf86AllowMouseOpenFail = FALSE;
 #ifdef XF86VIDMODE
 Bool xf86VidModeDisabled = FALSE;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 9e89a5f..7e027e3 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1516,11 +1516,6 @@ ddxProcessArgument(int argc, char **argv, int i)
     xf86AllowMouseOpenFail = TRUE;
     return 1;
   }
-  if (!strcmp(argv[i],"-bestRefresh"))
-  {
-    xf86BestRefresh = TRUE;
-    return 1;
-  }
   if (!strcmp(argv[i],"-ignoreABI"))
   {
     LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL);
@@ -1800,7 +1795,6 @@ ddxUseMsg()
   ErrorF("-allowNonLocalXvidtune allow xvidtune to be run as a non-local client\n");
 #endif
   ErrorF("-allowMouseOpenFail    start server even if the mouse can't be initialized\n");
-  ErrorF("-bestRefresh           choose modes with the best refresh rate\n");
   ErrorF("-ignoreABI             make module ABI mismatches non-fatal\n");
   ErrorF("-isolateDevice bus_id  restrict device resets to bus_id (PCI only)\n");
   ErrorF("-version               show the server version\n");
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index a58be17..e40c951 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -70,7 +70,6 @@ extern int xf86Depth;
 extern Pix24Flags xf86Pix24;
 extern rgb xf86Weight;
 extern Bool xf86FlipPixels;
-extern Bool xf86BestRefresh;
 extern Gamma xf86Gamma;
 extern char *xf86ServerName;
 extern struct pci_slot_match xf86IsolateDevice;
commit 5a72c45d42abc7227c6cf3d14fd7043ea7527c54
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 10:54:11 2008 -0400

    Remove unused -showunresolved option

diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index dabcd3d..e2c8313 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -180,7 +180,6 @@ int xf86Depth = -1;
 rgb xf86Weight = {0, 0, 0};
 Bool xf86FlipPixels = FALSE;
 Gamma xf86Gamma = {0.0, 0.0, 0.0};
-Bool xf86ShowUnresolved = DEFAULT_UNRESOLVED;
 Bool xf86BestRefresh = DEFAULT_BEST_REFRESH;
 Bool xf86AllowMouseOpenFail = FALSE;
 #ifdef XF86VIDMODE
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index b18944a..9e89a5f 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1489,11 +1489,6 @@ ddxProcessArgument(int argc, char **argv, int i)
     xf86ConfigFile = argv[i + 1];
     return 2;
   }
-  if (!strcmp(argv[i],"-showunresolved"))
-  {
-    xf86ShowUnresolved = TRUE;
-    return 1;
-  }
   if (!strcmp(argv[i],"-probeonly"))
   {
     xf86ProbeOnly = TRUE;
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 10350be..a58be17 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -73,7 +73,6 @@ extern Bool xf86FlipPixels;
 extern Bool xf86BestRefresh;
 extern Gamma xf86Gamma;
 extern char *xf86ServerName;
-extern Bool xf86ShowUnresolved;
 extern struct pci_slot_match xf86IsolateDevice;
 
 /* Other parameters */
commit 9f08ffc557b52e2e8cd54fb692b66700c83d61c6
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 10:29:23 2008 -0400

    Remove unused xf86Info.pMouse

diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 3052149..dabcd3d 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -99,7 +99,6 @@ xf86InfoRec xf86Info = {
 	-1,		/* vtno */
 	FALSE,		/* vtSysreq */
 	SKWhenNeeded,	/* ddxSpecialKeys */
-	NULL,		/* pMouse */
 	-1,		/* lastEventTime */
 	FALSE,		/* vtRequestsPending */
 	FALSE,		/* dontVTSwitch */
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 12c700a..6a7a6dc 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -67,9 +67,6 @@ typedef struct {
     Bool		vtSysreq;
     SpecialKeysInDDX	ddxSpecialKeys;
 
-    /* mouse part */
-    DeviceIntPtr	pMouse;
-
     /* event handler part */
     int			lastEventTime;
     Bool		vtRequestsPending;
commit f227fbf74f0c619ecf3275cdb4c10b1a4b3a8cfc
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Tue Aug 19 11:36:12 2008 +0200

    EXA: Inline Prepare/FinishAccessWindow into only caller, ChangeWindowAttributes.
    
    Also check the requested mask in addition to the GC state before doing work.

diff --git a/exa/exa.c b/exa/exa.c
index 37a0bb0..ab7aab3 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -671,34 +671,25 @@ exaCreateGC (GCPtr pGC)
     return TRUE;
 }
 
-void
-exaPrepareAccessWindow(WindowPtr pWin)
+static Bool
+exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
 {
-    if (pWin->backgroundState == BackgroundPixmap) 
+    Bool ret;
+
+    if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) 
         exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
 
-    if (pWin->borderIsPixel == FALSE)
-        exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
-}
+    if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE)
+        exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK);
 
-void
-exaFinishAccessWindow(WindowPtr pWin)
-{
-    if (pWin->backgroundState == BackgroundPixmap) 
-        exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
+    ret = fbChangeWindowAttributes(pWin, mask);
 
-    if (pWin->borderIsPixel == FALSE)
-        exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
-}
+    if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE)
+        exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK);
 
-static Bool
-exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
-{
-    Bool ret;
+    if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) 
+        exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
 
-    exaPrepareAccessWindow(pWin);
-    ret = fbChangeWindowAttributes(pWin, mask);
-    exaFinishAccessWindow(pWin);
     return ret;
 }
 
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 9ec2a56..dc6a6e0 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -260,12 +260,6 @@ typedef struct {
   */
 void exaDDXDriverInit (ScreenPtr pScreen);
 
-void
-exaPrepareAccessWindow(WindowPtr pWin);
-
-void
-exaFinishAccessWindow(WindowPtr pWin);
-
 /* exa_unaccel.c */
 void
 exaPrepareAccessGC(GCPtr pGC);
commit 825b3fe11d1b813bf8d5b24a880ed04b78ae1acf
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Tue Aug 19 11:22:40 2008 +0200

    EXA: Don't use exaGlyphs if the driver doesn't provide a PrepareComposite hook.
    
    It's buggy without Composite acceleration (leading to cropped glyphs) and not
    really useful in that case anyway. The bug probably still needs to be found and
    fixed for drivers that provide a PrepareComposite hook but can't accelerate
    text rendering though.

diff --git a/exa/exa.c b/exa/exa.c
index e1bbb32..37a0bb0 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -752,7 +752,8 @@ exaCloseScreen(int i, ScreenPtr pScreen)
     PictureScreenPtr	ps = GetPictureScreenIfSet(pScreen);
 #endif
 
-    exaGlyphsFini(pScreen);
+    if (ps->Glyphs == exaGlyphs)
+	exaGlyphsFini(pScreen);
 
     pScreen->CreateGC = pExaScr->SavedCreateGC;
     pScreen->CloseScreen = pExaScr->SavedCloseScreen;
@@ -931,8 +932,10 @@ exaDriverInit (ScreenPtr		pScreen,
         pExaScr->SavedComposite = ps->Composite;
 	ps->Composite = exaComposite;
 
-	pExaScr->SavedGlyphs = ps->Glyphs;
-	ps->Glyphs = exaGlyphs;
+	if (pScreenInfo->PrepareComposite) {
+	    pExaScr->SavedGlyphs = ps->Glyphs;
+	    ps->Glyphs = exaGlyphs;
+	}
 	
 	pExaScr->SavedTriangles = ps->Triangles;
 	ps->Triangles = exaTriangles;
@@ -993,7 +996,8 @@ exaDriverInit (ScreenPtr		pScreen,
 	}
     }
 
-    exaGlyphsInit(pScreen);
+    if (ps->Glyphs == exaGlyphs)
+	exaGlyphsInit(pScreen);
 
     LogMessage(X_INFO, "EXA(%d): Driver registered support for the following"
 	       " operations:\n", pScreen->myNum);
commit 75e495a4cd823b6fa42a8d167ecc9f4723320dea
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 17:58:08 2008 -0400

    Remove unused xf86Info.mouseLocal

diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 54c934a..3052149 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -100,7 +100,6 @@ xf86InfoRec xf86Info = {
 	FALSE,		/* vtSysreq */
 	SKWhenNeeded,	/* ddxSpecialKeys */
 	NULL,		/* pMouse */
-	NULL,		/* mouseLocal */
 	-1,		/* lastEventTime */
 	FALSE,		/* vtRequestsPending */
 	FALSE,		/* dontVTSwitch */
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 013c91e..12c700a 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -69,7 +69,6 @@ typedef struct {
 
     /* mouse part */
     DeviceIntPtr	pMouse;
-    pointer		mouseLocal;
 
     /* event handler part */
     int			lastEventTime;
commit b3dfd7e3e4deef21b40c885f8e7eae34b55888b2
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 17:56:18 2008 -0400

    Remove unused xf86Info.sharedMonitor

diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 489b964..54c934a 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -108,7 +108,6 @@ xf86InfoRec xf86Info = {
 	FALSE,		/* dontZoom */
 	FALSE,		/* notrapSignals */
 	FALSE,		/* caughtSignal */
-	FALSE,		/* sharedMonitor */
 	NULL,		/* currentScreen */
 #ifdef CSRG_BASED
 	-1,		/* screenFd */
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 8ae1f37..013c91e 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -81,7 +81,6 @@ typedef struct {
     Bool		caughtSignal;
 
     /* graphics part */
-    Bool		sharedMonitor;
     ScreenPtr		currentScreen;
 #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
     int			screenFd;	/* fd for memory mapped access to
commit 5e43cd28692bc05cac80f38b47104a26c0524385
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 17:46:42 2008 -0400

    Remove the remainder of grab deactivation and closedown.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 38d4664..7cf4040 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -746,8 +746,6 @@ typedef enum {
     FLAG_PC98,
     FLAG_NOPM,
     FLAG_XINERAMA,
-    FLAG_ALLOW_DEACTIVATE_GRABS,
-    FLAG_ALLOW_CLOSEDOWN_GRABS,
     FLAG_LOG,
     FLAG_RENDER_COLORMAP_MODE,
     FLAG_HANDLE_SPECIAL_KEYS,
@@ -801,10 +799,6 @@ static OptionInfoRec FlagOptions[] = {
 	{0}, FALSE },
   { FLAG_XINERAMA,		"Xinerama",			OPTV_BOOLEAN,
 	{0}, FALSE },
-  { FLAG_ALLOW_DEACTIVATE_GRABS,"AllowDeactivateGrabs",		OPTV_BOOLEAN,
-	{0}, FALSE },
-  { FLAG_ALLOW_CLOSEDOWN_GRABS, "AllowClosedownGrabs",		OPTV_BOOLEAN,
-	{0}, FALSE },
   { FLAG_LOG,			"Log",				OPTV_STRING,
 	{0}, FALSE },
   { FLAG_RENDER_COLORMAP_MODE,	"RenderColormapMode",		OPTV_STRING,
@@ -884,10 +878,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
     xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
     xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
 
-    xf86GetOptValBool(FlagOptions, FLAG_ALLOW_DEACTIVATE_GRABS,
-		      &(xf86Info.grabInfo.allowDeactivate));
-    xf86GetOptValBool(FlagOptions, FLAG_ALLOW_CLOSEDOWN_GRABS,
-		      &(xf86Info.grabInfo.allowClosedown));
     xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
     if (xf86Info.ignoreABI) {
 	    xf86Msg(X_CONFIG, "Ignoring ABI Version\n");
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index ff75a7d..15dce9f 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -204,15 +204,6 @@ ProcessInputEvents ()
   xf86SetViewport(xf86Info.currentScreen, x, y);
 }
 
-void
-xf86GrabServerCallback(CallbackListPtr *callbacks, pointer data, pointer args)
-{
-    ServerGrabInfoRec *grab = (ServerGrabInfoRec*)args;
-
-    xf86Info.grabInfo.server.client = grab->client;
-    xf86Info.grabInfo.server.grabstate = grab->grabstate;
-}
-
 /*
  * Handle keyboard events that cause some kind of "action"
  * (i.e., server termination, video mode changes, VT switches, etc.)
@@ -240,43 +231,6 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
 	if (!xf86Info.dontZoom)
 	    xf86ZoomViewport(xf86Info.currentScreen, -1);
 	break;
-    case ACTION_DISABLEGRAB:
-	if (!xf86Info.grabInfo.disabled && xf86Info.grabInfo.allowDeactivate) {
-	  if (inputInfo.pointer && inputInfo.pointer->deviceGrab.grab != NULL &&
-	      inputInfo.pointer->deviceGrab.DeactivateGrab)
-	    inputInfo.pointer->deviceGrab.DeactivateGrab(inputInfo.pointer);
-	  if (inputInfo.keyboard && 
-                  inputInfo.keyboard->deviceGrab.grab != NULL &&
-	      inputInfo.keyboard->deviceGrab.DeactivateGrab)
-	    inputInfo.keyboard->deviceGrab.DeactivateGrab(inputInfo.keyboard);
-	}
-	break;
-    case ACTION_CLOSECLIENT:
-	if (!xf86Info.grabInfo.disabled && xf86Info.grabInfo.allowClosedown) {
-	  ClientPtr pointer, keyboard, server;
-
-	  pointer = keyboard = server = NULL;
-	  if (inputInfo.pointer && inputInfo.pointer->deviceGrab.grab != NULL)
-	    pointer = clients[CLIENT_ID(inputInfo.pointer->deviceGrab.grab->resource)];
-	  if (inputInfo.keyboard && inputInfo.keyboard->deviceGrab.grab != NULL)
-          {
-	    keyboard = clients[CLIENT_ID(inputInfo.keyboard->deviceGrab.grab->resource)];
-	    if (keyboard == pointer)
-	      keyboard = NULL;
-	  }
-	  if ((xf86Info.grabInfo.server.grabstate == SERVER_GRABBED) &&
-	      (((server = xf86Info.grabInfo.server.client) == pointer) ||
-	       (server == keyboard)))
-	      server = NULL;
-
-	  if (pointer)
-	    CloseDownClient(pointer);
-	  if (keyboard)
-	    CloseDownClient(keyboard);
-	  if (server)
-	    CloseDownClient(server);
-	}
-	break;
 #if !defined(__SOL8__) && \
     (!defined(sun) || defined(__i386__)) && defined(VT_ACTIVATE)
     case ACTION_SWITCHSCREEN:
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 34970e0..b18944a 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1050,8 +1050,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
     /* set up the proper access funcs */
     xf86PostPreInit();
 
-    AddCallback(&ServerGrabCallback, xf86GrabServerCallback, NULL);
-
   } else {
     /*
      * serverGeneration != 1; some OSs have to do things here, too.
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index cb4bae7..10350be 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -164,7 +164,6 @@ void xf86SigHandler(int signo);
 void xf86HandlePMEvents(int fd, pointer data);
 extern int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num);
 extern pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event);
-void xf86GrabServerCallback(CallbackListPtr *, pointer, pointer);
 
 /* xf86Helper.c */
 void xf86LogInit(void);
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 093f4b8..8ae1f37 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -115,18 +115,6 @@ typedef struct {
     Bool		useDefaultFontPath;
     MessageType		useDefaultFontPathFrom;
     Bool        ignoreABI;
-    struct {
-	Bool		disabled;		/* enable/disable deactivating
-						 * grabs or closing the
-						 * connection to the grabbing
-						 * client */
-	ClientPtr	override;		/* client that disabled
-						 * grab deactivation.
-						 */
-	Bool		allowDeactivate;
-	Bool		allowClosedown;
-	ServerGrabInfoRec server;
-    } grabInfo;
 
     Bool        allowEmptyInput;  /* Allow the server to start with no input
                                    * devices. */
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 0156d18..8c21123 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -1110,8 +1110,6 @@ typedef enum {
     ACTION_TERMINATE		= 0,	/* Terminate Server */
     ACTION_NEXT_MODE		= 10,	/* Switch to next video mode */
     ACTION_PREV_MODE,
-    ACTION_DISABLEGRAB		= 20,	/* Cancel server/pointer/kbd grabs */
-    ACTION_CLOSECLIENT,			/* Kill client holding grab */
     ACTION_SWITCHSCREEN		= 100,	/* VT switch */
     ACTION_SWITCHSCREEN_NEXT,
     ACTION_SWITCHSCREEN_PREV,
diff --git a/hw/xfree86/dixmods/xkbPrivate.c b/hw/xfree86/dixmods/xkbPrivate.c
index 40c9311..db21a4e 100644
--- a/hw/xfree86/dixmods/xkbPrivate.c
+++ b/hw/xfree86/dixmods/xkbPrivate.c
@@ -30,10 +30,6 @@ XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
             xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
         else if (strcasecmp(msgbuf, "+vmode")==0)
             xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
-        else if (strcasecmp(msgbuf, "ungrab")==0)
-            xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
-        else if (strcasecmp(msgbuf, "clsgrb")==0)
-            xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
     }
 
     return 0;
commit cd1e8f26147919227e7624ac4c6b313d972a4d35
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 17:40:46 2008 -0400

    Remove unused EstimateSizesAggressively option.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 35a7af2..38d4664 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -744,7 +744,6 @@ typedef enum {
     FLAG_DPMS_OFFTIME,
     FLAG_PIXMAP,
     FLAG_PC98,
-    FLAG_ESTIMATE_SIZES_AGGRESSIVELY,
     FLAG_NOPM,
     FLAG_XINERAMA,
     FLAG_ALLOW_DEACTIVATE_GRABS,
@@ -798,8 +797,6 @@ static OptionInfoRec FlagOptions[] = {
 	{0}, FALSE },
   { FLAG_PC98,			"PC98",				OPTV_BOOLEAN,
 	{0}, FALSE },
-  { FLAG_ESTIMATE_SIZES_AGGRESSIVELY,"EstimateSizesAggressively",OPTV_INTEGER,
-	{0}, FALSE },
   { FLAG_NOPM,			"NoPM",				OPTV_BOOLEAN,
 	{0}, FALSE },
   { FLAG_XINERAMA,		"Xinerama",			OPTV_BOOLEAN,
@@ -1013,12 +1010,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 	xf86Info.randRFrom = X_CONFIG;
     }
 #endif
-    i = -1;
-    xf86GetOptValInteger(FlagOptions, FLAG_ESTIMATE_SIZES_AGGRESSIVELY, &i);
-    if (i >= 0)
-	xf86Info.estimateSizesAggressively = i;
-    else
-	xf86Info.estimateSizesAggressively = 0;
 
     xf86Info.aiglx = TRUE;
     xf86Info.aiglxFrom = X_DEFAULT;
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 7102476..489b964 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -126,7 +126,6 @@ xf86InfoRec xf86Info = {
 #endif
 	TRUE,		/* pmFlag */
 	LogNone,	/* syncLog */
-	0,		/* estimateSizesAggressively */
 	FALSE,		/* kbdCustomKeycodes */
 	FALSE,		/* disableRandR */
 	X_DEFAULT	/* randRFrom */
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 014f817..093f4b8 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -104,7 +104,6 @@ typedef struct {
 #endif
     Bool		pmFlag;
     Log			log;
-    int			estimateSizesAggressively;
     Bool		kbdCustomKeycodes;
     Bool		disableRandR;
     MessageType		randRFrom;
commit faaf0046155abbd15415d5a6b62ead4f58935c28
Author: Mathieu Bérard <mathieu.berard at crans.org>
Date:   Mon Aug 18 17:23:26 2008 -0400

    Remove xaaTEGlyphBlt.S
    
    Should have been removed in 593144dddd977f53bcd1a115f9544eeece46df4c but
    ajax was asleep at the wheel.

diff --git a/hw/xfree86/xaa/xaaTEGlyphBlt.S b/hw/xfree86/xaa/xaaTEGlyphBlt.S
deleted file mode 100644
index 5f3137f..0000000
--- a/hw/xfree86/xaa/xaaTEGlyphBlt.S
+++ /dev/null
@@ -1,964 +0,0 @@
-/*
- * Copyright 1996  The XFree86 Project
- *
- * Permission is hereby granted, free of charge, to any person obtaining a 
- * copy of this software and associated documentation files (the "Software"), 
- * to deal in the Software without restriction, including without limitation 
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, 
- * and/or sell copies of the Software, and to permit persons to whom the 
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL 
- * HARM HANEMAAYER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
- * SOFTWARE.
- * 
- * Written by Harm Hanemaayer (H.Hanemaayer at inter.nl.net).
- */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaTEGlyphBlt.S,v 1.1 1999/07/10 07:24:54 dawes Exp $ */
-
-
-/*
- * Intel Pentium-optimized versions of "terminal emulator font" text
- * bitmap transfer routines.
- *
- * SCANLINE_PAD_DWORD.
- *
- * Only for glyphs with a fixed width of 6 pixels or 8 pixels.
- */
-
-#include "assyntax.h"
-
-#ifndef QNX4
- 	FILE("xaaTEGlyphBlt.s")
-#else
- 	FILE( __FILE__ )
-#endif
-
-	AS_BEGIN
-
-/*
- * Definition of stack frame function arguments.
- * All functions have the same arguments (some don't have glyphwidth,
- * but that's OK, since it comes last and doesn't affect the offset
- * of the other arguments).
- */
-
-#define base_arg	REGOFF(20,ESP)
-#define glyphp_arg	REGOFF(24,ESP)
-#define line_arg	REGOFF(28,ESP)
-#define width_arg	REGOFF(32,ESP)
-#define glyphwidth_arg	REGOFF(36,ESP)
-
-#define BYTE_REVERSED	GLNAME(byte_reversed)
-
-/* I assume %eax and %edx can be trashed. */
-
-	SEG_TEXT
-
-	ALIGNTEXT4
-
-#ifdef FIXEDBASE
-# ifdef MSBFIRST
-	GLOBL GLNAME(DrawTETextScanlineWidth6PMSBFirstFixedBase)
-GLNAME(DrawTETextScanlineWidth6PMSBFirstFixedBase):
-# else
-	GLOBL GLNAME(DrawTETextScanlineWidth6PLSBFirstFixedBase)
-GLNAME(DrawTETextScanlineWidth6PLSBFirstFixedBase):
-# endif
-#else
-# ifdef MSBFIRST
-	GLOBL GLNAME(DrawTETextScanlineWidth6PMSBFirst)
-GLNAME(DrawTETextScanlineWidth6PMSBFirst):
-# else
-	GLOBL GLNAME(DrawTETextScanlineWidth6PLSBFirst)
-GLNAME(DrawTETextScanlineWidth6PLSBFirst):
-# endif
-#endif
-
-/* Definition of stack frame function arguments. */
-
-#define base_arg	REGOFF(20,ESP)
-#define glyphp_arg	REGOFF(24,ESP)
-#define line_arg	REGOFF(28,ESP)
-#define width_arg	REGOFF(32,ESP)
-
-	SUB_L	(CONST(16),ESP)
-	MOV_L	(EBP,REGOFF(12,ESP))	/* PUSH EBP */
-	MOV_L	(EBX,REGOFF(8,ESP))	/* PUSH EBX */
-	MOV_L	(ESI,REGOFF(4,ESP))	/* PUSH ESI */
-	MOV_L	(EDI,REGOFF(0,ESP))	/* PUSH EDI */
-
-	MOV_L	(line_arg,EBP)
-	MOV_L	(base_arg,EDI)
-	MOV_L	(glyphp_arg,ESI)
-
-	ALIGNTEXT4
-
-.L6_1:
-	/* Pentium-optimized instruction pairing. */
-	/* EBX = bits = glyph[0][line] */
-	MOV_L	(REGOFF(4,ESI),EDX)		/* glyphp[1] */
-	MOV_L	(REGIND(ESI),EBX)		/* glyphp[0] */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[1][line] */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[0][line] */
-	SAL_L	(CONST(6),EDX)			/* glyphp[1][line] << 6 */
-	MOV_L	(REGOFF(8,ESI),ECX)		/* glyphp[2] */
-	MOV_L	(REGOFF(12,ESI),EAX)		/* glyphp[3] */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[2][line] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[3][line] */
-	SAL_L	(CONST(12),ECX)			/* glyphp[2][line] << 12 */
-	OR_L	(EDX,EBX)			/* bits |= ..[1].. << 6 */
-	SAL_L	(CONST(18),EAX)			/* glyphp[3][line] << 18 */
-	OR_L	(ECX,EBX)			/* bits |= ..[2].. << 12 */
-
-	MOV_L	(REGOFF(16,ESI),EDX)		/* glyphp[4] */
-	MOV_L	(REGOFF(20,ESI),ECX)		/* glyphp[5] */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[4][line] */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[5][line] */
-	SAL_L	(CONST(24),EDX)			/* glyphp[4][line] << 24 */
-	OR_L	(EAX,EBX)			/* bits |= ..[3].. << 18 */
-	SAL_L	(CONST(30),ECX)			/* glyphp[5][line] << 30 */
-	OR_L	(EDX,EBX)			/* bits |= ..[4].. << 24 */
-
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(20,ESI),EAX)		/* glyphp[5] */
-	OR_L	(ECX,EBX)			/* bits |= ..[5].. << 30 */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[5][line] */
-	MOV_L	(EBX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(CONST(0),EAX)
-	OR_L	(ECX,EBX)			/* bits |= ..[5].. << 30 */
-	MOV_L	(CONST(0),EDX)
-	MOV_B	(BL,AL)
-	MOV_B	(BH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),BH)
-	ROL_L	(CONST(16),EBX)
-	MOV_B	(BL,AL)
-	MOV_B	(BH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),BH)
-	ROL_L	(CONST(16),EBX)
-	MOV_L	(REGOFF(20,ESI),EAX)		/* glyphp[5] */
-	MOV_L	(EBX,REGIND(EDI))
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[5][line] */
-#endif
-
-	CMP_L   (CONST(32),width_arg)
-        JG      (.L6_2)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(4),EDI)		/* base++ */
-#endif
-	JMP	(.L6_4)
-.L6_2:
-	/* Note that glyphp[5][line] is already read again. */
-	/* EAX = bits = glyphp[5][line] >> 2 */
-	MOV_L	(REGOFF(24,ESI),EDX)		/* glyphp[6] */
-	MOV_L	(REGOFF(28,ESI),EBX)		/* glyphp[7] */
-	SHR_L	(CONST(2),EAX)			/* glyphp[5][line] >> 2 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[6][line] */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[7][line] */
-	MOV_L	(REGOFF(32,ESI),ECX)		/* glyphp[8] */
-	SAL_L	(CONST(4),EDX)			/* glyphp[6][line] << 4 */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[8][line] */
-	SAL_L	(CONST(10),EBX)			/* glyphp[7][line] << 10 */
-	OR_L	(EDX,EAX)			/* bits |= ..[6].. << 4 */
-	SAL_L	(CONST(16),ECX)			/* glyphp[8][line] << 16 */
-	MOV_L	(REGOFF(36,ESI),EDX)		/* glyphp[9] */
-	OR_L	(EBX,EAX)			/* bits |= ..[7].. << 10 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[9][line] */
-	OR_L	(ECX,EAX)			/* bits |= ..[8].. << 16 */
-	MOV_L	(REGOFF(40,ESI),EBX)		/* glyphp[10] */
-	SAL_L	(CONST(22),EDX)			/* glyphp[9][line] << 22 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[10][line] */
-	OR_L	(EDX,EAX)			/* bits |= ..[9].. << 22 */
-
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(40,ESI),ECX)		/* glyphp[10] */
-	SAL_L	(CONST(28),EBX)			/* glyphp[10][line] << 28 */
-	MOV_L	(REGOFF(44,ESI),EDX)		/* glyphp[11] */
-	OR_L	(EBX,EAX)			/* bits |= ..[10].. << 28 */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[10][line] */
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(4,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[11][line] */
-#else
-	MOV_L	(CONST(0),ECX)
-	SAL_L	(CONST(28),EBX)			/* glyphp[10][line] << 28 */
-	MOV_L	(CONST(0),EDX)
-	OR_L	(EBX,EAX)			/* bits |= ..[10].. << 28 */
-	MOV_B	(AL,CL)
-	MOV_B	(AH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),AH)
-	ROL_L	(CONST(16),EAX)
-	MOV_B	(AL,CL)
-	MOV_B	(AH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),AH)
-	MOV_L	(REGOFF(40,ESI),ECX)		/* glyphp[10] */
-	ROL_L	(CONST(16),EAX)
-	MOV_L	(REGOFF(44,ESI),EDX)		/* glyphp[11] */
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(4,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[10][line] */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[11][line] */
-#endif
-
-	CMP_L   (CONST(64),width_arg)
-        JG      (.L6_3)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(8),EDI)		/* base+=2 */
-#endif
-	JMP	(.L6_4)
-.L6_3:
-	/* Note that glyphp[10][line] is read again. */
-	/* EAX = bits = glyphp[10][line] >> 4 */
-	SHR_L	(CONST(4),ECX)			/* glyphp[10][line] >> 4 */
-	MOV_L	(REGOFF(48,ESI),EBX)		/* glyphp[12] */
-	SAL_L	(CONST(2),EDX)			/* glyphp[11][line] << 2 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[12][line] */
-	OR_L	(EDX,ECX)			/* bits |= ..[11].. << 2 */
-	MOV_L	(REGOFF(52,ESI),EAX)		/* glyphp[13] */
-	SAL_L	(CONST(8),EBX)			/* glyphp[12][line] << 8 */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[13][line] */
-	OR_L	(EBX,ECX)			/* bits |= ..[12].. << 8 */
-	MOV_L	(REGOFF(56,ESI),EDX)		/* glyphp[14] */
-	SAL_L	(CONST(14),EAX)			/* glyphp[13][line] << 14 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[14][line] */
-	OR_L	(EAX,ECX)			/* bits |= ..[13].. << 14 */
-	MOV_L	(REGOFF(60,ESI),EBX)		/* glyphp[15] */
-	SAL_L	(CONST(20),EDX)			/* glyphp[14][line] << 20 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[15][line] */
-	OR_L	(EDX,ECX)			/* bits |= ..[14].. << 20 */
-
-#ifndef MSBFIRST
-	SAL_L	(CONST(26),EBX)			/* glyphp[15][line] << 26 */
-	OR_L	(EBX,ECX)			/* bits |= ..[15].. << 26 */
-#ifndef FIXEDBASE
-	MOV_L	(ECX,REGOFF(8,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(ECX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),EAX)
-	SAL_L	(CONST(26),EBX)			/* glyphp[15][line] << 26 */
-	MOV_L	(CONST(0),EDX)
-	OR_L	(EBX,ECX)			/* bits |= ..[15].. << 26 */
-	MOV_B	(CL,AL)
-	MOV_B	(CH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),CH)
-	ROL_L	(CONST(16),ECX)
-	MOV_B	(CL,AL)
-	MOV_B	(CH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),CH)
-	ROL_L	(CONST(16),ECX)
-#ifndef FIXEDBASE
-	MOV_L	(ECX,REGOFF(8,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(ECX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#endif
-
-#ifndef FIXEDBASE
-	ADD_L	(CONST(12),EDI)		/* base += 3*/
-#endif
-	CMP_L   (CONST(96),width_arg)
-        JLE     (.L6_4)
-	ADD_L	(CONST(64),ESI)		/* glyphp += 16 */
-	SUB_L	(CONST(96),width_arg)
-        JMP     (.L6_1)
-
-.L6_4:
-
-#ifndef FIXEDBASE
-	MOV_L	(EDI,EAX)		/* return base */
-#else
-	MOV_L	(base_arg,EAX)		/* return base */
-#endif
-	MOV_L	(REGOFF(0,ESP),EDI)	/* POPL EDI */
-	MOV_L	(REGOFF(4,ESP),ESI)	/* POPL ESI */
-	MOV_L	(REGOFF(8,ESP),EBX)	/* POPL EBX */
-	MOV_L	(REGOFF(12,ESP),EBP)	/* POPL EBP */
-	ADD_L	(CONST(16),ESP)
-	RET
-	
-
-	ALIGNTEXT4
-
-#ifdef FIXEDBASE
-# ifdef MSBFIRST
-	GLOBL GLNAME(DrawTETextScanlineWidth8PMSBFirstFixedBase)
-GLNAME(DrawTETextScanlineWidth8PMSBFirstFixedBase):
-# else
-	GLOBL GLNAME(DrawTETextScanlineWidth8PLSBFirstFixedBase)
-GLNAME(DrawTETextScanlineWidth8PLSBFirstFixedBase):
-# endif
-#else
-# ifdef MSBFIRST
-	GLOBL GLNAME(DrawTETextScanlineWidth8PMSBFirst)
-GLNAME(DrawTETextScanlineWidth8PMSBFirst):
-# else
-	GLOBL GLNAME(DrawTETextScanlineWidth8PLSBFirst)
-GLNAME(DrawTETextScanlineWidth8PLSBFirst):
-# endif
-#endif
-
-	SUB_L	(CONST(16),ESP)
-	MOV_L	(EBP,REGOFF(12,ESP))	/* PUSH EBP */
-	MOV_L	(EBX,REGOFF(8,ESP))	/* PUSH EBX */
-	MOV_L	(ESI,REGOFF(4,ESP))	/* PUSH ESI */
-	MOV_L	(EDI,REGOFF(0,ESP))	/* PUSH EDI */
-
-	MOV_L	(line_arg,EBP)
-	MOV_L	(base_arg,EDI)
-	MOV_L	(glyphp_arg,ESI)
-
-	ALIGNTEXT4
-
-.L8_1:
-	/* Pentium-optimized instruction pairing. */
-	/* EBX = bits */
-	MOV_L	(REGIND(ESI),EAX)		/* glyphp[0] */
-	MOV_L	(REGOFF(4,ESI),EDX)		/* glyphp[1] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[0][line] */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[1][line] */
-#ifdef MSBFIRST
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),BH)
-#else
-	MOV_L	(EAX,EBX)			/* bits = glyph[0][line] */
-	MOV_B   (DL,BH)				/* bits |= ..[1].. << 8 */
-#endif
-
-	ROL_L	(CONST(16),EBX)
-	MOV_L	(REGOFF(8,ESI),EAX)		/* glyphp[2] */
-	MOV_L	(REGOFF(12,ESI),ECX)		/* glyphp[3] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[2][line] */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[3][line] */
-#ifdef MSBFIRST
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),BH)
-#else
-	MOV_B   (AL,BL)				/* bits |= ..[2].. << 16 */
-	MOV_B   (CL,BH)				/* bits |= ..[3].. << 24 */
-#endif
-	ROL_L	(CONST(16),EBX)
-	MOV_L	(EBX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-	CMP_L	(CONST(32),width_arg)
-#ifndef FIXEDBASE
-	JLE	(.L8_2)
-#else
-	JLE	(.L8_3)
-#endif
-
-	MOV_L	(REGOFF(16,ESI),EAX)		/* glyphp[4] */
-	MOV_L	(REGOFF(20,ESI),EDX)		/* glyphp[5] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[4][line] */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[5][line] */
-#ifdef MSBFIRST
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),BH)
-#else
-	MOV_L    (EAX,EBX)			/* bits = glyph[4][line] */
-	MOV_B    (DL,BH)			/* nits |= ..[5].. << 8 */
-#endif
-
-	ROL_L	(CONST(16),EBX)
-	MOV_L	(REGOFF(24,ESI),EAX)		/* glyphp[6] */
-	MOV_L	(REGOFF(28,ESI),ECX)		/* glyphp[7] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[6][line] */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[7][line] */
-#ifdef MSBFIRST
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),BH)
-#else
-	MOV_B   (AL,BL)				/* bits |= ..[6].. << 16 */
-	MOV_B   (CL,BH)				/* bits |= ..[7].. << 24 */
-#endif
-	ROL_L	(CONST(16),EBX)
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(4,EDI))	/* WRITE_IN_BIT_ORDER(base+1, bits) */
-	ADD_L	(CONST(8),EDI)		/* base += 2 */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-	CMP_L	(CONST(64),width_arg)
-	JLE	(.L8_3)
-	ADD_L	(CONST(32),ESI)		/* glyphp += 8 */
-	SUB_L	(CONST(64),width_arg)
-	JMP	(.L8_1)
-
-#ifndef FIXEDBASE
-.L8_2:
-	ADD_L	(CONST(4),EDI)		/* base++ */
-.L8_3:
-	MOV_L	(EDI,EAX)		/* return base */
-#else
-.L8_3:
-	MOV_L	(base_arg,EAX)		/* return base */
-#endif
-	MOV_L	(REGOFF(0,ESP),EDI)	/* POPL EDI */
-	MOV_L	(REGOFF(4,ESP),ESI)	/* POPL ESI */
-	MOV_L	(REGOFF(8,ESP),EBX)	/* POPL EBX */
-	MOV_L	(REGOFF(12,ESP),EBP)	/* POPL EBP */
-	ADD_L	(CONST(16),ESP)
-	RET
-
-	ALIGNTEXT4
-
-#ifdef FIXEDBASE
-# ifdef MSBFIRST
-	GLOBL GLNAME(DrawTETextScanlineWidth9PMSBFirstFixedBase)
-GLNAME(DrawTETextScanlineWidth9PMSBFirstFixedBase):
-# else
-	GLOBL GLNAME(DrawTETextScanlineWidth9PLSBFirstFixedBase)
-GLNAME(DrawTETextScanlineWidth9PLSBFirstFixedBase):
-# endif
-#else
-# ifdef MSBFIRST
-	GLOBL GLNAME(DrawTETextScanlineWidth9PMSBFirst)
-GLNAME(DrawTETextScanlineWidth9PMSBFirst):
-# else
-	GLOBL GLNAME(DrawTETextScanlineWidth9PLSBFirst)
-GLNAME(DrawTETextScanlineWidth9PLSBFirst):
-# endif
-#endif
-
-	SUB_L	(CONST(16),ESP)
-	MOV_L	(EBP,REGOFF(12,ESP))	/* PUSH EBP */
-	MOV_L	(EBX,REGOFF(8,ESP))	/* PUSH EBX */
-	MOV_L	(ESI,REGOFF(4,ESP))	/* PUSH ESI */
-	MOV_L	(EDI,REGOFF(0,ESP))	/* PUSH EDI */
-
-	MOV_L	(line_arg,EBP)
-	MOV_L	(base_arg,EDI)
-	MOV_L	(glyphp_arg,ESI)
-
-	ALIGNTEXT4
-
-.L9_1:
-	/* Pentium-optimized instruction pairing. */
-	/* EAX = bits */
-	MOV_L	(REGOFF(4,ESI),EBX)		/* glyphp[1] */
-	MOV_L	(REGIND(ESI),EAX)		/* glyphp[0] */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[1][line] */
-	MOV_L	(REGOFF(8,ESI),ECX)		/* glyphp[2] */
-	SAL_L	(CONST(9),EBX)			/* glyphp[1][line] << 9 */
-	MOV_L	(REGOFF(12,ESI),EDX)		/* glyphp[3] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[0][line] */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[3][line] */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[2][line] */
-	OR_L	(EBX,EAX)			/* bits |= ..[1].. << 9 */
-	SAL_L	(CONST(18),ECX)			/* glyphp[2][line] << 18 */
-	OR_L	(ECX,EAX)			/* bits |= ..[2].. << 18 */
-	SAL_L	(CONST(27),EDX)			/* glyphp[3][line << 27 */
-			
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(12,ESI),EBX)		/* glyphp[3] */
-	OR_L	(EDX,EAX)			/* bits |= ..[3].. << 27 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[3][line] */
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(CONST(0),EBX)
-	OR_L	(EDX,EAX)			/* bits |= ..[3].. << 27 */
-	MOV_L	(CONST(0),ECX)
-	MOV_B	(AL,BL)
-	MOV_B	(AH,CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),AH)
-	ROL_L	(CONST(16),EAX)
-	MOV_B	(AL,BL)
-	MOV_B	(AH,CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),AH)
-	MOV_L	(REGOFF(12,ESI),EBX)		/* glyphp[3] */
-	ROL_L	(CONST(16),EAX)
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[3][line] */
-	MOV_L	(EAX,REGIND(EDI))
-#endif
-
-	CMP_L   (CONST(32),width_arg)
-        JG      (.L9_2)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(4),EDI)		/* base++ */
-#endif
-	JMP	(.L9_11)
-.L9_2:
-	/* Note that glyphp[3][line] is read again. */
-	/* EAX = bits, EBX = glyphp[3][line] >> 5 */
-	SHR_L	(CONST(5),EBX)			/* glyphp[3][line] >> 5 */
-	MOV_L	(REGOFF(16,ESI),EAX)		/* glyphp[4] */
-	MOV_L	(REGOFF(20,ESI),ECX)		/* glyphp[5] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[4][line] */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[5][line] */
-	MOV_L	(REGOFF(24,ESI),EDX)		/* glyphp[6] */
-	SAL_L	(CONST(4),EAX)			/* glyphp[4][line] << 4 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[6][line] */
-	SAL_L	(CONST(13),ECX)			/* glyphp[5][line] << 13 */
-	OR_L	(EBX,EAX)			/* bits |= ..[4].. << 4 */
-	SAL_L	(CONST(22),EDX)			/* glyphp[6][line] << 22 */
-	MOV_L	(REGOFF(28,ESI),EBX)		/* glyphp[7] */
-	OR_L	(ECX,EAX)			/* bits |= ..[5].. << 13 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[7][line] */
-	OR_L	(EDX,EAX)			/* bits |= ..[6].. << 22 */
-
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(28,ESI),ECX)		/* glyphp[7] */
-	SAL_L	(CONST(31),EBX)			/* glyphp[7][line] << 31 */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[7][line] */
-	OR_L	(EBX,EAX)			/* bits |= ..[7].. << 31 */
-	MOV_L	(REGOFF(32,ESI),EDX)		/* glyphp[8] */
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(4,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),ECX)
-	SAL_L	(CONST(31),EBX)			/* glyphp[7][line] << 31 */
-	MOV_L	(CONST(0),EDX)
-	OR_L	(EBX,EAX)			/* bits |= ..[7].. << 31 */
-	MOV_B	(AL,CL)
-	MOV_B	(AH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),AH)
-	ROL_L	(CONST(16),EAX)
-	MOV_B	(AL,CL)
-	MOV_B	(AH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),AH)
-	MOV_L	(REGOFF(28,ESI),ECX)		/* glyphp[7] */
-	ROL_L	(CONST(16),EAX)
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[7][line] */
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(4,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-	MOV_L	(REGOFF(32,ESI),EDX)		/* glyphp[8] */
-#endif
-
-	CMP_L   (CONST(64),width_arg)
-        JG      (.L9_3)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(8),EDI)		/* base+=2 */
-#endif
-	JMP	(.L9_11)
-.L9_3:
-
-	/* Note that glyphp[7][line] is read again. */
-	/* ECX = bits = glyphp[7][line] >> 1 */
-	SHR_L	(CONST(1),ECX)			/* glyphp[7][line] >> 1 */
-	MOV_L	(REGOFF(36,ESI),EBX)		/* glyphp[9] */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[8][line] */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[9][line] */
-	SAL_L	(CONST(8),EDX)			/* glyphp[8][line] << 8 */
-	MOV_L	(REGOFF(40,ESI),EAX)		/* glyphp[10] */
-	SAL_L	(CONST(17),EBX)			/* glyphp[9][line] << 17 */
-	OR_L	(EDX,ECX)			/* bits |= ..[8].. << 8 */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[10][line] */
-	OR_L	(EBX,ECX)			/* bits |= ..[9].. << 17 */
-	SAL_L	(CONST(26),EAX)			/* glyphp[10][line] << 26 */
-
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(40,ESI),EDX)		/* glyphp[10] */
-	OR_L	(EAX,ECX)			/* bits |= ..[10].. << 26 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[10][line] */
-#ifndef FIXEDBASE
-	MOV_L	(ECX,REGOFF(8,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(ECX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),EDX)
-	OR_L	(EAX,ECX)			/* bits |= ..[10].. << 26 */
-	MOV_L	(CONST(0),EBX)
-	MOV_B	(CL,DL)
-	MOV_B	(CH,BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),CH)
-	ROL_L	(CONST(16),ECX)
-	MOV_B	(CL,DL)
-	MOV_B	(CH,BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),CH)
-	MOV_L	(REGOFF(40,ESI),EDX)		/* glyphp[10] */
-	ROL_L	(CONST(16),ECX)
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[10][line] */
-#ifndef FIXEDBASE
-	MOV_L	(ECX,REGOFF(8,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(ECX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#endif
-
-	CMP_L   (CONST(96),width_arg)
-        JG      (.L9_4)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(12),EDI)		/* base+=3 */
-#endif
-	JMP	(.L9_11)
-.L9_4:
-	/* Note that glyphp[10][line] is read again. */
-	/* EDX = bits = glyphp[10][line] >> 6 */
-	SHR_L	(CONST(6),EDX)			/* glyphp[10][line] >> 6 */
-	MOV_L	(REGOFF(44,ESI),EBX)		/* glyphp[11] */
-	MOV_L	(REGOFF(48,ESI),EAX)		/* glyphp[12] */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[11][line] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[12][line] */
-	MOV_L	(REGOFF(52,ESI),ECX)		/* glyphp[13] */
-	SAL_L	(CONST(3),EBX)			/* glyphp[11][line] << 3 */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[13][line] */
-	SAL_L	(CONST(12),EAX)			/* glyphp[12][line] << 12 */
-	OR_L	(EBX,EDX)			/* bits |= ..[11].. << 3 */
-	SAL_L	(CONST(21),ECX)			/* glyphp[13][line] << 21 */
-	MOV_L	(REGOFF(56,ESI),EBX)		/* glyphp[14] */
-	OR_L	(EAX,EDX)			/* bits |= ..[12].. << 17 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[14][line] */
-	SAL_L	(CONST(30),EBX)			/* glyphp[14][line] << 30 */
-	OR_L	(ECX,EDX)			/* bits |= ..[13].. << 21 */
-
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(56,ESI),EAX)		/* glyphp[14] */
-	OR_L	(EBX,EDX)			/* bits |= ..[14].. << 30 */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[14][line] */
-#ifndef FIXEDBASE
-	MOV_L	(EDX,REGOFF(12,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EDX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),EAX)
-	OR_L	(EBX,EDX)			/* bits |= ..[14].. << 30 */
-	MOV_L	(CONST(0),ECX)
-	MOV_B	(DL,AL)
-	MOV_B	(DH,CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),DH)
-	ROL_L	(CONST(16),EDX)
-	MOV_B	(DL,AL)
-	MOV_B	(DH,CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),DH)
-	MOV_L	(REGOFF(56,ESI),EAX)		/* glyphp[14] */
-	ROL_L	(CONST(16),EDX)
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[14][line] */
-#ifndef FIXEDBASE
-	MOV_L	(EDX,REGOFF(12,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EDX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#endif
-
-	CMP_L   (CONST(128),width_arg)
-        JG      (.L9_5)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(16),EDI)		/* base+=4 */
-#endif
-	JMP	(.L9_11)
-.L9_5:	
-	/* Note that glyphp[14][line] is read again. */
-	/* EAX = bits = glyphp[14][line] >> 2 */
-	SHR_L	(CONST(2),EAX)			/* glyphp[14][line] >> 2 */
-	MOV_L	(REGOFF(60,ESI),ECX)		/* glyphp[15] */
-	MOV_L	(REGOFF(64,ESI),EBX)		/* glyphp[16] */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[15][line] */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[16][line] */
-	MOV_L	(REGOFF(68,ESI),EDX)		/* glyphp[17] */
-	SAL_L	(CONST(7),ECX)			/* glyphp[15][line] << 7 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[17][line] */
-	SAL_L	(CONST(16),EBX)			/* glyphp[16][line] << 16 */
-	OR_L	(ECX,EAX)			/* bits |= ..[15].. << 7 */
-	SAL_L	(CONST(25),EDX)			/* glyphp[17][line] << 25 */
-	OR_L	(EBX,EAX)			/* bits |= ..[16].. << 16 */
-	
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(68,ESI),ECX)		/* glyphp[17] */
-	OR_L	(EDX,EAX)			/* bits |= ..[17].. << 25 */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[17][line] */
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(16,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),ECX)
-	OR_L	(EDX,EAX)			/* bits |= ..[17].. << 25 */
-	MOV_L	(CONST(0),EBX)
-	MOV_B	(AL,CL)
-	MOV_B	(AH,BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),AH)
-	ROL_L	(CONST(16),EAX)
-	MOV_B	(AL,CL)
-	MOV_B	(AH,BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),AH)
-	MOV_L	(REGOFF(68,ESI),ECX)		/* glyphp[17] */
-	ROL_L	(CONST(16),EAX)
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[17][line] */
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(16,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#endif
-
-	CMP_L   (CONST(160),width_arg)
-        JG      (.L9_6)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(20),EDI)		/* base+=5 */
-#endif
-	JMP	(.L9_11)
-.L9_6:	
-	/* Note that glyphp[17][line] is read again. */
-	/* ECX = bits = glyphp[17][line] >> 7 */
-	SHR_L	(CONST(7),ECX)			/* glyphp[17][line] >> 7 */
-	MOV_L	(REGOFF(72,ESI),EBX)		/* glyphp[18] */
-	MOV_L	(REGOFF(76,ESI),EAX)		/* glyphp[19] */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[18][line] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[19][line] */
-	MOV_L	(REGOFF(80,ESI),EDX)		/* glyphp[20] */
-	SAL_L	(CONST(2),EBX)			/* glyphp[18][line] << 2 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[20][line] */
-	SAL_L	(CONST(11),EAX)			/* glyphp[19][line] << 11 */
-	OR_L	(EBX,ECX)			/* bits |= ..[18].. << 2 */
-	SAL_L	(CONST(20),EDX)			/* glyphp[20][line] << 20 */
-	MOV_L	(REGOFF(84,ESI),EBX)		/* glyphp[21] */
-	OR_L	(EAX,ECX)			/* bits |= ..[19].. << 11 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[21][line] */
-	OR_L	(EDX,ECX)			/* bits |= ..[20].. << 20 */
-	
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(84,ESI),EAX)		/* glyphp[21] */
-	SAL_L	(CONST(29),EBX)			/* glyphp[21][line] << 29 */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[21][line] */
-	OR_L	(EBX,ECX)			/* bits |= ..[14].. << 30 */
-	MOV_L	(REGOFF(88,ESI),EDX)		/* glyphp[22] */
-#ifndef FIXEDBASE
-	MOV_L	(ECX,REGOFF(20,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(ECX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),EAX)
-	SAL_L	(CONST(29),EBX)			/* glyphp[21][line] << 29 */
-	MOV_L	(CONST(0),EDX)
-	OR_L	(EBX,ECX)			/* bits |= ..[14].. << 30 */
-	MOV_B	(CL,AL)
-	MOV_B	(CH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),CH)
-	ROL_L	(CONST(16),ECX)
-	MOV_B	(CL,AL)
-	MOV_B	(CH,DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),CH)
-	MOV_L	(REGOFF(84,ESI),EAX)		/* glyphp[21] */
-	ROL_L	(CONST(16),ECX)
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[21][line] */
-#ifndef FIXEDBASE
-	MOV_L	(ECX,REGOFF(20,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(ECX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-	MOV_L	(REGOFF(88,ESI),EDX)		/* glyphp[22] */
-#endif
-
-	CMP_L   (CONST(192),width_arg)
-        JG      (.L9_7)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(24),EDI)		/* base+=6 */
-#endif
-	JMP	(.L9_11)
-.L9_7:
-	/* Note that glyphp[21][line] is read again. */
-	/* EAX = bits = glyphp[21][line] >> 3 */
-	SHR_L	(CONST(3),EAX)			/* glyphp[21][line] >> 3 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[22][line] */
-	MOV_L	(REGOFF(92,ESI),EBX)		/* glyphp[23] */
-	MOV_L	(REGOFF(96,ESI),ECX)		/* glyphp[24] */
-	SAL_L	(CONST(6),EDX)			/* glyphp[22][line] << 6 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[23][line] */
-	OR_L	(EDX,EAX)			/* bits |= ..[22].. << 6 */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[24][line] */
-	SAL_L	(CONST(15),EBX)			/* glyphp[23][line] << 15 */
-	OR_L	(EBX,EAX)			/* bits |= ..[23].. << 15 */
-	SAL_L	(CONST(24),ECX)			/* glyphp[24][line] << 24 */
-
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(96,ESI),EDX)		/* glyphp[24] */
-	OR_L	(ECX,EAX)			/* bits |= ..[24].. << 24 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[24][line] */
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(24,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),EDX)
-	OR_L	(ECX,EAX)			/* bits |= ..[24].. << 24 */
-	MOV_L	(CONST(0),EBX)
-	MOV_B	(AL,DL)
-	MOV_B	(AH,BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),AH)
-	ROL_L	(CONST(16),EAX)
-	MOV_B	(AL,DL)
-	MOV_B	(AH,BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EDX),AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),AH)
-	MOV_L	(REGOFF(96,ESI),EDX)		/* glyphp[24] */
-	ROL_L	(CONST(16),EAX)
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[24][line] */
-#ifndef FIXEDBASE
-	MOV_L	(EAX,REGOFF(24,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EAX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#endif
-
-	CMP_L   (CONST(224),width_arg)
-        JG      (.L9_8)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(28),EDI)		/* base+=7 */
-#endif
-	JMP	(.L9_11)
-.L9_8:
-	/* Note that glyphp[24][line] is read again. */
-	/* EDX = bits = glyphp[24][line] >> 8 */
-
-	SHR_L	(CONST(8),EDX)			/* glyphp[24][line] >> 8 */
-	MOV_L	(REGOFF(100,ESI),EAX)		/* glyphp[25] */
-	MOV_L	(REGOFF(104,ESI),EBX)		/* glyphp[26] */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[25][line] */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[26][line] */
-	MOV_L	(REGOFF(108,ESI),ECX)		/* glyphp[27] */
-	SAL_L	(CONST(1),EAX)			/* glyphp[25][line] << 1 */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[27][line] */
-	SAL_L	(CONST(10),EBX)			/* glyphp[26][line] << 10 */
-	OR_L	(EAX,EDX)			/* bits |= ..[25].. << 1 */
-	SAL_L	(CONST(19),ECX)			/* glyphp[27][line] << 19 */
-	OR_L	(EBX,EDX)			/* bits |= ..[26].. << 10 */
-	MOV_L	(REGOFF(112,ESI),EAX)		/* glyphp[28] */
-	OR_L	(ECX,EDX)			/* bits |= ..[27].. << 19 */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[28][line] */
-
-#ifndef MSBFIRST
-	MOV_L	(REGOFF(112,ESI),EBX)		/* glyphp[28] */
-	SAL_L	(CONST(28),EAX)			/* glyphp[28][line] << 28 */
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[28][line] */
-	OR_L	(EAX,EDX)			/* bits |= ..[28].. << 28 */
-	MOV_L	(REGOFF(116,ESI),ECX)		/* glyphp[29] */
-#ifndef FIXEDBASE
-	MOV_L	(EDX,REGOFF(28,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EDX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),EBX)
-	SAL_L	(CONST(28),EAX)			/* glyphp[28][line] << 28 */
-	MOV_L	(CONST(0),ECX)
-	OR_L	(EAX,EDX)			/* bits |= ..[28].. << 28 */
-	MOV_B	(DL,BL)
-	MOV_B	(DH,CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),DH)
-	ROL_L	(CONST(16),EDX)
-	MOV_B	(DL,BL)
-	MOV_B	(DH,CL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EBX),DL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),DH)
-	MOV_L	(REGOFF(112,ESI),EBX)		/* glyphp[28] */
-	ROL_L	(CONST(16),EDX)
-	MOV_L	(REGOFF(116,ESI),ECX)		/* glyphp[29] */
-#ifndef FIXEDBASE
-	MOV_L	(EDX,REGOFF(28,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EDX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-	MOV_L	(REGBISD(EBX,EBP,4,0),EBX)	/* glyphp[28][line] */
-#endif
-	
-	CMP_L   (CONST(256),width_arg)
-        JG      (.L9_9)
-#ifndef FIXEDBASE
-	ADD_L	(CONST(32),EDI)		/* base+=8 */
-#endif
-	JMP	(.L9_11)
-.L9_9:
-	/* Note that glyphp[28][line] is read again. */
-	/* EBX = bits = glyphp[28][line] >> 4 */
-	SHR_L	(CONST(4),EBX)			/* glyphp[28][line] >> 4 */
-	MOV_L	(REGBISD(ECX,EBP,4,0),ECX)	/* glyphp[29][line] */
-	MOV_L	(REGOFF(120,ESI),EAX)		/* glyphp[30] */
-	MOV_L	(REGOFF(124,ESI),EDX)		/* glyphp[31] */
-	SAL_L	(CONST(5),ECX)			/* glyphp[29][line] << 5 */
-	MOV_L	(REGBISD(EAX,EBP,4,0),EAX)	/* glyphp[30][line] */
-	OR_L	(ECX,EBX)			/* bits |= ..[29].. << 5 */
-	MOV_L	(REGBISD(EDX,EBP,4,0),EDX)	/* glyphp[31][line] */
-	SAL_L	(CONST(14),EAX)			/* glyphp[30][line] << 14 */
-	ADD_L	(CONST(128),ESI)		/* glyphp+=32 */
-	SAL_L	(CONST(23),EDX)			/* glyphp[31][line] << 23 */
-	OR_L	(EAX,EBX)			/* bits |= ..[30].. << 14 */
-	SUB_L	(CONST(288),width_arg)		/* width-=288 */
-	OR_L	(EDX,EBX)			/* bits |= ..[31].. << 23 */
-
-#ifndef MSBFIRST
-#ifndef FIXEDBASE
-	MOV_L	(EBX,REGOFF(32,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EBX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#else
-	MOV_L	(CONST(0),ECX)
-	MOV_L	(CONST(0),EAX)
-	MOV_B	(BL,CL)
-	MOV_B	(BH,AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),BH)
-	ROL_L	(CONST(16),EBX)
-	MOV_B	(BL,CL)
-	MOV_B	(BH,AL)
-	MOV_B	(REGOFF(BYTE_REVERSED,ECX),BL)
-	MOV_B	(REGOFF(BYTE_REVERSED,EAX),BH)
-	ROL_L	(CONST(16),EBX)
-#ifndef FIXEDBASE
-	MOV_L	(EBX,REGOFF(32,EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#else
-	MOV_L	(EBX,REGIND(EDI))	/* WRITE_IN_BIT_ORDER(base, bits) */
-#endif
-#endif
-	
-	ADD_L	(CONST(36),EDI)		/* base+=9 */
-	CMP_L   (CONST(0),width_arg)
-        JG      (.L9_1)
-			
-.L9_11:
-#ifndef FIXEDBASE
-	MOV_L	(EDI,EAX)		/* return base */
-#else
-	MOV_L	(base_arg,EAX)		/* return base */
-#endif
-	MOV_L	(REGOFF(0,ESP),EDI)	/* POPL EDI */
-	MOV_L	(REGOFF(4,ESP),ESI)	/* POPL ESI */
-	MOV_L	(REGOFF(8,ESP),EBX)	/* POPL EBX */
-	MOV_L	(REGOFF(12,ESP),EBP)	/* POPL EBP */
-	ADD_L	(CONST(16),ESP)
-	RET
commit 562462e78dd6a5e2ed5b36aa22be52f31d55485d
Author: Mathieu Bérard <mathieu.berard at crans.org>
Date:   Mon Aug 18 17:05:24 2008 -0400

    Remove dead {bsd,lnx}Resource.c

diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index fa23324..60a18d3 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -72,7 +72,6 @@ libbsd_la_SOURCES = \
 EXTRA_DIST = \
 	bsd_apm.c \
 	bsd_kqueue_apm.c \
-	bsdResource.c \
 	memrange.h \
 	libusb/data.c \
 	libusb/descr.c \
diff --git a/hw/xfree86/os-support/bsd/bsdResource.c b/hw/xfree86/os-support/bsd/bsdResource.c
deleted file mode 100644
index fe166c8..0000000
--- a/hw/xfree86/os-support/bsd/bsdResource.c
+++ /dev/null
@@ -1,92 +0,0 @@
-
-/* Resource information code */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86Privstr.h"
-#include "xf86Pci.h"
-#include "xf86Resources.h"
-#define NEED_OS_RAC_PROTOS
-#include "xf86_OSlib.h"
-
-/* Avoid Imakefile changes */
-#include "bus/Pci.h"
-
-#ifdef INCLUDE_XF86_NO_DOMAIN
-
-#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
-
-resPtr
-xf86AccResFromOS(resPtr ret)
-{
-    resRange range;
-
-    /*
-     * Fallback is to claim the following areas:
-     *
-     * 0x000c0000 - 0x000effff  location of VGA and other extensions ROMS
-     */
-
-    RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-
-    /*
-     * Fallback would be to claim well known ports in the 0x0 - 0x3ff range
-     * along with their sparse I/O aliases, but that's too imprecise.  Instead
-     * claim a bare minimum here.
-     */
-    RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */
-    ret = xf86AddResToList(ret, &range, -1);
-
-    /*
-     * At minimum, the top and bottom resources must be claimed, so that
-     * resources that are (or appear to be) unallocated can be relocated.
-     */
-    RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-    RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-/*  RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
-    ret = xf86AddResToList(ret, &range, -1); */
-    RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-
-    /* XXX add others */
-    return ret;
-}
-
-#elif defined(__powerpc__)
-
-resPtr
-xf86AccResFromOS(resPtr ret)
-{
-    resRange range;
-
-    /*
-     * At minimum, the top and bottom resources must be claimed, so that
-     * resources that are (or appear to be) unallocated can be relocated.
-     */
-    RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-    RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-    RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-    RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-
-    return ret;
-}
-
-#else
-
-#error : Put your platform dependent code here!!
-
-#endif
-
-#endif /* INCLUDE_XF86_NO_DOMAIN */
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 02a4e0c..f12dfb0 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -44,8 +44,7 @@ INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
 
 # FIXME: These need to be added to the build
 LNX_EXTRA_SRCS = \
-	lnx_font.c \
-	lnxResource.c
+	lnx_font.c
 
 EXTRA_DIST = \
 	$(LNX_EXTRA_SRCS) \
diff --git a/hw/xfree86/os-support/linux/lnxResource.c b/hw/xfree86/os-support/linux/lnxResource.c
deleted file mode 100644
index 734f4d6..0000000
--- a/hw/xfree86/os-support/linux/lnxResource.c
+++ /dev/null
@@ -1,105 +0,0 @@
-
-/* Resource information code */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86Privstr.h"
-#include "xf86Pci.h"
-#include "xf86Resources.h"
-#define NEED_OS_RAC_PROTOS
-#include "xf86_OSlib.h"
-#include "lnx.h"
-
-/* Avoid Imakefile changes */
-#include "bus/Pci.h"
-
-#ifdef INCLUDE_XF86_NO_DOMAIN
-
-#ifdef __alpha__
-
-resPtr
-xf86AccResFromOS(resPtr ret)
-{
-    resRange range;
-
-    /*
-     * Fallback is to claim the following areas:
-     *
-     * 0x000c0000 - 0x000effff  location of VGA and other extensions ROMS
-     */
-
-    RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-
-    /*
-     * Fallback would be to claim well known ports in the 0x0 - 0x3ff range
-     * along with their sparse I/O aliases, but that's too imprecise.  Instead
-     * claim a bare minimum here.
-     */
-    RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */
-    ret = xf86AddResToList(ret, &range, -1);
-
-    /*
-     * At minimum, the top and bottom resources must be claimed, so that
-     * resources that are (or appear to be) unallocated can be relocated.
-     */
-    RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-    RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-/*  RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
-    ret = xf86AddResToList(ret, &range, -1); */
-    RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-
-    /* XXX add others */
-    return ret;
-}
-
-#elif defined(__powerpc__) || \
-      defined(__sparc__) || \
-      defined(__mips__) || \
-      defined(__sh__) || \
-      defined(__m32r__) || \
-      defined(__mc68000__) || \
-      defined(__arm__) || \
-      defined(__s390__) || \
-      defined(__hppa__)
-
-resPtr
-xf86AccResFromOS(resPtr ret)
-{
-    resRange range;
-
-    /*
-     * At minimum, the top and bottom resources must be claimed, so that
-     * resources that are (or appear to be) unallocated can be relocated.
-     */
-    RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-    RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-    RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
-    ret = xf86AddResToList(ret, &range, -1);
-#if defined(__sparc__) || defined(__powerpc__)
-    RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock);
-#else
-    RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
-#endif
-    ret = xf86AddResToList(ret, &range, -1);
-
-    return ret;
-}
-
-#else
-
-#error : Put your platform dependent code here!!
-
-#endif
-
-#endif /* INCLUDE_XF86_NO_DOMAIN */
commit e3e47b35e369bf4abb0fe15865acca0b34600b1f
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 17:03:22 2008 -0400

    Remove MAX_PCI_{BUSES,DOMAINS} and some associated #if 0.

diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index 0686946..734e709 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -138,19 +138,16 @@
 
 /* Global data */
 
-pciBusInfo_t  *pciBusInfo[MAX_PCI_BUSES] = { NULL, };
-_X_EXPORT int            pciNumBuses = 0;     /* Actual number of PCI buses */
+pciBusInfo_t *pciBusInfo = NULL;
+_X_EXPORT int pciNumBuses = 0;     /* Actual number of PCI buses */
 
 _X_EXPORT ADDRESS
 pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
 {
-  int bus = PCI_BUS_FROM_TAG(tag);
-
-  if ((bus >= 0) && (bus < pciNumBuses) && pciBusInfo[bus] &&
-	pciBusInfo[bus]->funcs->pciAddrBusToHost)
-	  return (*pciBusInfo[bus]->funcs->pciAddrBusToHost)(tag, type, addr);
-  else
-	  return(addr);
+    if (pciBusInfo->funcs->pciAddrBusToHost)
+	return pciBusInfo->funcs->pciAddrBusToHost(tag, type, addr);
+    else
+	return addr;
 }
 
 _X_EXPORT PCITAG
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index a8b1079..31a7fbf 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -115,14 +115,10 @@
 /*
  * Global Definitions
  */
-#if defined(sun) && defined(SVR4) && defined(sparc)
-# define MAX_PCI_BUSES   4096	/* Max number of PCI buses           */
-#elif (defined(__alpha__) || defined(__ia64__)) && defined (linux)
-# define MAX_PCI_DOMAINS	512
-# define PCI_DOM_MASK	0x01fful
-# define MAX_PCI_BUSES	(MAX_PCI_DOMAINS*256) /* 256 per domain      */
+#if (defined(__alpha__) || defined(__ia64__)) && defined (linux)
+#define PCI_DOM_MASK	0x01fful
 #else
-# define MAX_PCI_BUSES   256	/* Max number of PCI buses           */
+#define PCI_DOM_MASK 0x0ffu
 #endif
 
 #define DEVID(vendor, device) \
@@ -245,6 +241,6 @@ void          pciCfgMech1SetBits(PCITAG tag, int offset, CARD32 mask,
 				 CARD32 val);
 ADDRESS       pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS);
 
-extern pciBusInfo_t  *pciBusInfo[];
+extern pciBusInfo_t  *pciBusInfo;
 
 #endif /* _PCI_H */
diff --git a/hw/xfree86/os-support/bus/bsd_pci.c b/hw/xfree86/os-support/bus/bsd_pci.c
index 57ad09b..3bd9d15 100644
--- a/hw/xfree86/os-support/bus/bsd_pci.c
+++ b/hw/xfree86/os-support/bus/bsd_pci.c
@@ -80,7 +80,7 @@ void
 bsdPciInit(void)
 {
     pciNumBuses = 1;
-    pciBusInfo[0] = &bsd_pci;
+    pciBusInfo = &bsd_pci;
 
     xf86InitVidMem();
 }
diff --git a/hw/xfree86/os-support/bus/ix86Pci.c b/hw/xfree86/os-support/bus/ix86Pci.c
index c6a8471..80bac32 100644
--- a/hw/xfree86/os-support/bus/ix86Pci.c
+++ b/hw/xfree86/os-support/bus/ix86Pci.c
@@ -470,185 +470,17 @@ ix86PciSelectCfgmech(void)
     xf86MsgVerb(X_INFO, 2, "PCI: No PCI bus found\n");
 }
 
-#if 0
-static pciTagRec
-ix86PcibusTag(CARD8 bus, CARD8 cardnum, CARD8 func)
-{
-    pciTagRec tag;
-
-    tag.cfg1 = 0;
-
-    if (func > 7 || cardnum >= pciBusInfo[bus]->numDevices)
-	return tag;
-
-    switch (ix86Pci0.configMech) {
-    case PCI_CFG_MECH_1:
-	    tag.cfg1 = PCI_EN | ((CARD32)bus << 16) |
-		       ((CARD32)cardnum << 11) |
-		       ((CARD32)func << 8);
-	    break;
-
-    case PCI_CFG_MECH_2:
-	    tag.cfg2.port    = 0xc000 | ((CARD16)cardnum << 8);
-	    tag.cfg2.enable  = 0xf0 | (func << 1);
-	    tag.cfg2.forward = bus;
-	    break;
-    }
-
-    return tag;
-}
-#endif
-
-#if 0
-static CARD32
-ix86PciReadLongSetup(PCITAG Tag, int reg)
-{
-    ix86PciSelectCfgmech();
-    return (*ix86Pci0.funcs->pciReadLong)(Tag,reg);
-}
-
-static CARD32
-ix86PciReadLongCFG1(PCITAG Tag, int reg)
-{
-    CARD32    addr, data = 0;
-
-#ifdef DEBUGPCI
-    ErrorF("ix86PciReadLong 0x%lx, %d\n", Tag, reg);
-#endif
-
-    addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg);
-    outl(PCI_CFGMECH1_ADDRESS_REG, addr);
-    data = inl(PCI_CFGMECH1_DATA_REG);
-    outl(PCI_CFGMECH1_ADDRESS_REG, 0);
-
-#ifdef DEBUGPCI
-    ErrorF("ix86PciReadLong 0x%lx\n", data);
-#endif
-
-    return data;
-}
-
-static CARD32
-ix86PciReadLongCFG2(PCITAG Tag, int reg)
-{
-    CARD32    addr, data = 0;
-    CARD8     forward, enable;
-
-#ifdef DEBUGPCI
-    ErrorF("ix86PciReadLong 0x%lx, %d\n", Tag, reg);
-#endif
-
-    forward  = PCI_FORWARD_FROM_TAG(Tag);
-    enable   = PCI_ENABLE_FROM_TAG(Tag);
-    addr     = PCI_ADDR_FROM_TAG_CFG2(Tag,reg);
-
-    outb(PCI_CFGMECH2_ENABLE_REG, enable);
-    outb(PCI_CFGMECH2_FORWARD_REG, forward);
-    data = inl((CARD16)addr);
-    outb(PCI_CFGMECH2_ENABLE_REG, 0);
-    outb(PCI_CFGMECH2_FORWARD_REG, 0);
-
-#ifdef DEBUGPCI
-    ErrorF("ix86PciReadLong 0x%lx\n", data);
-#endif
-
-    return data;
-}
-
-static void
-ix86PciWriteLongSetup(PCITAG Tag, int reg, CARD32 data)
-{
-    ix86PciSelectCfgmech();
-    (*ix86Pci0.funcs->pciWriteLong)(Tag,reg,data);
-}
-
-static void
-ix86PciWriteLongCFG1(PCITAG Tag, int reg, CARD32 data)
-{
-    CARD32    addr;
-
-    addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg);
-    outl(PCI_CFGMECH1_ADDRESS_REG, addr);
-    outl(PCI_CFGMECH1_DATA_REG, data);
-    outl(PCI_CFGMECH1_ADDRESS_REG, 0);
-}
-
-static void
-ix86PciWriteLongCFG2(PCITAG Tag, int reg, CARD32 data)
-{
-    CARD32    addr;
-    CARD8 forward, enable;
-
-    forward  = PCI_FORWARD_FROM_TAG(Tag);
-    enable   = PCI_ENABLE_FROM_TAG(Tag);
-    addr     = PCI_ADDR_FROM_TAG_CFG2(Tag,reg);
-
-    outb(PCI_CFGMECH2_ENABLE_REG, enable);
-    outb(PCI_CFGMECH2_FORWARD_REG, forward);
-    outl((CARD16)addr, data);
-    outb(PCI_CFGMECH2_ENABLE_REG, 0);
-    outb(PCI_CFGMECH2_FORWARD_REG, 0);
-}
-
-static void
-ix86PciSetBitsLongSetup(PCITAG Tag, int reg, CARD32 mask, CARD32 val)
-{
-    ix86PciSelectCfgmech();
-    (*ix86Pci0.funcs->pciSetBitsLong)(Tag,reg,mask,val);
-}
-
-static void
-ix86PciSetBitsLongCFG1(PCITAG Tag, int reg, CARD32 mask, CARD32 val)
-{
-    CARD32    addr, data = 0;
-
-#ifdef DEBUGPCI
-    ErrorF("ix86PciSetBitsLong 0x%lx, %d\n", Tag, reg);
-#endif
-
-    addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg);
-    outl(PCI_CFGMECH1_ADDRESS_REG, addr);
-    data = inl(PCI_CFGMECH1_DATA_REG);
-    data = (data & ~mask) | (val & mask);
-    outl(PCI_CFGMECH1_DATA_REG, data);
-    outl(PCI_CFGMECH1_ADDRESS_REG, 0);
-}
-
-static void
-ix86PciSetBitsLongCFG2(PCITAG Tag, int reg, CARD32 mask, CARD32 val)
-{
-    CARD32    addr, data = 0;
-    CARD8 enable, forward;
-
-#ifdef DEBUGPCI
-    ErrorF("ix86PciSetBitsLong 0x%lx, %d\n", Tag, reg);
-#endif
-
-    forward  = PCI_FORWARD_FROM_TAG(Tag);
-    enable   = PCI_ENABLE_FROM_TAG(Tag);
-    addr     = PCI_ADDR_FROM_TAG_CFG2(Tag,reg);
-
-    outb(PCI_CFGMECH2_ENABLE_REG, enable);
-    outb(PCI_CFGMECH2_FORWARD_REG, forward);
-    data = inl((CARD16)addr);
-    data = (data & ~mask) | (val & mask);
-    outl((CARD16)addr, data);
-    outb(PCI_CFGMECH2_ENABLE_REG, 0);
-    outb(PCI_CFGMECH2_FORWARD_REG, 0);
-}
-#endif
-
 void
 ix86PciInit()
 {
-    /* Initialize pciBusInfo[] array and function pointers */
+    /* Initialize pciBusInfo */
     pciNumBuses    = 1;
-    pciBusInfo[0]  = &ix86Pci0;
+    pciBusInfo     = &ix86Pci0;
 
     /* Make sure that there is a PCI bus present. */
     ix86PciSelectCfgmech();
     if (ix86Pci0.configMech == PCI_CFG_MECH_UNKNOWN) {
 	pciNumBuses    = 0;
-	pciBusInfo[0]  = NULL;
+	pciBusInfo     = NULL;
     }
 }
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index 634d22f..bbc5917 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -115,7 +115,7 @@ linuxPciInit(void)
 	return;
     }
     pciNumBuses    = 1;
-    pciBusInfo[0]  = &linuxPci0;
+    pciBusInfo	   = &linuxPci0;
 }
 
 /**
commit 593144dddd977f53bcd1a115f9544eeece46df4c
Author: Mathieu Bérard <mathieu.berard at crans.org>
Date:   Mon Aug 18 16:46:36 2008 -0400

    Remove some unused assembly code and assyntax.h

diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
index b521efe..04997a6 100644
--- a/hw/xfree86/os-support/Makefile.am
+++ b/hw/xfree86/os-support/Makefile.am
@@ -1,7 +1,7 @@
 SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS)
 DIST_SUBDIRS = bsd bus misc linux solaris sysv sco hurd
 
-sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h assyntax.h
+sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h
 
 EXTRA_DIST = int10Defines.h xf86OSpriv.h
 
@@ -23,5 +23,4 @@ DISTCLEANFILES = xorgos.c
 
 # FIXME: These don't seem to be used anywhere
 EXTRA_DIST += \
-	shared/bios_devmem.c \
-	shared/inout.S
+	shared/bios_devmem.c
diff --git a/hw/xfree86/os-support/assyntax.h b/hw/xfree86/os-support/assyntax.h
deleted file mode 100644
index 4f8bbbf..0000000
--- a/hw/xfree86/os-support/assyntax.h
+++ /dev/null
@@ -1,749 +0,0 @@
-#ifndef __ASSYNTAX_H__
-#define	__ASSYNTAX_H__
-
-/*
- * Copyright 1992 Vrije Universiteit, The Netherlands
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of the Vrije Universiteit not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  The Vrije Universiteit makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * The Vrije Universiteit DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL The Vrije Universiteit BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1993-1999 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
- /*
- * assyntax.h
- *
- * Select the syntax appropriate to the 386 assembler being used
- * To add support for more assemblers add more columns to the CHOICE
- * macro.  Note that register names must also have uppercase names
- * to avoid macro recursion. e.g., #define ah %ah recurses!
- *
- * NB 1.  Some of the macros for certain assemblers imply that the code is to
- *	  run in protected mode!!  Caveat emptor.
- *
- * NB 2.  486 specific instructions are not included.  This is to discourage
- *	  their accidental use in code that is intended to run on 386 and 486
- *	  systems.
- *
- * Supported assemblers:
- *
- * (a) AT&T SysVr4 as(1):	default
- * (b) GNU Assembler gas:	define USE_GAS or GNU_ASSEMBLER
- * (c) Amsterdam Compiler kit:	define ACK_ASSEMBLER
- *
- * The following naming conventions have been used to identify the various
- * data types:
- *		_SR = segment register version
- *	Integer:
- *		_Q = quadword	= 64 bits
- *		_L = long	= 32 bits
- *		_W = short	= 16 bits
- *		_B = byte	=  8 bits
- *	Floating-point:
- *		_X = m80real	= 80 bits
- *		_D = double	= 64 bits
- *		_S = single	= 32 bits
- *
- * Author: Gregory J. Sharp, Sept 1992
- *         Vrije Universiteit, Amsterdam, The Netherlands
- */
-
-#if defined(USE_GAS) && !defined(GNU_ASSEMBLER)
-#define GNU_ASSEMBLER
-#endif
-
-#if (defined(__STDC__) && !defined(UNIXCPP)) || (defined (sun) && defined (__i386__) && defined (SVR4) && defined (__STDC__) && !defined (__GNUC__)) 
-#define	CONCAT(x, y)	x ## y
-#else
-#define	CONCAT(x, y)	x/**/y
-#endif
-
-#ifdef ACK_ASSEMBLER
-
-/* Assume we write code for 32-bit protected mode! */
-
-/* Redefine register names for GAS & AT&T assemblers */
-#define	AL	al
-#define	AH	ah
-#define	AX	ax
-#define	EAX	ax
-#define	BL	bl
-#define	BH	bh
-#define	BX	bx
-#define	EBX	bx
-#define	CL	cl
-#define	CH	ch
-#define	CX	cx
-#define	ECX	cx
-#define	DL	dl
-#define	DH	dh
-#define	DX	dx
-#define	EDX	dx
-#define	BP	bp
-#define	EBP	bp
-#define	SI	si
-#define	ESI	si
-#define	DI	di
-#define	EDI	di
-#define	SP	sp
-#define	ESP	sp
-#define	CS	cs
-#define	SS	ss
-#define	DS	ds
-#define	ES	es
-#define	FS	fs
-#define	GS	gs
-/* Control Registers */
-#define	CR0	cr0
-#define	CR1	cr1
-#define	CR2	cr2
-#define	CR3	cr3
-/* Debug Registers */
-#define	DR0	dr0
-#define	DR1	dr1
-#define	DR2	dr2
-#define	DR3	dr3
-#define	DR4	dr4
-#define	DR5	dr5
-#define	DR6	dr6
-#define	DR7	dr7
-/* Floating-point Stack */
-#define	ST	st
-
-#define	AS_BEGIN	.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
-
-
-#define	_WTOG		o16	/* word toggle for _W instructions */
-#define	_LTOG			/* long toggle for _L instructions */
-#define	ADDR_TOGGLE	a16
-#define	OPSZ_TOGGLE	o16
-#define	USE16		.use16
-#define	USE32		.use32
-
-#define	CHOICE(a,b,c)	c
-
-#else /* AT&T or GAS */
-
-/* Redefine register names for GAS & AT&T assemblers */
-#define	AL	%al
-#define	AH	%ah
-#define	AX	%ax
-#define	EAX	%eax
-#define	BL	%bl
-#define	BH	%bh
-#define	BX	%bx
-#define	EBX	%ebx
-#define	CL	%cl
-#define	CH	%ch
-#define	CX	%cx
-#define	ECX	%ecx
-#define	DL	%dl
-#define	DH	%dh
-#define	DX	%dx
-#define	EDX	%edx
-#define	BP	%bp
-#define	EBP	%ebp
-#define	SI	%si
-#define	ESI	%esi
-#define	DI	%di
-#define	EDI	%edi
-#define	SP	%sp
-#define	ESP	%esp
-#define	CS	%cs
-#define	SS	%ss
-#define	DS	%ds
-#define	ES	%es
-#define	FS	%fs
-#define	GS	%gs
-/* Control Registers */
-#define	CR0	%cr0
-#define	CR1	%cr1
-#define	CR2	%cr2
-#define	CR3	%cr3
-/* Debug Registers */
-#define	DR0	%db0
-#define	DR1	%db1
-#define	DR2	%db2
-#define	DR3	%db3
-#define	DR4	%db4
-#define	DR5	%db5
-#define	DR6	%db6
-#define	DR7	%db7
-/* Floating-point Stack */
-#define	ST	%st
-
-#define	AS_BEGIN
-#define	USE16
-#define	USE32
-
-#ifdef GNU_ASSEMBLER
-
-#define	ADDR_TOGGLE	aword
-#define	OPSZ_TOGGLE	word
-
-#define	CHOICE(a,b,c)	b
-
-#else
-/*
- * AT&T ASSEMBLER SYNTAX
- * *********************
- */
-#define	CHOICE(a,b,c)	a
-
-#define	ADDR_TOGGLE	addr16
-#define	OPSZ_TOGGLE	data16
-
-#endif /* GNU_ASSEMBLER */
-#endif /* ACK_ASSEMBLER */
-
-
-#if (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__)
-#define GLNAME(a)       a
-#else
-#define GLNAME(a)       CONCAT(_,a)
-#endif
-
-
-	/****************************************/
-	/*					*/
-	/*	Select the various choices	*/
-	/*					*/
-	/****************************************/
-
-
-/* Redefine assembler directives */
-/*********************************/
-#define GLOBL		CHOICE(.globl, .globl, .extern)
-#define	ALIGNTEXT4	CHOICE(.align 4, .align ARG2(2,0x90), .align 4)
-#define	ALIGNTEXT2	CHOICE(.align 2, .align ARG2(1,0x90), .align 2)
-/* ALIGNTEXT4ifNOP is the same as ALIGNTEXT4, but only if the space is
- * guaranteed to be filled with NOPs.  Otherwise it does nothing.
- */
-#define	ALIGNTEXT4ifNOP	CHOICE(.align 4, .align ARG2(2,0x90), /*can't do it*/)
-#define	ALIGNDATA4	CHOICE(.align 4, .align ARG2(2,0x0), .align 4)
-#define	ALIGNDATA2	CHOICE(.align 2, .align ARG2(1,0x0), .align 2)
-#define	FILE(s)		CHOICE(.file s, .file s, .file s)
-#define	STRING(s)	CHOICE(.string s, .asciz s, .asciz s)
-#define	D_LONG		CHOICE(.long, .long, .data4)
-#define	D_WORD		CHOICE(.value, .short, .data2)
-#define	D_BYTE		CHOICE(.byte, .byte, .data1)
-#define	SPACE		CHOICE(.comm, .space, .space)
-#define	COMM		CHOICE(.comm, .comm, .comm)
-#define	SEG_DATA	CHOICE(.data, .data, .sect .data)
-#define	SEG_TEXT	CHOICE(.text, .text, .sect .text)
-#define	SEG_BSS		CHOICE(.bss, .bss, .sect .bss)
-
-#ifdef GNU_ASSEMBLER
-#define	D_SPACE(n)	. = . + n
-#else
-#define	D_SPACE(n)	.space n
-#endif
-
-/* Addressing Modes */
-/* Immediate Mode */
-#define	ADDR(a)		CHOICE(CONCAT($,a), CONCAT($,a), a)
-#define	CONST(a)	CHOICE(CONCAT($,a), CONCAT($,a), a)
-
-/* Indirect Mode */
-#define	CONTENT(a)	CHOICE(a, a, (a))	 /* take contents of variable */
-#define	REGIND(a)	CHOICE((a), (a), (a))	 /* Register a indirect */
-/* Register b indirect plus displacement a */
-#define	REGOFF(a, b)	CHOICE(a(b), a(b), a(b))
-/* Reg indirect Base + Index + Displacement  - this is mainly for 16-bit mode
- * which has no scaling
- */
-#define	REGBID(b,i,d)	CHOICE(d(b,i), d(b,i), d(b)(i))
-/* Reg indirect Base + (Index * Scale) + Displacement */
-#define	REGBISD(b,i,s,d) CHOICE(d(b,i,s), d(b,i,s), d(b)(i*s))
-/* Displaced Scaled Index: */
-#define REGDIS(d,i,s)	CHOICE(d(,i,s), d(,i,s), d(i * s))
-/* Indexed Base: */
-#define REGBI(b,i)	CHOICE((b,i), (b,i), (b)(i))
-/* Displaced Base: */
-#define REGDB(d,b)	CHOICE(d(b), d(b), d(b))
-/* Variable indirect: */
-#define VARINDIRECT(var) CHOICE(*var, *var, (var))
-/* Use register contents as jump/call target: */
-#define CODEPTR(reg)	CHOICE(*reg, *reg, reg)
-
-/* For expressions requiring bracketing
- * eg. (CRT0_PM | CRT_EM)
- */
-
-#define	EXPR(a)		CHOICE([a], (a), [a])
-#define	ENOT(a)		CHOICE(0!a, ~a, ~a)
-#define	EMUL(a,b)	CHOICE(a\*b, a*b, a*b)
-#define	EDIV(a,b)	CHOICE(a\/b, a/b, a/b)
-
-/*
- * We have to beat the problem of commas within arguments to choice.
- * eg. choice (add a,b, add b,a) will get argument mismatch.  Luckily ANSI
- * and other known cpp definitions evaluate arguments before substitution
- * so the following works.
- */
-#define	ARG2(a, b)	a,b
-#define	ARG3(a,b,c)	a,b,c
-
-/* Redefine assembler commands */
-#define	AAA		CHOICE(aaa, aaa, aaa)
-#define	AAD		CHOICE(aad, aad, aad)
-#define	AAM		CHOICE(aam, aam, aam)
-#define	AAS		CHOICE(aas, aas, aas)
-#define	ADC_L(a, b)	CHOICE(adcl ARG2(a,b), adcl ARG2(a,b), _LTOG adc ARG2(b,a))
-#define	ADC_W(a, b)	CHOICE(adcw ARG2(a,b), adcw ARG2(a,b), _WTOG adc ARG2(b,a))
-#define	ADC_B(a, b)	CHOICE(adcb ARG2(a,b), adcb ARG2(a,b), adcb ARG2(b,a))
-#define	ADD_L(a, b)	CHOICE(addl ARG2(a,b), addl ARG2(a,b), _LTOG add ARG2(b,a))
-#define	ADD_W(a, b)	CHOICE(addw ARG2(a,b), addw ARG2(a,b), _WTOG add ARG2(b,a))
-#define	ADD_B(a, b)	CHOICE(addb ARG2(a,b), addb ARG2(a,b), addb ARG2(b,a))
-#define	AND_L(a, b)	CHOICE(andl ARG2(a,b), andl ARG2(a,b), _LTOG and ARG2(b,a))
-#define	AND_W(a, b)	CHOICE(andw ARG2(a,b), andw ARG2(a,b), _WTOG and ARG2(b,a))
-#define	AND_B(a, b)	CHOICE(andb ARG2(a,b), andb ARG2(a,b), andb ARG2(b,a))
-#define	ARPL(a,b)	CHOICE(arpl ARG2(a,b), arpl ARG2(a,b), arpl ARG2(b,a))
-#define	BOUND_L(a, b)	CHOICE(boundl ARG2(a,b), boundl ARG2(b,a), _LTOG bound ARG2(b,a))
-#define	BOUND_W(a, b)	CHOICE(boundw ARG2(a,b), boundw ARG2(b,a), _WTOG bound ARG2(b,a))
-#define	BSF_L(a, b)	CHOICE(bsfl ARG2(a,b), bsfl ARG2(a,b), _LTOG bsf ARG2(b,a))
-#define	BSF_W(a, b)	CHOICE(bsfw ARG2(a,b), bsfw ARG2(a,b), _WTOG bsf ARG2(b,a))
-#define	BSR_L(a, b)	CHOICE(bsrl ARG2(a,b), bsrl ARG2(a,b), _LTOG bsr ARG2(b,a))
-#define	BSR_W(a, b)	CHOICE(bsrw ARG2(a,b), bsrw ARG2(a,b), _WTOG bsr ARG2(b,a))
-#define	BT_L(a, b)	CHOICE(btl ARG2(a,b), btl ARG2(a,b), _LTOG bt ARG2(b,a))
-#define	BT_W(a, b)	CHOICE(btw ARG2(a,b), btw ARG2(a,b), _WTOG bt ARG2(b,a))
-#define	BTC_L(a, b)	CHOICE(btcl ARG2(a,b), btcl ARG2(a,b), _LTOG btc ARG2(b,a))
-#define	BTC_W(a, b)	CHOICE(btcw ARG2(a,b), btcw ARG2(a,b), _WTOG btc ARG2(b,a))
-#define	BTR_L(a, b)	CHOICE(btrl ARG2(a,b), btrl ARG2(a,b), _LTOG btr ARG2(b,a))
-#define	BTR_W(a, b)	CHOICE(btrw ARG2(a,b), btrw ARG2(a,b), _WTOG btr ARG2(b,a))
-#define	BTS_L(a, b)	CHOICE(btsl ARG2(a,b), btsl ARG2(a,b), _LTOG bts ARG2(b,a))
-#define	BTS_W(a, b)	CHOICE(btsw ARG2(a,b), btsw ARG2(a,b), _WTOG bts ARG2(b,a))
-#define	CALL(a)		CHOICE(call a, call a, call a)
-#define	CALLF(s,a)	CHOICE(lcall ARG2(s,a), lcall ARG2(s,a), callf s:a)
-#define	CBW		CHOICE(cbtw, cbw, cbw)
-#define	CWDE		CHOICE(cwtd, cwde, cwde)
-#define	CLC		CHOICE(clc, clc, clc)
-#define	CLD		CHOICE(cld, cld, cld)
-#define	CLI		CHOICE(cli, cli, cli)
-#define	CLTS		CHOICE(clts, clts, clts)
-#define	CMC		CHOICE(cmc, cmc, cmc)
-#define	CMP_L(a, b)	CHOICE(cmpl ARG2(a,b), cmpl ARG2(a,b), _LTOG cmp ARG2(b,a))
-#define	CMP_W(a, b)	CHOICE(cmpw ARG2(a,b), cmpw ARG2(a,b), _WTOG cmp ARG2(b,a))
-#define	CMP_B(a, b)	CHOICE(cmpb ARG2(a,b), cmpb ARG2(a,b), cmpb ARG2(b,a))
-#define	CMPS_L		CHOICE(cmpsl, cmpsl, _LTOG cmps)
-#define	CMPS_W		CHOICE(cmpsw, cmpsw, _WTOG cmps)
-#define	CMPS_B		CHOICE(cmpsb, cmpsb, cmpsb)
-#define	CWD		CHOICE(cwtl, cwd, cwd)
-#define	CDQ		CHOICE(cltd, cdq, cdq)
-#define	DAA		CHOICE(daa, daa, daa)
-#define	DAS		CHOICE(das, das, das)
-#define	DEC_L(a)	CHOICE(decl a, decl a, _LTOG dec a)
-#define	DEC_W(a)	CHOICE(decw a, decw a, _WTOG dec a)
-#define	DEC_B(a)	CHOICE(decb a, decb a, decb a)
-#define	DIV_L(a)	CHOICE(divl a, divl a, div a)
-#define	DIV_W(a)	CHOICE(divw a, divw a, div a)
-#define	DIV_B(a)	CHOICE(divb a, divb a, divb a)
-#define	ENTER(a,b)	CHOICE(enter ARG2(a,b), enter ARG2(a,b), enter ARG2(b,a))
-#define	HLT		CHOICE(hlt, hlt, hlt)
-#define	IDIV_L(a)	CHOICE(idivl a, idivl a, _LTOG idiv a)
-#define	IDIV_W(a)	CHOICE(idivw a, idivw a, _WTOG idiv a)
-#define	IDIV_B(a)	CHOICE(idivb a, idivb a, idivb a)
-/* More forms than this for imul!! */
-#define	IMUL_L(a, b)	CHOICE(imull ARG2(a,b), imull ARG2(a,b), _LTOG imul ARG2(b,a))
-#define	IMUL_W(a, b)	CHOICE(imulw ARG2(a,b), imulw ARG2(a,b), _WTOG imul ARG2(b,a))
-#define	IMUL_B(a)	CHOICE(imulb a, imulb a, imulb a)
-#define	IN_L		CHOICE(inl (DX), inl ARG2(DX,EAX), _LTOG in DX)
-#define	IN_W		CHOICE(inw (DX), inw ARG2(DX,AX), _WTOG in DX)
-#define	IN_B		CHOICE(inb (DX), inb ARG2(DX,AL), inb DX)
-/* Please AS code writer: use the following ONLY, if you refer to ports<256
- * directly, but not in IN1_W(DX), for instance, even if IN1_ looks nicer
- */
-#if defined (sun)
-#define IN1_L(a)    CHOICE(inl (a), inl ARG2(a,EAX), _LTOG in a)
-#define IN1_W(a)    CHOICE(inw (a), inw ARG2(a,AX), _WTOG in a)
-#define IN1_B(a)    CHOICE(inb (a), inb ARG2(a,AL), inb a)
-#else
-#define	IN1_L(a)	CHOICE(inl a, inl ARG2(a,EAX), _LTOG in a)
-#define	IN1_W(a)	CHOICE(inw a, inw ARG2(a,AX), _WTOG in a)
-#define	IN1_B(a)	CHOICE(inb a, inb ARG2(a,AL), inb a)
-#endif
-#define	INC_L(a)	CHOICE(incl a, incl a, _LTOG inc a)
-#define	INC_W(a)	CHOICE(incw a, incw a, _WTOG inc a)
-#define	INC_B(a)	CHOICE(incb a, incb a, incb a)
-#define	INS_L		CHOICE(insl, insl, _LTOG ins)
-#define	INS_W		CHOICE(insw, insw, _WTOG ins)
-#define	INS_B		CHOICE(insb, insb, insb)
-#define	INT(a)		CHOICE(int a, int a, int a)
-#define	INT3		CHOICE(int CONST(3), int3, int CONST(3))
-#define	INTO		CHOICE(into, into, into)
-#define	IRET		CHOICE(iret, iret, iret)
-#define	IRETD		CHOICE(iret, iret, iretd)
-#define	JA(a)		CHOICE(ja a, ja a, ja a)
-#define	JAE(a)		CHOICE(jae a, jae a, jae a)
-#define	JB(a)		CHOICE(jb a, jb a, jb a)
-#define	JBE(a)		CHOICE(jbe a, jbe a, jbe a)
-#define	JC(a)		CHOICE(jc a, jc a, jc a)
-#define	JE(a)		CHOICE(je a, je a, je a)
-#define	JG(a)		CHOICE(jg a, jg a, jg a)
-#define	JGE(a)		CHOICE(jge a, jge a, jge a)
-#define	JL(a)		CHOICE(jl a, jl a, jl a)
-#define	JLE(a)		CHOICE(jle a, jle a, jle a)
-#define	JNA(a)		CHOICE(jna a, jna a, jna a)
-#define	JNAE(a)		CHOICE(jnae a, jnae a, jnae a)
-#define	JNB(a)		CHOICE(jnb a, jnb a, jnb a)
-#define	JNBE(a)		CHOICE(jnbe a, jnbe a, jnbe a)
-#define	JNC(a)		CHOICE(jnc a, jnc a, jnc a)
-#define	JNE(a)		CHOICE(jne a, jne a, jne a)
-#define	JNG(a)		CHOICE(jng a, jng a, jng a)
-#define	JNGE(a)		CHOICE(jnge a, jnge a, jnge a)
-#define	JNL(a)		CHOICE(jnl a, jnl a, jnl a)
-#define	JNLE(a)		CHOICE(jnle a, jnle a, jnle a)
-#define	JNO(a)		CHOICE(jno a, jno a, jno a)
-#define	JNP(a)		CHOICE(jnp a, jnp a, jnp a)
-#define	JNS(a)		CHOICE(jns a, jns a, jns a)
-#define	JNZ(a)		CHOICE(jnz a, jnz a, jnz a)
-#define	JO(a)		CHOICE(jo a, jo a, jo a)
-#define	JP(a)		CHOICE(jp a, jp a, jp a)
-#define	JPE(a)		CHOICE(jpe a, jpe a, jpe a)
-#define	JPO(a)		CHOICE(jpo a, jpo a, jpo a)
-#define	JS(a)		CHOICE(js a, js a, js a)
-#define	JZ(a)		CHOICE(jz a, jz a, jz a)
-#define	JMP(a)		CHOICE(jmp a, jmp a, jmp a)
-#define	JMPF(s,a)	CHOICE(ljmp ARG2(s,a), ljmp ARG2(s,a), jmpf s:a)
-#define	LAHF		CHOICE(lahf, lahf, lahf)
-#if !defined(_REAL_MODE) && !defined(_V86_MODE)
-#define	LAR(a, b)	CHOICE(lar ARG2(a, b), lar ARG2(a, b), lar ARG2(b, a))
-#endif
-#define	LEA_L(a, b)	CHOICE(leal ARG2(a,b), leal ARG2(a,b), _LTOG lea ARG2(b,a))
-#define	LEA_W(a, b)	CHOICE(leaw ARG2(a,b), leaw ARG2(a,b), _WTOG lea ARG2(b,a))
-#define	LEAVE		CHOICE(leave, leave, leave)
-#define	LGDT(a)		CHOICE(lgdt a, lgdt a, lgdt a)
-#define	LIDT(a)		CHOICE(lidt a, lidt a, lidt a)
-#define	LDS(a, b)	CHOICE(ldsl ARG2(a,b), lds ARG2(a,b), lds ARG2(b,a))
-#define	LES(a, b)	CHOICE(lesl ARG2(a,b), les ARG2(a,b), les ARG2(b,a))
-#define	LFS(a, b)	CHOICE(lfsl ARG2(a,b), lfs ARG2(a,b), lfs ARG2(b,a))
-#define	LGS(a, b)	CHOICE(lgsl ARG2(a,b), lgs ARG2(a,b), lgs ARG2(b,a))
-#define	LSS(a, b)	CHOICE(lssl ARG2(a,b), lss ARG2(a,b), lss ARG2(b,a))
-#define	LLDT(a)		CHOICE(lldt a, lldt a, lldt a)
-#define	LMSW(a)		CHOICE(lmsw a, lmsw a, lmsw a)
-#define LOCK		CHOICE(lock, lock, lock)
-#define	LODS_L		CHOICE(lodsl, lodsl, _LTOG lods)
-#define	LODS_W		CHOICE(lodsw, lodsw, _WTOG lods)
-#define	LODS_B		CHOICE(lodsb, lodsb, lodsb)
-#define	LOOP(a)		CHOICE(loop a, loop a, loop a)
-#define	LOOPE(a)	CHOICE(loope a, loope a, loope a)
-#define	LOOPZ(a)	CHOICE(loopz a, loopz a, loopz a)
-#define	LOOPNE(a)	CHOICE(loopne a, loopne a, loopne a)
-#define	LOOPNZ(a)	CHOICE(loopnz a, loopnz a, loopnz a)
-#if !defined(_REAL_MODE) && !defined(_V86_MODE)
-#define	LSL(a, b)	CHOICE(lsl ARG2(a,b), lsl ARG2(a,b), lsl ARG2(b,a))
-#endif
-#define	LTR(a)		CHOICE(ltr a, ltr a, ltr a)
-#define	MOV_SR(a, b)	CHOICE(movw ARG2(a,b), mov ARG2(a,b), mov ARG2(b,a))
-#define	MOV_L(a, b)	CHOICE(movl ARG2(a,b), movl ARG2(a,b), _LTOG mov ARG2(b,a))
-#define	MOV_W(a, b)	CHOICE(movw ARG2(a,b), movw ARG2(a,b), _WTOG mov ARG2(b,a))
-#define	MOV_B(a, b)	CHOICE(movb ARG2(a,b), movb ARG2(a,b), movb ARG2(b,a))
-#define	MOVS_L		CHOICE(movsl, movsl, _LTOG movs)
-#define	MOVS_W		CHOICE(movsw, movsw, _WTOG movs)
-#define	MOVS_B		CHOICE(movsb, movsb, movsb)
-#define	MOVSX_BL(a, b)	CHOICE(movsbl ARG2(a,b), movsbl ARG2(a,b), movsx ARG2(b,a))
-#define	MOVSX_BW(a, b)	CHOICE(movsbw ARG2(a,b), movsbw ARG2(a,b), movsx ARG2(b,a))
-#define	MOVSX_WL(a, b)	CHOICE(movswl ARG2(a,b), movswl ARG2(a,b), movsx ARG2(b,a))
-#define	MOVZX_BL(a, b)	CHOICE(movzbl ARG2(a,b), movzbl ARG2(a,b), movzx ARG2(b,a))
-#define	MOVZX_BW(a, b)	CHOICE(movzbw ARG2(a,b), movzbw ARG2(a,b), movzx ARG2(b,a))
-#define	MOVZX_WL(a, b)	CHOICE(movzwl ARG2(a,b), movzwl ARG2(a,b), movzx ARG2(b,a))
-#define	MUL_L(a)	CHOICE(mull a, mull a, _LTOG mul a)
-#define	MUL_W(a)	CHOICE(mulw a, mulw a, _WTOG mul a)
-#define	MUL_B(a)	CHOICE(mulb a, mulb a, mulb a)
-#define	NEG_L(a)	CHOICE(negl a, negl a, _LTOG neg a)
-#define	NEG_W(a)	CHOICE(negw a, negw a, _WTOG neg a)
-#define	NEG_B(a)	CHOICE(negb a, negb a, negb a)
-#define	NOP		CHOICE(nop, nop, nop)
-#define	NOT_L(a)	CHOICE(notl a, notl a, _LTOG not a)
-#define	NOT_W(a)	CHOICE(notw a, notw a, _WTOG not a)
-#define	NOT_B(a)	CHOICE(notb a, notb a, notb a)
-#define	OR_L(a,b)	CHOICE(orl ARG2(a,b), orl ARG2(a,b), _LTOG or ARG2(b,a))
-#define	OR_W(a,b)	CHOICE(orw ARG2(a,b), orw ARG2(a,b), _WTOG or ARG2(b,a))
-#define	OR_B(a,b)	CHOICE(orb ARG2(a,b), orb ARG2(a,b), orb ARG2(b,a))
-#define	OUT_L		CHOICE(outl (DX), outl ARG2(EAX,DX), _LTOG out DX)
-#define	OUT_W		CHOICE(outw (DX), outw ARG2(AX,DX), _WTOG out DX)
-#define	OUT_B		CHOICE(outb (DX), outb ARG2(AL,DX), outb DX)
-/* Please AS code writer: use the following ONLY, if you refer to ports<256
- * directly, but not in OUT1_W(DX), for instance, even if OUT1_ looks nicer
- */
-#define	OUT1_L(a)	CHOICE(outl (a), outl ARG2(EAX,a), _LTOG out a)
-#define	OUT1_W(a)	CHOICE(outw (a), outw ARG2(AX,a), _WTOG out a)
-#define	OUT1_B(a)	CHOICE(outb (a), outb ARG2(AL,a), outb a)
-#define	OUTS_L		CHOICE(outsl, outsl, _LTOG outs)
-#define	OUTS_W		CHOICE(outsw, outsw, _WTOG outs)
-#define	OUTS_B		CHOICE(outsb, outsb, outsb)
-#define	POP_SR(a)	CHOICE(pop a, pop a, pop a)
-#define	POP_L(a)	CHOICE(popl a, popl a, _LTOG pop a)
-#define	POP_W(a)	CHOICE(popw a, popw a, _WTOG pop a)
-#define	POPA_L		CHOICE(popal, popal, _LTOG popa)
-#define	POPA_W		CHOICE(popaw, popaw, _WTOG popa)
-#define	POPF_L		CHOICE(popfl, popfl, _LTOG popf)
-#define	POPF_W		CHOICE(popfw, popfw, _WTOG popf)
-#define	PUSH_SR(a)	CHOICE(push a, push a, push a)
-#define	PUSH_L(a)	CHOICE(pushl a, pushl a, _LTOG push a)
-#define	PUSH_W(a)	CHOICE(pushw a, pushw a, _WTOG push a)
-#define	PUSH_B(a)	CHOICE(push a, pushb a, push a)
-#define	PUSHA_L		CHOICE(pushal, pushal, _LTOG pusha)
-#define	PUSHA_W		CHOICE(pushaw, pushaw, _WTOG pusha)
-#define	PUSHF_L		CHOICE(pushfl, pushfl, _LTOG pushf)
-#define	PUSHF_W		CHOICE(pushfw, pushfw, _WTOG pushf)
-#define	RCL_L(a, b)	CHOICE(rcll ARG2(a,b), rcll ARG2(a,b), _LTOG rcl ARG2(b,a))
-#define	RCL_W(a, b)	CHOICE(rclw ARG2(a,b), rclw ARG2(a,b), _WTOG rcl ARG2(b,a))
-#define	RCL_B(a, b)	CHOICE(rclb ARG2(a,b), rclb ARG2(a,b), rclb ARG2(b,a))
-#define	RCR_L(a, b)	CHOICE(rcrl ARG2(a,b), rcrl ARG2(a,b), _LTOG rcr ARG2(b,a))
-#define	RCR_W(a, b)	CHOICE(rcrw ARG2(a,b), rcrw ARG2(a,b), _WTOG rcr ARG2(b,a))
-#define	RCR_B(a, b)	CHOICE(rcrb ARG2(a,b), rcrb ARG2(a,b), rcrb ARG2(b,a))
-#define	ROL_L(a, b)	CHOICE(roll ARG2(a,b), roll ARG2(a,b), _LTOG rol ARG2(b,a))
-#define	ROL_W(a, b)	CHOICE(rolw ARG2(a,b), rolw ARG2(a,b), _WTOG rol ARG2(b,a))
-#define	ROL_B(a, b)	CHOICE(rolb ARG2(a,b), rolb ARG2(a,b), rolb ARG2(b,a))
-#define	ROR_L(a, b)	CHOICE(rorl ARG2(a,b), rorl ARG2(a,b), _LTOG ror ARG2(b,a))
-#define	ROR_W(a, b)	CHOICE(rorw ARG2(a,b), rorw ARG2(a,b), _WTOG ror ARG2(b,a))
-#define	ROR_B(a, b)	CHOICE(rorb ARG2(a,b), rorb ARG2(a,b), rorb ARG2(b,a))
-#define	REP		CHOICE(rep ;, rep ;, repe)
-#define	REPE		CHOICE(repz ;, repe ;, repe)
-#define	REPNE		CHOICE(repnz ;, repne ;, repne)
-#define	REPNZ		REPNE
-#define	REPZ		REPE
-#define	RET		CHOICE(ret, ret, ret)
-#define	SAHF		CHOICE(sahf, sahf, sahf)
-#define	SAL_L(a, b)	CHOICE(sall ARG2(a,b), sall ARG2(a,b), _LTOG sal ARG2(b,a))
-#define	SAL_W(a, b)	CHOICE(salw ARG2(a,b), salw ARG2(a,b), _WTOG sal ARG2(b,a))
-#define	SAL_B(a, b)	CHOICE(salb ARG2(a,b), salb ARG2(a,b), salb ARG2(b,a))
-#define	SAR_L(a, b)	CHOICE(sarl ARG2(a,b), sarl ARG2(a,b), _LTOG sar ARG2(b,a))
-#define	SAR_W(a, b)	CHOICE(sarw ARG2(a,b), sarw ARG2(a,b), _WTOG sar ARG2(b,a))
-#define	SAR_B(a, b)	CHOICE(sarb ARG2(a,b), sarb ARG2(a,b), sarb ARG2(b,a))
-#define	SBB_L(a, b)	CHOICE(sbbl ARG2(a,b), sbbl ARG2(a,b), _LTOG sbb ARG2(b,a))
-#define	SBB_W(a, b)	CHOICE(sbbw ARG2(a,b), sbbw ARG2(a,b), _WTOG sbb ARG2(b,a))
-#define	SBB_B(a, b)	CHOICE(sbbb ARG2(a,b), sbbb ARG2(a,b), sbbb ARG2(b,a))
-#define	SCAS_L		CHOICE(scasl, scasl, _LTOG scas)
-#define	SCAS_W		CHOICE(scasw, scasw, _WTOG scas)
-#define	SCAS_B		CHOICE(scasb, scasb, scasb)
-#define	SETA(a)		CHOICE(seta a, seta a, seta a)
-#define	SETAE(a)	CHOICE(setae a, setae a, setae a)
-#define	SETB(a)		CHOICE(setb a, setb a, setb a)
-#define	SETBE(a)	CHOICE(setbe a, setbe a, setbe a)
-#define	SETC(a)		CHOICE(setc a, setb a, setb a)
-#define	SETE(a)		CHOICE(sete a, sete a, sete a)
-#define	SETG(a)		CHOICE(setg a, setg a, setg a)
-#define	SETGE(a)	CHOICE(setge a, setge a, setge a)
-#define	SETL(a)		CHOICE(setl a, setl a, setl a)
-#define	SETLE(a)	CHOICE(setle a, setle a, setle a)
-#define	SETNA(a)	CHOICE(setna a, setna a, setna a)
-#define	SETNAE(a)	CHOICE(setnae a, setnae a, setnae a)
-#define	SETNB(a)	CHOICE(setnb a, setnb a, setnb a)
-#define	SETNBE(a)	CHOICE(setnbe a, setnbe a, setnbe a)
-#define	SETNC(a)	CHOICE(setnc a, setnb a, setnb a)
-#define	SETNE(a)	CHOICE(setne a, setne a, setne a)
-#define	SETNG(a)	CHOICE(setng a, setng a, setng a)
-#define	SETNGE(a)	CHOICE(setnge a, setnge a, setnge a)
-#define	SETNL(a)	CHOICE(setnl a, setnl a, setnl a)
-#define	SETNLE(a)	CHOICE(setnle a, setnle a, setnle a)
-#define	SETNO(a)	CHOICE(setno a, setno a, setno a)
-#define	SETNP(a)	CHOICE(setnp a, setnp a, setnp a)
-#define	SETNS(a)	CHOICE(setns a, setns a, setna a)
-#define	SETNZ(a)	CHOICE(setnz a, setnz a, setnz a)
-#define	SETO(a)		CHOICE(seto a, seto a, seto a)
-#define	SETP(a)		CHOICE(setp a, setp a, setp a)
-#define	SETPE(a)	CHOICE(setpe a, setpe a, setpe a)
-#define	SETPO(a)	CHOICE(setpo a, setpo a, setpo a)
-#define	SETS(a)		CHOICE(sets a, sets a, seta a)
-#define	SETZ(a)		CHOICE(setz a, setz a, setz a)
-#define	SGDT(a)		CHOICE(sgdt a, sgdt a, sgdt a)
-#define	SIDT(a)		CHOICE(sidt a, sidt a, sidt a)
-#define	SHL_L(a, b)	CHOICE(shll ARG2(a,b), shll ARG2(a,b), _LTOG shl ARG2(b,a))
-#define	SHL_W(a, b)	CHOICE(shlw ARG2(a,b), shlw ARG2(a,b), _WTOG shl ARG2(b,a))
-#define	SHL_B(a, b)	CHOICE(shlb ARG2(a,b), shlb ARG2(a,b), shlb ARG2(b,a))
-#define	SHLD_L(a,b,c)	CHOICE(shldl ARG3(a,b,c), shldl ARG3(a,b,c), _LTOG shld ARG3(c,b,a))
-#define	SHLD2_L(a,b)	CHOICE(shldl ARG2(a,b), shldl ARG3(CL,a,b), _LTOG shld ARG3(b,a,CL))
-#define	SHLD_W(a,b,c)	CHOICE(shldw ARG3(a,b,c), shldw ARG3(a,b,c), _WTOG shld ARG3(c,b,a))
-#define	SHLD2_W(a,b)	CHOICE(shldw ARG2(a,b), shldw ARG3(CL,a,b), _WTOG shld ARG3(b,a,CL))
-#define	SHR_L(a, b)	CHOICE(shrl ARG2(a,b), shrl ARG2(a,b), _LTOG shr ARG2(b,a))
-#define	SHR_W(a, b)	CHOICE(shrw ARG2(a,b), shrw ARG2(a,b), _WTOG shr ARG2(b,a))
-#define	SHR_B(a, b)	CHOICE(shrb ARG2(a,b), shrb ARG2(a,b), shrb ARG2(b,a))
-#define	SHRD_L(a,b,c)	CHOICE(shrdl ARG3(a,b,c), shrdl ARG3(a,b,c), _LTOG shrd ARG3(c,b,a))
-#define	SHRD2_L(a,b)	CHOICE(shrdl ARG2(a,b), shrdl ARG3(CL,a,b), _LTOG shrd ARG3(b,a,CL))
-#define	SHRD_W(a,b,c)	CHOICE(shrdw ARG3(a,b,c), shrdw ARG3(a,b,c), _WTOG shrd ARG3(c,b,a))
-#define	SHRD2_W(a,b)	CHOICE(shrdw ARG2(a,b), shrdw ARG3(CL,a,b), _WTOG shrd ARG3(b,a,CL))
-#define	SLDT(a)		CHOICE(sldt a, sldt a, sldt a)
-#define	SMSW(a)		CHOICE(smsw a, smsw a, smsw a)
-#define	STC		CHOICE(stc, stc, stc)
-#define	STD		CHOICE(std, std, std)
-#define	STI		CHOICE(sti, sti, sti)
-#define	STOS_L		CHOICE(stosl, stosl, _LTOG stos)
-#define	STOS_W		CHOICE(stosw, stosw, _WTOG stos)
-#define	STOS_B		CHOICE(stosb, stosb, stosb)
-#define	STR(a)		CHOICE(str a, str a, str a)
-#define	SUB_L(a, b)	CHOICE(subl ARG2(a,b), subl ARG2(a,b), _LTOG sub ARG2(b,a))
-#define	SUB_W(a, b)	CHOICE(subw ARG2(a,b), subw ARG2(a,b), _WTOG sub ARG2(b,a))
-#define	SUB_B(a, b)	CHOICE(subb ARG2(a,b), subb ARG2(a,b), subb ARG2(b,a))
-#define	TEST_L(a, b)	CHOICE(testl ARG2(a,b), testl ARG2(a,b), _LTOG test ARG2(b,a))
-#define	TEST_W(a, b)	CHOICE(testw ARG2(a,b), testw ARG2(a,b), _WTOG test ARG2(b,a))
-#define	TEST_B(a, b)	CHOICE(testb ARG2(a,b), testb ARG2(a,b), testb ARG2(b,a))
-#define	VERR(a)		CHOICE(verr a, verr a, verr a)
-#define	VERW(a)		CHOICE(verw a, verw a, verw a)
-#define	WAIT		CHOICE(wait, wait, wait)
-#define	XCHG_L(a, b)	CHOICE(xchgl ARG2(a,b), xchgl ARG2(a,b), _LTOG xchg ARG2(b,a))
-#define	XCHG_W(a, b)	CHOICE(xchgw ARG2(a,b), xchgw ARG2(a,b), _WTOG xchg ARG2(b,a))
-#define	XCHG_B(a, b)	CHOICE(xchgb ARG2(a,b), xchgb ARG2(a,b), xchgb ARG2(b,a))
-#define	XLAT		CHOICE(xlat, xlat, xlat)
-#define	XOR_L(a, b)	CHOICE(xorl ARG2(a,b), xorl ARG2(a,b), _LTOG xor ARG2(b,a))
-#define	XOR_W(a, b)	CHOICE(xorw ARG2(a,b), xorw ARG2(a,b), _WTOG xor ARG2(b,a))
-#define	XOR_B(a, b)	CHOICE(xorb ARG2(a,b), xorb ARG2(a,b), xorb ARG2(b,a))
-
-
-/* Floating Point Instructions */
-#define	F2XM1		CHOICE(f2xm1, f2xm1, f2xm1)
-#define	FABS		CHOICE(fabs, fabs, fabs)
-#define	FADD_D(a)	CHOICE(faddl a, faddl a, faddd a)
-#define	FADD_S(a)	CHOICE(fadds a, fadds a, fadds a)
-#define	FADD2(a, b)	CHOICE(fadd ARG2(a,b), fadd ARG2(a,b), fadd ARG2(b,a))
-#define	FADDP(a, b)	CHOICE(faddp ARG2(a,b), faddp ARG2(a,b), faddp ARG2(b,a))
-#define	FIADD_L(a)	CHOICE(fiaddl a, fiaddl a, fiaddl a)
-#define	FIADD_W(a)	CHOICE(fiadd a, fiadds a, fiadds a)
-#define	FBLD(a)		CHOICE(fbld a, fbld a, fbld a)
-#define	FBSTP(a)	CHOICE(fbstp a, fbstp a, fbstp a)
-#define	FCHS		CHOICE(fchs, fchs, fchs)
-#define	FCLEX		CHOICE(fclex, wait; fnclex, wait; fclex)
-#define	FNCLEX		CHOICE(fnclex, fnclex, fclex)
-#define	FCOM(a)		CHOICE(fcom a, fcom a, fcom a)
-#define	FCOM_D(a)	CHOICE(fcoml a, fcoml a, fcomd a)
-#define	FCOM_S(a)	CHOICE(fcoms a, fcoms a, fcoms a)
-#define	FCOMP(a)	CHOICE(fcomp a, fcomp a, fcomp a)
-#define	FCOMP_D(a)	CHOICE(fcompl a, fcompl a, fcompd a)
-#define	FCOMP_S(a)	CHOICE(fcomps a, fcomps a, fcomps a)
-#define	FCOMPP		CHOICE(fcompp, fcompp, fcompp)
-#define	FCOS		CHOICE(fcos, fcos, fcos)
-#define	FDECSTP		CHOICE(fdecstp, fdecstp, fdecstp)
-#define	FDIV_D(a)	CHOICE(fdivl a, fdivl a, fdivd a)
-#define	FDIV_S(a)	CHOICE(fdivs a, fdivs a, fdivs a)
-#define	FDIV2(a, b)	CHOICE(fdiv ARG2(a,b), fdiv ARG2(a,b), fdiv ARG2(b,a))
-#define	FDIVP(a, b)	CHOICE(fdivp ARG2(a,b), fdivp ARG2(a,b), fdivp ARG2(b,a))
-#define	FIDIV_L(a)	CHOICE(fidivl a, fidivl a, fidivl a)
-#define	FIDIV_W(a)	CHOICE(fidiv a, fidivs a, fidivs a)
-#define	FDIVR_D(a)	CHOICE(fdivrl a, fdivrl a, fdivrd a)
-#define	FDIVR_S(a)	CHOICE(fdivrs a, fdivrs a, fdivrs a)
-#define	FDIVR2(a, b)	CHOICE(fdivr ARG2(a,b), fdivr ARG2(a,b), fdivr ARG2(b,a))
-#define	FDIVRP(a, b)	CHOICE(fdivrp ARG2(a,b), fdivrp ARG2(a,b), fdivrp ARG2(b,a))
-#define	FIDIVR_L(a)	CHOICE(fidivrl a, fidivrl a, fidivrl a)
-#define	FIDIVR_W(a)	CHOICE(fidivr a, fidivrs a, fidivrs a)
-#define	FFREE(a)	CHOICE(ffree a, ffree a, ffree a)
-#define	FICOM_L(a)	CHOICE(ficoml a, ficoml a, ficoml a)
-#define	FICOM_W(a)	CHOICE(ficom a, ficoms a, ficoms a)
-#define	FICOMP_L(a)	CHOICE(ficompl a, ficompl a, ficompl a)
-#define	FICOMP_W(a)	CHOICE(ficomp a, ficomps a, ficomps a)
-#define	FILD_Q(a)	CHOICE(fildll a, fildq a, fildq a)
-#define	FILD_L(a)	CHOICE(fildl a, fildl a, fildl a)
-#define	FILD_W(a)	CHOICE(fild a, filds a, filds a)
-#define	FINCSTP		CHOICE(fincstp, fincstp, fincstp)
-#define	FINIT		CHOICE(finit, wait; fninit, wait; finit)
-#define	FNINIT		CHOICE(fninit, fninit, finit)
-#define	FIST_L(a)	CHOICE(fistl a, fistl a, fistl a)
-#define	FIST_W(a)	CHOICE(fist a, fists a, fists a)
-#define	FISTP_Q(a)	CHOICE(fistpll a, fistpq a, fistpq a)
-#define	FISTP_L(a)	CHOICE(fistpl a, fistpl a, fistpl a)
-#define	FISTP_W(a)	CHOICE(fistp a, fistps a, fistps a)
-#define	FLD_X(a)	CHOICE(fldt a, fldt a, fldx a) /* 80 bit data type! */
-#define	FLD_D(a)	CHOICE(fldl a, fldl a, fldd a)
-#define	FLD_S(a)	CHOICE(flds a, flds a, flds a)
-#define	FLD1		CHOICE(fld1, fld1, fld1)
-#define	FLDL2T		CHOICE(fldl2t, fldl2t, fldl2t)
-#define	FLDL2E		CHOICE(fldl2e, fldl2e, fldl2e)
-#define	FLDPI		CHOICE(fldpi, fldpi, fldpi)
-#define	FLDLG2		CHOICE(fldlg2, fldlg2, fldlg2)
-#define	FLDLN2		CHOICE(fldln2, fldln2, fldln2)
-#define	FLDZ		CHOICE(fldz, fldz, fldz)
-#define	FLDCW(a)	CHOICE(fldcw a, fldcw a, fldcw a)
-#define	FLDENV(a)	CHOICE(fldenv a, fldenv a, fldenv a)
-#define	FMUL_S(a)	CHOICE(fmuls a, fmuls a, fmuls a)
-#define	FMUL_D(a)	CHOICE(fmull a, fmull a, fmuld a)
-#define	FMUL2(a, b)	CHOICE(fmul ARG2(a,b), fmul ARG2(a,b), fmul ARG2(b,a))
-#define	FMULP(a, b)	CHOICE(fmulp ARG2(a,b), fmulp ARG2(a,b), fmulp ARG2(b,a))
-#define	FIMUL_L(a)	CHOICE(fimull a, fimull a, fimull a)
-#define	FIMUL_W(a)	CHOICE(fimul a, fimuls a, fimuls a)
-#define	FNOP		CHOICE(fnop, fnop, fnop)
-#define	FPATAN		CHOICE(fpatan, fpatan, fpatan)
-#define	FPREM		CHOICE(fprem, fprem, fprem)
-#define	FPREM1		CHOICE(fprem1, fprem1, fprem1)
-#define	FPTAN		CHOICE(fptan, fptan, fptan)
-#define	FRNDINT		CHOICE(frndint, frndint, frndint)
-#define	FRSTOR(a)	CHOICE(frstor a, frstor a, frstor a)
-#define	FSAVE(a)	CHOICE(fsave a, wait; fnsave a, wait; fsave a)
-#define	FNSAVE(a)	CHOICE(fnsave a, fnsave a, fsave a)
-#define	FSCALE		CHOICE(fscale, fscale, fscale)
-#define	FSIN		CHOICE(fsin, fsin, fsin)
-#define	FSINCOS		CHOICE(fsincos, fsincos, fsincos)
-#define	FSQRT		CHOICE(fsqrt, fsqrt, fsqrt)
-#define	FST_D(a)	CHOICE(fstl a, fstl a, fstd a)
-#define	FST_S(a)	CHOICE(fsts a, fsts a, fsts a)
-#define	FSTP_X(a)	CHOICE(fstpt a, fstpt a, fstpx a)
-#define	FSTP_D(a)	CHOICE(fstpl a, fstpl a, fstpd a)
-#define	FSTP_S(a)	CHOICE(fstps a, fstps a, fstps a)
-#define	FSTCW(a)	CHOICE(fstcw a, wait; fnstcw a, wait; fstcw a)
-#define	FNSTCW(a)	CHOICE(fnstcw a, fnstcw a, fstcw a)
-#define	FSTENV(a)	CHOICE(fstenv a, wait; fnstenv a, fstenv a)
-#define	FNSTENV(a)	CHOICE(fnstenv a, fnstenv a, fstenv a)
-#define	FSTSW(a)	CHOICE(fstsw a, wait; fnstsw a, wait; fstsw a)
-#define	FNSTSW(a)	CHOICE(fnstsw a, fnstsw a, fstsw a)
-#define	FSUB_S(a)	CHOICE(fsubs a, fsubs a, fsubs a)
-#define	FSUB_D(a)	CHOICE(fsubl a, fsubl a, fsubd a)
-#define	FSUB2(a, b)	CHOICE(fsub ARG2(a,b), fsub ARG2(a,b), fsub ARG2(b,a))
-#define	FSUBP(a, b)	CHOICE(fsubp ARG2(a,b), fsubp ARG2(a,b), fsubp ARG2(b,a))
-#define	FISUB_L(a)	CHOICE(fisubl a, fisubl a, fisubl a)
-#define	FISUB_W(a)	CHOICE(fisub a, fisubs a, fisubs a)
-#define	FSUBR_S(a)	CHOICE(fsubrs a, fsubrs a, fsubrs a)
-#define	FSUBR_D(a)	CHOICE(fsubrl a, fsubrl a, fsubrd a)
-#define	FSUBR2(a, b)	CHOICE(fsubr ARG2(a,b), fsubr ARG2(a,b), fsubr ARG2(b,a))
-#define	FSUBRP(a, b)	CHOICE(fsubrp ARG2(a,b), fsubrp ARG2(a,b), fsubrp ARG2(b,a))
-#define	FISUBR_L(a)	CHOICE(fisubrl a, fisubrl a, fisubrl a)
-#define	FISUBR_W(a)	CHOICE(fisubr a, fisubrs a, fisubrs a)
-#define	FTST		CHOICE(ftst, ftst, ftst)
-#define	FUCOM(a)	CHOICE(fucom a, fucom a, fucom a)
-#define	FUCOMP(a)	CHOICE(fucomp a, fucomp a, fucomp a)
-#define	FUCOMPP		CHOICE(fucompp, fucompp, fucompp)
-#define	FWAIT		CHOICE(wait, wait, wait)
-#define	FXAM		CHOICE(fxam, fxam, fxam)
-#define	FXCH(a)		CHOICE(fxch a, fxch a, fxch a)
-#define	FXTRACT		CHOICE(fxtract, fxtract, fxtract)
-#define	FYL2X		CHOICE(fyl2x, fyl2x, fyl2x)
-#define	FYL2XP1		CHOICE(fyl2xp1, fyl2xp1, fyl2xp1)
-
-#endif /* __ASSYNTAX_H__ */
diff --git a/hw/xfree86/os-support/misc/BUSmemcpy.S b/hw/xfree86/os-support/misc/BUSmemcpy.S
deleted file mode 100644
index 373723c..0000000
--- a/hw/xfree86/os-support/misc/BUSmemcpy.S
+++ /dev/null
@@ -1,153 +0,0 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.s,v 1.2 1998/07/25 16:56:49 dawes Exp $ */
-/******************************************************************************
-                        Copyright 1993 by Glenn G. Lai
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Glenn G. Lai not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-Glenn G. Lai DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-Glenn G. Lai
-P.O. Box 4314
-Austin, Tx 78765
-(glenn at cs.utexas.edu)
-8/9/93
-******************************************************************************/
-/* $XConsortium: BUSmemcpy.s /main/4 1996/02/21 17:39:34 kaleb $ */
-
-/*
- * Modified to use long-alignment of video memory rather than word-alignment
- * to improve performance for LocalBus video cards.  Function names changed
- * from ISAToMem and MemToISA to BusToMem and MemToBus.
- *
- * David Dawes <dawes at XFree86.org>, 25 August 1993.
- */
-
-
-#include "assyntax.h"
-
-	FILE("BUSmemcpy.s")
-
-	AS_BEGIN
-
-/* BusToMem copies from video memory to main memory
-   MemToBus copies from main memory to video memory
-
-	void xf86BusToMem(unsigned char *dst, unsigned char *src, int len);
-	void xf86MemToBus(unsigned char *dst, unsigned char *src, int len);
-*/
-
-#define dst     REGOFF(4,ESP)
-#define src     REGOFF(8,ESP)
-#define len     REGOFF(12,ESP)
-
-	GLOBL	GLNAME(xf86BusToMem)
-	GLOBL	GLNAME(xf86MemToBus)
-
-	SEG_DATA
-copyright:
-	STRING("Copyright 8/9/1993 by Glenn G. Lai")
-
-	SEG_TEXT
-	ALIGNTEXT4
-GLNAME(xf86BusToMem):
-	CLD
-	PUSH_L	(ESI)
-	MOV_L	(EDI, EDX)
-	
-	MOV_L	(src, ESI)
-	MOV_L	(dst, EDI)
-	MOV_L	(len, ECX)
-	
-	CMP_L	(CONST(7), ECX)
-	JC	(quickBM)
-
-	TEST_L	(CONST(1), ESI)
-	JZ	(BwM)
-
-	MOVS_B
-	DEC_L	(ECX)
-
-BwM:	
-	TEST_L	(CONST(2), ESI)
-	JZ	(BlM)
-
-	MOVS_W
-	DEC_L	(ECX)
-	DEC_L	(ECX)
-
-BlM:
-	MOV_L	(ECX, EAX)
-	AND_L	(CONST(3), EAX)
-	SHR_L	(CONST(2), ECX)
-	REP
-	MOVS_L
-	MOV_L	(EAX, ECX)
-quickBM:
-	OR_L	(ECX, ECX)
-	JZ	(return)
-	REP
-	MOVS_B
-return:
-	POP_L	(ESI)
-	MOV_L	(EDX, EDI)
-	RET
-/************************/
-
-	ALIGNTEXT4
-GLNAME(xf86MemToBus):
-	CLD
-	PUSH_L	(ESI)
-	MOV_L	(EDI, EDX)
-	
-	MOV_L	(src, ESI)
-	MOV_L	(dst, EDI)
-	MOV_L	(len, ECX)
-	
-	CMP_L	(CONST(7), ECX)
-	JC	(quickMB)
-
-	TEST_L	(CONST(1), EDI)
-	JZ	(MwB)
-
-	MOVS_B
-	DEC_L	(ECX)
-
-MwB:	
-	TEST_L	(CONST(2), EDI)
-	JZ	(MlB)
-
-	MOVS_W
-	DEC_L	(ECX)
-	DEC_L	(ECX)
-
-MlB:
-	MOV_L	(ECX, EAX)
-	AND_L	(CONST(3), EAX)
-	SHR_L	(CONST(2), ECX)
-	REP
-	MOVS_L
-	MOV_L	(EAX, ECX)
-quickMB:
-	OR_L	(ECX, ECX)
-	JZ	(return)
-	REP
-	MOVS_B
-
-	POP_L	(ESI)
-	MOV_L	(EDX, EDI)
-	RET
-
diff --git a/hw/xfree86/os-support/misc/IODelay.S b/hw/xfree86/os-support/misc/IODelay.S
deleted file mode 100644
index 4c6e32f..0000000
--- a/hw/xfree86/os-support/misc/IODelay.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/IODelay.S,v 1.1 1999/07/10 07:24:50 dawes Exp $ */
-/*******************************************************************************
-                        Copyright 1994 by Glenn G. Lai
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyr notice appear in all copies and that
-both that copyr notice and this permission notice appear in
-supporting documentation, and that the name of Glenn G. Lai not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-Glenn G. Lai DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-Glenn G. Lai
-P.O. Box 4314
-Austin, Tx 78765
-glenn at cs.utexas.edu)
-7/21/94
-*******************************************************************************/
-/* $XConsortium: IODelay.s /main/4 1996/02/21 17:40:21 kaleb $ */
- 
-/* 
- *   All we really need is a delay of about 40ns for I/O recovery for just
- *   about any occasion, but we'll be more conservative here:  On a
- *   100-MHz CPU, produce at least a delay of 1,000ns.
- */ 
-
-#include "assyntax.h"
-
-	FILE("DACDelay.s")
-
-	AS_BEGIN
-
-	GLOBL	GLNAME(xf86IODelay)
-
-	SEG_TEXT
-	ALIGNTEXT4
-GLNAME(xf86IODelay):
-	MOV_L 	(CONST(100), EAX)
-delay_it:
-	DEC_L	(EAX)
-	JNE	(delay_it)
-	RET
-
diff --git a/hw/xfree86/os-support/misc/Makefile.am b/hw/xfree86/os-support/misc/Makefile.am
index 737328c..39066ec 100644
--- a/hw/xfree86/os-support/misc/Makefile.am
+++ b/hw/xfree86/os-support/misc/Makefile.am
@@ -1,15 +1,7 @@
-# FIXME: Add the *.S files to build when applicable
-I386_SRCS = BUSmemcpy.S IODelay.S SlowBcopy.S
-OTHER_SRCS = BUSmemcpy.c IODelay.c SlowBcopy.c
-
-ARCH_SRCS = $(OTHER_SRCS)
-
-# FIXME: Add to the build (NeedPortIO)
-PORTIO_SRCS = PortIO.S
 
 noinst_LTLIBRARIES = libmisc.la
 
-libmisc_la_SOURCES = Delay.c $(ARCH_SRCS)
+libmisc_la_SOURCES = Delay.c BUSmemcpy.c IODelay.c SlowBcopy.c
 
 #AM_LDFLAGS = -r
 
diff --git a/hw/xfree86/os-support/misc/PortIO.S b/hw/xfree86/os-support/misc/PortIO.S
deleted file mode 100644
index 75db311..0000000
--- a/hw/xfree86/os-support/misc/PortIO.S
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $XFree86$ */
-
-/* Port I/O functions for platforms with no inlining. */
-
-#include "assyntax.h"
-
-	FILE("PortIO.s")
-
-	AS_BEGIN
-
-	GLOBL	GLNAME(outb)
-	GLOBL	GLNAME(outw)
-	GLOBL	GLNAME(outl)
-	GLOBL	GLNAME(inb)
-	GLOBL	GLNAME(inw)
-	GLOBL	GLNAME(inl)
-
-	SEG_TEXT
-	ALIGNTEXT4
-GLNAME(outb):
-	MOV_L	(REGOFF(4,ESP), EDX)
-	MOV_L	(REGOFF(8,ESP), EAX)
-	OUT_B
-	RET
-
-	ALIGNTEXT4
-GLNAME(outw):
-	MOV_L	(REGOFF(4,ESP), EDX)
-	MOV_L	(REGOFF(8,ESP), EAX)
-	OUT_W
-	RET
-
-	ALIGNTEXT4
-GLNAME(outl):
-	MOV_L	(REGOFF(4,ESP), EDX)
-	MOV_L	(REGOFF(8,ESP), EAX)
-	OUT_L
-	RET
-
-	ALIGNTEXT4
-GLNAME(inb):
-	MOV_L	(REGOFF(4,ESP), EDX)
-	IN_B
-	RET
-
-	ALIGNTEXT4
-GLNAME(inw):
-	MOV_L	(REGOFF(4,ESP), EDX)
-	IN_L
-	RET
-
-	ALIGNTEXT4
-GLNAME(inl):
-	MOV_L	(REGOFF(4,ESP), EDX)
-	IN_L
-	RET
-
diff --git a/hw/xfree86/os-support/misc/SlowBcopy.S b/hw/xfree86/os-support/misc/SlowBcopy.S
deleted file mode 100644
index 9b6af1d..0000000
--- a/hw/xfree86/os-support/misc/SlowBcopy.S
+++ /dev/null
@@ -1,108 +0,0 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.S,v 1.1 1999/07/10 07:24:51 dawes Exp $ */
-/*******************************************************************************
-                        Copyright 1994 by Glenn G. Lai
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyr notice appear in all copies and that
-both that copyr notice and this permission notice appear in
-supporting documentation, and that the name of Glenn G. Lai not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-Glenn G. Lai DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-Glenn G. Lai
-P.O. Box 4314
-Austin, Tx 78765
-glenn at cs.utexas.edu)
-7/21/94
-*******************************************************************************/
-/* $XConsortium: SlowBcopy.s /main/4 1996/02/21 17:40:52 kaleb $ */
- 
-/* 
- *   Modified from the output generated by GCC
- *
- *   Create a dependency that should be immune from the effect of register
- *   renaming as is commonly seen in superscalar processors.  This should
- *   insert a minimum of 100-ns delays between reads/writes at clock rates
- *   up to 100 MHz---GGL
- *   
- *   Slowbcopy(char *src, char *dst, int count)   
- *   
- */ 
-
-#include "assyntax.h"
-
-	FILE("SlowBcopy.s")
-
-	AS_BEGIN
-
-gcc2_compiled.:
-___gnu_compiled_c:
-
-	GLOBL	GLNAME(xf86SlowBcopy)
-
-	SEG_TEXT
-	ALIGNTEXT4
-GLNAME(xf86SlowBcopy):
-	PUSH_L	(EBP)
-	MOV_L	(ESP,EBP)
-	PUSH_L	(ESI)
-	PUSH_L	(EBX)
-	MOV_L	(REGOFF(8,EBP),ECX)
-	MOV_L	(REGOFF(12,EBP),EDX)
-	MOV_L	(REGOFF(16,EBP),ESI)
-	XOR_L	(EAX,EAX)
-	CMP_L	(ESI,EAX)
-	JGE	(L3)
-
-	ALIGNTEXT4
-L5:
-	MOV_B	(REGIND(ECX),BL)
-
-	MOV_B	(BL, BH)
-	MOV_B	(BH, BL)
-	MOV_B	(BL, BH)
-	MOV_B	(BH, BL)
-	MOV_B	(BL, BH)
-	MOV_B	(BH, BL)
-	MOV_B	(BL, BH)
-	MOV_B	(BH, BL)
-	MOV_B	(BL, BH)
-	MOV_B	(BH, BL)
-
-	MOV_B	(BL,REGIND(EDX))
-
-	INC_L	(ECX)
-	DEC_L	(ECX)
-	INC_L	(ECX)
-	DEC_L	(ECX)
-	INC_L	(ECX)
-	DEC_L	(ECX)
-	INC_L	(ECX)
-	DEC_L	(ECX)
-	INC_L	(ECX)
-	DEC_L	(ECX)
-
-	INC_L	(ECX)
-	INC_L	(EDX)
-	INC_L	(EAX)
-	CMP_L	(ESI,EAX)
-	JL	(L5)
-L3:
-	LEA_L	(REGOFF(-8,EBP),ESP)
-	POP_L	(EBX)
-	POP_L	(ESI)
-	MOV_L	(EBP,ESP)
-	POP_L	(EBP)
-	RET
-
diff --git a/hw/xfree86/os-support/shared/inout.S b/hw/xfree86/os-support/shared/inout.S
deleted file mode 100644
index 80c47c4..0000000
--- a/hw/xfree86/os-support/shared/inout.S
+++ /dev/null
@@ -1,111 +0,0 @@
-/* $XConsortium: inout.s /main/6 1996/02/21 17:53:35 kaleb $ */
-
-
-
-
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/inout.S,v 1.1 1999/07/10 07:24:52 dawes Exp $ */
-
-#include "assyntax.h"
-
-/*
- *	Make i80386 io primitives available at C-level.
- */
-
-	FILE("inout.s")
-	AS_BEGIN
-	SEG_TEXT
-
-/*
- *-----------------------------------------------------------------------
- * inb ---
- *	Input one byte.
- *
- * Results:
- *      Byte in al.
- *-----------------------------------------------------------------------
- */
-	GLOBL	GLNAME(inb)
-GLNAME(inb):
-	MOV_L	(REGOFF(4,ESP),EDX)
-	SUB_L	(EAX,EAX)
-	IN_B
-	RET
-
-/*
- *-----------------------------------------------------------------------
- * outb ---
- *	Output one byte.
- *
- * Results:
- *      None.
- *-----------------------------------------------------------------------
- */
-	GLOBL	GLNAME(outb)
-GLNAME(outb):
-	MOV_L	(REGOFF(4,sp),EDX)
-	MOV_L	(REGOFF(8,sp),EAX)
-	OUT_B
-	RET
-/*
- *-----------------------------------------------------------------------
- * inw ---
- *	Input one 16-bit word.
- *
- * Results:
- *      Word in ax.
- *-----------------------------------------------------------------------
- */
-	GLOBL	GLNAME(inw)
-GLNAME(inw):
-	MOV_L	(REGOFF(4,ESP),EDX)
-	IN_W
-	RET
-
-/*
- *-----------------------------------------------------------------------
- * outw ---
- *	Output one 16-bit word.
- *
- * Results:
- *      None.
- *-----------------------------------------------------------------------
- */
-	GLOBL	GLNAME(outw)
-GLNAME(outw):
-	MOV_L	(REGOFF(4,ESP),EDX)
-	MOV_L	(REGOFF(8,ESP),EAX)
-	OUT_W
-	RET
-
-/*
- *-----------------------------------------------------------------------
- * inl ---
- *	Input one 32-bit longword.
- *
- * Results:
- *      Word in eax.
- *-----------------------------------------------------------------------
- */
-	GLOBL	GLNAME(inl)
-GLNAME(inl):
-	MOV_L	(REGOFF(4,ESP),EDX)
-	IN_L
-	RET
-
-/*
- *-----------------------------------------------------------------------
- * outl ---
- *	Output one 32-bit longword.
- *
- * Results:
- *      None.
- *-----------------------------------------------------------------------
- */
-	GLOBL	GLNAME(outl)
-GLNAME(outl):
-	MOV_L	(REGOFF(4,ESP),EDX)
-	MOV_L	(REGOFF(8,ESP),EAX)
-	OUT_L
-	RET
-
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index bd8267a..c409eb7 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -67,7 +67,7 @@ DISTCLEANFILES = $(POLYSEG) \
 sdk_HEADERS = xaa.h xaalocal.h xaarop.h xaaWrapper.h
 EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
              xaaStipple.c xaaTEGlyph.c xaaNonTEGlyph.c xaaBitmap.c \
-             xaaTEGlyphBlt.S XAA.HOWTO
+             XAA.HOWTO
 
 INCLUDES = $(XORG_INCS)
 
commit 2d3e478384ef8af2a760f39792e35e4a6174c967
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 15:09:44 2008 -0400

    int10: Fix int1A for %ax == 0xB101.
    
    pciNumBuses was pretty much always 1 post-pciaccess.  That ain't good.

diff --git a/hw/xfree86/int10/xf86int10.c b/hw/xfree86/int10/xf86int10.c
index f50607c..51eb91f 100644
--- a/hw/xfree86/int10/xf86int10.c
+++ b/hw/xfree86/int10/xf86int10.c
@@ -655,6 +655,32 @@ find_pci_class(CARD8 intf, CARD8 subClass, CARD16 _class,
 }
 #endif
 
+/*
+ * Return the last bus number in the same domain as dev.  Only look at the
+ * one domain since this is going into %cl, and VGA I/O is per-domain anyway.
+ */
+static int
+int1A_last_bus_number(struct pci_device *dev)
+{
+    struct pci_device *d;
+    struct pci_slot_match m = { dev->domain,
+				PCI_MATCH_ANY,
+				PCI_MATCH_ANY,
+				PCI_MATCH_ANY };
+    struct pci_device_iterator *iter;
+    int i = 0;
+
+    iter = pci_slot_match_iterator_create(&m);
+
+    while ((d = pci_device_next(iter)))
+	if (d->bus > i)
+	    i = d->bus;
+
+    pci_iterator_destroy(iter);
+
+    return i;
+}
+
 static int
 int1A_handler(xf86Int10InfoPtr pInt)
 {
@@ -674,7 +700,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
 	X86_EDX = 0x20494350; /* " ICP" */
 	X86_EBX = 0x0210;    /* Version 2.10 */
 	X86_ECX &= 0xFF00;
-	X86_ECX |= (pciNumBuses & 0xFF);   /* Max bus number in system */
+	X86_ECX |= int1A_last_bus_number(pvp);
 	X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
 #ifdef PRINT_INT
 	ErrorF("ax=0x%x dx=0x%x bx=0x%x cx=0x%x flags=0x%x\n",
commit 539717fe1f08a000d1eef9f345d24cb49e3663b5
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 14:50:33 2008 -0400

    Remove (unused) pciMaxBusNum.

diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index 064533c..0686946 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -136,17 +136,10 @@
 
 #include <pciaccess.h>
 
-#define PCI_MFDEV_SUPPORT   1 /* Include PCI multifunction device support */
-#define PCI_BRIDGE_SUPPORT  1 /* Include support for PCI-to-PCI bridges */
-
-/*
- * Global data
- */
+/* Global data */
 
 pciBusInfo_t  *pciBusInfo[MAX_PCI_BUSES] = { NULL, };
 _X_EXPORT int            pciNumBuses = 0;     /* Actual number of PCI buses */
-int            pciMaxBusNum = MAX_PCI_BUSES;
-
 
 _X_EXPORT ADDRESS
 pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index e56d61e..a8b1079 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -245,8 +245,6 @@ void          pciCfgMech1SetBits(PCITAG tag, int offset, CARD32 mask,
 				 CARD32 val);
 ADDRESS       pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS);
 
-extern int    pciMaxBusNum;
-
 extern pciBusInfo_t  *pciBusInfo[];
 
 #endif /* _PCI_H */
commit 3c03d9f1efbbacec6e8be58da99bf0977a8e0fec
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 14:37:42 2008 -0400

    Remove sparcPci.c
    
    There is no way this code can have been building for anyone since pciaccess
    was merged.  BSD and Linux were already using OS code on sparc, the only
    people who could want this are Solaris, who should be using pciaccess
    anyway.

diff --git a/configure.ac b/configure.ac
index 95a084f..52d35c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1217,7 +1217,6 @@ AC_MSG_RESULT([$XORG])
 xorg_bus_linuxpci=no
 xorg_bus_bsdpci=no
 xorg_bus_ix86pci=no
-xorg_bus_sparcpci=no
 xorg_bus_sparc=no
 
 if test "x$XORG" = xyes; then
@@ -1344,7 +1343,6 @@ if test "x$XORG" = xyes; then
 
 	case $host_cpu in
 	  sparc*)
-		xorg_bus_sparcpci="yes"
 		xorg_bus_sparc="yes"
 		;;
 	  i*86|x86_64*|amd64*)
@@ -1450,7 +1448,6 @@ AM_CONDITIONAL([XORG], [test "x$XORG" = xyes])
 AM_CONDITIONAL([XORG_BUS_LINUXPCI], [test "x$xorg_bus_linuxpci" = xyes])
 AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes])
 AM_CONDITIONAL([XORG_BUS_IX86PCI], [test "x$xorg_bus_ix86pci" = xyes])
-AM_CONDITIONAL([XORG_BUS_SPARCPCI], [test "x$xorg_bus_sparcpci" = xyes])
 AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes])
 AM_CONDITIONAL([LINUX_IA64], [test "x$linux_ia64" = xyes])
 AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes])
diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am
index 94c3750..5199340 100644
--- a/hw/xfree86/os-support/bus/Makefile.am
+++ b/hw/xfree86/os-support/bus/Makefile.am
@@ -15,10 +15,6 @@ if XORG_BUS_IX86PCI
 PCI_SOURCES += ix86Pci.c
 endif
 
-if XORG_BUS_SPARCPCI
-PCI_SOURCES += sparcPci.c
-endif
-
 if XORG_BUS_SPARC
 PLATFORM_SOURCES = Sbus.c
 sdk_HEADERS += xf86Sbus.h
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index 26ba947..e56d61e 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -198,15 +198,9 @@
 
 #if !defined(ARCH_PCI_INIT)
 #warning You really need to port to libpciaccess.
-/*
- * Select architecture specific PCI init function
- */
 #if defined(__i386__) || defined(__i386) ||  defined(__amd64__) || defined(__amd64)
-# define ARCH_PCI_INIT ix86PciInit
-#elif defined(__sparc__) || defined(sparc)
-# define ARCH_PCI_INIT sparcPciInit
-# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
-#endif
+#define ARCH_PCI_INIT ix86PciInit
+#endif /* i386/amd64 */
 #endif /* !defined(ARCH_PCI_INIT) */
 
 #ifndef ARCH_PCI_INIT
diff --git a/hw/xfree86/os-support/bus/sparcPci.c b/hw/xfree86/os-support/bus/sparcPci.c
deleted file mode 100644
index 2d8039c..0000000
--- a/hw/xfree86/os-support/bus/sparcPci.c
+++ /dev/null
@@ -1,979 +0,0 @@
-/*
- * Copyright (C) 2001-2003 The XFree86 Project, Inc.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
- * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "Pci.h"
-#include "xf86sbusBus.h"
-
-#if defined(sun)
-
-extern char *apertureDevName;
-static int  apertureFd = -1;
-
-/*
- * A version of xf86MapVidMem() that allows for 64-bit displacements (but not
- * sizes).  Areas thus mapped can be unmapped by xf86UnMapVidMem().
- */
-static pointer
-sparcMapAperture(int iScreen, int Flags,
-		 unsigned long long Base, unsigned long Size)
-{
-    pointer result;
-    static int lastFlags = 0;
-
-    /* Assume both Base & Size are multiples of the page size */
-
-    if ((apertureFd < 0) || (Flags != lastFlags)) {
-	if (apertureFd >= 0)
-	    close(apertureFd);
-	lastFlags = Flags;
-	apertureFd = open(apertureDevName,
-	    (Flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR);
-	if (apertureFd < 0)
-	    FatalError("sparcMapAperture:  open failure:  %s\n",
-		       strerror(errno));
-    }
-
-    result = mmap(NULL, Size,
-		  (Flags & VIDMEM_READONLY) ?
-		      PROT_READ : (PROT_READ | PROT_WRITE),
-		  MAP_SHARED, apertureFd, (off_t)Base);
-
-    if (result == MAP_FAILED)
-	FatalError("sparcMapAperture:  mmap failure:  %s\n", strerror(errno));
-
-    return result;
-}
-
-/*
- * Platform-specific bus privates.
- */
-typedef struct _sparcDomainRec {
-    unsigned long long io_addr, io_size;
-    unsigned long long mem_addr, mem_size;
-    pointer pci, io;
-    int bus_min, bus_max;
-    unsigned char dfn_mask[256 / 8];
-} sparcDomainRec, *sparcDomainPtr;
-
-#define SetBitInMap(bit, map) \
-    do { \
-	int _bit = (bit); \
-	(map)[_bit >> 3] |= 1 << (_bit & 7); \
-    } while (0)
-
-#define IsBitSetInMap(bit, map) \
-    ((map)[(bit) >> 3] & (1 << ((bit) & 7)))
-
-/*
- * Domain 0 is reserved for the one that represents the system as a whole, i.e.
- * the one without any resource relocations.
- */
-#define MAX_DOMAINS (MAX_PCI_BUSES / 256)
-static sparcDomainPtr xf86DomainInfo[MAX_DOMAINS];
-static int            pciNumDomains = 1;
-
-/* Variables that are assigned this must be declared volatile */
-#define PciReg(base, tag, off, type) \
-    *(volatile type *)(pointer)((char *)(base) + \
-	(PCI_TAG_NO_DOMAIN(tag) | (off)))
-
-/* Generic SPARC PCI access functions */
-static CARD32
-sparcPciCfgRead32(PCITAG tag, int off)
-{
-    pciBusInfo_t    *pBusInfo;
-    sparcDomainPtr  pDomain;
-    volatile CARD32 result = (CARD32)(-1);	/* Must be volatile */
-    int             bus;
-
-    if ((off >= 0) && (off <= 252) && !(off & 3) &&
-	((bus = PCI_BUS_FROM_TAG(tag)) < pciNumBuses) &&
-	(pBusInfo = pciBusInfo[bus]) && (pDomain = pBusInfo->pciBusPriv) &&
-	(bus >= pDomain->bus_min) && (bus < pDomain->bus_max) &&
-	((bus > pDomain->bus_min) ||
-	 IsBitSetInMap(PCI_DFN_FROM_TAG(tag), pDomain->dfn_mask))) {
-	result = PciReg(pDomain->pci, tag, off, CARD32);
-
-	result = PCI_CPU(result);
-    }
-
-    return result;
-}
-
-static void
-sparcPciCfgWrite32(PCITAG tag, int off, CARD32 val)
-{
-    pciBusInfo_t   *pBusInfo;
-    sparcDomainPtr pDomain;
-    int            bus;
-
-    if ((off < 0) || (off > 252) || (off & 3) ||
-	((bus = PCI_BUS_FROM_TAG(tag)) >= pciNumBuses) ||
-	!(pBusInfo = pciBusInfo[bus]) || !(pDomain = pBusInfo->pciBusPriv) ||
-	(bus < pDomain->bus_min) || (bus >= pDomain->bus_max) ||
-	((bus == pDomain->bus_min) &&
-	 !IsBitSetInMap(PCI_DFN_FROM_TAG(tag), pDomain->dfn_mask)))
-	return;
-
-    val = PCI_CPU(val);
-    PciReg(pDomain->pci, tag, off, CARD32) = val;
-}
-
-static void
-sparcPciCfgSetBits32(PCITAG tag, int off, CARD32 mask, CARD32 bits)
-{
-    CARD32 PciVal;
-
-    PciVal = sparcPciCfgRead32(tag, off);
-    PciVal &= ~mask;
-    PciVal |= bits;
-    sparcPciCfgWrite32(tag, off, PciVal);
-}
-
-static pciBusFuncs_t sparcPCIFunctions =
-{
-    sparcPciCfgRead32,
-    sparcPciCfgWrite32,
-    sparcPciCfgSetBits32,
-    pciAddrNOOP,
-    pciAddrNOOP
-};
-
-/*
- * Sabre-specific versions of the above because of its peculiar access size
- * requirements.
- */
-static CARD32
-sabrePciCfgRead32(PCITAG tag, int off)
-{
-    pciBusInfo_t    *pBusInfo;
-    sparcDomainPtr  pDomain;
-    volatile CARD32 result;			/* Must be volatile */
-    int             bus;
-
-    if (PCI_BDEV_FROM_TAG(tag))
-	return sparcPciCfgRead32(tag, off);
-
-    if (PCI_FUNC_FROM_TAG(tag) || (off < 0) || (off > 252) || (off & 3) ||
-	((bus = PCI_BUS_FROM_TAG(tag)) >= pciNumBuses) ||
-	!(pBusInfo = pciBusInfo[bus]) || !(pDomain = pBusInfo->pciBusPriv) ||
-	(bus != pDomain->bus_min))
-	return (CARD32)(-1);
-
-    if (off < 8) {
-	result = (PciReg(pDomain->pci, tag, off, CARD16) << 16) |
-		  PciReg(pDomain->pci, tag, off + 2, CARD16);
-	return PCI_CPU(result);
-    }
-
-    result = (PciReg(pDomain->pci, tag, off + 3, CARD8) << 24) |
-	     (PciReg(pDomain->pci, tag, off + 2, CARD8) << 16) |
-	     (PciReg(pDomain->pci, tag, off + 1, CARD8) <<  8) |
-	     (PciReg(pDomain->pci, tag, off    , CARD8)      );
-    return result;
-}
-
-static void
-sabrePciCfgWrite32(PCITAG tag, int off, CARD32 val)
-{
-    pciBusInfo_t   *pBusInfo;
-    sparcDomainPtr pDomain;
-    int            bus;
-
-    if (PCI_BDEV_FROM_TAG(tag))
-	sparcPciCfgWrite32(tag, off, val);
-    else if (!PCI_FUNC_FROM_TAG(tag) &&
-	     (off >= 0) && (off <= 252) && !(off & 3) &&
-	     ((bus = PCI_BUS_FROM_TAG(tag)) < pciNumBuses) &&
-	     (pBusInfo = pciBusInfo[bus]) &&
-	     (pDomain = pBusInfo->pciBusPriv) &&
-	     (bus == pDomain->bus_min)) {
-	if (off < 8) {
-	    val = PCI_CPU(val);
-	    PciReg(pDomain->pci, tag, off    , CARD16) = val >> 16;
-	    PciReg(pDomain->pci, tag, off + 2, CARD16) = val;
-	} else {
-	    PciReg(pDomain->pci, tag, off    , CARD8) = val;
-	    PciReg(pDomain->pci, tag, off + 1, CARD8) = val >> 8;
-	    PciReg(pDomain->pci, tag, off + 2, CARD8) = val >> 16;
-	    PciReg(pDomain->pci, tag, off + 3, CARD8) = val >> 24;
-	}
-    }
-}
-
-static void
-sabrePciCfgSetBits32(PCITAG tag, int off, CARD32 mask, CARD32 bits)
-{
-    CARD32 PciVal;
-
-    PciVal = sabrePciCfgRead32(tag, off);
-    PciVal &= ~mask;
-    PciVal |= bits;
-    sabrePciCfgWrite32(tag, off, PciVal);
-}
-
-static pciBusFuncs_t sabrePCIFunctions =
-{
-    sabrePciCfgRead32,
-    sabrePciCfgWrite32,
-    sabrePciCfgSetBits32,
-    pciAddrNOOP,
-    pciAddrNOOP
-};
-
-static int pagemask;
-
-/* Scan PROM for all PCI host bridges in the system */
-void
-sparcPciInit(void)
-{
-    int node, node2;
-
-    if (!xf86LinearVidMem())
-	return;
-
-    apertureFd = open(apertureDevName, O_RDWR);
-    if (apertureFd < 0) {
-	xf86Msg(X_ERROR,
-	    "sparcPciInit:  open failure:  %s\n", strerror(errno));
-	return;
-    }
-
-    sparcPromInit();
-    pagemask = getpagesize() - 1;
-
-    for (node = promGetChild(promRootNode);
-	 node;
-	 node = promGetSibling(node)) {
-	unsigned long long pci_addr;
-	sparcDomainRec     domain;
-	sparcDomainPtr     pDomain;
-	pciBusFuncs_p      pFunctions;
-	char               *prop_val;
-	int                prop_len, bus;
-
-	prop_val = promGetProperty("name", &prop_len);
-	/* Some PROMs include the trailing null;  some don't */
-	if (!prop_val || (prop_len < 3) || (prop_len > 4) ||
-	    strcmp(prop_val, "pci"))
-	    continue;
-
-	prop_val = promGetProperty("model", &prop_len);
-	if (!prop_val || (prop_len <= 0)) {
-	    prop_val = promGetProperty("compatible", &prop_len);
-	    if (!prop_val || (prop_len <= 0))
-		continue;
-	}
-
-	pFunctions = &sparcPCIFunctions;
-	(void)memset(&domain, 0, sizeof(domain));
-
-	if (!strncmp("SUNW,sabre",   prop_val, prop_len) ||
-	    !strncmp("pci108e,a000", prop_val, prop_len) ||
-	    !strncmp("pci108e,a001", prop_val, prop_len)) {
-	    /*
-	     * There can only be one "Sabre" bridge in a system.  It provides
-	     * PCI configuration space, a 24-bit I/O space and a 32-bit memory
-	     * space, all three of which are at fixed physical CPU addresses.
-	     */
-	    static Bool sabre_seen = FALSE;
-
-	    xf86Msg(X_INFO,
-		"Sabre or Hummingbird PCI host bridge found (\"%s\")\n",
-		prop_val);
-
-	    /* There can only be one Sabre */
-	    if (sabre_seen)
-		continue;
-	    sabre_seen = TRUE;
-
-	    /* Get "bus-range" property */
-	    prop_val = promGetProperty("bus-range", &prop_len);
-	    if (!prop_val || (prop_len != 8) ||
-		(((unsigned int *)prop_val)[0]) ||
-		(((unsigned int *)prop_val)[1] >= 256))
-		continue;
-
-	    pci_addr         = 0x01fe01000000ull;
-	    domain.io_addr   = 0x01fe02000000ull;
-	    domain.io_size   = 0x000001000000ull;
-	    domain.mem_addr  = 0x01ff00000000ull;
-	    domain.mem_size  = 0x000100000000ull;
-	    domain.bus_min   = 0;			/* Always */
-	    domain.bus_max   = ((int *)prop_val)[1];
-
-	    pFunctions = &sabrePCIFunctions;
-	} else
-	if (!strncmp("SUNW,psycho",  prop_val, prop_len) ||
-	    !strncmp("pci108e,8000", prop_val, prop_len)) {
-	    /*
-	     * A "Psycho" host bridge provides two PCI interfaces, each with
-	     * its own 16-bit I/O and 31-bit memory spaces.  Both share the
-	     * same PCI configuration space.  Here, they are assigned separate
-	     * domain numbers to prevent unintentional I/O and/or memory
-	     * resource conflicts.
-	     */
-	    xf86Msg(X_INFO,
-		"Psycho PCI host bridge found (\"%s\")\n", prop_val);
-
-	    /* Get "bus-range" property */
-	    prop_val = promGetProperty("bus-range", &prop_len);
-	    if (!prop_val || (prop_len != 8) ||
-		(((unsigned int *)prop_val)[1] >= 256) ||
-		(((unsigned int *)prop_val)[0] > ((unsigned int *)prop_val)[1]))
-		continue;
-
-	    domain.bus_min = ((int *)prop_val)[0];
-	    domain.bus_max = ((int *)prop_val)[1];
-
-	    /* Get "ranges" property */
-	    prop_val = promGetProperty("ranges", &prop_len);
-	    if (!prop_val || (prop_len != 112) ||
-		prop_val[0] || (prop_val[28] != 0x01u) ||
-		(prop_val[56] != 0x02u) || (prop_val[84] != 0x03u) ||
-		(((unsigned int *)prop_val)[4] != 0x01000000u) ||
-		((unsigned int *)prop_val)[5] ||
-		((unsigned int *)prop_val)[12] ||
-		(((unsigned int *)prop_val)[13] != 0x00010000u) ||
-		((unsigned int *)prop_val)[19] ||
-		(((unsigned int *)prop_val)[20] != 0x80000000u) ||
-		((((unsigned int *)prop_val)[11] & ~0x00010000u) !=
-		 0x02000000u) ||
-		(((unsigned int *)prop_val)[18] & ~0x80000000u) ||
-		(((unsigned int *)prop_val)[3] !=
-		 ((unsigned int *)prop_val)[10]) ||
-		(((unsigned int *)prop_val)[17] !=
-		 ((unsigned int *)prop_val)[24]) ||
-		(((unsigned int *)prop_val)[18] !=
-		 ((unsigned int *)prop_val)[25]) ||
-		(((unsigned int *)prop_val)[19] !=
-		 ((unsigned int *)prop_val)[26]) ||
-		(((unsigned int *)prop_val)[20] !=
-		 ((unsigned int *)prop_val)[27]))
-		continue;
-
-	    /* Use memcpy() to avoid alignment issues */
-	    (void)memcpy(&pci_addr, prop_val + 12,
-			 sizeof(pci_addr));
-	    (void)memcpy(&domain.io_addr, prop_val + 40,
-			 sizeof(domain.io_addr));
-	    (void)memcpy(&domain.mem_addr, prop_val + 68,
-			 sizeof(domain.mem_addr));
-
-	    domain.io_size  = 0x000000010000ull;
-	    domain.mem_size = 0x000080000000ull;
-	} else
-	if (!strncmp("SUNW,schizo",  prop_val, prop_len) ||
-	    !strncmp("pci108e,8001", prop_val, prop_len)) {
-	    /*
-	     * I have no docs on the "Schizo", but judging from the Linux
-	     * kernel, it also provides two PCI domains.  Each PCI
-	     * configuration space is the usual 16M in size, followed by a
-	     * variable-length I/O space.  Each domain also provides a
-	     * variable-length memory space.  The kernel seems to think the I/O
-	     * spaces are 16M long, and the memory spaces, 2G, but these
-	     * assumptions are actually only present in source code comments.
-	     * Sun has, however, confirmed to me the validity of these
-	     * assumptions.
-	     */
-	    volatile unsigned long long mem_match, mem_mask, io_match, io_mask;
-	    unsigned long Offset;
-	    pointer pSchizo;
-
-	    xf86Msg(X_INFO,
-		"Schizo PCI host bridge found (\"%s\")\n", prop_val);
-
-	    /* Get "bus-range" property */
-	    prop_val = promGetProperty("bus-range", &prop_len);
-	    if (!prop_val || (prop_len != 8) ||
-		(((unsigned int *)prop_val)[1] >= 256) ||
-		(((unsigned int *)prop_val)[0] > ((unsigned int *)prop_val)[1]))
-		continue;
-
-	    domain.bus_min = ((int *)prop_val)[0];
-	    domain.bus_max = ((int *)prop_val)[1];
-
-	    /* Get "reg" property */
-	    prop_val = promGetProperty("reg", &prop_len);
-	    if (!prop_val || (prop_len != 48))
-		continue;
-
-	    /* Temporarily map some of Schizo's registers */
-	    pSchizo = sparcMapAperture(-1, VIDMEM_MMIO,
-		((unsigned long long *)prop_val)[2] - 0x000000010000ull,
-		0x00010000ul);
-
-	    /* Determine where PCI config, I/O and memory spaces reside */
-	    if ((((unsigned long long *)prop_val)[0] & 0x000000700000ull) ==
-		0x000000600000ull)
-		Offset = 0x0040;
-	    else
-		Offset = 0x0060;
-
-	    mem_match = PciReg(pSchizo, 0, Offset, unsigned long long);
-	    mem_mask  = PciReg(pSchizo, 0, Offset + 8, unsigned long long);
-	    io_match  = PciReg(pSchizo, 0, Offset + 16, unsigned long long);
-	    io_mask   = PciReg(pSchizo, 0, Offset + 24, unsigned long long);
-
-	    /* Unmap Schizo registers */
-	    xf86UnMapVidMem(-1, pSchizo, 0x00010000ul);
-
-	    /* Calculate sizes */
-	    mem_mask = (((mem_mask - 1) ^ mem_mask) >> 1) + 1;
-	    io_mask  = (((io_mask  - 1) ^ io_mask ) >> 1) + 1;
-
-	    if (io_mask <= 0x000001000000ull)	/* Nothing left for I/O */
-		continue;
-
-	    domain.mem_addr = mem_match & ~0x8000000000000000ull;
-	    domain.mem_size = mem_mask;
-	    pci_addr        = io_match  & ~0x8000000000000000ull;
-	    domain.io_addr  = pci_addr  +  0x0000000001000000ull;
-	    domain.io_size  = io_mask   -  0x0000000001000000ull;
-	} else {
-	    xf86Msg(X_WARNING, "Unknown PCI host bridge: \"%s\"\n", prop_val);
-	    continue;
-	}
-
-	/* Only map as much PCI configuration as we need */
-	domain.pci = (char *)sparcMapAperture(-1, VIDMEM_MMIO,
-	    pci_addr + PCI_MAKE_TAG(domain.bus_min, 0, 0),
-	    PCI_MAKE_TAG(domain.bus_max - domain.bus_min + 1, 0, 0)) -
-	    PCI_MAKE_TAG(domain.bus_min, 0, 0);
-
-	/* Allocate a domain record */
-	pDomain = xnfalloc(sizeof(sparcDomainRec));
-	*pDomain = domain;
-
-	/*
-	 * Allocate and prime pciBusInfo records.  These are allocated one at a
-	 * time because those for empty buses are eventually released.
-	 */
-	bus = pDomain->bus_min =
-	    PCI_MAKE_BUS(pciNumDomains, domain.bus_min);
-	pciNumBuses = pDomain->bus_max =
-	    PCI_MAKE_BUS(pciNumDomains, domain.bus_max) + 1;
-
-	pciBusInfo[bus] = xnfcalloc(1, sizeof(pciBusInfo_t));
-	pciBusInfo[bus]->configMech = PCI_CFG_MECH_OTHER;
-	pciBusInfo[bus]->numDevices = 32;
-	pciBusInfo[bus]->funcs = pFunctions;
-	pciBusInfo[bus]->pciBusPriv = pDomain;
-	while (++bus < pciNumBuses) {
-	    pciBusInfo[bus] = xnfalloc(sizeof(pciBusInfo_t));
-	    *(pciBusInfo[bus]) = *(pciBusInfo[bus - 1]);
-	    pciBusInfo[bus]->funcs = &sparcPCIFunctions;
-	}
-
-	/* Next domain, please... */
-	xf86DomainInfo[pciNumDomains++] = pDomain;
-
-	/*
-	 * OK, enough of the straight-forward stuff.  Time to deal with some
-	 * brokenness...
-	 *
-	 * The PCI specs require that when a bus transaction remains unclaimed
-	 * for too long, the master entity on that bus is to cancel the
-	 * transaction it issued or passed on with a master abort.  Two
-	 * outcomes are possible:
-	 *
-	 * - the master abort can be treated as an error that is propogated
-	 *   back through the bus tree to the entity that ultimately originated
-	 *   the transaction; or
-	 * - the transaction can be allowed to complete normally, which means
-	 *   that writes are ignored and reads return all ones.
-	 *
-	 * In the first case, if the CPU happens to be at the tail end of the
-	 * tree path through one of its host bridges, it will be told there is
-	 * a hardware mal-function, despite being generated by software.
-	 *
-	 * For a software function (be it firmware, OS or userland application)
-	 * to determine how a PCI bus tree is populated, it must be able to
-	 * detect when master aborts occur.  Obviously, PCI discovery is much
-	 * simpler when master aborts are allowed to complete normally.
-	 *
-	 * Unfortunately, a number of non-Intel PCI implementations have chosen
-	 * to treat master aborts as severe errors.  The net effect is to
-	 * cripple PCI discovery algorithms in userland.
-	 *
-	 * On SPARCs, master aborts cause a number of different behaviours,
-	 * including delivering a signal to the userland application, rebooting
-	 * the system, "dropping down" to firmware, or, worst of all, bus
-	 * lockouts.  Even in the first case, the SIGBUS signal that is
-	 * eventually generated isn't delivered in a timely enough fashion to
-	 * allow an application to reliably detect the master abort that
-	 * ultimately caused it.
-	 *
-	 * This can be somewhat mitigated.  On all architectures, master aborts
-	 * that occur on secondary buses can be forced to complete normally
-	 * because the PCI-to-PCI bridges that serve them are governed by an
-	 * industry-wide specification.  (This is just another way of saying
-	 * that whatever justification there might be for erroring out master
-	 * aborts is deemed by the industry as insufficient to generate more
-	 * PCI non-compliance than there already is...)
-	 *
-	 * This leaves us with master aborts that occur on primary buses.
-	 * There is no specification for host-to-PCI bridges.  Bridges used in
-	 * SPARCs can be told to ignore all PCI errors, but not specifically
-	 * master aborts.  Not only is this too coarse-grained, but
-	 * master-aborted read transactions on the primary bus end up returning
-	 * garbage rather than all ones.
-	 *
-	 * I have elected to work around this the only way I can think of doing
-	 * so right now.  The following scans an additional PROM level and
-	 * builds a device/function map for the primary bus.  I can only hope
-	 * this PROM information represents all devices on the primary bus,
-	 * rather than only a subset of them.
-	 *
-	 * Master aborts are useful in other ways too, that are not addressed
-	 * here.  These include determining whether or not a domain provides
-	 * VGA, or if a PCI device actually implements PCI disablement.
-	 *
-	 * ---  TSI @ UQV  2001.09.19
-	 */
-	for (node2 = promGetChild(node);
-	     node2;
-	     node2 = promGetSibling(node2)) {
-	    /* Get "reg" property */
-	    prop_val = promGetProperty("reg", &prop_len);
-	    if (!prop_val || (prop_len % 20))
-		continue;
-
-	    /*
-	     * It's unnecessary to scan the entire "reg" property, but I'll do
-	     * so anyway.
-	     */
-	    prop_len /= 20;
-	    for (;  prop_len--;  prop_val += 20)
-		SetBitInMap(PCI_DFN_FROM_TAG(*(PCITAG *)prop_val),
-		    pDomain->dfn_mask);
-	}
-
-	/* Assume the host bridge is device 0, function 0 on its bus */
-	SetBitInMap(0, pDomain->dfn_mask);
-    }
-
-    sparcPromClose();
-
-    close(apertureFd);
-    apertureFd = -1;
-}
-
-#ifndef INCLUDE_XF86_NO_DOMAIN
-
-_X_EXPORT int
-xf86GetPciDomain(PCITAG Tag)
-{
-    return PCI_DOM_FROM_TAG(Tag);
-}
-
-_X_EXPORT pointer
-xf86MapDomainMemory(int ScreenNum, int Flags, PCITAG Tag,
-		    ADDRESS Base, unsigned long Size)
-{
-    sparcDomainPtr pDomain;
-    pointer        result;
-    int            domain = PCI_DOM_FROM_TAG(Tag);
-
-    if ((domain <= 0) || (domain >= pciNumDomains) ||
-	!(pDomain = xf86DomainInfo[domain]) ||
-	(((unsigned long long)Base + (unsigned long long)Size) >
-	 pDomain->mem_size))
-	FatalError("xf86MapDomainMemory() called with invalid parameters.\n");
-
-    result = sparcMapAperture(ScreenNum, Flags, pDomain->mem_addr + Base, Size);
-
-    if (apertureFd >= 0) {
-	close(apertureFd);
-	apertureFd = -1;
-    }
-
-    return result;
-}
-
-_X_EXPORT IOADDRESS
-xf86MapLegacyIO(int ScreenNum, int Flags, PCITAG Tag,
-		IOADDRESS Base, unsigned long Size)
-{
-    sparcDomainPtr pDomain;
-    int            domain = PCI_DOM_FROM_TAG(Tag);
-
-    if ((domain <= 0) || (domain >= pciNumDomains) ||
-	!(pDomain = xf86DomainInfo[domain]) ||
-	(((unsigned long long)Base + (unsigned long long)Size) >
-	 pDomain->io_size))
-	FatalError("xf86MapLegacyIO() called with invalid parameters.\n");
-
-    /* Permanently map all of I/O space */
-    if (!pDomain->io) {
-	pDomain->io = sparcMapAperture(ScreenNum, Flags,
-	    pDomain->io_addr, pDomain->io_size);
-
-	if (apertureFd >= 0) {
-	    close(apertureFd);
-	    apertureFd = -1;
-	}
-    }
-
-    return (IOADDRESS)pDomain->io + Base;
-}
-
-resPtr
-xf86AccResFromOS(resPtr pRes)
-{
-    sparcDomainPtr pDomain;
-    resRange       range;
-    int            domain;
-
-    for (domain = 1;  domain < pciNumDomains;  domain++) {
-	if (!(pDomain = xf86DomainInfo[domain]))
-	    continue;
-
-	/*
-	 * At minimum, the top and bottom resources must be claimed, so that
-	 * resources that are (or appear to be) unallocated can be relocated.
-	 */
-	RANGE(range, 0x00000000u, 0x0009ffffu,
-	      RANGE_TYPE(ResExcMemBlock, domain));
-	pRes = xf86AddResToList(pRes, &range, -1);
-	RANGE(range, 0x000c0000u, 0x000effffu,
-	      RANGE_TYPE(ResExcMemBlock, domain));
-	pRes = xf86AddResToList(pRes, &range, -1);
-	RANGE(range, 0x000f0000u, 0x000fffffu,
-	      RANGE_TYPE(ResExcMemBlock, domain));
-	pRes = xf86AddResToList(pRes, &range, -1);
-
-	RANGE(range, pDomain->mem_size - 1, pDomain->mem_size - 1,
-	      RANGE_TYPE(ResExcMemBlock, domain));
-	pRes = xf86AddResToList(pRes, &range, -1);
-
-	RANGE(range, 0x00000000u, 0x00000000u,
-	      RANGE_TYPE(ResExcIoBlock, domain));
-	pRes = xf86AddResToList(pRes, &range, -1);
-	RANGE(range, pDomain->io_size - 1, pDomain->io_size - 1,
-	      RANGE_TYPE(ResExcIoBlock, domain));
-	pRes = xf86AddResToList(pRes, &range, -1);
-    }
-
-    return pRes;
-}
-
-#endif /* !INCLUDE_XF86_NO_DOMAIN */
-
-#endif /* defined(sun) */
-
-#if defined(ARCH_PCI_PCI_BRIDGE)
-
-/* Definitions specific to Sun's APB P2P bridge (a.k.a. Simba) */
-#define APB_IO_ADDRESS_MAP	0xDE
-#define APB_MEM_ADDRESS_MAP	0xDF
-
-/*
- * Simba's can only occur on bus 0.  Furthermore, Simba's must have a non-zero
- * device/function number because the Sabre interface they must connect to
- * occupies the 0:0:0 slot.  Also, there can be only one Sabre interface in the
- * system, and therefore, only one Simba function can route any particular
- * resource.  Thus, it is appropriate to use a single set of static variables
- * to hold the tag of the Simba function routing a VGA resource range at any
- * one time, and to test these variables for non-zero to determine whether or
- * not the Sabre would master-abort a VGA access (and kill the system).
- *
- * The trick is to determine when it is safe to re-route VGA, because doing so
- * re-routes much more.
- */
-static PCITAG simbavgaIOTag = 0, simbavgaMemTag = 0;
-static Bool simbavgaRoutingAllow = TRUE;
-
-/*
- * Scan the bus subtree rooted at 'bus' for a non-display device that might be
- * decoding the bottom 2 MB of I/O space and/or the bottom 512 MB of memory
- * space.  Reset simbavgaRoutingAllow if such a device is found.
- *
- * XXX For now, this is very conservative and should be made less so as the
- *     need arises.
- */
-static void
-simbaCheckBus(CARD16 pcicommand, int bus)
-{
-    pciConfigPtr pPCI, *ppPCI = xf86scanpci(0);
-
-    while ((pPCI = *ppPCI++)) {
-	if (pPCI->busnum < bus)
-	    continue;
-	if (pPCI->busnum > bus)
-	    break;
-
-	/* XXX Assume all devices respect PCI disablement */
-	if (!(pcicommand & pPCI->pci_command))
-	    continue;
-
-	/* XXX This doesn't deal with mis-advertised classes */
-	switch (pPCI->pci_base_class) {
-	case PCI_CLASS_PREHISTORIC:
-	    if (pPCI->pci_sub_class == PCI_SUBCLASS_PREHISTORIC_VGA)
-		continue;	/* Ignore VGA */
-	    break;
-
-	case PCI_CLASS_DISPLAY:
-	    continue;
-
-	case PCI_CLASS_BRIDGE:
-	    switch (pPCI->pci_sub_class) {
-	    case PCI_SUBCLASS_BRIDGE_PCI:
-	    case PCI_SUBCLASS_BRIDGE_CARDBUS:
-		/* Scan secondary bus */
-		/* XXX First check bridge routing? */
-		simbaCheckBus(pcicommand & pPCI->pci_command,
-		    PCI_SECONDARY_BUS_EXTRACT(pPCI->pci_pp_bus_register,
-			pPCI->tag));
-		if (!simbavgaRoutingAllow)
-		    return;
-
-	    default:
-		break;
-	    }
-
-	default:
-	    break;
-	}
-
-	/*
-	 * XXX We could check the device's bases here, but PCI doesn't limit
-	 *     the device's decoding to them.
-	 */
-
-	simbavgaRoutingAllow = FALSE;
-	break;
-    }
-}
-
-static pciConfigPtr
-simbaVerifyBus(int bus)
-{
-    pciConfigPtr pPCI;
-    if ((bus < 0) || (bus >= pciNumBuses) ||
-	!pciBusInfo[bus] || !(pPCI = pciBusInfo[bus]->bridge) ||
-	(pPCI->pci_device_vendor != DEVID(VENDOR_SUN, CHIP_SIMBA)))
-	return NULL;
-
-    return pPCI;
-}
-
-static CARD16
-simbaControlBridge(int bus, CARD16 mask, CARD16 value)
-{
-    pciConfigPtr pPCI;
-    CARD16 current = 0, tmp;
-    CARD8 iomap, memmap;
-
-    if ((pPCI = simbaVerifyBus(bus))) {
-	/*
-	 * The Simba does not implement VGA enablement as described in the P2P
-	 * spec.  It does however route I/O and memory in large enough chunks
-	 * so that we can determine were VGA resources would be routed
-	 * (including ISA VGA I/O aliases).  We can allow changes to that
-	 * routing only under certain circumstances.
-	 */
-	iomap = pciReadByte(pPCI->tag, APB_IO_ADDRESS_MAP);
-	memmap = pciReadByte(pPCI->tag, APB_MEM_ADDRESS_MAP);
-	if (iomap & memmap & 0x01) {
-	    current |= PCI_PCI_BRIDGE_VGA_EN;
-	    if ((mask & PCI_PCI_BRIDGE_VGA_EN) &&
-		!(value & PCI_PCI_BRIDGE_VGA_EN)) {
-		if (!simbavgaRoutingAllow) {
-		    xf86MsgVerb(X_WARNING, 3, "Attempt to disable VGA routing"
-				" through Simba at %x:%x:%x disallowed.\n",
-				pPCI->busnum, pPCI->devnum, pPCI->funcnum);
-		    value |= PCI_PCI_BRIDGE_VGA_EN;
-		} else {
-		    pciWriteByte(pPCI->tag, APB_IO_ADDRESS_MAP,
-				 iomap & ~0x01);
-		    pciWriteByte(pPCI->tag, APB_MEM_ADDRESS_MAP,
-				 memmap & ~0x01);
-		    simbavgaIOTag = simbavgaMemTag = 0;
-		}
-	    }
-	} else {
-	    if (mask & value & PCI_PCI_BRIDGE_VGA_EN) {
-		if (!simbavgaRoutingAllow) {
-		    xf86MsgVerb(X_WARNING, 3, "Attempt to enable VGA routing"
-				" through Simba at %x:%x:%x disallowed.\n",
-				pPCI->busnum, pPCI->devnum, pPCI->funcnum);
-		    value &= ~PCI_PCI_BRIDGE_VGA_EN;
-		} else {
-		    if (pPCI->tag != simbavgaIOTag) {
-			if (simbavgaIOTag) {
-			    tmp = pciReadByte(simbavgaIOTag,
-					      APB_IO_ADDRESS_MAP);
-			    pciWriteByte(simbavgaIOTag, APB_IO_ADDRESS_MAP,
-					 tmp & ~0x01);
-			}
-
-			pciWriteByte(pPCI->tag, APB_IO_ADDRESS_MAP,
-				     iomap | 0x01);
-			simbavgaIOTag = pPCI->tag;
-		    }
-
-		    if (pPCI->tag != simbavgaMemTag) {
-			if (simbavgaMemTag) {
-			    tmp = pciReadByte(simbavgaMemTag,
-					      APB_MEM_ADDRESS_MAP);
-			    pciWriteByte(simbavgaMemTag, APB_MEM_ADDRESS_MAP,
-					 tmp & ~0x01);
-			}
-
-			pciWriteByte(pPCI->tag, APB_MEM_ADDRESS_MAP,
-				     memmap | 0x01);
-			simbavgaMemTag = pPCI->tag;
-		    }
-		}
-	    }
-	}
-
-	/* Move on to master abort failure enablement (as per P2P spec) */
-	tmp = pciReadWord(pPCI->tag, PCI_PCI_BRIDGE_CONTROL_REG);
-	current |= tmp;
-	if (tmp & PCI_PCI_BRIDGE_MASTER_ABORT_EN) {
-	    if ((mask & PCI_PCI_BRIDGE_MASTER_ABORT_EN) &&
-		!(value & PCI_PCI_BRIDGE_MASTER_ABORT_EN))
-		pciWriteWord(pPCI->tag, PCI_PCI_BRIDGE_CONTROL_REG,
-			     tmp & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN);
-	} else {
-	    if (mask & value & PCI_PCI_BRIDGE_MASTER_ABORT_EN)
-		pciWriteWord(pPCI->tag, PCI_PCI_BRIDGE_CONTROL_REG,
-			     tmp | PCI_PCI_BRIDGE_MASTER_ABORT_EN);
-	}
-
-	/* Insert emulation of other P2P controls here */
-    }
-
-    return (current & ~mask) | (value & mask);
-}
-
-static void
-simbaGetBridgeResources(int bus,
-			pointer *ppIoRes,
-			pointer *ppMemRes,
-			pointer *ppPmemRes)
-{
-    pciConfigPtr pPCI = simbaVerifyBus(bus);
-    resRange range;
-    int i;
-
-    if (!pPCI)
-	return;
-
-    if (ppIoRes) {
-	xf86FreeResList(*ppIoRes);
-	*ppIoRes = NULL;
-
-	if (pPCI->pci_command & PCI_CMD_IO_ENABLE) {
-	    unsigned char iomap = pciReadByte(pPCI->tag, APB_IO_ADDRESS_MAP);
-	    if (simbavgaRoutingAllow)
-		iomap |= 0x01;
-	    for (i = 0;  i < 8;  i++) {
-		if (iomap & (1 << i)) {
-		    RANGE(range, i << 21, ((i + 1) << 21) - 1,
-			  RANGE_TYPE(ResExcIoBlock,
-				     xf86GetPciDomain(pPCI->tag)));
-		    *ppIoRes = xf86AddResToList(*ppIoRes, &range, -1);
-		}
-	    }
-	}
-    }
-
-    if (ppMemRes) {
-	xf86FreeResList(*ppMemRes);
-	*ppMemRes = NULL;
-
-	if (pPCI->pci_command & PCI_CMD_MEM_ENABLE) {
-	    unsigned char memmap = pciReadByte(pPCI->tag, APB_MEM_ADDRESS_MAP);
-	    if (simbavgaRoutingAllow)
-		memmap |= 0x01;
-	    for (i = 0;  i < 8;  i++) {
-		if (memmap & (1 << i)) {
-		    RANGE(range, i << 29, ((i + 1) << 29) - 1,
-			  RANGE_TYPE(ResExcMemBlock,
-				     xf86GetPciDomain(pPCI->tag)));
-		    *ppMemRes = xf86AddResToList(*ppMemRes, &range, -1);
-		}
-	    }
-	}
-    }
-
-    if (ppPmemRes) {
-	xf86FreeResList(*ppPmemRes);
-	*ppPmemRes = NULL;
-    }
-}
-
-void ARCH_PCI_PCI_BRIDGE(pciConfigPtr pPCI)
-{
-    static pciBusFuncs_t simbaBusFuncs;
-    pciBusInfo_t *pBusInfo;
-    CARD16 pcicommand;
-
-    if (pPCI->pci_device_vendor != DEVID(VENDOR_SUN, CHIP_SIMBA))
-	return;
-
-    pBusInfo = pPCI->businfo;
-
-    simbaBusFuncs = *(pBusInfo->funcs);
-    simbaBusFuncs.pciControlBridge = simbaControlBridge;
-    simbaBusFuncs.pciGetBridgeResources = simbaGetBridgeResources;
-
-    pBusInfo->funcs = &simbaBusFuncs;
-
-    if (!simbavgaRoutingAllow)
-	return;
-
-    pcicommand = 0;
-
-    if (pciReadByte(pPCI->tag, APB_IO_ADDRESS_MAP) & 0x01) {
-	pcicommand |= PCI_CMD_IO_ENABLE;
-	simbavgaIOTag = pPCI->tag;
-    }
-
-    if (pciReadByte(pPCI->tag, APB_MEM_ADDRESS_MAP) & 0x01) {
-	pcicommand |= PCI_CMD_MEM_ENABLE;
-	simbavgaMemTag = pPCI->tag;
-    }
-
-    if (!pcicommand)
-	return;
-
-    simbaCheckBus(pcicommand,
-	PCI_SECONDARY_BUS_EXTRACT(pPCI->pci_pp_bus_register, pPCI->tag));
-}
-
-#endif /* defined(ARCH_PCI_PCI_BRIDGE) */
commit 9a39b6cfbda306eb594e87ce828afa01cd7aa01e
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 14:26:01 2008 -0400

    Remove XF86SCANPCI_WRAPPER.

diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index c01bdc5..26ba947 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -215,14 +215,6 @@
 
 extern void ARCH_PCI_INIT(void);
 
-#if defined(XF86SCANPCI_WRAPPER)
-typedef enum {
-    SCANPCI_INIT,
-    SCANPCI_TERM
-} scanpciWrapperOpt;
-extern void XF86SCANPCI_WRAPPER(scanpciWrapperOpt flags);
-#endif
-
 /*
  * Table of functions used to access a specific PCI bus domain
  * (e.g. a primary PCI bus and all of its secondaries)
commit 470b05a610e641094d46742393684acd786d78a8
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 14:03:36 2008 -0400

    Remove vestigial MAX_PCI_DEVICES.

diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index 488e1e3..c01bdc5 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -115,8 +115,6 @@
 /*
  * Global Definitions
  */
-#define MAX_PCI_DEVICES 128	/* Max number of devices accomodated */
-				/* by xf86scanpci		     */
 #if defined(sun) && defined(SVR4) && defined(sparc)
 # define MAX_PCI_BUSES   4096	/* Max number of PCI buses           */
 #elif (defined(__alpha__) || defined(__ia64__)) && defined (linux)
commit 244a635fcdc9e0a7212d51b26d74f49d8e1b071f
Author: Fredrik Höglund <fredrik at kde.org>
Date:   Mon Aug 18 19:27:34 2008 +0200

    Fix the tile offset in miPaintWindow for ParentRelative windows.

diff --git a/mi/miexpose.c b/mi/miexpose.c
index 7da1324..9fbcdd7 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -547,8 +547,8 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
 	draw_x_off = drawable->x;
 	draw_y_off = drawable->y;
 
-	tile_x_off = 0;
-	tile_y_off = 0;
+	tile_x_off = pWin->drawable.x - draw_x_off;
+	tile_y_off = pWin->drawable.y - draw_y_off;
 	fill = pWin->background;
 	switch (pWin->backgroundState) {
 	case None:
commit fdf7c747a8e1bc59dfb31b7f90dd5eab2687315b
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 13:13:03 2008 -0400

    Remove PciProbeType and associated weirdness.
    
    This code was effectively only used in ix86Pci.c to select PCI config
    access type.  Nobody should be using that path anymore, in the glorious
    pciaccess world; kernel services should get it right for you.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 4b56152..35a7af2 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -738,12 +738,6 @@ typedef enum {
     FLAG_ALLOWMOUSEOPENFAIL,
     FLAG_VTSYSREQ,
     FLAG_XKBDISABLE,
-    FLAG_PCIPROBE1,
-    FLAG_PCIPROBE2,
-    FLAG_PCIFORCECONFIG1,
-    FLAG_PCIFORCECONFIG2,
-    FLAG_PCIFORCENONE,
-    FLAG_PCIOSCONFIG,
     FLAG_SAVER_BLANKTIME,
     FLAG_DPMS_STANDBYTIME,
     FLAG_DPMS_SUSPENDTIME,
@@ -792,18 +786,6 @@ static OptionInfoRec FlagOptions[] = {
 	{0}, FALSE },
   { FLAG_XKBDISABLE,		"XkbDisable",			OPTV_BOOLEAN,
 	{0}, FALSE },
-  { FLAG_PCIPROBE1,		"PciProbe1"		,	OPTV_BOOLEAN,
-	{0}, FALSE },
-  { FLAG_PCIPROBE2,		"PciProbe2",			OPTV_BOOLEAN,
-	{0}, FALSE },
-  { FLAG_PCIFORCECONFIG1,	"PciForceConfig1",		OPTV_BOOLEAN,
-	{0}, FALSE },
-  { FLAG_PCIFORCECONFIG2,	"PciForceConfig2",		OPTV_BOOLEAN,
-	{0}, FALSE },
-  { FLAG_PCIFORCENONE,		"PciForceNone",			OPTV_BOOLEAN,
-	{0}, FALSE },
-  { FLAG_PCIOSCONFIG,	        "PciOsConfig",   		OPTV_BOOLEAN,
-	{0}, FALSE },
   { FLAG_SAVER_BLANKTIME,	"BlankTime"		,	OPTV_INTEGER,
 	{0}, FALSE },
   { FLAG_DPMS_STANDBYTIME,	"StandbyTime",			OPTV_INTEGER,
@@ -973,19 +955,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 #endif
     }
 
-    if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE1))
-	xf86Info.pciFlags = PCIProbe1;
-    if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE2))
-	xf86Info.pciFlags = PCIProbe2;
-    if (xf86IsOptionSet(FlagOptions, FLAG_PCIFORCECONFIG1))
-	xf86Info.pciFlags = PCIForceConfig1;
-    if (xf86IsOptionSet(FlagOptions, FLAG_PCIFORCECONFIG2))
-	xf86Info.pciFlags = PCIForceConfig2;
-    if (xf86IsOptionSet(FlagOptions, FLAG_PCIOSCONFIG))
-	xf86Info.pciFlags = PCIOsConfig;
-    if (xf86IsOptionSet(FlagOptions, FLAG_PCIFORCENONE))
-	xf86Info.pciFlags = PCIForceNone;
-
     xf86Info.pmFlag = TRUE;
     if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value)) 
 	xf86Info.pmFlag = !value;
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index c000891..7102476 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -119,7 +119,6 @@ xf86InfoRec xf86Info = {
 	FALSE,		/* vidModeAllowNonLocal */
 	TRUE,		/* miscModInDevEnabled */
 	FALSE,		/* miscModInDevAllowNonLocal */
-	PCIOsConfig,	/* pciFlags */
 	Pix24DontCare,	/* pixmap24 */
 	X_DEFAULT,	/* pix24From */
 #ifdef __i386__
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 0601c0d..014f817 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -37,17 +37,6 @@
 #include "xf86Pci.h"
 #include "xf86str.h"
 
-/* PCI probe flags */
-
-typedef enum {
-    PCIProbe1		= 0,
-    PCIProbe2,
-    PCIForceConfig1,
-    PCIForceConfig2,
-    PCIForceNone,
-    PCIOsConfig
-} PciProbeType;
-
 typedef enum {
     LogNone,
     LogFlush,
@@ -108,7 +97,6 @@ typedef struct {
     Bool		miscModInDevEnabled;	/* Allow input devices to be
 						 * changed */
     Bool		miscModInDevAllowNonLocal;
-    PciProbeType	pciFlags;
     Pix24Flags		pixmap24;
     MessageType		pix24From;
 #ifdef __i386__
diff --git a/hw/xfree86/os-support/bus/ix86Pci.c b/hw/xfree86/os-support/bus/ix86Pci.c
index e542463..c6a8471 100644
--- a/hw/xfree86/os-support/bus/ix86Pci.c
+++ b/hw/xfree86/os-support/bus/ix86Pci.c
@@ -277,8 +277,8 @@ ix86PciBusCheck(void)
     return FALSE;
 }
 
-static
-void ix86PciSelectCfgmech(void)
+static void
+ix86PciSelectCfgmech(void)
 {
     static Bool beenhere = FALSE;
     CARD32 mode1Res1 = 0, mode1Res2 = 0, oldVal1 = 0;
@@ -290,248 +290,184 @@ void ix86PciSelectCfgmech(void)
 
     beenhere = TRUE;
 
-    /*
-     * Determine if motherboard chipset supports PCI Config Mech 1 or 2
-     * We rely on xf86Info.pciFlags to tell which mechanisms to try....
-     */
-    switch (xf86Info.pciFlags) {
-	case PCIOsConfig:
-	case PCIProbe1:
-	    if (!xf86EnableIO())
-		return;
+    /* Determine if motherboard chipset supports PCI Config Mech 1 or 2 */
+    do {
+	if (!xf86EnableIO())
+	    return;
 
-	    xf86MsgVerb(X_INFO, 2,
-			"PCI: Probing config type using method 1\n");
-	    oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG);
+	xf86MsgVerb(X_INFO, 2,
+		"PCI: Probing config type using method 1\n");
+	oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG);
 
 #ifdef DEBUGPCI
-      if (xf86Verbose > 2) {
-	ErrorF("Checking config type 1:\n"
-		"\tinitial value of MODE1_ADDR_REG is 0x%08x\n", oldVal1);
-	ErrorF("\tChecking that all bits in mask 0x7f000000 are clear\n");
-      }
+	if (xf86Verbose > 2) {
+	    ErrorF("Checking config type 1:\n"
+		    "\tinitial value of MODE1_ADDR_REG is 0x%08x\n", oldVal1);
+	    ErrorF("\tChecking that all bits in mask 0x7f000000 are clear\n");
+	}
 #endif
 
-      /* Assuming config type 1 to start with */
-      if ((oldVal1 & 0x7f000000) == 0) {
+	/* Assuming config type 1 to start with */
+	if ((oldVal1 & 0x7f000000) == 0) {
 
-	stages |= 0x01;
+	    stages |= 0x01;
 
 #ifdef DEBUGPCI
-	if (xf86Verbose > 2) {
-	    ErrorF("\tValue indicates possibly config type 1\n");
-	    ErrorF("\tWriting 32-bit value 0x%08x to MODE1_ADDR_REG\n", PCI_EN);
+	    if (xf86Verbose > 2) {
+		ErrorF("\tValue indicates possibly config type 1\n");
+		ErrorF("\tWriting 32-bit value 0x%08x to MODE1_ADDR_REG\n", PCI_EN);
 #if 0
-	    ErrorF("\tWriting 8-bit value 0x00 to MODE1_ADDR_REG + 3\n");
+		ErrorF("\tWriting 8-bit value 0x00 to MODE1_ADDR_REG + 3\n");
 #endif
-	}
+	    }
 #endif
 
-	ix86Pci0.configMech = PCI_CFG_MECH_1;
-	ix86Pci0.numDevices = PCI_CFGMECH1_MAXDEV;
-	ix86Pci0.funcs = &ix86Funcs1;
+	    ix86Pci0.configMech = PCI_CFG_MECH_1;
+	    ix86Pci0.numDevices = PCI_CFGMECH1_MAXDEV;
+	    ix86Pci0.funcs = &ix86Funcs1;
 
-	outl(PCI_CFGMECH1_ADDRESS_REG, PCI_EN);
+	    outl(PCI_CFGMECH1_ADDRESS_REG, PCI_EN);
 
 #if 0
-	/*
-	 * This seems to cause some Neptune-based PCI machines to switch
-	 * from config type 1 to config type 2
-	 */
-	outb(PCI_CFGMECH1_ADDRESS_REG + 3, 0);
+	    /*
+	     * This seems to cause some Neptune-based PCI machines to switch
+	     * from config type 1 to config type 2
+	     */
+	    outb(PCI_CFGMECH1_ADDRESS_REG + 3, 0);
 #endif
-	mode1Res1 = inl(PCI_CFGMECH1_ADDRESS_REG);
+	    mode1Res1 = inl(PCI_CFGMECH1_ADDRESS_REG);
 
 #ifdef DEBUGPCI
-	if (xf86Verbose > 2) {
-	    ErrorF("\tValue read back from MODE1_ADDR_REG is 0x%08x\n",
+	    if (xf86Verbose > 2) {
+		ErrorF("\tValue read back from MODE1_ADDR_REG is 0x%08x\n",
 			mode1Res1);
-	    ErrorF("\tRestoring original contents of MODE1_ADDR_REG\n");
-	}
+		ErrorF("\tRestoring original contents of MODE1_ADDR_REG\n");
+	    }
 #endif
 
-	outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1);
+	    outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1);
 
-	if (mode1Res1) {
+	    if (mode1Res1) {
 
-	    stages |= 0x02;
+		stages |= 0x02;
 
 #ifdef DEBUGPCI
-	    if (xf86Verbose > 2) {
-		ErrorF("\tValue read back is non-zero, and indicates possible"
-			" config type 1\n");
-	    }
+		if (xf86Verbose > 2) {
+		    ErrorF("\tValue read back is non-zero, and indicates possible"
+			    " config type 1\n");
+		}
 #endif
 
-	    if (ix86PciBusCheck()) {
+		if (ix86PciBusCheck()) {
 
 #ifdef DEBUGPCI
-		if (xf86Verbose > 2)
-		    ErrorF("\tBus check Confirms this: ");
+		    if (xf86Verbose > 2)
+			ErrorF("\tBus check Confirms this: ");
 #endif
 
-		xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
-		xf86MsgVerb(X_INFO, 3,
-			"PCI: stages = 0x%02x, oldVal1 = 0x%08lx, mode1Res1"
-			" = 0x%08lx\n", stages, (unsigned long)oldVal1,
-			(unsigned long)mode1Res1);
-		return;
-	    }
+		    xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
+		    xf86MsgVerb(X_INFO, 3,
+			    "PCI: stages = 0x%02x, oldVal1 = 0x%08lx, mode1Res1"
+			    " = 0x%08lx\n", stages, (unsigned long)oldVal1,
+			    (unsigned long)mode1Res1);
+		    return;
+		}
 
 #ifdef DEBUGPCI
-	    if (xf86Verbose > 2) {
-		ErrorF("\tBus check fails to confirm this, continuing type 1"
-			" check ...\n");
-	    }
+		if (xf86Verbose > 2) {
+		    ErrorF("\tBus check fails to confirm this, continuing type 1"
+			    " check ...\n");
+		}
 #endif
 
-	}
+	    }
 
-	stages |= 0x04;
+	    stages |= 0x04;
 
 #ifdef DEBUGPCI
-	if (xf86Verbose > 2) {
-	    ErrorF("\tWriting 0xff000001 to MODE1_ADDR_REG\n");
-	}
+	    if (xf86Verbose > 2) {
+		ErrorF("\tWriting 0xff000001 to MODE1_ADDR_REG\n");
+	    }
 #endif
-	outl(PCI_CFGMECH1_ADDRESS_REG, 0xff000001);
-	mode1Res2 = inl(PCI_CFGMECH1_ADDRESS_REG);
+	    outl(PCI_CFGMECH1_ADDRESS_REG, 0xff000001);
+	    mode1Res2 = inl(PCI_CFGMECH1_ADDRESS_REG);
 
 #ifdef DEBUGPCI
-	if (xf86Verbose > 2) {
-	    ErrorF("\tValue read back from MODE1_ADDR_REG is 0x%08x\n",
+	    if (xf86Verbose > 2) {
+		ErrorF("\tValue read back from MODE1_ADDR_REG is 0x%08x\n",
 			mode1Res2);
-	    ErrorF("\tRestoring original contents of MODE1_ADDR_REG\n");
-	}
+		ErrorF("\tRestoring original contents of MODE1_ADDR_REG\n");
+	    }
 #endif
 
-	outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1);
+	    outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1);
 
-	if ((mode1Res2 & 0x80000001) == 0x80000000) {
+	    if ((mode1Res2 & 0x80000001) == 0x80000000) {
 
-	    stages |= 0x08;
+		stages |= 0x08;
 
 #ifdef DEBUGPCI
-	    if (xf86Verbose > 2) {
-		ErrorF("\tValue read back has only the msb set\n"
-			"\tThis indicates possible config type 1\n");
-	    }
+		if (xf86Verbose > 2) {
+		    ErrorF("\tValue read back has only the msb set\n"
+			    "\tThis indicates possible config type 1\n");
+		}
 #endif
 
-	    if (ix86PciBusCheck()) {
+		if (ix86PciBusCheck()) {
 
 #ifdef DEBUGPCI
-		if (xf86Verbose > 2)
-		    ErrorF("\tBus check Confirms this: ");
+		    if (xf86Verbose > 2)
+			ErrorF("\tBus check Confirms this: ");
 #endif
 
-		xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
-		xf86MsgVerb(X_INFO, 3,
-			"PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
-			"\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
-			stages, (unsigned long)oldVal1,
-			(unsigned long)mode1Res1, (unsigned long)mode1Res2);
-		return;
-	    }
+		    xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
+		    xf86MsgVerb(X_INFO, 3,
+			    "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
+			    "\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
+			    stages, (unsigned long)oldVal1,
+			    (unsigned long)mode1Res1, (unsigned long)mode1Res2);
+		    return;
+		}
 
 #ifdef DEBUGPCI
-	    if (xf86Verbose > 2) {
-		ErrorF("\tBus check fails to confirm this.\n");
-	    }
+		if (xf86Verbose > 2) {
+		    ErrorF("\tBus check fails to confirm this.\n");
+		}
 #endif
 
-	}
-      }
-
-      xf86MsgVerb(X_INFO, 3, "PCI: Standard check for type 1 failed.\n");
-      xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
-	       "\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
-	       stages, (unsigned long)oldVal1, (unsigned long)mode1Res1,
-	       (unsigned long)mode1Res2);
-
-      /* Try config type 2 */
-      oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG);
-      if ((oldVal2 & 0xf0) == 0) {
-	ix86Pci0.configMech = PCI_CFG_MECH_2;
-	ix86Pci0.numDevices = PCI_CFGMECH2_MAXDEV;
-	ix86Pci0.funcs = &ix86Funcs2;
-
-	outb(PCI_CFGMECH2_ENABLE_REG, 0x0e);
-	mode2Res1 = inb(PCI_CFGMECH2_ENABLE_REG);
-	outb(PCI_CFGMECH2_ENABLE_REG, oldVal2);
-
-	if (mode2Res1 == 0x0e) {
-	    if (ix86PciBusCheck()) {
-		xf86MsgVerb(X_INFO, 2, "PCI: Config type is 2\n");
-		return;
 	    }
 	}
-      }
-      break; /* } */
-
-    case PCIProbe2: /* { */
-	if (!xf86EnableIO())
-	    return;
 
-      /* The scanpci-style detection method */
-
-      xf86MsgVerb(X_INFO, 2, "PCI: Probing config type using method 2\n");
-
-      outb(PCI_CFGMECH2_ENABLE_REG, 0x00);
-      outb(PCI_CFGMECH2_FORWARD_REG, 0x00);
-      mode2Res1 = inb(PCI_CFGMECH2_ENABLE_REG);
-      mode2Res2 = inb(PCI_CFGMECH2_FORWARD_REG);
-
-      if (mode2Res1 == 0 && mode2Res2 == 0) {
-	xf86MsgVerb(X_INFO, 2, "PCI: Config type is 2\n");
-	ix86Pci0.configMech = PCI_CFG_MECH_2;
-	ix86Pci0.numDevices = PCI_CFGMECH2_MAXDEV;
-	ix86Pci0.funcs = &ix86Funcs2;
-	return;
-      }
-
-      oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG);
-      outl(PCI_CFGMECH1_ADDRESS_REG, PCI_EN);
-      mode1Res1 = inl(PCI_CFGMECH1_ADDRESS_REG);
-      outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1);
-      if (mode1Res1 == PCI_EN) {
-	xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
-	ix86Pci0.configMech = PCI_CFG_MECH_1;
-	ix86Pci0.numDevices = PCI_CFGMECH1_MAXDEV;
-	ix86Pci0.funcs = &ix86Funcs1;
-	return;
-      }
-      break; /* } */
-
-    case PCIForceConfig1:
-	if (!xf86EnableIO())
-	    return;
-
-      xf86MsgVerb(X_INFO, 2, "PCI: Forcing config type 1\n");
-
-      ix86Pci0.configMech = PCI_CFG_MECH_1;
-      ix86Pci0.numDevices = PCI_CFGMECH1_MAXDEV;
-      ix86Pci0.funcs = &ix86Funcs1;
-      return;
-
-    case PCIForceConfig2:
-	if (!xf86EnableIO())
-	    return;
-
-      xf86MsgVerb(X_INFO, 2, "PCI: Forcing config type 2\n");
-
-      ix86Pci0.configMech = PCI_CFG_MECH_2;
-      ix86Pci0.numDevices = PCI_CFGMECH2_MAXDEV;
-      ix86Pci0.funcs = &ix86Funcs2;
-      return;
-
-    case PCIForceNone:
+	xf86MsgVerb(X_INFO, 3, "PCI: Standard check for type 1 failed.\n");
+	xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
+		"\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
+		stages, (unsigned long)oldVal1, (unsigned long)mode1Res1,
+		(unsigned long)mode1Res2);
+
+	/* Try config type 2 */
+	oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG);
+	if ((oldVal2 & 0xf0) == 0) {
+	    ix86Pci0.configMech = PCI_CFG_MECH_2;
+	    ix86Pci0.numDevices = PCI_CFGMECH2_MAXDEV;
+	    ix86Pci0.funcs = &ix86Funcs2;
+
+	    outb(PCI_CFGMECH2_ENABLE_REG, 0x0e);
+	    mode2Res1 = inb(PCI_CFGMECH2_ENABLE_REG);
+	    outb(PCI_CFGMECH2_ENABLE_REG, oldVal2);
+
+	    if (mode2Res1 == 0x0e) {
+		if (ix86PciBusCheck()) {
+		    xf86MsgVerb(X_INFO, 2, "PCI: Config type is 2\n");
+		    return;
+		}
+	    }
+	}
 	break;
-    }
+    } while (0);
 
     /* No PCI found */
     ix86Pci0.configMech = PCI_CFG_MECH_UNKNOWN;
-    xf86MsgVerb(X_INFO, 2, "PCI: No PCI bus found or probed for\n");
+    xf86MsgVerb(X_INFO, 2, "PCI: No PCI bus found\n");
 }
 
 #if 0
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index 11eb4f9..634d22f 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -103,20 +103,19 @@ static pointer DomainMmappedIO[MAX_DOMAINS];
 void
 linuxPciInit(void)
 {
-	struct stat st;
+    struct stat st;
 
 #ifndef INCLUDE_XF86_NO_DOMAIN
     (void) memset(DomainMmappedIO, 0, sizeof(DomainMmappedIO));
 #endif
 
-	if ((xf86Info.pciFlags == PCIForceNone) ||
-	    (-1 == stat("/proc/bus/pci", &st))) {
-		/* when using this as default for all linux architectures,
-		   we'll need a fallback for 2.0 kernels here */
-		return;
-	}
-	pciNumBuses    = 1;
-	pciBusInfo[0]  = &linuxPci0;
+    if (-1 == stat("/proc/bus/pci", &st)) {
+	/* when using this as default for all linux architectures,
+	   we'll need a fallback for 2.0 kernels here */
+	return;
+    }
+    pciNumBuses    = 1;
+    pciBusInfo[0]  = &linuxPci0;
 }
 
 /**
commit 95bb6f53624a3e6f4d62a2f789982c5544d2fc70
Author: Mathieu Bérard <mathieu.berard at crans.org>
Date:   Mon Aug 18 11:47:19 2008 -0400

    Remove ancient unused inline hack.

diff --git a/hw/xfree86/os-support/misc/Makefile.am b/hw/xfree86/os-support/misc/Makefile.am
index ad27cfc..737328c 100644
--- a/hw/xfree86/os-support/misc/Makefile.am
+++ b/hw/xfree86/os-support/misc/Makefile.am
@@ -7,9 +7,6 @@ ARCH_SRCS = $(OTHER_SRCS)
 # FIXME: Add to the build (NeedPortIO)
 PORTIO_SRCS = PortIO.S
 
-# FIXME: Add to the build (if HasGcc || HasGcc2)
-ILHACK_SRCS = xf86_IlHack.c
-
 noinst_LTLIBRARIES = libmisc.la
 
 libmisc_la_SOURCES = Delay.c $(ARCH_SRCS)
@@ -20,4 +17,4 @@ INCLUDES = $(XORG_INCS)
 
 AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
 
-EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS) $(ILHACK_SRCS)
+EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS)
diff --git a/hw/xfree86/os-support/misc/xf86_IlHack.c b/hw/xfree86/os-support/misc/xf86_IlHack.c
deleted file mode 100644
index 6c9871d..0000000
--- a/hw/xfree86/os-support/misc/xf86_IlHack.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * This file is an incredible crock to get the normally-inline functions
- * built into the server so that things can be debugged properly.
- *
- * Note: this doesn't work when using a compiler other than GCC.
- */
-
-#define static /**/
-#define __inline__ /**/
-#undef NO_INLINE
-#define DO_PROTOTYPES
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "compiler.h"
commit e1ae8db625b5e8c298a557592ef23656b3da4886
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 18 09:53:48 2008 -0400

    Drop dead PowerPC PCI code.
    
    Also add a warning for anyone still using legacy PCI code.

diff --git a/configure.ac b/configure.ac
index d42d7fd..95a084f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1217,7 +1217,6 @@ AC_MSG_RESULT([$XORG])
 xorg_bus_linuxpci=no
 xorg_bus_bsdpci=no
 xorg_bus_ix86pci=no
-xorg_bus_ppcpci=no
 xorg_bus_sparcpci=no
 xorg_bus_sparc=no
 
@@ -1344,15 +1343,6 @@ if test "x$XORG" = xyes; then
 	esac
 
 	case $host_cpu in
-	  powerpc*)
-		case $host_os in
-		  linux*|freebsd*|netbsd*|openbsd*|kfreebsd*-gnu)
-			;;
-		  *)
-			xorg_bus_ppcpci="yes"
-			;;
-		esac
-		;;
 	  sparc*)
 		xorg_bus_sparcpci="yes"
 		xorg_bus_sparc="yes"
@@ -1460,7 +1450,6 @@ AM_CONDITIONAL([XORG], [test "x$XORG" = xyes])
 AM_CONDITIONAL([XORG_BUS_LINUXPCI], [test "x$xorg_bus_linuxpci" = xyes])
 AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes])
 AM_CONDITIONAL([XORG_BUS_IX86PCI], [test "x$xorg_bus_ix86pci" = xyes])
-AM_CONDITIONAL([XORG_BUS_PPCPCI], [test "x$xorg_bus_ppcpci" = xyes])
 AM_CONDITIONAL([XORG_BUS_SPARCPCI], [test "x$xorg_bus_sparcpci" = xyes])
 AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes])
 AM_CONDITIONAL([LINUX_IA64], [test "x$linux_ia64" = xyes])
diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am
index d48fcb6..94c3750 100644
--- a/hw/xfree86/os-support/bus/Makefile.am
+++ b/hw/xfree86/os-support/bus/Makefile.am
@@ -15,10 +15,6 @@ if XORG_BUS_IX86PCI
 PCI_SOURCES += ix86Pci.c
 endif
 
-if XORG_BUS_PPCPCI
-PCI_SOURCES += ppcPci.c
-endif
-
 if XORG_BUS_SPARCPCI
 PCI_SOURCES += sparcPci.c
 endif
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index a1390c0..488e1e3 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -199,13 +199,12 @@
 
 
 #if !defined(ARCH_PCI_INIT)
+#warning You really need to port to libpciaccess.
 /*
  * Select architecture specific PCI init function
  */
 #if defined(__i386__) || defined(__i386) ||  defined(__amd64__) || defined(__amd64)
 # define ARCH_PCI_INIT ix86PciInit
-#elif defined(__powerpc__) || defined(__powerpc64__)
-# define ARCH_PCI_INIT ppcPciInit
 #elif defined(__sparc__) || defined(sparc)
 # define ARCH_PCI_INIT sparcPciInit
 # define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
diff --git a/hw/xfree86/os-support/bus/ppcPci.c b/hw/xfree86/os-support/bus/ppcPci.c
deleted file mode 100644
index 49c1a2a..0000000
--- a/hw/xfree86/os-support/bus/ppcPci.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * ppcPci.c - PowerPC PCI access functions
- *
- * PCI driver functions supporting Motorola PowerPC platforms
- * including Powerstack(RiscPC/RiscPC+), PowerStackII, MTX, and
- * MVME 160x/260x/360x/460x VME boards
- *
- * Gary Barton
- * Concurrent Computer Corporation
- * garyb at gate.net
- *
- */
-
-/*
- * Copyright 1998 by Concurrent Computer Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Concurrent Computer
- * Corporation not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission.  Concurrent Computer Corporation makes no representations
- * about the suitability of this software for any purpose.  It is
- * provided "as is" without express or implied warranty.
- *
- * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE
- * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Copyright 1998 by Metro Link Incorporated
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of Metro Link
- * Incorporated not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission.  Metro Link Incorporated makes no representations
- * about the suitability of this software for any purpose.  It is
- * provided "as is" without express or implied warranty.
- *
- * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE
- * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <stdio.h>
-#include "compiler.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "Pci.h"
-
-#ifndef MAP_FAILED
-#define MAP_FAILED (pointer)(-1)
-#endif
-
-void
-ppcPciInit()
-{
-  
-  static void motoppcPciInit(void);
-  motoppcPciInit();
-
-}
commit 99583b43a9a202d047ff417d47485e4c0e0c9670
Author: Jie Luo <clotho67 at gmail.com>
Date:   Sun Aug 17 23:13:22 2008 +0200

    glx: avoid possible NULLptr deref, fix #16884

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 19d8674..aedbc02 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -148,8 +148,10 @@ void
 __glXContextDestroy(__GLXcontext *context)
 {
     if (!context->isDirect) {
-	__glXUnrefDrawable(context->drawPriv);
-	__glXUnrefDrawable(context->readPriv);
+	if (context->drawPriv)
+	    __glXUnrefDrawable(context->drawPriv);
+	if (context->readPriv)
+	    __glXUnrefDrawable(context->readPriv);
     }
     __glXFlushContextCache();
 }
@@ -621,8 +623,10 @@ DoMakeCurrent(__GLXclientState *cl,
 	}
 	__glXFlushContextCache();
 	if (!prevglxc->isDirect) {
-	    __glXUnrefDrawable(prevglxc->drawPriv);
-	    __glXUnrefDrawable(prevglxc->readPriv);
+	    if (prevglxc->drawPriv)
+		__glXUnrefDrawable(prevglxc->drawPriv);
+	    if (prevglxc->readPriv)
+		__glXUnrefDrawable(prevglxc->readPriv);
 	}
     }
 	
commit 421b7e8f12083e9518fa7deda968a2f73c9a0006
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sun Aug 17 19:57:02 2008 +0200

    exa: fix assert logic thinko from 361a9eb953aaa38f8ebc057185de29e50f9eef26
    
    - I guess failing PrepareAccess is rare, since this a 3 year old bug.

diff --git a/exa/exa.c b/exa/exa.c
index c276d9a..e1bbb32 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -514,7 +514,7 @@ ExaDoPrepareAccess(DrawablePtr pDrawable, int index)
 
     if (!(*pExaScr->info->PrepareAccess) (pPixmap, index)) {
 	ExaPixmapPriv (pPixmap);
-	if (pExaPixmap->score != EXA_PIXMAP_SCORE_PINNED)
+	if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED)
 	    FatalError("Driver failed PrepareAccess on a pinned pixmap\n");
 	exaMoveOutPixmap (pPixmap);
     }
commit 1e62e773273539352bc21b2da5262678dd3fc7df
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Fri Aug 15 15:19:44 2008 +0930

    Require inputproto 1.9.99.4

diff --git a/configure.ac b/configure.ac
index c902773..d42d7fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -660,7 +660,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la'
 XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
 
 dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="[randrproto >= 1.2] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.3] [kbproto >= 1.0.3]" 
+REQUIRED_MODULES="[randrproto >= 1.2] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.4] [kbproto >= 1.0.3]" 
 REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.9.5]"
 
 dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
commit 609c04b62bdb0e86f33860069033c7142eecf210
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Fri Aug 15 14:51:59 2008 +0930

    dix: stick a warning in about loss of subpixel precision.

diff --git a/dix/getevents.c b/dix/getevents.c
index 718b8ff..166ab4e 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -938,6 +938,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
                 &pDev->last.valuators[first_valuator]);
 
     /* Update the valuators with the true value sent to the client*/
+    /* FIXME: we lose subpixel precision here. */
     if(v0) *v0 = x;
     if(v1) *v1 = y;
 
commit de1573172ad2c2e98c101727930a468213295783
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Wed Aug 13 13:11:44 2008 +0930

    Backport device properties to XI 1.5 instead of XI 2.0

diff --git a/Xi/exglobals.h b/Xi/exglobals.h
index 0b1caf9..42a6953 100644
--- a/Xi/exglobals.h
+++ b/Xi/exglobals.h
@@ -52,6 +52,7 @@ extern Mask DeviceOwnerGrabButtonMask;
 extern Mask DeviceButtonGrabMask;
 extern Mask DeviceButtonMotionMask;
 extern Mask DevicePresenceNotifyMask;
+extern Mask DevicePropertyNotifyMask;
 extern Mask DeviceEnterWindowMask;
 extern Mask DeviceLeaveWindowMask;
 extern Mask PropagateMask[];
@@ -72,6 +73,7 @@ extern int DeviceButtonStateNotify;
 extern int DeviceMappingNotify;
 extern int ChangeDeviceNotify;
 extern int DevicePresenceNotify;
+extern int DevicePropertyNotify;
 extern int DeviceEnterNotify;
 extern int DeviceLeaveNotify;
 
diff --git a/Xi/extinit.c b/Xi/extinit.c
index ba93ebc..979622f 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -210,22 +210,24 @@ static int (*ProcIVector[])(ClientPtr) = {
 	ProcXSetDeviceValuators,                /* 33 */
 	ProcXGetDeviceControl,                  /* 34 */
 	ProcXChangeDeviceControl,               /* 35 */
-        ProcXQueryDevicePointer,                /* 36 */
-        ProcXWarpDevicePointer,                 /* 37 */
-        ProcXChangeDeviceCursor,                /* 38 */
-        ProcXChangeDeviceHierarchy,             /* 39 */
-        ProcXChangeWindowAccess,                /* 40 */
-        ProcXQueryWindowAccess,                 /* 41 */
-        ProcXSetClientPointer,                  /* 42 */
-        ProcXGetClientPointer,                  /* 43 */
-        ProcXiSelectEvent,                      /* 44 */
-        ProcXExtendedGrabDevice,                /* 45 */
-        ProcXListDeviceProperties,              /* 46 */
-        ProcXQueryDeviceProperty,               /* 47 */
-        ProcXConfigureDeviceProperty,           /* 48 */
-        ProcXChangeDeviceProperty,              /* 49 */
-        ProcXDeleteDeviceProperty,              /* 50 */
-        ProcXGetDeviceProperty                  /* 51 */
+        /* XI 1.5 */
+        ProcXListDeviceProperties,              /* 36 */
+        ProcXQueryDeviceProperty,               /* 37 */
+        ProcXConfigureDeviceProperty,           /* 38 */
+        ProcXChangeDeviceProperty,              /* 39 */
+        ProcXDeleteDeviceProperty,              /* 40 */
+        ProcXGetDeviceProperty,                 /* 41 */
+        /* XI 2 */
+        ProcXQueryDevicePointer,                /* 42 */
+        ProcXWarpDevicePointer,                 /* 43 */
+        ProcXChangeDeviceCursor,                /* 44 */
+        ProcXChangeDeviceHierarchy,             /* 45 */
+        ProcXChangeWindowAccess,                /* 46 */
+        ProcXQueryWindowAccess,                 /* 47 */
+        ProcXSetClientPointer,                  /* 48 */
+        ProcXGetClientPointer,                  /* 49 */
+        ProcXiSelectEvent,                      /* 50 */
+        ProcXExtendedGrabDevice                 /* 51 */
 };
 
 /* For swapped clients */
@@ -266,22 +268,22 @@ static int (*SProcIVector[])(ClientPtr) = {
 	SProcXSetDeviceValuators,                /* 33 */
 	SProcXGetDeviceControl,                  /* 34 */
 	SProcXChangeDeviceControl,               /* 35 */
-        SProcXQueryDevicePointer,                /* 36 */
-        SProcXWarpDevicePointer,                 /* 37 */
-        SProcXChangeDeviceCursor,                /* 38 */
-        SProcXChangeDeviceHierarchy,             /* 39 */
-        SProcXChangeWindowAccess,                /* 40 */
-        SProcXQueryWindowAccess,                 /* 41 */
-        SProcXSetClientPointer,                  /* 42 */
-        SProcXGetClientPointer,                  /* 43 */
-        SProcXiSelectEvent,                      /* 44 */
-        SProcXExtendedGrabDevice,                /* 45 */
-        SProcXListDeviceProperties,              /* 46 */
-        SProcXQueryDeviceProperty,               /* 47 */
-        SProcXConfigureDeviceProperty,           /* 48 */
-        SProcXChangeDeviceProperty,              /* 49 */
-        SProcXDeleteDeviceProperty,              /* 50 */
-        SProcXGetDeviceProperty                  /* 51 */
+        SProcXListDeviceProperties,              /* 36 */
+        SProcXQueryDeviceProperty,               /* 37 */
+        SProcXConfigureDeviceProperty,           /* 38 */
+        SProcXChangeDeviceProperty,              /* 39 */
+        SProcXDeleteDeviceProperty,              /* 40 */
+        SProcXGetDeviceProperty,                 /* 41 */
+        SProcXQueryDevicePointer,                /* 42 */
+        SProcXWarpDevicePointer,                 /* 43 */
+        SProcXChangeDeviceCursor,                /* 44 */
+        SProcXChangeDeviceHierarchy,             /* 45 */
+        SProcXChangeWindowAccess,                /* 46 */
+        SProcXQueryWindowAccess,                 /* 47 */
+        SProcXSetClientPointer,                  /* 48 */
+        SProcXGetClientPointer,                  /* 49 */
+        SProcXiSelectEvent,                      /* 50 */
+        SProcXExtendedGrabDevice                 /* 51 */
 };
 
 /*****************************************************************
@@ -308,6 +310,7 @@ Mask DeviceOwnerGrabButtonMask;
 Mask DeviceButtonGrabMask;
 Mask DeviceButtonMotionMask;
 Mask DevicePresenceNotifyMask;
+Mask DevicePropertyNotifyMask;
 Mask DeviceEnterWindowMask;
 Mask DeviceLeaveWindowMask;
 
@@ -327,6 +330,7 @@ int DeviceButtonStateNotify;
 int DeviceMappingNotify;
 int ChangeDeviceNotify;
 int DevicePresenceNotify;
+int DevicePropertyNotify;
 int DeviceEnterNotify;
 int DeviceLeaveNotify;
 
@@ -590,6 +594,17 @@ SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to
 }
 
 static void
+SDevicePropertyNotifyEvent (devicePropertyNotify *from, devicePropertyNotify *to)
+{
+    char n;
+
+    *to = *from;
+    swaps(&to->sequenceNumber,n);
+    swapl(&to->time, n);
+    swapl(&to->atom, n);
+}
+
+static void
 SDeviceEnterNotifyEvent (deviceEnterNotify *from, deviceEnterNotify *to)
 {
     char n;
@@ -786,7 +801,8 @@ FixExtensionEvents(ExtensionEntry * extEntry)
     DeviceKeyStateNotify = ChangeDeviceNotify + 1;
     DeviceButtonStateNotify = DeviceKeyStateNotify + 1;
     DevicePresenceNotify = DeviceButtonStateNotify + 1;
-    DeviceEnterNotify = DevicePresenceNotify + 1;
+    DevicePropertyNotify = DevicePresenceNotify + 1;
+    DeviceEnterNotify = DevicePropertyNotify + 1;
     DeviceLeaveNotify = DeviceEnterNotify + 1;
 
     event_base[KeyClass] = DeviceKeyPress;
@@ -876,6 +892,9 @@ FixExtensionEvents(ExtensionEntry * extEntry)
     DevicePresenceNotifyMask = GetNextExtEventMask();
     SetEventInfo(DevicePresenceNotifyMask, _devicePresence);
 
+    DevicePropertyNotifyMask = GetNextExtEventMask();
+    SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify);
+
     DeviceEnterWindowMask = GetNextExtEventMask();
     SetMaskForExtEvent(DeviceEnterWindowMask, DeviceEnterNotify);
     AllowPropagateSuppress(DeviceEnterWindowMask);
@@ -929,8 +948,9 @@ RestoreExtensionEvents(void)
     DeviceKeyStateNotify = 13;
     DeviceButtonStateNotify = 13;
     DevicePresenceNotify = 14;
-    DeviceEnterNotify = 15;
-    DeviceLeaveNotify = 16;
+    DevicePropertyNotify = 15;
+    DeviceEnterNotify = 16;
+    DeviceLeaveNotify = 17;
 
     BadDevice = 0;
     BadEvent = 1;
@@ -969,6 +989,7 @@ IResetProc(ExtensionEntry * unused)
     EventSwapVector[DeviceMappingNotify] = NotImplemented;
     EventSwapVector[ChangeDeviceNotify] = NotImplemented;
     EventSwapVector[DevicePresenceNotify] = NotImplemented;
+    EventSwapVector[DevicePropertyNotify] = NotImplemented;
     EventSwapVector[DeviceEnterNotify] = NotImplemented;
     EventSwapVector[DeviceLeaveNotify] = NotImplemented;
     RestoreExtensionEvents();
@@ -1072,6 +1093,8 @@ SEventIDispatch(xEvent * from, xEvent * to)
 	DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
     else if (type == DevicePresenceNotify)
 	DO_SWAP(SDevicePresenceNotifyEvent, devicePresenceNotify);
+    else if (type == DevicePropertyNotify)
+	DO_SWAP(SDevicePropertyNotifyEvent, devicePropertyNotify);
     else if (type == DeviceEnterNotify)
         DO_SWAP(SDeviceEnterNotifyEvent, deviceEnterNotify);
     else if (type == DeviceLeaveNotify)
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index b4ccfe6..ec1ed6c 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -191,21 +191,18 @@ XIDeleteAllDeviceProperties (DeviceIntPtr device)
 {
     XIPropertyPtr               prop, next;
     XIPropertyHandlerPtr        curr_handler, next_handler;
-    devicePropertyNotifyEvent   event;
+    devicePropertyNotify        event;
 
     for (prop = device->properties.properties; prop; prop = next)
     {
         next = prop->next;
 
-        event.type      = GenericEvent;
-        event.extension = IReqCode;
-        event.evtype    = XI_DevicePropertyNotify;
-        event.length    = 0;
+        event.type      = DevicePropertyNotify;
         event.deviceid  = device->id;
         event.state     = PropertyDelete;
         event.atom      = prop->propertyName;
         event.time      = currentTime.milliseconds;
-        SendEventToAllWindows(device, XI_DevicePropertyNotifyMask,
+        SendEventToAllWindows(device, DevicePropertyNotifyMask,
                 (xEvent*)&event, 1);
 
         XIDestroyDeviceProperty(prop);
@@ -226,7 +223,7 @@ int
 XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient)
 {
     XIPropertyPtr               prop, *prev;
-    devicePropertyNotifyEvent   event;
+    devicePropertyNotify        event;
 
     for (prev = &device->properties.properties; (prop = *prev); prev = &(prop->next))
         if (prop->propertyName == property)
@@ -238,15 +235,12 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient)
     if (prop)
     {
         *prev = prop->next;
-        event.type      = GenericEvent;
-        event.extension = IReqCode;
-        event.length    = 0;
-        event.evtype    = XI_DevicePropertyNotify;
+        event.type      = DevicePropertyNotify;
         event.deviceid  = device->id;
         event.state     = PropertyDelete;
         event.atom      = prop->propertyName;
         event.time      = currentTime.milliseconds;
-        SendEventToAllWindows(device, XI_DevicePropertyNotifyMask,
+        SendEventToAllWindows(device, DevicePropertyNotifyMask,
                               (xEvent*)&event, 1);
         XIDestroyDeviceProperty (prop);
     }
@@ -261,7 +255,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
                         Bool fromClient)
 {
     XIPropertyPtr               prop;
-    devicePropertyNotifyEvent   event;
+    devicePropertyNotify        event;
     int                         size_in_bytes;
     int                         total_size;
     unsigned long               total_len;
@@ -379,15 +373,12 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
 
     if (sendevent)
     {
-        event.type      = GenericEvent;
-        event.extension = IReqCode;
-        event.length    = 0;
-        event.evtype    = XI_DevicePropertyNotify;
+        event.type      = DevicePropertyNotify;
         event.deviceid  = dev->id;
         event.state     = PropertyNewValue;
         event.atom      = prop->propertyName;
         event.time      = currentTime.milliseconds;
-        SendEventToAllWindows(dev, XI_DevicePropertyNotifyMask,
+        SendEventToAllWindows(dev, DevicePropertyNotifyMask,
                               (xEvent*)&event, 1);
     }
     return(Success);
@@ -786,17 +777,14 @@ ProcXGetDeviceProperty (ClientPtr client)
 
     if (stuff->delete && (reply.bytesAfter == 0))
     {
-        devicePropertyNotifyEvent    event;
+        devicePropertyNotify    event;
 
-        event.type      = GenericEvent;
-        event.extension = IReqCode;
-        event.length    = 0;
-        event.evtype    = XI_DevicePropertyNotify;
+        event.type      = DevicePropertyNotify;
         event.deviceid  = dev->id;
         event.state     = PropertyDelete;
         event.atom      = prop->propertyName;
         event.time      = currentTime.milliseconds;
-        SendEventToAllWindows(dev, XI_DevicePropertyNotifyMask,
+        SendEventToAllWindows(dev, DevicePropertyNotifyMask,
                               (xEvent*)&event, 1);
     }
 
commit 8b9ed7dec2954d4890ddcc7c874fc0832b16495a
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 14 09:08:14 2008 -0700

    XQuartz: Fixed a stuck modifier key bug.
    (cherry picked from commit eeb6e5a9e98dcf045ec230f160d5992080dceba6)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index fb3fd54..5a1f0e8 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -898,7 +898,7 @@ handle_mouse:
 		break;
 
 		case NSKeyDown: case NSKeyUp:
-			DarwinSendKeyboardEvents((type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]);
+            DarwinSendKeyboardEvents((type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]);
 		break;
 
 		case NSFlagsChanged:
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index d00c088..2b8e8de 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -151,32 +151,38 @@ static void DarwinPressModifierMask(int pressed, int mask) {
         if (keycode != 0)
             DarwinSendKeyboardEvents(pressed, keycode);
     }
-
-    ErrorF("DarwinPressModifierMask pressed=%s, mask=%d, key=%d, keycode=%d\n", pressed == KeyPress ? "press" : "release", mask, key, keycode);
 }
 
 #ifdef NX_DEVICELCTLKEYMASK
 #define CONTROL_MASK(flags) (flags & (NX_DEVICELCTLKEYMASK|NX_DEVICERCTLKEYMASK))
+#define NX_CONTROLMASK_FULL (NX_CONTROLMASK | NX_DEVICELCTLKEYMASK | NX_DEVICERCTLKEYMASK)
 #else
 #define CONTROL_MASK(flags) (NX_CONTROLMASK)
+#define NX_CONTROLMASK_FULL NX_CONTROLMASK
 #endif /* NX_DEVICELCTLKEYMASK */
 
 #ifdef NX_DEVICELSHIFTKEYMASK
 #define SHIFT_MASK(flags) (flags & (NX_DEVICELSHIFTKEYMASK|NX_DEVICERSHIFTKEYMASK))
+#define NX_SHIFTMASK_FULL (NX_SHIFTMASK | NX_DEVICELSHIFTKEYMASK | NX_DEVICERSHIFTKEYMASK)
 #else
 #define SHIFT_MASK(flags) (NX_SHIFTMASK)
+#define NX_SHIFTMASK_FULL NX_SHIFTMASK
 #endif /* NX_DEVICELSHIFTKEYMASK */
 
 #ifdef NX_DEVICELCMDKEYMASK
 #define COMMAND_MASK(flags) (flags & (NX_DEVICELCMDKEYMASK|NX_DEVICERCMDKEYMASK))
+#define NX_COMMANDMASK_FULL (NX_COMMANDMASK | NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK)
 #else
 #define COMMAND_MASK(flags) (NX_COMMANDMASK)
+#define NX_COMMANDMASK_FULL NX_COMMANDMASK
 #endif /* NX_DEVICELCMDKEYMASK */
 
 #ifdef NX_DEVICELALTKEYMASK
 #define ALTERNATE_MASK(flags) (flags & (NX_DEVICELALTKEYMASK|NX_DEVICERALTKEYMASK))
+#define NX_ALTERNATEMASK_FULL (NX_ALTERNATEMASK | NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK)
 #else
 #define ALTERNATE_MASK(flags) (NX_ALTERNATEMASK)
+#define NX_ALTERNATEMASK_FULL NX_ALTERNATEMASK
 #endif /* NX_DEVICELALTKEYMASK */
 
 /*
@@ -187,21 +193,19 @@ static void DarwinUpdateModifiers(
     int pressed,        // KeyPress or KeyRelease
     int flags )         // modifier flags that have changed
 {
-    fprintf(stderr, "DarwinUpdateModifiers pressed=%s, flags=%x\n", pressed == KeyPress ? "press" : "release", flags);
-    
     if (flags & NX_ALPHASHIFTMASK) {
         DarwinPressModifierMask(pressed, NX_ALPHASHIFTMASK);
     }
-    if (flags & NX_COMMANDMASK) {
+    if (flags & NX_COMMANDMASK_FULL) {
         DarwinPressModifierMask(pressed, COMMAND_MASK(flags));
     }
-    if (flags & NX_CONTROLMASK) {
+    if (flags & NX_CONTROLMASK_FULL) {
         DarwinPressModifierMask(pressed, CONTROL_MASK(flags));
     }
-    if (flags & NX_ALTERNATEMASK) {
+    if (flags & NX_ALTERNATEMASK_FULL) {
         DarwinPressModifierMask(pressed, ALTERNATE_MASK(flags));
     }
-    if (flags & NX_SHIFTMASK) {
+    if (flags & NX_SHIFTMASK_FULL) {
         DarwinPressModifierMask(pressed, SHIFT_MASK(flags));
     }
     if (flags & NX_SECONDARYFNMASK) {
commit 1770c85374883229ec5e9685229b2333e62705e6
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 14 07:32:37 2008 -0700

    XQuartz: Made 3-button mouse simulation a little more consistent.
    (cherry picked from commit d207b037d2ae213369e5627a17d8831c9bc16ad8)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index b731c72..d00c088 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -77,7 +77,7 @@ in this Software without prior written authorization from The Open Group.
 /* FIXME: Abstract this better */
 void QuartzModeEQInit(void);
 
-static int old_flags = 0;  // last known modifier state
+static int modifier_flags = 0;  // last known modifier state
 
 #define FD_ADD_MAX 128
 static int fd_add[FD_ADD_MAX];
@@ -140,19 +140,19 @@ static inline void darwinEvents_unlock(void) {
 
 /*
  * DarwinPressModifierMask
- *  Press or release the given modifier key, specified by its mask.
+ * Press or release the given modifier key, specified by its mask (one of NX_*MASK constants)
  */
-static void DarwinPressModifierMask(
-    int pressed,				    
-    int mask)       // one of NX_*MASK constants
-{
+static void DarwinPressModifierMask(int pressed, int mask) {
+    int keycode;
     int key = DarwinModifierNXMaskToNXKey(mask);
 
     if (key != -1) {
-        int keycode = DarwinModifierNXKeyToNXKeycode(key, 0);
+        keycode = DarwinModifierNXKeyToNXKeycode(key, 0);
         if (keycode != 0)
-	  DarwinSendKeyboardEvents(pressed, keycode);
+            DarwinSendKeyboardEvents(pressed, keycode);
     }
+
+    ErrorF("DarwinPressModifierMask pressed=%s, mask=%d, key=%d, keycode=%d\n", pressed == KeyPress ? "press" : "release", mask, key, keycode);
 }
 
 #ifdef NX_DEVICELCTLKEYMASK
@@ -187,6 +187,8 @@ static void DarwinUpdateModifiers(
     int pressed,        // KeyPress or KeyRelease
     int flags )         // modifier flags that have changed
 {
+    fprintf(stderr, "DarwinUpdateModifiers pressed=%s, flags=%x\n", pressed == KeyPress ? "press" : "release", flags);
+    
     if (flags & NX_ALPHASHIFTMASK) {
         DarwinPressModifierMask(pressed, NX_ALPHASHIFTMASK);
     }
@@ -214,45 +216,10 @@ static void DarwinUpdateModifiers(
  * are held down during a "context" switch -- otherwise, we would miss the KeyUp.
  */
 static void DarwinReleaseModifiers(void) {
+    ErrorF("DarwinReleaseModifiers\n");
 	DarwinUpdateModifiers(KeyRelease, COMMAND_MASK(-1) | CONTROL_MASK(-1) | ALTERNATE_MASK(-1) | SHIFT_MASK(-1));
 }
 
-/*
- * DarwinSimulateMouseClick
- *  Send a mouse click to X when multiple mouse buttons are simulated
- *  with modifier-clicks, such as command-click for button 2. The dix
- *  layer is told that the previously pressed modifier key(s) are
- *  released, the simulated click event is sent. After the mouse button
- *  is released, the modifier keys are reverted to their actual state,
- *  which may or may not be pressed at that point. This is usually
- *  closest to what the user wants. Ie. the user typically wants to
- *  simulate a button 2 press instead of Command-button 2.
- */
-static void DarwinSimulateMouseClick(
-    int pointer_x,
-    int pointer_y,
-    float pressure,
-    float tilt_x,
-    float tilt_y,
-    int whichButton,    // mouse button to be pressed
-    int modifierMask)   // modifiers used for the fake click
-{
-    // first fool X into forgetting about the keys
-	// for some reason, it's not enough to tell X we released the Command key -- 
-	// it has to be the *left* Command key.
-	if (modifierMask & NX_COMMANDMASK) modifierMask |=NX_DEVICELCMDKEYMASK ;
-    DarwinUpdateModifiers(KeyRelease, modifierMask);
-
-    // push the mouse button
-    DarwinSendPointerEvents(ButtonPress, whichButton, pointer_x, pointer_y, 
-			    pressure, tilt_x, tilt_y);
-    DarwinSendPointerEvents(ButtonRelease, whichButton, pointer_x, pointer_y, 
-			    pressure, tilt_x, tilt_y);
-
-    // restore old modifiers
-    DarwinUpdateModifiers(KeyPress, modifierMask);
-}
-
 /* Generic handler for Xquartz-specifc events.  When possible, these should
    be moved into their own individual functions and set as handlers using
    mieqSetHandler. */
@@ -475,7 +442,6 @@ static void DarwinPrepareValuators(int *valuators, ScreenPtr screen,
 void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y, 
 			     float pressure, float tilt_x, float tilt_y) {
 	static int darwinFakeMouseButtonDown = 0;
-	static int darwinFakeMouseButtonMask = 0;
 	int i, num_events;
 	DeviceIntPtr dev;
     ScreenPtr screen;
@@ -499,35 +465,27 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
         return;
     }
 
+    /* Handle fake click */
 	if (ev_type == ButtonPress && darwinFakeButtons && ev_button == 1) {
-		// Mimic multi-button mouse with modifier-clicks
-		// If both sets of modifiers are pressed,
-		// button 2 is clicked.
-		if ((old_flags & darwinFakeMouse2Mask) == darwinFakeMouse2Mask) {
-			DarwinSimulateMouseClick(pointer_x, pointer_y, pressure, 
-			       tilt_x, tilt_y, 2, darwinFakeMouse2Mask);
+        if(darwinFakeMouseButtonDown != 0) {
+            /* We're currently "down" with another button, so release it first */
+            DarwinSendPointerEvents(ButtonRelease, darwinFakeMouseButtonDown, pointer_x, pointer_y, pressure, tilt_x, tilt_y);
+            darwinFakeMouseButtonDown=0;
+        }
+		if ((modifier_flags & darwinFakeMouse2Mask) == darwinFakeMouse2Mask) {
+            ev_button = 2;
 			darwinFakeMouseButtonDown = 2;
-			darwinFakeMouseButtonMask = darwinFakeMouse2Mask;
-			return;
-		} else if ((old_flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) {
-			DarwinSimulateMouseClick(pointer_x, pointer_y, pressure, 
-			       tilt_x, tilt_y, 3, darwinFakeMouse3Mask);
+		} else if ((modifier_flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) {
+            ev_button = 3;
 			darwinFakeMouseButtonDown = 3;
-			darwinFakeMouseButtonMask = darwinFakeMouse3Mask;
-			return;
 		}
 	}
 
-	if (ev_type == ButtonRelease && darwinFakeButtons && darwinFakeMouseButtonDown) {
-		// If last mousedown was a fake click, don't check for
-		// mouse modifiers here. The user may have released the
-		// modifiers before the mouse button.
-		ev_button = darwinFakeMouseButtonDown;
-		darwinFakeMouseButtonDown = 0;
-		// Bring modifiers back up to date
-		DarwinUpdateModifiers(KeyPress, darwinFakeMouseButtonMask & old_flags);
-		darwinFakeMouseButtonMask = 0;
-		return;
+	if (ev_type == ButtonRelease && ev_button == 1) {
+        if(darwinFakeMouseButtonDown) {
+            ev_button = darwinFakeMouseButtonDown;
+            darwinFakeMouseButtonDown = 0;
+        }
 	}
 
     DarwinPrepareValuators(valuators, screen, pointer_x, pointer_y, pressure, tilt_x, tilt_y);
@@ -547,7 +505,7 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
 		return;
 	}
 
-	if (old_flags == 0 && darwinSyncKeymap && darwinKeymapFile == NULL) {
+	if (modifier_flags == 0 && darwinSyncKeymap && darwinKeymapFile == NULL) {
 		/* See if keymap has changed. */
 
 		static unsigned int last_seed;
@@ -627,9 +585,9 @@ void DarwinSendScrollEvents(float count_x, float count_y,
 /* Send the appropriate KeyPress/KeyRelease events to GetKeyboardEvents to
    reflect changing modifier flags (alt, control, meta, etc) */
 void DarwinUpdateModKeys(int flags) {
-	DarwinUpdateModifiers(KeyRelease, old_flags & ~flags);
-	DarwinUpdateModifiers(KeyPress, ~old_flags & flags);
-	old_flags = flags;
+	DarwinUpdateModifiers(KeyRelease, modifier_flags & ~flags);
+	DarwinUpdateModifiers(KeyPress, ~modifier_flags & flags);
+	modifier_flags = flags;
 }
 
 /*
commit f51f77d25e69b51fa3fd557ffdb5573b61759706
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Aug 13 19:09:05 2008 -0700

    XQuartz: Reverted "Control" text to be accurately "Command" in the input prefs.
    (cherry picked from commit b287c481e1cbe77ff84d10a708505f148a0c8434)

diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
index 8357655..fd7d85a 100644
--- a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
@@ -2,12 +2,13 @@
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
 	<data>
 		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">9E17</string>
+		<string key="IBDocument.SystemVersion">9F10</string>
 		<string key="IBDocument.InterfaceBuilderVersion">670</string>
-		<string key="IBDocument.AppKitVersion">949.33</string>
+		<string key="IBDocument.AppKitVersion">949.34</string>
 		<string key="IBDocument.HIToolboxVersion">352.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
+			<integer value="351"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -456,7 +457,7 @@
 				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSWindowContentMinSize">{320, 240}</string>
 				<object class="NSView" key="NSWindowView" id="941366957">
-					<nil key="NSNextResponder"/>
+					<reference key="NSNextResponder"/>
 					<int key="NSvFlags">256</int>
 					<object class="NSMutableArray" key="NSSubviews">
 						<bool key="EncodedWithXMLCoder">YES</bool>
@@ -472,7 +473,7 @@
 										<characters key="NS.bytes">1</characters>
 									</object>
 									<object class="NSView" key="NSView" id="596750588">
-										<nil key="NSNextResponder"/>
+										<reference key="NSNextResponder" ref="448510093"/>
 										<int key="NSvFlags">256</int>
 										<object class="NSMutableArray" key="NSSubviews">
 											<bool key="EncodedWithXMLCoder">YES</bool>
@@ -548,7 +549,7 @@
 												<object class="NSTextFieldCell" key="NSCell" id="649334366">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
-													<string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gb3IgQ29udHJvbCB3aGlsZSBjbGlja2luZyB0byBhY3RpdmF0ZSB0aGUgbWlkZGxl
+													<string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gb3IgQ29tbWFuZCB3aGlsZSBjbGlja2luZyB0byBhY3RpdmF0ZSB0aGUgbWlkZGxl
 IG9yIHJpZ2h0IG1vdXNlIGJ1dHRvbnMuCg</string>
 													<reference key="NSSupport" ref="26"/>
 													<reference key="NSControlView" ref="282885445"/>
@@ -616,6 +617,7 @@ IG9yIHJpZ2h0IG1vdXNlIGJ1dHRvbnMuCg</string>
 											</object>
 										</object>
 										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
+										<reference key="NSSuperview" ref="448510093"/>
 									</object>
 									<string key="NSLabel">Input</string>
 									<reference key="NSColor" ref="57160303"/>
@@ -839,7 +841,7 @@ IG9yIHJpZ2h0IG1vdXNlIGJ1dHRvbnMuCg</string>
 										<characters key="NS.bytes">2</characters>
 									</object>
 									<object class="NSView" key="NSView" id="184765684">
-										<reference key="NSNextResponder" ref="448510093"/>
+										<nil key="NSNextResponder"/>
 										<int key="NSvFlags">256</int>
 										<object class="NSMutableArray" key="NSSubviews">
 											<bool key="EncodedWithXMLCoder">YES</bool>
@@ -956,7 +958,6 @@ IG9yIHJpZ2h0IG1vdXNlIGJ1dHRvbnMuCg</string>
 											</object>
 										</object>
 										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
-										<reference key="NSSuperview" ref="448510093"/>
 									</object>
 									<string key="NSLabel">Windows</string>
 									<reference key="NSColor" ref="57160303"/>
@@ -1068,18 +1069,19 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 									<reference key="NSTabView" ref="448510093"/>
 								</object>
 							</object>
-							<reference key="NSSelectedTabViewItem" ref="10973343"/>
+							<reference key="NSSelectedTabViewItem" ref="287591690"/>
 							<reference key="NSFont" ref="463863101"/>
 							<int key="NSTvFlags">0</int>
 							<bool key="NSAllowTruncatedLabels">YES</bool>
 							<bool key="NSDrawsBackground">YES</bool>
 							<object class="NSMutableArray" key="NSSubviews">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<reference ref="184765684"/>
+								<reference ref="596750588"/>
 							</object>
 						</object>
 					</object>
 					<string key="NSFrameSize">{484, 280}</string>
+					<reference key="NSSuperview"/>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
 				<string key="NSMinSize">{213, 129}</string>
@@ -1315,6 +1317,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 									</object>
 									<string key="NSFrame">{{1, 17}, {301, 198}}</string>
 									<reference key="NSSuperview" ref="1063387772"/>
+									<reference key="NSNextKeyView" ref="905092943"/>
 									<reference key="NSDocView" ref="905092943"/>
 									<reference key="NSBGColor" ref="812484075"/>
 									<int key="NScvFlags">4</int>
@@ -1347,6 +1350,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 									</object>
 									<string key="NSFrame">{{1, 0}, {301, 17}}</string>
 									<reference key="NSSuperview" ref="1063387772"/>
+									<reference key="NSNextKeyView" ref="792419186"/>
 									<reference key="NSDocView" ref="792419186"/>
 									<reference key="NSBGColor" ref="812484075"/>
 									<int key="NScvFlags">4</int>
@@ -1355,6 +1359,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							</object>
 							<string key="NSFrame">{{20, 20}, {318, 231}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
+							<reference key="NSNextKeyView" ref="580565898"/>
 							<int key="NSsFlags">50</int>
 							<reference key="NSVScroller" ref="842897584"/>
 							<reference key="NSHScroller" ref="17278747"/>
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib
index aaaf0c2..fc82ba0 100644
Binary files a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib differ
commit 04956b80431169e0ae713a3e6ba4cdc157ce3a66
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sat Aug 9 10:07:32 2008 -0700

    Transport/Apple: Add TRANS_NOXAUTH to incoming connections when the listener is flagged as such
    (cherry picked from commit ba4a7924261070ad0aff7211b7a1c9581fad4646)

diff --git a/os/connection.c b/os/connection.c
index c0bdd1a..a111fa5 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -878,6 +878,10 @@ EstablishNewConnections(ClientPtr clientUnused, pointer closure)
 	    ErrorConnMax(new_trans_conn);
 	    _XSERVTransClose(new_trans_conn);
 	}
+
+	if(trans_conn->flags & TRANS_NOXAUTH)
+	    new_trans_conn->flags = new_trans_conn->flags | TRANS_NOXAUTH;
+
       }
 #ifndef WIN32
     }
commit e6813e8de65eee854bbffe6ab0f8ba158f43b10b
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Wed Aug 13 14:24:45 2008 +0930

    Xi: byte-swap device property requests.

diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index c9a01e4..b4ccfe6 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -519,6 +519,7 @@ ProcXListDeviceProperties (ClientPtr client)
         int n;
         swaps (&rep.sequenceNumber, n);
         swapl (&rep.length, n);
+        swaps (&rep.nAtoms, n);
     }
     temppAtoms = pAtoms;
     for (prop = dev->properties.properties; prop; prop = prop->next)
@@ -823,60 +824,79 @@ ProcXGetDeviceProperty (ClientPtr client)
 int
 SProcXListDeviceProperties (ClientPtr client)
 {
+    char n;
     REQUEST(xListDevicePropertiesReq);
 
+    swaps(&stuff->length, n);
+
     REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
-    (void) stuff;
-    return BadImplementation;
+    return (ProcXListDeviceProperties(client));
 }
 
 int
 SProcXQueryDeviceProperty (ClientPtr client)
 {
+    char n;
     REQUEST(xQueryDevicePropertyReq);
 
+    swaps(&stuff->length, n);
+    swapl(&stuff->property, n);
+
     REQUEST_SIZE_MATCH(xQueryDevicePropertyReq);
-    (void) stuff;
-    return BadImplementation;
+    return (ProcXQueryDeviceProperty(client));
 }
 
 int
 SProcXConfigureDeviceProperty (ClientPtr client)
 {
+    char n;
     REQUEST(xConfigureDevicePropertyReq);
 
+    swaps(&stuff->length, n);
+    swapl(&stuff->property, n);
+
     REQUEST_SIZE_MATCH(xConfigureDevicePropertyReq);
-    (void) stuff;
-    return BadImplementation;
+    return (ProcXConfigureDeviceProperty(client));
 }
 
 int
 SProcXChangeDeviceProperty (ClientPtr client)
 {
+    char n;
     REQUEST(xChangeDevicePropertyReq);
 
+    swaps(&stuff->length, n);
+    swapl(&stuff->property, n);
+    swapl(&stuff->type, n);
+    swapl(&stuff->nUnits, n);
     REQUEST_SIZE_MATCH(xChangeDevicePropertyReq);
-    (void) stuff;
-    return BadImplementation;
+    return (ProcXChangeDeviceProperty(client));
 }
 
 int
 SProcXDeleteDeviceProperty (ClientPtr client)
 {
+    char n;
     REQUEST(xDeleteDevicePropertyReq);
 
+    swaps(&stuff->length, n);
+    swapl(&stuff->property, n);
     REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
-    (void) stuff;
-    return BadImplementation;
+    return (ProcXDeleteDeviceProperty(client));
 }
 
 int
 SProcXGetDeviceProperty (ClientPtr client)
 {
+    char n;
     REQUEST(xGetDevicePropertyReq);
 
+    swaps(&stuff->length, n);
+    swapl(&stuff->property, n);
+    swapl(&stuff->type, n);
+    swapl(&stuff->longOffset, n);
+    swapl(&stuff->longLength, n);
     REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
-    (void) stuff;
-    return BadImplementation;
+    return (ProcXGetDeviceProperty(client));
 }
 
commit 0ce687634fa5e0d955e896a0d0d5f584a4cfd1a4
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Aug 13 17:28:08 2008 -0400

    Eviscerate save-under support.
    
    Use a compositing manager already.  Plus I really wanted to use 'eviscerate'
    in a commit message.

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index b690593..17f587b 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -588,7 +588,6 @@ Bool PanoramiXCreateConnectionBlock(void)
 {
     int i, j, length;
     Bool disableBackingStore = FALSE;
-    Bool disableSaveUnders = FALSE;
     int old_width, old_height;
     float width_mult, height_mult;
     xWindowRoot *root;
@@ -614,17 +613,12 @@ Bool PanoramiXCreateConnectionBlock(void)
 	}
 	if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport)
 	     disableBackingStore = TRUE;
-	if(pScreen->saveUnderSupport != screenInfo.screens[0]->saveUnderSupport)
-	     disableSaveUnders = TRUE;
     }
 
-    if(disableBackingStore || disableSaveUnders) {
-    	for(i = 0; i < screenInfo.numScreens; i++) {
+    if (disableBackingStore) {
+    	for (i = 0; i < screenInfo.numScreens; i++) {
 	    pScreen = screenInfo.screens[i];
-	    if(disableBackingStore)
-		pScreen->backingStoreSupport = NotUseful;
-	    if(disableSaveUnders)
-		pScreen->saveUnderSupport = NotUseful;
+	    pScreen->backingStoreSupport = NotUseful;
 	}
     }
 
diff --git a/dix/main.c b/dix/main.c
index 35e59bd..ac8e0f2 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -557,7 +557,7 @@ CreateConnectionBlock(void)
 	root.maxInstalledMaps = pScreen->maxInstalledCmaps; 
 	root.rootVisualID = pScreen->rootVisual;		
 	root.backingStore = pScreen->backingStoreSupport;
-	root.saveUnders = pScreen->saveUnderSupport != NotUseful;
+	root.saveUnders = FALSE;
 	root.rootDepth = pScreen->rootDepth;
 	root.nDepths = pScreen->numDepths;
 	memmove(pBuf, (char *)&root, sizeof(xWindowRoot));
diff --git a/dix/window.c b/dix/window.c
index 14fccab..9bcf546 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -179,9 +179,6 @@ static Bool TileScreenSaver(int i, int kind);
 
 #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
 
-_X_EXPORT int numSaveUndersViewable = 0;
-_X_EXPORT int deltaSaveUndersViewable = 0;
-
 #ifdef DEBUG
 /******
  * PrintWindowTree
@@ -269,8 +266,6 @@ int	defaultBackingStore = NotUseful;
 /* hack to force no backing store */
 Bool	disableBackingStore = FALSE;
 Bool	enableBackingStore = FALSE;
-/* hack to force no save unders */
-Bool	disableSaveUnders = FALSE;
 
 static void
 SetWindowToDefaults(WindowPtr pWin)
@@ -470,20 +465,7 @@ CreateRootWindow(ScreenPtr pScreen)
     if (enableBackingStore)
 	pScreen->backingStoreSupport = Always;
 
-#ifdef DO_SAVE_UNDERS
-    if ((pScreen->backingStoreSupport != NotUseful) &&
-	(pScreen->saveUnderSupport == NotUseful))
-    {
-	/*
-	 * If the screen has backing-store but no save-unders, let the
-	 * clients know we can support save-unders using backing-store.
-	 */
-	pScreen->saveUnderSupport = USE_DIX_SAVE_UNDERS;
-    }
-#endif /* DO_SAVE_UNDERS */
-		
-    if (disableSaveUnders)
-	pScreen->saveUnderSupport = NotUseful;
+    pScreen->saveUnderSupport = NotUseful;
 
     return TRUE;
 }
@@ -927,10 +909,6 @@ CrushTree(WindowPtr pWin)
 	    }
 	    FreeResource(pChild->drawable.id, RT_WINDOW);
 	    pSib = pChild->nextSib;
-#ifdef DO_SAVE_UNDERS
-	    if (pChild->saveUnder && pChild->viewable)
-		deltaSaveUndersViewable--;
-#endif
 	    pChild->viewable = FALSE;
 	    if (pChild->realized)
 	    {
@@ -1257,47 +1235,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
 		client->errorValue = val;
 		goto PatchUp;
 	    }
-#ifdef DO_SAVE_UNDERS
-	    if (pWin->parent && (pWin->saveUnder != val) && (pWin->viewable) &&
-		DO_SAVE_UNDERS(pWin))
-	    {
-		/*
-		 * Re-check all siblings and inferiors for obscurity or
-		 * exposition (hee hee).
-		 */
-		if (pWin->saveUnder)
-		    deltaSaveUndersViewable--;
-		else
-		    deltaSaveUndersViewable++;
-		pWin->saveUnder = val;
-
-		if (pWin->firstChild)
-		{
-                    pLayerWin = (*pScreen->GetLayerWindow)(pWin);
-                   if ((*pScreen->ChangeSaveUnder)(pLayerWin->parent, pWin->nextSib))
-                       (*pScreen->PostChangeSaveUnder)(pLayerWin->parent,
-                                                       pWin->nextSib);
-               }
-               else
-               {
-                   if ((*pScreen->ChangeSaveUnder)(pWin, pWin->nextSib))
-                       (*pScreen->PostChangeSaveUnder)(pWin,
-                                                       pWin->nextSib);
-               }                                   
-	    }
-	    else
-	    {
-		/*  If we're changing the saveUnder attribute of the root 
-		 *  window, all we do is set pWin->saveUnder so that
-		 *  GetWindowAttributes returns the right value.  We don't
-		 *  do the "normal" save-under processing (as above).
-		 *  Hope that doesn't cause any problems.
-		 */
-		pWin->saveUnder = val;
-	    }
-#else
 	    pWin->saveUnder = val;
-#endif /* DO_SAVE_UNDERS */
 	    break;
 	  case CWEventMask:
 	    rc = EventSelectForWindow(pWin, client, (Mask )*pVlist);
@@ -2199,9 +2137,6 @@ ReflectStackChange(
     Bool WasViewable = (Bool)pWin->viewable;
     Bool anyMarked;
     WindowPtr pFirstChange;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr  pLayerWin;
     ScreenPtr pScreen = pWin->drawable.pScreen;
 
@@ -2216,21 +2151,11 @@ ReflectStackChange(
 	anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange,
 						      &pLayerWin);
 	if (pLayerWin != pWin) pFirstChange = pLayerWin;
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pFirstChange);
-	}
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked)
 	{
 	    (*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, kind);
 	    (*pScreen->HandleExposures)(pLayerWin->parent);
 	}
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin, pFirstChange);
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pWin->drawable.pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange, kind);
     }
@@ -2681,10 +2606,6 @@ RealizeTree(WindowPtr pWin)
 	if (pChild->mapped)
 	{
 	    pChild->realized = TRUE;
-#ifdef DO_SAVE_UNDERS
-	    if (pChild->saveUnder)
-		deltaSaveUndersViewable++;
-#endif
 	    pChild->viewable = (pChild->drawable.class == InputOutput);
 	    (* Realize)(pChild);
 	    if (pChild->firstChild)
@@ -2739,9 +2660,6 @@ MapWindow(WindowPtr pWin, ClientPtr client)
     ScreenPtr pScreen;
 
     WindowPtr pParent;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr  pLayerWin;
 
     if (pWin->mapped)
@@ -2787,21 +2705,11 @@ MapWindow(WindowPtr pWin, ClientPtr client)
 	{
 	    anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin,
 							  &pLayerWin);
-#ifdef DO_SAVE_UNDERS
-	    if (DO_SAVE_UNDERS(pWin))
-	    {
-		dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib);
-	    }
-#endif /* DO_SAVE_UNDERS */
 	    if (anyMarked)
 	    {
 		(*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTMap);
 		(*pScreen->HandleExposures)(pLayerWin->parent);
 	    }
-#ifdef DO_SAVE_UNDERS
-	    if (dosave)
-		(*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib);
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin, VTMap);
 	}
@@ -2841,17 +2749,11 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
 {
     WindowPtr	pWin;
     WindowPtr	pFirstMapped = NullWindow;
-#ifdef DO_SAVE_UNDERS
-    WindowPtr	pFirstSaveUndered = NullWindow;
-#endif
     ScreenPtr	pScreen;
     Mask	parentRedirect;
     Mask	parentNotify;
     xEvent	event;
     Bool	anyMarked;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr		pLayerWin;
 
     pScreen = pParent->drawable.pScreen;
@@ -2891,12 +2793,6 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
 		{
 		    anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
 							(WindowPtr *)NULL);
-#ifdef DO_SAVE_UNDERS
-		    if (DO_SAVE_UNDERS(pWin))
-		    {
-			dosave = TRUE;
-		    }
-#endif /* DO_SAVE_UNDERS */
 		}
 	    }
 	}
@@ -2913,38 +2809,9 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
 	}
         if (anyMarked)
         {
-#ifdef DO_SAVE_UNDERS
-	    if (pLayerWin->parent != pParent)
-	    {
-		if (dosave || (DO_SAVE_UNDERS(pLayerWin)))
-		{
-		    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin,
-							 pLayerWin);
-		}
-	    }
-	    else if (dosave)
-	    {
-		dosave = FALSE;
-		for (pWin = pParent->firstChild; pWin; pWin = pWin->nextSib)
-		{
-		    if (DO_SAVE_UNDERS(pWin))
-		    {
-			dosave |= (*pScreen->ChangeSaveUnder)(pWin,
-							      pWin->nextSib);
-			if (dosave && !pFirstSaveUndered)
-			    pFirstSaveUndered = pWin;
-		    }
-		}
-            }
-#endif /* DO_SAVE_UNDERS */
 	    (*pScreen->ValidateTree)(pLayerWin->parent, pFirstMapped, VTMap);
 	    (*pScreen->HandleExposures)(pLayerWin->parent);
 	}
-#ifdef DO_SAVE_UNDERS
-        if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin,
-					    pFirstSaveUndered->nextSib);
-#endif /* DO_SAVE_UNDERS */
         if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstMapped,
 					 VTMap);
@@ -2984,10 +2851,6 @@ UnrealizeTree(
 		DeleteWindowFromAnyEvents(pChild, FALSE);
 	    if (pChild->viewable)
 	    {
-#ifdef DO_SAVE_UNDERS
-		if (pChild->saveUnder)
-		    deltaSaveUndersViewable--;
-#endif
 		pChild->viewable = FALSE;
 		(* MarkUnrealizedWindow)(pChild, pWin, fromConfigure);
 		pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@@ -3048,16 +2911,6 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
 	    (*pScreen->ValidateTree)(pLayerWin->parent, pWin, VTUnmap);
 	    (*pScreen->HandleExposures)(pLayerWin->parent);
 	}
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    if ( (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib) )
-	    {
-		(*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib);
-	    }
-	}
-	pWin->DIXsaveUnder = FALSE;
-#endif /* DO_SAVE_UNDERS */
 	if (!fromConfigure && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, pWin, VTUnmap);
     }
@@ -3113,9 +2966,6 @@ UnmapSubwindows(WindowPtr pWin)
 		UnrealizeTree(pChild, FALSE);
 	    if (wasViewable)
 	    {
-#ifdef DO_SAVE_UNDERS
-		pChild->DIXsaveUnder = FALSE;
-#endif /* DO_SAVE_UNDERS */
 	    }
 	}
     }
@@ -3145,13 +2995,6 @@ UnmapSubwindows(WindowPtr pWin)
 	    (*pScreen->ValidateTree)(pLayerWin->parent, pHead, VTUnmap);
 	    (*pScreen->HandleExposures)(pLayerWin->parent);
 	}
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    if ( (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin))
-		(*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-	}
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, pHead, VTUnmap);
     }
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 754b942..9e27840 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -102,9 +102,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
     Bool	WasViewable;
     Bool	anyMarked = FALSE;
     RegionPtr	pOldClip = 0;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr   pLayerWin;
     BoxRec	box;
 
@@ -171,12 +168,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
 	    anyMarked = TRUE;
 	}
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
-	}
-#endif /* DO_SAVE_UNDERS */
 
 	if (anyMarked)
 	    (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -186,10 +177,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
     {
 	if (anyMarked)
 	    (*pScreen->HandleExposures)(pWin);
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
     }
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 0dd7fc7..f10fb1c 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1096,9 +1096,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
     WindowPtr	pChild;
     Bool	WasViewable = (Bool)(pWin->viewable);
     Bool	anyMarked = FALSE;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr   pLayerWin;
     BoxRec	box;
 
@@ -1168,12 +1165,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
 	    anyMarked = TRUE;
 	}
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
-	}
-#endif /* DO_SAVE_UNDERS */
 
 	if (anyMarked)
 	    (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -1183,10 +1174,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
     {
 	if (anyMarked)
 	    (*pScreen->HandleExposures)(pWin);
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
     }
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 220d25c..e9de050 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -323,8 +323,6 @@ _X_HIDDEN void *dixLookupTab[] = {
     SYMFUNC(TraverseTree)
     SYMFUNC(UnmapWindow)
     SYMFUNC(WalkTree)
-    SYMVAR(deltaSaveUndersViewable)
-    SYMVAR(numSaveUndersViewable)
     SYMVAR(savedScreenInfo)
     SYMVAR(screenIsSaved)
 
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 3df1e7b..50dcbbf 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -900,9 +900,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
     Bool	WasViewable = (Bool)(pWin->viewable);
     Bool	anyMarked = TRUE;
     RegionPtr	pOldClip = NULL, bsExposed;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr   pLayerWin;
     BoxRec	box;
 
@@ -973,12 +970,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
 	    anyMarked = TRUE;
 	}
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
-	}
-#endif /* DO_SAVE_UNDERS */
 
 	if (anyMarked)
 	    (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -1010,10 +1001,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
     {
 	if (anyMarked)
 	    (*pScreen->HandleExposures)(pWin);
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
     }
diff --git a/include/opaque.h b/include/opaque.h
index d5abcbd..ab39cc8 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -54,7 +54,6 @@ extern char *display;
 extern int defaultBackingStore;
 extern Bool disableBackingStore;
 extern Bool enableBackingStore;
-extern Bool disableSaveUnders;
 extern Bool PartialNetwork;
 #ifndef NOLOGOHACK
 extern int logoScreenSaver;
diff --git a/include/windowstr.h b/include/windowstr.h
index 76501c7..13ce60b 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -257,25 +257,6 @@ typedef struct _FocusSemaphores {
     char                focusinout[(MAX_DEVICES + 7)/8];
 } FocusSemaphoresRec, *FocusSemaphoresPtr;
 
-/*
- * this is the configuration parameter "NO_BACK_SAVE"
- * it means that any existant backing store should not 
- * be used to implement save unders.
- */
-
-#ifndef NO_BACK_SAVE
-#define DO_SAVE_UNDERS(pWin)	((pWin)->drawable.pScreen->saveUnderSupport ==\
-				 USE_DIX_SAVE_UNDERS)
-/*
- * saveUnderSupport is set to this magic value when using DIXsaveUnders
- */
-
-#define USE_DIX_SAVE_UNDERS	0x40
-#endif
-
-extern int numSaveUndersViewable;
-extern int deltaSaveUndersViewable;
-
 #ifdef XEVIE
 extern WindowPtr xeviewin;
 #endif
diff --git a/mi/mi.h b/mi/mi.h
index 2fdaf20..45bfa1d 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -485,16 +485,6 @@ extern void miClearToBackground(
     Bool /*generateExposures*/
 );
 
-extern Bool miChangeSaveUnder(
-    WindowPtr /*pWin*/,
-    WindowPtr /*first*/
-);
-
-extern void miPostChangeSaveUnder(
-    WindowPtr /*pWin*/,
-    WindowPtr /*pFirst*/
-);
-
 extern void miMarkWindow(
     WindowPtr /*pWin*/
 );
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index 77687fb..2fc583e 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -929,9 +929,6 @@ miOverlayMoveWindow(
     short bw;
     RegionRec overReg, underReg;
     DDXPointRec oldpt;
-#ifdef DO_SAVE_UNDERS
-    Bool dosave = FALSE;
-#endif
 
     if (!(pParent = pWin->parent))
        return ;
@@ -969,10 +966,6 @@ miOverlayMoveWindow(
 	miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
 	(*pScreen->MarkOverlappedWindows) (pWin, windowToValidate, NULL);
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	    dosave = (*pScreen->ChangeSaveUnder)(pWin, windowToValidate);
-#endif /* DO_SAVE_UNDERS */
 
 	(*pScreen->ValidateTree)(pWin->parent, NullWindow, kind);
 	if(REGION_NOTEMPTY(pScreen, &underReg)) {
@@ -987,10 +980,6 @@ miOverlayMoveWindow(
 	REGION_UNINIT(pScreen, &overReg);
 	(*pScreen->HandleExposures)(pWin->parent);
 
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pWin, windowToValidate);
-#endif /* DO_SAVE_UNDERS */
 	if (pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pWin->parent, NullWindow, kind);
     }
@@ -1147,9 +1136,6 @@ miOverlayResizeWindow(
     RegionPtr	borderVisible2 = NullRegion; 
     Bool	shrunk = FALSE; /* shrunk in an inner dimension */
     Bool	moved = FALSE;	/* window position changed */
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     Bool	doUnderlay;
 
     /* if this is a root window, can't be resized */
@@ -1279,10 +1265,6 @@ miOverlayResizeWindow(
 	if(pTree)
 	    pTree->valdata->borderVisible = borderVisible2;
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	    dosave = (*pScreen->ChangeSaveUnder)(pWin, pFirstChange);
-#endif /* DO_SAVE_UNDERS */
 
 	(*pScreen->ValidateTree)(pWin->parent, pFirstChange, VTOther);
 	/*
@@ -1504,10 +1486,6 @@ miOverlayResizeWindow(
 	if (destClip2)
 	    REGION_DESTROY(pScreen, destClip2);
 	(*pScreen->HandleExposures)(pWin->parent);
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pWin, pFirstChange);
-#endif /* DO_SAVE_UNDERS */
 	if (pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pWin->parent, pFirstChange, VTOther);
     }
@@ -1521,9 +1499,6 @@ miOverlaySetShape(WindowPtr pWin)
 {
     Bool	WasViewable = (Bool)(pWin->viewable);
     ScreenPtr 	pScreen = pWin->drawable.pScreen;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
 
     if (WasViewable) {
 	(*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
@@ -1556,20 +1531,12 @@ miOverlaySetShape(WindowPtr pWin)
     if (WasViewable) {
 	(*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	    dosave = (*pScreen->ChangeSaveUnder)(pWin, pWin);
-#endif /* DO_SAVE_UNDERS */
 
 	(*pScreen->ValidateTree)(pWin->parent, NullWindow, VTOther);
     }
 
     if (WasViewable) {
 	(*pScreen->HandleExposures)(pWin->parent);
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pWin, pWin);
-#endif /* DO_SAVE_UNDERS */
 	if (pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pWin->parent, NullWindow, VTOther);
     }
@@ -1589,9 +1556,6 @@ miOverlayChangeBorderWidth(
     ScreenPtr pScreen;
     Bool WasViewable = (Bool)(pWin->viewable);
     Bool HadBorder;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
 
     oldwidth = wBorderWidth (pWin);
     if (oldwidth == width)
@@ -1625,17 +1589,9 @@ miOverlayChangeBorderWidth(
 		}
 	    }
 	}
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	    dosave = (*pScreen->ChangeSaveUnder)(pWin, pWin->nextSib);
-#endif /* DO_SAVE_UNDERS */
 	(*pScreen->ValidateTree)(pWin->parent, pWin, VTOther);
 	(*pScreen->HandleExposures)(pWin->parent);
 
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pWin, pWin->nextSib);
-#endif /* DO_SAVE_UNDERS */
 	if (pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pWin->parent, pWin, VTOther);
     }
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index ee60746..6cd4df3 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -257,8 +257,8 @@ miScreenInit(
     pScreen->wakeupData = (pointer)0;
     pScreen->MarkWindow = miMarkWindow;
     pScreen->MarkOverlappedWindows = miMarkOverlappedWindows;
-    pScreen->ChangeSaveUnder = miChangeSaveUnder;
-    pScreen->PostChangeSaveUnder = miPostChangeSaveUnder;
+    pScreen->ChangeSaveUnder = NULL;
+    pScreen->PostChangeSaveUnder = NULL;
     pScreen->MoveWindow = miMoveWindow;
     pScreen->ResizeWindow = miSlideAndSizeWindow;
     pScreen->GetLayerWindow = miGetLayerWindow;
diff --git a/mi/miwindow.c b/mi/miwindow.c
index 1a8b194..e3360d6 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -122,209 +122,6 @@ miClearToBackground(WindowPtr pWin,
 	REGION_DESTROY(pScreen, pBSReg);
 }
 
-/*
- * For SaveUnders using backing-store. The idea is that when a window is mapped
- * with saveUnder set TRUE, any windows it obscures will have its backing
- * store turned on setting the DIXsaveUnder bit,
- * The backing-store code must be written to allow for this
- */
-
-/*-
- *-----------------------------------------------------------------------
- * miCheckSubSaveUnder --
- *	Check all the inferiors of a window for coverage by saveUnder
- *	windows. Called from ChangeSaveUnder and CheckSaveUnder.
- *	This code is very inefficient.
- *
- * Results:
- *	TRUE if any windows need to have backing-store removed.
- *
- * Side Effects:
- *	Windows may have backing-store turned on or off.
- *
- *-----------------------------------------------------------------------
- */
-static Bool
-miCheckSubSaveUnder(
-    WindowPtr		pParent,	/* Parent to check */
-    WindowPtr		pFirst,		/* first reconfigured window */
-    RegionPtr		pRegion)	/* Initial area obscured by saveUnder */
-{
-    WindowPtr		pChild;		/* Current child */
-    ScreenPtr		pScreen;	/* Screen to use */
-    RegionRec		SubRegion;	/* Area of children obscured */
-    Bool		res = FALSE;	/* result */
-    Bool		subInited=FALSE;/* SubRegion initialized */
-
-    pScreen = pParent->drawable.pScreen;
-    if ( (pChild = pParent->firstChild) )
-    {
-	/*
-	 * build region above first changed window
-	 */
-
-	for (; pChild != pFirst; pChild = pChild->nextSib)
-	    if (pChild->viewable && pChild->saveUnder)
-		REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
-	
-	/*
-	 * check region below and including first changed window
-	 */
-
-	for (; pChild; pChild = pChild->nextSib)
-	{
-	    if (pChild->viewable)
-	    {
-		/*
-		 * don't save under nephew/niece windows;
-		 * use a separate region
-		 */
-
-		if (pChild->firstChild)
-		{
-		    if (!subInited)
-		    {
-			REGION_NULL(pScreen, &SubRegion);
-			subInited = TRUE;
-		    }
-		    REGION_COPY(pScreen, &SubRegion, pRegion);
-		    res |= miCheckSubSaveUnder(pChild, pChild->firstChild,
-					     &SubRegion);
-		}
-		else
-		{
-		    res |= miCheckSubSaveUnder(pChild, pChild->firstChild,
-					     pRegion);
-		}
-
-		if (pChild->saveUnder)
-		    REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
-	    }
-	}
-
-	if (subInited)
-	    REGION_UNINIT(pScreen, &SubRegion);
-    }
-
-    /*
-     * Check the state of this window.	DIX save unders are
-     * enabled for viewable windows with some client expressing
-     * exposure interest and which intersect the save under region
-     */
-
-    if (pParent->viewable && 
-	((pParent->eventMask | wOtherEventMasks(pParent)) & ExposureMask) &&
-	REGION_NOTEMPTY(pScreen, &pParent->borderSize) &&
-	RECT_IN_REGION(pScreen, pRegion, REGION_EXTENTS(pScreen, 
-					&pParent->borderSize)) != rgnOUT)
-    {
-	if (!pParent->DIXsaveUnder)
-	{
-	    pParent->DIXsaveUnder = TRUE;
-	    (*pScreen->ChangeWindowAttributes) (pParent, CWBackingStore);
-	}
-    }
-    else
-    {
-	if (pParent->DIXsaveUnder)
-	{
-	    res = TRUE;
-	    pParent->DIXsaveUnder = FALSE;
-	}
-    }
-    return res;
-}
-
-
-/*-
- *-----------------------------------------------------------------------
- * miChangeSaveUnder --
- *	Change the save-under state of a tree of windows. Called when
- *	a window with saveUnder TRUE is mapped/unmapped/reconfigured.
- *	
- * Results:
- *	TRUE if any windows need to have backing-store removed (which
- *	means that PostChangeSaveUnder needs to be called later to 
- *	finish the job).
- *
- * Side Effects:
- *	Windows may have backing-store turned on or off.
- *
- *-----------------------------------------------------------------------
- */
-Bool
-miChangeSaveUnder(
-    WindowPtr		pWin,
-    WindowPtr		first		/* First window to check.
-					 * Used when pWin was restacked */
-    )
-{
-    RegionRec	rgn;	/* Area obscured by saveUnder windows */
-    ScreenPtr 	pScreen;
-    Bool	res;
-
-    if (!deltaSaveUndersViewable && !numSaveUndersViewable)
-	return FALSE;
-    numSaveUndersViewable += deltaSaveUndersViewable;
-    deltaSaveUndersViewable = 0;
-    pScreen = pWin->drawable.pScreen;
-    REGION_NULL(pScreen, &rgn);
-    res = miCheckSubSaveUnder (pWin->parent,
-			       pWin->saveUnder ? first : pWin->nextSib,
-			       &rgn);
-    REGION_UNINIT(pScreen, &rgn);
-    return res;
-}
-
-/*-
- *-----------------------------------------------------------------------
- * miPostChangeSaveUnder --
- *	Actually turn backing-store off for those windows that no longer
- *	need to have it on.
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	Backing-store and SAVE_UNDER_CHANGE_BIT are turned off for those
- *	windows affected.
- *
- *-----------------------------------------------------------------------
- */
-void
-miPostChangeSaveUnder(WindowPtr pWin, WindowPtr pFirst)
-{
-    WindowPtr pParent, pChild;
-    ChangeWindowAttributesProcPtr ChangeWindowAttributes;
-
-    if (!(pParent = pWin->parent))
-	return;
-    ChangeWindowAttributes = pParent->drawable.pScreen->ChangeWindowAttributes;
-    if (!pParent->DIXsaveUnder &&
-	(pParent->backingStore == NotUseful) && pParent->backStorage)
-	(*ChangeWindowAttributes)(pParent, CWBackingStore);
-    if (!(pChild = pFirst))
-	return;
-    while (1)
-    {
-	if (!pChild->DIXsaveUnder &&
-	    (pChild->backingStore == NotUseful) && pChild->backStorage)
-	    (*ChangeWindowAttributes)(pChild, CWBackingStore);
-	if (pChild->firstChild)
-	{
-	    pChild = pChild->firstChild;
-	    continue;
-	}
-	while (!pChild->nextSib)
-	{
-	    pChild = pChild->parent;
-	    if (pChild == pParent)
-		return;
-	}
-	pChild = pChild->nextSib;
-    }
-}
-
 void
 miMarkWindow(WindowPtr pWin)
 {
@@ -474,9 +271,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
     Bool anyMarked = FALSE;
     ScreenPtr pScreen;
     WindowPtr windowToValidate;
-#ifdef DO_SAVE_UNDERS
-    Bool dosave = FALSE;
-#endif
     WindowPtr pLayerWin;
 
     /* if this is a root window, can't be moved */
@@ -516,12 +310,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
 	    anyMarked |= (*pScreen->MarkOverlappedWindows)
 				(pWin, pLayerWin, (WindowPtr *)NULL);
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, windowToValidate);
-	}
-#endif /* DO_SAVE_UNDERS */
 
 	if (anyMarked)
 	{
@@ -531,10 +319,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
 	    /* XXX need to retile border if ParentRelative origin */
 	    (*pScreen->HandleExposures)(pLayerWin->parent);
 	}
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin, windowToValidate);
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, kind);
     }
@@ -606,9 +390,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
     RegionPtr	borderVisible = NullRegion; /* visible area of the border */
     Bool	shrunk = FALSE; /* shrunk in an inner dimension */
     Bool	moved = FALSE;	/* window position changed */
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr  pLayerWin;
 
     /* if this is a root window, can't be resized */
@@ -721,12 +502,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
 	    pWin->valdata->before.borderVisible = borderVisible;
 	}
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pFirstChange);
-	}
-#endif /* DO_SAVE_UNDERS */
 
 	if (anyMarked)
 	    (*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, VTOther);
@@ -889,12 +664,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
 	    REGION_DESTROY(pScreen, destClip);
 	if (anyMarked)
 	    (*pScreen->HandleExposures)(pLayerWin->parent);
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	{
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin, pFirstChange);
-	}
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange,
 					  VTOther);
@@ -922,9 +691,6 @@ miSetShape(WindowPtr pWin)
     Bool	WasViewable = (Bool)(pWin->viewable);
     ScreenPtr 	pScreen = pWin->drawable.pScreen;
     Bool	anyMarked = FALSE;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr   pLayerWin;
 
     if (WasViewable)
@@ -956,12 +722,6 @@ miSetShape(WindowPtr pWin)
 	anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
 						(WindowPtr *)NULL);
 
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
-	}
-#endif /* DO_SAVE_UNDERS */
 
 	if (anyMarked)
 	    (*pScreen->ValidateTree)(pLayerWin->parent, NullWindow, VTOther);
@@ -971,10 +731,6 @@ miSetShape(WindowPtr pWin)
     {
 	if (anyMarked)
 	    (*pScreen->HandleExposures)(pLayerWin->parent);
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, VTOther);
     }
@@ -993,9 +749,6 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
     ScreenPtr pScreen;
     Bool WasViewable = (Bool)(pWin->viewable);
     Bool HadBorder;
-#ifdef DO_SAVE_UNDERS
-    Bool	dosave = FALSE;
-#endif
     WindowPtr  pLayerWin;
 
     oldwidth = wBorderWidth (pWin);
@@ -1028,22 +781,12 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
 		pWin->valdata->before.borderVisible = borderVisible;
 	    }
 	}
-#ifdef DO_SAVE_UNDERS
-	if (DO_SAVE_UNDERS(pWin))
-	{
-	    dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib);
-	}
-#endif /* DO_SAVE_UNDERS */
 
 	if (anyMarked)
 	{
 	    (*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTOther);
 	    (*pScreen->HandleExposures)(pLayerWin->parent);
 	}
-#ifdef DO_SAVE_UNDERS
-	if (dosave)
-	    (*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib);
-#endif /* DO_SAVE_UNDERS */
 	if (anyMarked && pScreen->PostValidateTree)
 	    (*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin,
 					  VTOther);
diff --git a/os/utils.c b/os/utils.c
index 96da35d..bf52ea0 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -534,7 +534,6 @@ void UseMsg(void)
     ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
 #endif
     ErrorF("-s #                   screen-saver timeout (minutes)\n");
-    ErrorF("-su                    disable any save under support\n");
     ErrorF("-t #                   mouse threshold (pixels)\n");
     ErrorF("-terminate             terminate at server reset\n");
     ErrorF("-to #                  connection time out\n");
@@ -837,8 +836,6 @@ ProcessCommandLine(int argc, char *argv[])
 	    else
 		UseMsg();
 	}
-	else if ( strcmp( argv[i], "-su") == 0)
-	    disableSaveUnders = TRUE;
 	else if ( strcmp( argv[i], "-t") == 0)
 	{
 	    if(++i < argc)
commit f456f32cd97684052cab4712e7f4c827132c554b
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Aug 13 16:21:28 2008 -0400

    Build fix.

diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 98d7ec8..eff2c31 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -4,9 +4,9 @@ if DRI
 DRI_SUBDIR = dri
 endif
 
-if DRI2
-DRI2_SUBDIR = dri2
-endif
+#if DRI2
+#DRI2_SUBDIR = dri2
+#endif
 
 if XF86UTILS
 XF86UTILS_SUBDIR = utils
commit c1e9b7dc6f4600fe6c301aecd7d67461cb884df0
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Aug 13 14:13:55 2008 -0400

    Sledgehammer off the DRI2 build system.

diff --git a/configure.ac b/configure.ac
index 5155dbd..c902773 100644
--- a/configure.ac
+++ b/configure.ac
@@ -856,13 +856,13 @@ if test "x$DRI" = xyes; then
 	AC_SUBST(GL_CFLAGS)
 fi
 
-AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
-if test "x$DRI2" = xyes; then
-	# FIXME: Bump the versions once we have releases of these.
-	AC_DEFINE(DRI2, 1, [Build DRI2 extension])
-	PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= 1.1])
-	PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.2])
-fi
+#AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
+#if test "x$DRI2" = xyes; then
+#	# FIXME: Bump the versions once we have releases of these.
+#	AC_DEFINE(DRI2, 1, [Build DRI2 extension])
+#	PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= 1.1])
+#	PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.2])
+#fi
 
 AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
 if test "x$XINERAMA" = xyes; then
commit 544bfd06663ff71bc5275459cf74a3557530544f
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Aug 13 11:09:54 2008 -0400

    Remove xf86Version.h and related API.
    
    We haven't meaningfully been API-compatible with xf86 modules in ages,
    let's stop pretending.

diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 15b56fa..de14dbb 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -47,7 +47,7 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
 sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
               xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \
               xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \
-              $(XVSDKINCS) xf86Version.h xorgVersion.h \
+              $(XVSDKINCS) xorgVersion.h \
               xf86sbusBus.h xf86xv.h xf86xvmc.h xf86xvpriv.h
 
 DISTCLEANFILES = xf86Build.h
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index cd6da59..6c3c095 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -277,7 +277,6 @@ Bool xf86GetModInDevEnabled(void);
 Bool xf86GetAllowMouseOpenFail(void);
 Bool xf86IsPc98(void);
 void xf86DisableRandR(void);
-CARD32 xf86GetVersion(void);
 CARD32 xorgGetVersion(void);
 CARD32 xf86GetModuleVersion(pointer module);
 pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name);
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index d358da0..0dd7fc7 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -60,7 +60,6 @@
 #include "mivalidate.h"
 #include "xf86RAC.h"
 #include "xf86Bus.h"
-#include "xf86Version.h"
 
 /* For xf86GetClocks */
 #if defined(CSRG_BASED) || defined(__GNU__)
@@ -2352,12 +2351,6 @@ xf86DisableRandR()
 }
 
 _X_EXPORT CARD32
-xf86GetVersion()
-{
-    return XF86_VERSION_CURRENT;
-}
-
-_X_EXPORT CARD32
 xf86GetModuleVersion(pointer module)
 {
     return (CARD32)LoaderGetModuleVersion(module);
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 3c75df0..415d095 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -42,7 +42,6 @@
 #define _XF86MODULE_H
 
 #include "misc.h"
-#include "xf86Version.h"
 #ifndef NULL
 #define NULL ((void *)0)
 #endif
diff --git a/hw/xfree86/common/xf86Version.h b/hw/xfree86/common/xf86Version.h
deleted file mode 100644
index b93ac7d..0000000
--- a/hw/xfree86/common/xf86Version.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifndef XF86_VERSION_CURRENT
-
-#define XF86_VERSION_MAJOR	4
-#define XF86_VERSION_MINOR	3
-#define XF86_VERSION_PATCH	99
-#define XF86_VERSION_SNAP	902
-
-/* This has five arguments for compatibilty reasons */
-#define XF86_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
-	(((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
-
-#define XF86_GET_MAJOR_VERSION(vers)	((vers) / 10000000)
-#define XF86_GET_MINOR_VERSION(vers)	(((vers) % 10000000) / 100000)
-#define XF86_GET_PATCH_VERSION(vers)	(((vers) % 100000) / 1000)
-#define XF86_GET_SNAP_VERSION(vers)	((vers) % 1000)
-
-/* Define these for compatibility.  They'll be removed at some point. */
-#define XF86_VERSION_SUBMINOR	XF86_VERSION_PATCH
-#define XF86_VERSION_BETA	0
-#define XF86_VERSION_ALPHA	XF86_VERSION_SNAP
-
-#define XF86_VERSION_CURRENT					\
-   XF86_VERSION_NUMERIC(XF86_VERSION_MAJOR,			\
-			XF86_VERSION_MINOR,			\
-			XF86_VERSION_PATCH,			\
-			XF86_VERSION_SNAP,			\
-			0)
-
-#endif
diff --git a/hw/xfree86/common/xisb.c b/hw/xfree86/common/xisb.c
index d021ec1..6314094 100644
--- a/hw/xfree86/common/xisb.c
+++ b/hw/xfree86/common/xisb.c
@@ -41,7 +41,6 @@
 
 #include <misc.h>
 #include <xf86.h>
-#include <xf86Version.h>
 #include <xf86_OSproc.h>
 #include <xf86_OSlib.h>
 #include <xf86Xinput.h>
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 7ff17ef..3d6ca7b 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -445,7 +445,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     SYMFUNC(xf86IsPc98)
     SYMFUNC(xf86DisableRandR)
     SYMFUNC(xf86GetRotation)
-    SYMFUNC(xf86GetVersion)
     SYMFUNC(xf86GetModuleVersion)
     SYMFUNC(xf86GetClocks)
     SYMFUNC(xf86SetPriority)
commit 139c3ab7b754dc425a09d5f7b6d2a8fb2b88138a
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Tue Aug 12 17:49:49 2008 +0930

    Xi: return the state from the correct keyboard in QueryDevicePointer.

diff --git a/Xi/querydp.c b/Xi/querydp.c
index d63bed1..744a295 100644
--- a/Xi/querydp.c
+++ b/Xi/querydp.c
@@ -72,7 +72,7 @@ ProcXQueryDevicePointer(ClientPtr client)
 {
     int rc;
     xQueryDevicePointerReply rep;
-    DeviceIntPtr pDev;
+    DeviceIntPtr pDev, kbd;
     WindowPtr pWin, t;
     SpritePtr pSprite;
 
@@ -100,12 +100,14 @@ ProcXQueryDevicePointer(ClientPtr client)
     if (pDev->valuator->motionHintWindow)
         MaybeStopHint(pDev, client);
 
+    kbd = GetPairedDevice(pDev);
+
     pSprite = pDev->spriteInfo->sprite;
     rep.repType = X_Reply;
     rep.RepType = X_QueryDevicePointer;
     rep.length = 0;
     rep.sequenceNumber = client->sequence;
-    rep.mask = pDev->button->state | inputInfo.keyboard->key->state;
+    rep.mask = pDev->button->state | (kbd && kbd->key) ? kbd->key->state : 0;
     rep.root = (GetCurrentRootWindow(pDev))->drawable.id;
     rep.rootX = pSprite->hot.x;
     rep.rootY = pSprite->hot.y;
commit 998375f4154b000f75b2bafd4e276c0237d24dc7
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Tue Aug 12 17:49:16 2008 +0930

    dix: remove superfluous check.

diff --git a/dix/devices.c b/dix/devices.c
index 7519e06..2225e08 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2640,9 +2640,6 @@ GetPairedDevice(DeviceIntPtr dev)
     if (!dev->isMaster && dev->u.master)
         dev = dev->u.master;
 
-    if (!dev->spriteInfo->paired)
-        return NULL;
-
     return dev->spriteInfo->paired;
 }
 
commit 9f9268821b13038556fbc029df54ab0e9b2aa77f
Author: Mathieu Bérard <mathieu.berard at crans.org>
Date:   Mon Aug 11 13:52:38 2008 -0400

    The smart scheduler is not optional.

diff --git a/configure.ac b/configure.ac
index 0769cb3..5155dbd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1041,7 +1041,6 @@ AC_SUBST([VENDOR_NAME_SHORT])
 AC_SUBST([VENDOR_RELEASE])
 AC_SUBST([VENDOR_MAN_VERSION])
 
-AC_DEFINE(SMART_SCHEDULE, 1, [Include time-based scheduler])
 AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrapper])
 
 if test "x$DEBUGGING" = xyes; then
diff --git a/damageext/damageext.c b/damageext/damageext.c
index 517c72d..7dd328a 100755
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -90,9 +90,7 @@ DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes)
     if (pDamageClient->critical > 0)
     {
 	SetCriticalOutputPending ();
-#ifdef SMART_SCHEDULE
 	pClient->smart_priority = SMART_MAX_PRIORITY;
-#endif
     }
 }
 
diff --git a/dix/dispatch.c b/dix/dispatch.c
index c04443b..202d2d9 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -237,7 +237,6 @@ UpdateCurrentTimeIf(void)
 	currentTime = systime;
 }
 
-#ifdef SMART_SCHEDULE
 
 #undef SMART_DEBUG
 
@@ -338,7 +337,6 @@ SmartScheduleClient (int *clientReady, int nready)
     }
     return best;
 }
-#endif
 
 #define MAJOROP ((xReq *)client->requestBuffer)->reqType
 
@@ -350,9 +348,7 @@ Dispatch(void)
     ClientPtr	client;
     int	nready;
     HWEventQueuePtr* icheck = checkForInput;
-#ifdef SMART_SCHEDULE
     long			start_tick;
-#endif
 
     nextFreeClientID = 1;
     nClients = 0;
@@ -371,13 +367,11 @@ Dispatch(void)
 
 	nready = WaitForSomething(clientReady);
 
-#ifdef SMART_SCHEDULE
 	if (nready && !SmartScheduleDisable)
 	{
 	    clientReady[0] = SmartScheduleClient (clientReady, nready);
 	    nready = 1;
 	}
-#endif
        /***************** 
 	*  Handle events in round robin fashion, doing input between 
 	*  each round 
@@ -399,16 +393,13 @@ Dispatch(void)
 	    }
 	    isItTimeToYield = FALSE;
  
-#ifdef SMART_SCHEDULE
 	    start_tick = SmartScheduleTime;
-#endif
 	    while (!isItTimeToYield)
 	    {
 	        if (*icheck[0] != *icheck[1])
 		    ProcessInputEvents();
 		
 		FlushIfCriticalOutputPending();
-#ifdef SMART_SCHEDULE
 		if (!SmartScheduleDisable && 
 		    (SmartScheduleTime - start_tick) >= SmartScheduleSlice)
 		{
@@ -417,7 +408,6 @@ Dispatch(void)
 			client->smart_priority--;
 		    break;
 		}
-#endif
 		/* now, finally, deal with client requests */
 
 	        result = ReadRequestFromClient(client);
@@ -465,11 +455,9 @@ Dispatch(void)
 	        }
 	    }
 	    FlushAllOutput();
-#ifdef SMART_SCHEDULE
 	    client = clients[clientReady[nready]];
 	    if (client)
 		client->smart_stop_tick = SmartScheduleTime;
-#endif
 	}
 	dispatchException &= ~DE_PRIORITYCHANGE;
     }
@@ -3453,9 +3441,7 @@ CloseDownClient(ClientPtr client)
 	if (client->index < nextFreeClientID)
 	    nextFreeClientID = client->index;
 	clients[client->index] = NullClient;
-#ifdef SMART_SCHEDULE
 	SmartLastClient = NullClient;
-#endif
 	dixFreePrivates(client->devPrivates);
 	xfree(client);
 
@@ -3505,12 +3491,10 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
 #endif
     client->replyBytesRemaining = 0;
     client->fontResFunc = NULL;
-#ifdef SMART_SCHEDULE
     client->smart_priority = 0;
     client->smart_start_tick = SmartScheduleTime;
     client->smart_stop_tick = SmartScheduleTime;
     client->smart_check_tick = SmartScheduleTime;
-#endif
 
     client->clientPtr = NULL;
 }
diff --git a/dix/events.c b/dix/events.c
index f04433b..7a79d29 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2014,10 +2014,8 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
 
 	if (BitIsOn(criticalEvents, type))
 	{
-#ifdef SMART_SCHEDULE
 	    if (client->smart_priority < SMART_MAX_PRIORITY)
 		client->smart_priority++;
-#endif
 	    SetCriticalOutputPending();
 	}
 
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 6400b69..21d8d9c 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -252,9 +252,6 @@
 /* Support SHAPE extension */
 #undef SHAPE
 
-/* Include time-based scheduler */
-#undef SMART_SCHEDULE
-
 /* Define to 1 on systems derived from System V Release 4 */
 #undef SVR4
 
diff --git a/include/dixstruct.h b/include/dixstruct.h
index 306870c..aae2dbd 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -129,17 +129,14 @@ typedef struct _Client {
     struct _FontResolution * (*fontResFunc) (    /* no need for font.h */
 		ClientPtr	/* pClient */,
 		int *		/* num */);
-#ifdef SMART_SCHEDULE
     int	    smart_priority;
     long    smart_start_tick;
     long    smart_stop_tick;
     long    smart_check_tick;
-#endif
     
     DeviceIntPtr clientPtr;
 }           ClientRec;
 
-#ifdef SMART_SCHEDULE
 /*
  * Scheduling interface
  */
@@ -155,7 +152,6 @@ extern void SmartScheduleStopTimer(void);
 
 extern Bool SmartScheduleInit(void);
 
-#endif
 
 /* This prototype is used pervasively in Xext, dix */
 #define DISPATCH_PROC(func) int func(ClientPtr /* client */)
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index 8cb2b5a..b8803e7 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -61,9 +61,6 @@
 /* Support SHAPE extension */
 #undef SHAPE
 
-/* Include time-based scheduler */
-#undef SMART_SCHEDULE
-
 /* Define to 1 on systems derived from System V Release 4 */
 #undef SVR4
 
diff --git a/os/WaitFor.c b/os/WaitFor.c
index f07388b..d6dd995 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -155,9 +155,7 @@ WaitForSomething(int *pClientsReady)
     int nready;
     fd_set devicesReadable;
     CARD32 now = 0;
-#ifdef SMART_SCHEDULE
     Bool    someReady = FALSE;
-#endif
 
     FD_ZERO(&clientsReadable);
 
@@ -170,7 +168,6 @@ WaitForSomething(int *pClientsReady)
 	    ProcessWorkQueue();
 	if (XFD_ANYSET (&ClientsWithInput))
 	{
-#ifdef SMART_SCHEDULE
 	    if (!SmartScheduleDisable)
 	    {
 		someReady = TRUE;
@@ -179,13 +176,11 @@ WaitForSomething(int *pClientsReady)
 		wt = &waittime;
 	    }
 	    else
-#endif
 	    {
 		XFD_COPYSET (&ClientsWithInput, &clientsReadable);
 		break;
 	    }
 	}
-#ifdef SMART_SCHEDULE
 	if (someReady)
 	{
 	    XFD_COPYSET(&AllSockets, &LastSelectMask);
@@ -193,7 +188,6 @@ WaitForSomething(int *pClientsReady)
 	}
 	else
 	{
-#endif
         wt = NULL;
 	if (timers)
         {
@@ -215,11 +209,9 @@ WaitForSomething(int *pClientsReady)
 	    }
 	}
 	XFD_COPYSET(&AllSockets, &LastSelectMask);
-#ifdef SMART_SCHEDULE
 	}
 	SmartScheduleStopTimer ();
 
-#endif
 	BlockHandler((pointer)&wt, (pointer)&LastSelectMask);
 	if (NewOutputPending)
 	    FlushAllOutput();
@@ -237,9 +229,7 @@ WaitForSomething(int *pClientsReady)
 	}
 	selecterr = GetErrno();
 	WakeupHandler(i, (pointer)&LastSelectMask);
-#ifdef SMART_SCHEDULE
 	SmartScheduleStartTimer ();
-#endif
 	if (i <= 0) /* An error or timeout occurred */
 	{
 	    if (dispatchException)
@@ -263,7 +253,6 @@ WaitForSomething(int *pClientsReady)
 			strerror(selecterr));
 		}
 	    }
-#ifdef SMART_SCHEDULE
 	    else if (someReady)
 	    {
 		/*
@@ -273,7 +262,6 @@ WaitForSomething(int *pClientsReady)
 		XFD_COPYSET(&ClientsWithInput, &clientsReadable);
 		break;
 	    }
-#endif
 	    if (*checkForInput[0] != *checkForInput[1])
 		return 0;
 
@@ -310,10 +298,8 @@ WaitForSomething(int *pClientsReady)
                         return 0;
 	        }
 	    }
-#ifdef SMART_SCHEDULE
 	    if (someReady)
 		XFD_ORSET(&LastSelectMask, &ClientsWithInput, &LastSelectMask);
-#endif	    
 	    if (AnyClientsWriteBlocked && XFD_ANYSET (&clientsWritable))
 	    {
 		NewOutputPending = TRUE;
diff --git a/os/io.c b/os/io.c
index 723ff6a..3c0d494 100644
--- a/os/io.c
+++ b/os/io.c
@@ -411,11 +411,9 @@ ReadRequestFromClient(ClientPtr client)
 	    FD_SET(fd, &ClientsWithInput);
 	else
 	{
-#ifdef SMART_SCHEDULE
 	    if (!SmartScheduleDisable)
 		FD_CLR(fd, &ClientsWithInput);
 	    else
-#endif
 		YieldControlNoInput();
 	}
     }
@@ -423,16 +421,12 @@ ReadRequestFromClient(ClientPtr client)
     {
 	if (!gotnow)
 	    AvailableInput = oc;
-#ifdef SMART_SCHEDULE
 	if (!SmartScheduleDisable)
 	    FD_CLR(fd, &ClientsWithInput);
 	else
-#endif
 	    YieldControlNoInput();
     }
-#ifdef SMART_SCHEDULE
     if (SmartScheduleDisable)
-#endif
     if (++timesThisConnection >= MAX_TIMES_PER)
 	YieldControl();
     if (move_header)
diff --git a/os/osinit.c b/os/osinit.c
index 986a642..74e2457 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -55,9 +55,7 @@ SOFTWARE.
 #include "osdep.h"
 #include <X11/Xos.h>
 
-#ifdef SMART_SCHEDULE
 #include "dixstruct.h"
-#endif
 
 #ifndef PATH_MAX
 #ifdef MAXPATHLEN
@@ -199,11 +197,9 @@ OsInit(void)
      * log file name if logging to a file is desired.
      */
     LogInit(NULL, NULL);
-#ifdef SMART_SCHEDULE
     if (!SmartScheduleDisable)
 	if (!SmartScheduleInit ())
 	    SmartScheduleDisable = TRUE;
-#endif
 }
 
 void
diff --git a/os/utils.c b/os/utils.c
index 88a6495..96da35d 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -111,9 +111,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
 
 #include "opaque.h"
 
-#ifdef SMART_SCHEDULE
 #include "dixstruct.h"
-#endif
 
 #ifdef XKB
 #include <xkbsrv.h>
@@ -552,10 +550,8 @@ void UseMsg(void)
     ErrorF("+xinerama              Enable XINERAMA extension\n");
     ErrorF("-xinerama              Disable XINERAMA extension\n");
 #endif
-#ifdef SMART_SCHEDULE
     ErrorF("-dumbSched             Disable smart scheduling, enable old behavior\n");
     ErrorF("-schedInterval int     Set scheduler interval in msec\n");
-#endif
     ErrorF("+extension name        Enable extension\n");
     ErrorF("-extension name        Disable extension\n");
 #ifdef XDMCP
@@ -926,7 +922,6 @@ ProcessCommandLine(int argc, char *argv[])
 	    i = skip - 1;
 	}
 #endif
-#ifdef SMART_SCHEDULE
 	else if ( strcmp( argv[i], "-dumbSched") == 0)
 	{
 	    SmartScheduleDisable = TRUE;
@@ -950,7 +945,6 @@ ProcessCommandLine(int argc, char *argv[])
 	    else
 		UseMsg();
 	}
-#endif
 #ifdef RENDER
 	else if ( strcmp( argv[i], "-render" ) == 0)
 	{
@@ -1234,7 +1228,6 @@ XNFstrdup(const char *s)
     return sd;
 }
 
-#ifdef SMART_SCHEDULE
 
 #ifdef SIGVTALRM
 #define SMART_SCHEDULE_POSSIBLE
@@ -1310,7 +1303,6 @@ SmartScheduleInit (void)
     return FALSE;
 #endif
 }
-#endif
 
 #ifdef SIG_BLOCK
 static sigset_t	PreviousSignalMask;
commit 2e2ce817ce404a5e000c9750fa96f656fed370b8
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Sun Aug 10 23:07:46 2008 +0200

    Move strcasecmp(), strcasencmp() and strcasestr() prototypes to os.h
    
    And make sure os.h is included in files that use it.

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index a8c9166..530fa86 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -88,6 +88,8 @@
 #include "dgaproc.h"
 #endif
 
+#include "os.h"
+
 EventListPtr xf86Events = NULL;
 
 /**
diff --git a/hw/xfree86/dixmods/xkbPrivate.c b/hw/xfree86/dixmods/xkbPrivate.c
index 7de3a66..40c9311 100644
--- a/hw/xfree86/dixmods/xkbPrivate.c
+++ b/hw/xfree86/dixmods/xkbPrivate.c
@@ -14,6 +14,7 @@
 #define XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
 
+#include "os.h"
 #include "xf86.h"
 
 int
diff --git a/include/dix.h b/include/dix.h
index 64e3d78..476ec2e 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -596,22 +596,6 @@ typedef struct {
     int count;
 } DeviceEventInfoRec;
 
-/* strcasecmp.c */
-#if NEED_STRCASECMP
-#define strcasecmp xstrcasecmp
-extern int xstrcasecmp(const char *s1, const char *s2);
-#endif
-
-#if NEED_STRNCASECMP
-#define strncasecmp xstrncasecmp
-extern int xstrncasecmp(const char *s1, const char *s2, size_t n);
-#endif
-
-#if NEED_STRCASESTR
-#define strcasestr xstrcasestr
-extern char *xstrcasestr(const char *s, const char *find);
-#endif
-
 extern int XItoCoreType(int xi_type);
 extern Bool DevHasCursor(DeviceIntPtr pDev);
 extern Bool IsPointerDevice( DeviceIntPtr dev);
diff --git a/include/os.h b/include/os.h
index ac418ce..bfe2363 100644
--- a/include/os.h
+++ b/include/os.h
@@ -450,6 +450,22 @@ extern void AbortDDX(void);
 extern void ddxGiveUp(void);
 extern int TimeSinceLastInputEvent(void);
 
+/* strcasecmp.c */
+#if NEED_STRCASECMP
+#define strcasecmp xstrcasecmp
+extern int xstrcasecmp(const char *s1, const char *s2);
+#endif
+
+#if NEED_STRNCASECMP
+#define strncasecmp xstrncasecmp
+extern int xstrncasecmp(const char *s1, const char *s2, size_t n);
+#endif
+
+#if NEED_STRCASESTR
+#define strcasestr xstrcasestr
+extern char *xstrcasestr(const char *s, const char *find);
+#endif
+
 /* Logging. */
 typedef enum _LogParameter {
     XLOG_FLUSH,
diff --git a/xkb/maprules.c b/xkb/maprules.c
index 4c947f0..b25d929 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -46,6 +46,7 @@
 #include "misc.h"
 #include "inputstr.h"
 #include "dix.h"
+#include "os.h"
 #include "xkbstr.h"
 #define XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
commit 02efa78ce2da470b252289ff2af598d06bc84ece
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Sun Aug 10 18:29:35 2008 +0200

    add libXinerama to the list of dependencies.
    
    Now that panoramiXext.h is installed bt libXinerama, it becomes required
    to build Xext.

diff --git a/configure.ac b/configure.ac
index 9d25539..0769cb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -868,7 +868,7 @@ AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
 if test "x$XINERAMA" = xyes; then
 	AC_DEFINE(XINERAMA, 1, [Support Xinerama extension])
 	AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama])
-	REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto"
+	REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto xinerama"
 fi
 
 AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])
commit be2210b69defa225d8bc4bb90d94bfd740ef8b1f
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Sat Aug 9 23:43:50 2008 +0200

    remove OpenBSD/amd64 specific mtrr API.
    
    The old code never worked anyways and was removed from OpenBSD.
    OpenBSD/amd64 4.4 and later support mtrr with the same API as
    OpenBSD/i386.

diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 505659e..9a28611 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -55,11 +55,6 @@
 #endif
 #endif
 
-#if defined(__OpenBSD__) && defined(__amd64__)
-#include <machine/mtrr.h>
-#include <machine/sysarch.h>
-#endif
-
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
 
@@ -108,11 +103,6 @@ static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool,
 			   MessageType);
 static void NetBSDundoWC(int, pointer);
 #endif
-#if defined(__OpenBSD__) && defined(__amd64__)
-static pointer amd64setWC(int, unsigned long, unsigned long, Bool, 
-    MessageType);
-static void amd64undoWC(int, pointer);
-#endif
 
 /*
  * Check if /dev/mem can be mmap'd.  If it can't print a warning when
@@ -229,10 +219,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 	pVidMem->setWC = NetBSDsetWC;
 	pVidMem->undoWC = NetBSDundoWC;
 #endif
-#if defined(__OpenBSD__) && defined(__amd64__)
-	pVidMem->setWC = amd64setWC;
-	pVidMem->undoWC = amd64undoWC;
-#endif
 	pVidMem->initialised = TRUE;
 }
 
@@ -952,55 +938,3 @@ NetBSDundoWC(int screenNum, pointer list)
 	xfree(mtrrp);
 }
 #endif
-
-#if defined(__OpenBSD__) && defined(__amd64__)
-static pointer
-amd64setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
-	    MessageType from)
-{
-	struct mtrr *mtrrp;
-	int n;
-
-	xf86DrvMsg(screenNum, X_WARNING,
-		   "%s MTRR %lx - %lx\n", enable ? "set" : "remove",
-		   base, (base + size));
-
-	mtrrp = xnfalloc(sizeof (struct mtrr));
-	mtrrp->base = base;
-	mtrrp->len = size;
-	mtrrp->type = MTRR_TYPE_WC;
-
-	/*
-	 * MTRR_PRIVATE will make this MTRR get reset automatically
-	 * if this process exits, so we have no need for an explicit
-	 * cleanup operation when starting a new server.
-	 */
-
-	if (enable)
-		mtrrp->flags = MTRR_VALID | MTRR_PRIVATE;
-	else
-		mtrrp->flags = 0;
-	n = 1;
-
-	if (amd64_set_mtrr(mtrrp, &n) < 0) {
-		xfree(mtrrp);
-		return NULL;
-	}
-	return mtrrp;
-}
-
-static void
-amd64undoWC(int screenNum, pointer list)
-{
-	struct mtrr *mtrrp = (struct mtrr *)list;
-	int n;
-
-	if (mtrrp == NULL)
-		return;
-	n = 1;
-	mtrrp->flags &= ~MTRR_VALID;
-	amd64_set_mtrr(mtrrp, &n);
-	xfree(mtrrp);
-}
-#endif /* OpenBSD/amd64 */
-
commit 6e33e6f355f7f04e77a165eb67b1414724c1fba3
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Sat Aug 9 23:43:03 2008 +0200

    Move string comparaison functions to from dix/ to os/.

diff --git a/dix/Makefile.am b/dix/Makefile.am
index 45da45f..182311e 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -35,9 +35,7 @@ libdix_la_SOURCES = 	\
 	swaprep.c	\
 	swapreq.c	\
 	tables.c	\
-	window.c	\
-	strcasecmp.c	\
-	strcasestr.c
+	window.c
 
 EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in
 
diff --git a/dix/strcasecmp.c b/dix/strcasecmp.c
deleted file mode 100644
index ca1051d..0000000
--- a/dix/strcasecmp.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- *      The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <ctype.h>
-#include "dix.h"
-
-#ifdef NEED_STRCASECMP
-int
-xstrcasecmp(const char *str1, const char *str2)
-{
-    const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
-
-    while (tolower(*us1) == tolower(*us2)) {
-        if (*us1++ == '\0')
-            return (0);
-        us2++;
-    }
-
-    return (tolower(*us1) - tolower(*us2));
-}
-#endif
-
-#ifdef NEED_STRNCASECMP
-int
-xstrncasecmp(const char *s1, const char *s2, size_t n)
-{
-    if (n != 0) {
-        const u_char *us1 = (const u_char *)s1, *us2 = (const u_char *)s2;
-
-        do {
-            if (tolower(*us1) != tolower(*us2++))
-                return (tolower(*us1) - tolower(*--us2));
-            if (*us1++ == '\0')
-                break;
-        } while (--n != 0);
-    }
-
-    return 0;
-}
-#endif
diff --git a/dix/strcasestr.c b/dix/strcasestr.c
deleted file mode 100644
index b3d4549..0000000
--- a/dix/strcasestr.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- *      The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Chris Torek.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <ctype.h>
-#include <string.h>
-#include "dix.h"
-
-/*
- * Find the first occurrence of find in s, ignore case.
- */
-#ifdef NEED_STRCASESTR
-char *
-xstrcasestr(const char *s, const char *find)
-{
-        char c, sc;
-        size_t len;
-
-        if ((c = *find++) != 0) {
-                c = tolower((unsigned char)c);
-                len = strlen(find);
-                do {
-                        do {
-                                if ((sc = *s++) == 0)
-                                        return (NULL);
-                        } while ((char)tolower((unsigned char)sc) != c);
-                } while (strncasecmp(s, find, len) != 0);
-                s--;
-        }
-        return ((char *)s);
-}
-#endif
diff --git a/os/Makefile.am b/os/Makefile.am
index 16e4bfa..16ecc15 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -18,6 +18,8 @@ libos_la_SOURCES = 	\
 	osdep.h		\
 	osinit.c	\
 	utils.c		\
+	strcasecmp.c	\
+	strcasestr.c	\
 	xdmauth.c	\
 	xstrans.c	\
 	xprintf.c	\
diff --git a/os/strcasecmp.c b/os/strcasecmp.c
new file mode 100644
index 0000000..ca1051d
--- /dev/null
+++ b/os/strcasecmp.c
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 1987, 1993
+ *      The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <ctype.h>
+#include "dix.h"
+
+#ifdef NEED_STRCASECMP
+int
+xstrcasecmp(const char *str1, const char *str2)
+{
+    const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
+
+    while (tolower(*us1) == tolower(*us2)) {
+        if (*us1++ == '\0')
+            return (0);
+        us2++;
+    }
+
+    return (tolower(*us1) - tolower(*us2));
+}
+#endif
+
+#ifdef NEED_STRNCASECMP
+int
+xstrncasecmp(const char *s1, const char *s2, size_t n)
+{
+    if (n != 0) {
+        const u_char *us1 = (const u_char *)s1, *us2 = (const u_char *)s2;
+
+        do {
+            if (tolower(*us1) != tolower(*us2++))
+                return (tolower(*us1) - tolower(*--us2));
+            if (*us1++ == '\0')
+                break;
+        } while (--n != 0);
+    }
+
+    return 0;
+}
+#endif
diff --git a/os/strcasestr.c b/os/strcasestr.c
new file mode 100644
index 0000000..b3d4549
--- /dev/null
+++ b/os/strcasestr.c
@@ -0,0 +1,64 @@
+/*-
+ * Copyright (c) 1990, 1993
+ *      The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <ctype.h>
+#include <string.h>
+#include "dix.h"
+
+/*
+ * Find the first occurrence of find in s, ignore case.
+ */
+#ifdef NEED_STRCASESTR
+char *
+xstrcasestr(const char *s, const char *find)
+{
+        char c, sc;
+        size_t len;
+
+        if ((c = *find++) != 0) {
+                c = tolower((unsigned char)c);
+                len = strlen(find);
+                do {
+                        do {
+                                if ((sc = *s++) == 0)
+                                        return (NULL);
+                        } while ((char)tolower((unsigned char)sc) != c);
+                } while (strncasecmp(s, find, len) != 0);
+                s--;
+        }
+        return ((char *)s);
+}
+#endif
commit 5968634996c08656a0c5e2fa35705cf7afac87e6
Author: Dave Miller <davem at davemloft.net>
Date:   Sat Aug 9 16:45:59 2008 +1000

    glx: fix crash in driGetConfigAttribIndex
    
    Don't access GLboolean via int pointers

diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c
index 13725ae..3285835 100644
--- a/glx/glxdricommon.c
+++ b/glx/glxdricommon.c
@@ -164,6 +164,10 @@ createModeFromConfig(const __DRIcoreExtension *core,
 	    if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT)
 		config->config.bindToTextureTargets |= GLX_TEXTURE_RECTANGLE_BIT_EXT;
 	    break;	
+	case __DRI_ATTRIB_FLOAT_MODE:
+	    config->config.floatMode = (value ? GL_TRUE : GL_FALSE);
+	    break;
+
 	default:
 	    setScalar(&config->config, attrib, value);
 	    break;
commit 4212599c922373a224d2235c74672a3a3aa8e0b1
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Fri Aug 8 12:17:58 2008 +0200

    EXA: Make sure damage tracking code is inactive if the driver manages pixmaps.
    
    It was always supposed to be like that... It was only recently pointed out (in
    a rather convoluted way) that it was not in fact the case.

diff --git a/exa/exa.c b/exa/exa.c
index b8294bb..c276d9a 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -159,7 +159,7 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
     RegionPtr pDamageReg;
     RegionRec region;
 
-    if (!pExaPixmap)
+    if (!pExaPixmap || !pExaPixmap->pDamage)
 	return;
 	
     box.x1 = max(x1, 0);
@@ -334,6 +334,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
                                        paddedWidth, NULL);
         pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
         pExaPixmap->fb_ptr = NULL;
+        pExaPixmap->pDamage = NULL;
     } else {
         pExaPixmap->driverPriv = NULL;
         /* Scratch pixmaps may have w/h equal to zero, and may not be
@@ -358,21 +359,22 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
 	     fbDestroyPixmap(pPixmap);
 	     return NULL;
         }
-    }
- 
-    pExaPixmap->area = NULL;
 
-    /* Set up damage tracking */
-    pExaPixmap->pDamage = DamageCreate (ExaDamageReport, NULL, DamageReportRawRegion, TRUE,
-					pScreen, pPixmap);
+	/* Set up damage tracking */
+	pExaPixmap->pDamage = DamageCreate (ExaDamageReport, NULL,
+					    DamageReportRawRegion, TRUE,
+					    pScreen, pPixmap);
 
-    if (pExaPixmap->pDamage == NULL) {
-	fbDestroyPixmap (pPixmap);
-	return NULL;
-    }
+	if (pExaPixmap->pDamage == NULL) {
+	    fbDestroyPixmap (pPixmap);
+	    return NULL;
+	}
 
-    DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
-    DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
+	DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
+	DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
+    }
+ 
+    pExaPixmap->area = NULL;
 
     /* None of the pixmap bits are valid initially */
     REGION_NULL(pScreen, &pExaPixmap->validSys);
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 48af459..8ac21b8 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -144,7 +144,6 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
     ExaScreenPriv (pDrawable->pScreen);
     PixmapPtr pPix = exaGetDrawablePixmap (pDrawable);
     ExaPixmapPriv(pPix);
-    ExaMigrationRec pixmaps[1];
     RegionPtr pClip;
     BoxPtr pbox;
     int nbox;
@@ -166,11 +165,16 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
     if (pExaScr->swappedOut)
 	return FALSE;
 
-    pixmaps[0].as_dst = TRUE;
-    pixmaps[0].as_src = FALSE;
-    pixmaps[0].pPix = pPix;
-    pixmaps[0].pReg = DamagePendingRegion(pExaPixmap->pDamage);
-    exaDoMigration (pixmaps, 1, TRUE);
+    if (pExaPixmap->pDamage) {
+	ExaMigrationRec pixmaps[1];
+
+ 	pixmaps[0].as_dst = TRUE;
+	pixmaps[0].as_src = FALSE;
+	pixmaps[0].pPix = pPix;
+	pixmaps[0].pReg = DamagePendingRegion(pExaPixmap->pDamage);
+
+	exaDoMigration (pixmaps, 1, TRUE);
+    }
 
     pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
 
@@ -297,14 +301,19 @@ exaShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int format,
 		   .x2 = pDrawable->x + dx + sw, .y2 = pDrawable->y + dy + sh };
     RegionRec region;
     int xoff, yoff;
-    RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
+    RegionPtr pending_damage = NULL;
 
-    REGION_INIT(pScreen, &region, &box, 1);
+    if (pExaPixmap->pDamage)
+	pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
 
-    exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
+    if (pending_damage) {
+	REGION_INIT(pScreen, &region, &box, 1);
 
-    REGION_TRANSLATE(pScreen, &region, xoff, yoff);
-    REGION_UNION(pScreen, pending_damage, pending_damage, &region);
+	exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
+
+	REGION_TRANSLATE(pScreen, &region, xoff, yoff);
+	REGION_UNION(pScreen, pending_damage, pending_damage, &region);
+    }
 
     if (!exaDoShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh,
 			  dx, dy, data)) {
@@ -318,10 +327,12 @@ exaShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int format,
 	exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
     }
 
-    REGION_TRANSLATE(pScreen, &region, -xoff, -yoff);
-    DamageDamageRegion(pDrawable, &region);
+    if (pending_damage) {
+	REGION_TRANSLATE(pScreen, &region, -xoff, -yoff);
+	DamageDamageRegion(pDrawable, &region);
 
-    REGION_UNINIT(pScreen, &region);
+	REGION_UNINIT(pScreen, &region);
+    }
 }
 
 ShmFuncs exaShmFuncs = { NULL, exaShmPutImage };
@@ -968,16 +979,23 @@ exaImageGlyphBlt (DrawablePtr	pDrawable,
     FbBits	    depthMask;
     PixmapPtr	    pPixmap = exaGetDrawablePixmap(pDrawable);
     ExaPixmapPriv(pPixmap);
-    RegionPtr	    pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
-    BoxRec	    extents = *REGION_EXTENTS(pScreen, pending_damage);
+    RegionPtr	    pending_damage = NULL;
+    BoxRec	    extents;
     int		    xoff, yoff;
 
-    if (extents.x1 >= extents.x2 || extents.y1 >= extents.y2)
-	return;
+    if (pExaPixmap->pDamage)
+	pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
 
-    depthMask = FbFullMask(pDrawable->depth);
+    if (pending_damage) {
+	extents = *REGION_EXTENTS(pScreen, pending_damage);
+
+	if (extents.x1 >= extents.x2 || extents.y1 >= extents.y2)
+	    return;
+
+	depthMask = FbFullMask(pDrawable->depth);
+    }
 
-    if ((pGC->planemask & depthMask) != depthMask)
+    if (!pending_damage || (pGC->planemask & depthMask) != depthMask)
     {
 	ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
 	return;
diff --git a/exa/exa_render.c b/exa/exa_render.c
index b480c6d..7042285 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -466,65 +466,67 @@ exaCompositeRects(CARD8	              op,
 {
     PixmapPtr pPixmap = exaGetDrawablePixmap(pDst->pDrawable);
     ExaPixmapPriv(pPixmap);
-    
-    int xoff, yoff;
-    int x1 = MAXSHORT;
-    int y1 = MAXSHORT;
-    int x2 = MINSHORT;
-    int y2 = MINSHORT;
     RegionRec region;
-    RegionPtr pending_damage;
-    BoxRec box;
     int n;
     ExaCompositeRectPtr r;
     
-    /* We have to manage the damage ourselves, since CompositeRects isn't
-     * something in the screen that can be managed by the damage extension,
-     * and EXA depends on damage to track what needs to be migrated between
-     * offscreen and onscreen.
-     */
+    if (pExaPixmap->pDamage) {
+	int xoff, yoff;
+	int x1 = MAXSHORT;
+	int y1 = MAXSHORT;
+	int x2 = MINSHORT;
+	int y2 = MINSHORT;
+	RegionPtr pending_damage;
+	BoxRec box;
+    
+	/* We have to manage the damage ourselves, since CompositeRects isn't
+	 * something in the screen that can be managed by the damage extension,
+	 * and EXA depends on damage to track what needs to be migrated between
+	 * offscreen and onscreen.
+	 */
 
-    /* Compute the overall extents of the composited region - we're making
-     * the assumption here that we are compositing a bunch of glyphs that
-     * cluster closely together and damaging each glyph individually would
-     * be a loss compared to damaging the bounding box.
-     */
-    n = nrect;
-    r = rects;
-    while (n--) {
-	int rect_x2 = r->xDst + r->width;
-	int rect_y2 = r->yDst + r->width;
-
-	if (r->xDst < x1) x1 = r->xDst;
-	if (r->xDst < y1) y1 = r->xDst;
-	if (rect_x2 > x2) x2 = rect_x2;
-	if (rect_y2 > y2) y2 = rect_y2;
-	
-	r++;
-    }
+	/* Compute the overall extents of the composited region - we're making
+	 * the assumption here that we are compositing a bunch of glyphs that
+	 * cluster closely together and damaging each glyph individually would
+	 * be a loss compared to damaging the bounding box.
+	 */
+	n = nrect;
+	r = rects;
+	while (n--) {
+	    int rect_x2 = r->xDst + r->width;
+	    int rect_y2 = r->yDst + r->width;
 
-    if (x2 <= x1 && y2 <= y1)
-	return;
+	    if (r->xDst < x1) x1 = r->xDst;
+	    if (r->xDst < y1) y1 = r->xDst;
+	    if (rect_x2 > x2) x2 = rect_x2;
+	    if (rect_y2 > y2) y2 = rect_y2;
 
-    box.x1 = x1;
-    box.x2 = x2 < MAXSHORT ? x2 : MAXSHORT;
-    box.y1 = y1;
-    box.y2 = y2 < MAXSHORT ? y2 : MAXSHORT;
-    
-    /* The pixmap migration code relies on pendingDamage indicating
-     * the bounds of the current rendering, so we need to force 
-     * the actual damage into that region before we do anything, and
-     * (see use of DamagePendingRegion in exaCopyDirty)
-     */
-    
-    REGION_INIT(pScreen, &region, &box, 1);
+	    r++;
+	}
+
+	if (x2 <= x1 && y2 <= y1)
+	    return;
+
+	box.x1 = x1;
+	box.x2 = x2 < MAXSHORT ? x2 : MAXSHORT;
+	box.y1 = y1;
+	box.y2 = y2 < MAXSHORT ? y2 : MAXSHORT;
+
+ 	/* The pixmap migration code relies on pendingDamage indicating
+	 * the bounds of the current rendering, so we need to force 
+	 * the actual damage into that region before we do anything, and
+	 * (see use of DamagePendingRegion in exaCopyDirty)
+	 */
+
+	REGION_INIT(pScreen, &region, &box, 1);
     
-    exaGetDrawableDeltas(pDst->pDrawable, pPixmap, &xoff, &yoff);
+	exaGetDrawableDeltas(pDst->pDrawable, pPixmap, &xoff, &yoff);
 
-    REGION_TRANSLATE(pScreen, &region, xoff, yoff);
-    pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
-    REGION_UNION(pScreen, pending_damage, pending_damage, &region);
-    REGION_TRANSLATE(pScreen, &region, -xoff, -yoff);
+	REGION_TRANSLATE(pScreen, &region, xoff, yoff);
+	pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
+	REGION_UNION(pScreen, pending_damage, pending_damage, &region);
+	REGION_TRANSLATE(pScreen, &region, -xoff, -yoff);
+    }
     
     /************************************************************/
     
@@ -546,14 +548,16 @@ exaCompositeRects(CARD8	              op,
     
     /************************************************************/
 
-    /* Now we have to flush the damage out from pendingDamage => damage 
-     * Calling DamageDamageRegion has that effect. (We could pass
-     * in an empty region here, but we pass in the same region we
-     * use above; the effect is the same.)
-     */
+    if (pExaPixmap->pDamage) {
+	/* Now we have to flush the damage out from pendingDamage => damage 
+	 * Calling DamageDamageRegion has that effect. (We could pass
+	 * in an empty region here, but we pass in the same region we
+	 * use above; the effect is the same.)
+	 */
 
-    DamageDamageRegion(pDst->pDrawable, &region);
-    REGION_UNINIT(pScreen, &region);
+	DamageDamageRegion(pDst->pDrawable, &region);
+	REGION_UNINIT(pScreen, &region);
+    }
 }
 
 static int
@@ -1067,23 +1071,26 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 	DrawablePtr pDraw = pDst->pDrawable;
 	PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
 	ExaPixmapPriv (pixmap);
-	RegionRec migration;
-	RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
-	int xoff, yoff;
 
-	exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
+	if (pExaPixmap->pDamage) {
+	    RegionRec migration;
+	    RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
+	    int xoff, yoff;
+
+	    exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
 
-	xoff += pDraw->x;
-	yoff += pDraw->y;
+	    xoff += pDraw->x;
+	    yoff += pDraw->y;
 
-	bounds.x1 += xoff;
-	bounds.y1 += yoff;
-	bounds.x2 += xoff;
-	bounds.y2 += yoff;
+	    bounds.x1 += xoff;
+	    bounds.y1 += yoff;
+	    bounds.x2 += xoff;
+	    bounds.y2 += yoff;
 
-	REGION_INIT(pScreen, &migration, &bounds, 1);
-	REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
-	REGION_UNINIT(pScreen, &migration);
+	    REGION_INIT(pScreen, &migration, &bounds, 1);
+	    REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
+	    REGION_UNINIT(pScreen, &migration);
+	}
 
 	exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
 
@@ -1170,23 +1177,26 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 	DrawablePtr pDraw = pDst->pDrawable;
 	PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
 	ExaPixmapPriv (pixmap);
-	RegionRec migration;
-	RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
-	int xoff, yoff;
 
-	exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
+	if (pExaPixmap->pDamage) {
+	    RegionRec migration;
+	    RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
+	    int xoff, yoff;
 
-	xoff += pDraw->x;
-	yoff += pDraw->y;
+	    exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
 
-	bounds.x1 += xoff;
-	bounds.y1 += yoff;
-	bounds.x2 += xoff;
-	bounds.y2 += yoff;
+	    xoff += pDraw->x;
+	    yoff += pDraw->y;
 
-	REGION_INIT(pScreen, &migration, &bounds, 1);
-	REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
-	REGION_UNINIT(pScreen, &migration);
+	    bounds.x1 += xoff;
+	    bounds.y1 += yoff;
+	    bounds.x2 += xoff;
+	    bounds.y2 += yoff;
+
+	    REGION_INIT(pScreen, &migration, &bounds, 1);
+	    REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
+	    REGION_UNINIT(pScreen, &migration);
+	}
 
 	exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
 	(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index ee6b98e..d5d6a30 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -104,8 +104,8 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
 			      pGC->alu))
 	exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
     else
-	exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST,
-			     DamagePendingRegion(pExaPixmap->pDamage));
+	exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pExaPixmap->pDamage ?
+			     DamagePendingRegion(pExaPixmap->pDamage) : NULL);
     fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
     exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
 }
@@ -362,23 +362,22 @@ ExaCheckComposite (CARD8      op,
 CARD32
 exaGetPixmapFirstPixel (PixmapPtr pPixmap)
 {
-    ExaScreenPriv(pPixmap->drawable.pScreen);
     CARD32 pixel;
     void *fb;
     Bool need_finish = FALSE;
     BoxRec box;
     RegionRec migration;
     ExaPixmapPriv (pPixmap);
-    Bool sys_valid = !miPointInRegion(&pExaPixmap->validSys, 0, 0,  &box);
-    Bool damaged = miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0,
-				   &box);
+    Bool sys_valid = pExaPixmap->pDamage &&
+	!miPointInRegion(&pExaPixmap->validSys, 0, 0,  &box);
+    Bool damaged = pExaPixmap->pDamage &&
+ 	miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box);
     Bool offscreen = exaPixmapIsOffscreen(pPixmap);
 
     fb = pExaPixmap->sys_ptr;
 
     /* Try to avoid framebuffer readbacks */
-    if (pExaScr->info->CreatePixmap ||
-	(!offscreen && !sys_valid && !damaged) ||
+    if ((!offscreen && !sys_valid && !damaged) ||
 	(offscreen && (!sys_valid || damaged)))
     {
 	box.x1 = 0;
commit 073116cc44859e96374cde46325df8540621d5ee
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Fri Aug 8 12:15:27 2008 +0200

    Remove commented out lines that make automake 1.9 puke.

diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 3678c19..9b2619d 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -21,9 +21,6 @@ X11_LDADD = \
 	$(top_builddir)/miext/rootless/librootless.la \
 	$(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11
 
-#	$(top_builddir)/hw/xquartz/GL/libCGLCore.la \
-#	$(top_builddir)/glx/libglx.la \
-
 X11_LDFLAGS =  \
 	-XCClinker -Objc \
 	-Wl,-u,_miDCInitialize \
commit 666781cd9b62207e45eebd3eb55a930f3a345f72
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Aug 8 01:41:28 2008 -0700

    Removed rogue #include
    (cherry picked from commit af238e99da45a4dd8d8cbb6564bb8d0a3d79d590)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index bdd075b..fb3fd54 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -33,7 +33,6 @@
 #include <dix-config.h>
 #endif
 
-#include "quartzForeground.h"
 #include "quartzCommon.h"
 
 #import "X11Application.h"
commit 4a0947bf06deacc3ae716730cfbbbeda1311bae3
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Aug 8 01:53:36 2008 -0700

    XQuartz: Disable the Xquartz AIGLX for now since it doesn't even compile any more...
    (cherry picked from commit 4545ba91e9d6ad62b6cafde3c73a672d3ded91a2)

diff --git a/configure.ac b/configure.ac
index 570a688..9d25539 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1539,8 +1539,7 @@ if test "x$XQUARTZ" = xyes; then
 	AC_DEFINE(XQUARTZ,1,[Have Quartz])
 	AC_DEFINE(ROOTLESS,1,[Build Rootless code])
 
-	DARWIN_GLX_LIBS='$(top_builddir)/hw/xquartz/GL/libCGLCore.la $(top_builddir)/glx/libglx.la'
-	DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $DARWIN_GLX_LIBS"
+	DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB"
 	AC_SUBST([DARWIN_LIBS])
 
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index be9ad1c..7bbfee5 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -9,7 +9,8 @@ AM_CPPFLAGS = \
 	-DXFree86Server \
 	-I$(top_srcdir)/miext/rootless
 
-SUBDIRS = bundle . GL xpr mach-startup doc
+# GL
+SUBDIRS = bundle . xpr mach-startup doc
 
 libXquartz_la_SOURCES = \
 	$(top_srcdir)/fb/fbcmap_mi.c \
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 9b2619d..3678c19 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -21,6 +21,9 @@ X11_LDADD = \
 	$(top_builddir)/miext/rootless/librootless.la \
 	$(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11
 
+#	$(top_builddir)/hw/xquartz/GL/libCGLCore.la \
+#	$(top_builddir)/glx/libglx.la \
+
 X11_LDFLAGS =  \
 	-XCClinker -Objc \
 	-Wl,-u,_miDCInitialize \
commit 5accc9b3ce1af539150d59b1800b66783fd3e947
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Aug 8 00:19:41 2008 -0700

    XQuartz: Re-added deprecated code fallback failsafe for keyboard layout on Leopard with some debugging spew.
    (cherry picked from commit 5854e712e9ebc210d2f8de6f5d4fb650944f314a)

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 5e7a13c..0bfb50b 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -71,6 +71,8 @@
 #include "X11/keysym.h"
 #include "keysym2ucs.h"
 
+#include <Availability.h>
+
 void QuartzXkbUpdate(DeviceIntPtr pDev);
 
 enum {
@@ -1090,6 +1092,7 @@ Bool LegalModifier(unsigned int key, DeviceIntPtr pDev)
 /* TODO: Not thread safe */
 unsigned int QuartzSystemKeymapSeed(void) {
     static unsigned int seed = 0;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
     static TISInputSourceRef last_key_layout = NULL;
     TISInputSourceRef key_layout;
 
@@ -1106,7 +1109,15 @@ unsigned int QuartzSystemKeymapSeed(void) {
     } else {
         last_key_layout = key_layout;
     }
+#else
+    static KeyboardLayoutRef last_key_layout;
+    KeyboardLayoutRef key_layout;
 
+    KLGetCurrentKeyboardLayout (&key_layout);
+    if (key_layout != last_key_layout)
+        seed++;
+    last_key_layout = key_layout;
+#endif
     return seed;
 }
 
@@ -1148,6 +1159,9 @@ static KeySym make_dead_key(KeySym in) {
 }
 
 Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+    KeyboardLayoutRef key_layout;
+#endif
     const void *chr_data = NULL;
     int num_keycodes = NUM_KEYCODES;
     UInt32 keyboard_type = 0;
@@ -1156,17 +1170,44 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
     KeySym *k;
 
     TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
-    keyboard_type = LMGetKbdType ();
+    keyboard_type = LMGetKbdType();
+
     if (currentKeyLayoutRef) {
       CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
-      if (currentKeyLayoutDataRef) chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
+      if (currentKeyLayoutDataRef)
+          chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
+    }
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+    if (chr_data == NULL) {
+        ErrorF("X11.app: Error detected in determining keyboard layout.  Please report this error at http://xquartz.macosforge.org\n");
+        ErrorF("X11.app: Debug Info: currentKeyLayoutRef=%p, chr_data=%p\n", currentKeyLayoutRef, chr_data);
+
+        KLGetCurrentKeyboardLayout (&key_layout);
+        KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
+
+        if(chr_data != NULL) {
+            ErrorF("X11.app: Fallback succeeded, but this is still a bug.  Please report the above information.\n");
+        }
     }
 
     if (chr_data == NULL) {
+        ErrorF("X11.app: Debug Info: kKLuchrData fallback failed, trying kKLKCHRData.\n", currentKeyLayoutRef, chr_data);
+        KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
+        is_uchr = 0;
+        num_keycodes = 128;
+        
+        if(chr_data != NULL) {
+            ErrorF("X11.app: Fallback succeeded, but this is still a bug.  Please report the above information.\n");
+        }
+    }
+#endif
+
+    if (chr_data == NULL) {
       ErrorF ( "Couldn't get uchr or kchr resource\n");
       return FALSE;
     }
-
+    
     /* Scan the keycode range for the Unicode character that each
        key produces in the four shift states. Then convert that to
        an X11 keysym (which may just the bit that says "this is
commit 465a9bb96e8a90e53e655b3245e22910201786d7
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Fri Aug 8 17:37:06 2008 +0930

    dix: don't try to create events if we don't have a screen. #16898
    
    A NULL screen may happen during server shutdown, when the output has been shut
    down but the devices still generate events.
    
    X.Org Bug 16898 <http://bugs.freedesktop.org/show_bug.cgi?id=16898>

diff --git a/dix/getevents.c b/dix/getevents.c
index 61252c3..718b8ff 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -814,6 +814,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
     ms = GetTimeInMillis(); /* before pointer update to help precision */
 
     /* Sanity checks. */
+    if (!scr) /* can happen during server shutdown */
+        return 0;
     if (type != MotionNotify && type != ButtonPress && type != ButtonRelease)
         return 0;
     if (type != MotionNotify && !pDev->button)
commit d684f5760f40b682a8b879641300abe689a263c5
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Fri Aug 8 14:18:01 2008 +0930

    xkb: actually initialise sli before using it.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 56be6e2..754641b 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3356,6 +3356,11 @@ _XkbSetNamedIndicator(ClientPtr client, DeviceIntPtr dev,
     if (rc != Success || !map) /* oh-oh */
         return rc;
 
+    sli = XkbFindSrvLedInfo(dev, stuff->ledClass, stuff->ledID,
+                            XkbXI_IndicatorsMask);
+    if (!sli)
+        return BadAlloc;
+
     namec = mapc = statec = 0;
     extDevReason = 0;
 
commit e00cd54c1ac57ea6e7767e90592200f343d9d08a
Author: Simon Thum <simon.thum at gmx.de>
Date:   Thu Aug 7 11:06:21 2008 +0200

    dix: remove misleading comment in ptrvelo.c
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 330ab39..2406be8 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -152,9 +152,8 @@ Expected result is a series of filters, each progressively more integrating.
 
 This allows for two strategies: Either you have one filter which is reasonable
 and is being coupled to account for fast-changing input, or you have 'one for
-every situation'. You might want to have loose coupling then, i.e. > 1.
-E.g. you could start around 1/2 of your anticipated delta t and
-scale up until several motion deltas are 'averaged'.
+every situation'. You might want to have tighter coupling then, e.g. 0.1.
+In the filter stats, you can see if a reasonable filter useage emerges.
 */
 void
 InitFilterChain(DeviceVelocityPtr s, float rdecay, float progression, int stages, int lutsize)
commit 6ca34549b89e73e3e0ec3cb7585686b880534cef
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Aug 7 16:27:57 2008 +0930

    dix: remove obsolete FIXME comment.
    
    Thanks to Simon Thum for pointing this out.

diff --git a/dix/getevents.c b/dix/getevents.c
index 5f9b8c1..61252c3 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -525,10 +525,6 @@ clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators,
 /**
  * Fills events with valuator events for pDev, as given by the other
  * parameters.
- *
- * FIXME: Need to fix ValuatorClassRec to store all the valuators as
- *        last posted, not just x and y; otherwise relative non-x/y
- *        valuators, though a very narrow use case, will be broken.
  */
 static EventList *
 getValuatorEvents(EventList *events, DeviceIntPtr pDev,
commit 2c3645581ee3f180d34e32c8016d5e4e1af4dca4
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Aug 7 11:55:10 2008 +0930

    dix: SetModifierMapping should only apply to the ClientPointer and it's SDs.

diff --git a/dix/devices.c b/dix/devices.c
index d8e37d7..7519e06 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1651,10 +1651,11 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap,
                      int numKeyPerModifier, xSetModifierMappingReply *rep)
 {
     DeviceIntPtr pDev = NULL;
+    DeviceIntPtr cp = PickKeyboard(client); /* ClientPointer keyboard */
     int rc, i = 0, inputMapLen = numKeyPerModifier * 8;
 
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
-        if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) {
+        if (pDev == cp || (!pDev->isMaster && (pDev->u.master == cp) && pDev->key)) {
             for (i = 0; i < inputMapLen; i++) {
                 /* Check that all the new modifiers fall within the advertised
                  * keycode range, and are okay with the DDX. */
commit e1b286d495b760cf67ddf936eca11da50fba847a
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Aug 6 09:42:32 2008 +0200

    dix: simplified debugging helper for pointer acceleration
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 56ce71b..330ab39 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -77,6 +77,15 @@ SimpleSmoothProfile(DeviceVelocityPtr pVel, float velocity,
                     float threshold, float acc);
 
 
+
+/*#define PTRACCEL_DEBUGGING*/
+
+#ifdef PTRACCEL_DEBUGGING
+#define DebugAccelF ErrorF
+#else
+#define DebugAccelF(...) /* */
+#endif
+
 /********************************
  *  Init/Uninit etc
  *******************************/
@@ -276,15 +285,13 @@ QueryFilterChain(
 	    result = cur;
 	    rfn = fn + 1; /*remember result determining filter */
 	} else if(cfn == -1){
-	    cfn = fn; /* rememeber first mismatching filter */
+	    cfn = fn; /* remember first mismatching filter */
 	}
     }
 
     s->statistics.filter_usecount[rfn]++;
-#ifdef PTRACCEL_DEBUGGING
-    ErrorF("(dix ptraccel) result from stage %i,  input %.2f, output %.2f\n",
+    DebugAccelF("(dix ptracc) result from stage %i,  input %.2f, output %.2f\n",
            rfn, value, result);
-#endif
 
     /* override first mismatching current (coupling) so the filter
      * catches up quickly. */
@@ -347,9 +354,7 @@ ProcessVelocityData(
         dy += s->last_dy;
         diff += s->last_diff;
         s->last_diff = time - s->lrm_time; /* prevent repeating add-up */
-#ifdef PTRACCEL_DEBUGGING
-        ErrorF("(dix ptracc) axial correction\n");
-#endif
+        DebugAccelF("(dix ptracc) axial correction\n");
     }else{
         s->last_diff = diff;
     }
@@ -387,9 +392,7 @@ ProcessVelocityData(
 	StuffFilterChain(s, cvelocity);
 	s->velocity = s->last_velocity = cvelocity;
 	s->last_reset = TRUE;
-#ifdef PTRACCEL_DEBUGGING
-        ErrorF("(dix ptracc) non-visible state reset\n");
-#endif
+	DebugAccelF("(dix ptracc) non-visible state reset\n");
 	return TRUE;
     }
 
@@ -401,9 +404,7 @@ ProcessVelocityData(
 	 * stuff that into the filter chain.
 	 */
 	s->last_reset = FALSE;
-#ifdef PTRACCEL_DEBUGGING
-        ErrorF("(dix ptracc) after-reset vel:%.3f\n", cvelocity);
-#endif
+	DebugAccelF("(dix ptracc) after-reset vel:%.3f\n", cvelocity);
 	StuffFilterChain(s, cvelocity);
 	s->velocity = cvelocity;
 	return FALSE;
@@ -415,12 +416,13 @@ ProcessVelocityData(
     /* perform coupling and decide final value */
     s->velocity = QueryFilterChain(s, cvelocity);
 
-#ifdef PTRACCEL_DEBUGGING
-    ErrorF("(dix ptracc) guess: vel=%.3f diff=%d   |%i|%i|%i|%i|\n",
+    DebugAccelF("(dix ptracc) guess: vel=%.3f diff=%d   %i|%i|%i|%i|%i|%i|%i|%i|%i\n",
            s->velocity, diff,
            s->statistics.filter_usecount[0], s->statistics.filter_usecount[1],
-           s->statistics.filter_usecount[2], s->statistics.filter_usecount[3]);
-#endif
+           s->statistics.filter_usecount[2], s->statistics.filter_usecount[3],
+           s->statistics.filter_usecount[4], s->statistics.filter_usecount[5],
+           s->statistics.filter_usecount[6], s->statistics.filter_usecount[7],
+           s->statistics.filter_usecount[8]);
     return FALSE;
 }
 
@@ -494,9 +496,7 @@ ComputeAcceleration(
     float res;
 
     if(vel->last_reset){
-#ifdef PTRACCEL_DEBUGGING
-        ErrorF("(dix ptracc) profile skipped\n");
-#endif
+	DebugAccelF("(dix ptracc) profile skipped\n");
         /*
          * This is intended to override the first estimate of a stroke,
          * which is too low (see ProcessVelocityData). 1 should make sure
@@ -516,17 +516,13 @@ ComputeAcceleration(
 	                   (vel->last_velocity + vel->velocity) / 2,
 	                   threshold, acc);
 	res /= 6.0f;
-#ifdef PTRACCEL_DEBUGGING
-        ErrorF("(dix ptracc) profile average [%.2f ... %.2f] is %.3f\n",
-               vel->velocity, vel->last_velocity, res);
-#endif
+	DebugAccelF("(dix ptracc) profile average [%.2f ... %.2f] is %.3f\n",
+	            vel->velocity, vel->last_velocity, res);
         return res;
     }else{
 	res = BasicComputeAcceleration(vel, vel->velocity, threshold, acc);
-#ifdef PTRACCEL_DEBUGGING
-        ErrorF("(dix ptracc) profile sample [%.2f] is %.3f\n",
+	DebugAccelF("(dix ptracc) profile sample [%.2f] is %.3f\n",
                vel->velocity, res);
-#endif
 	return res;
     }
 }
commit d95136e1510a48cc3ad066d880d56061fc6a42ee
Author: Simon Thum <simon.thum at gmx.de>
Date:   Thu Jul 31 00:39:03 2008 +0200

    xf86: don't replicate dix defaults for pointer acceleration
    
    the defaults from InitVelocityData() or hypothetic driver-side changes
    are now respected, not overridden.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 4ef7530..a8c9166 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -101,12 +101,9 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
     if(!s)
         return;
 
-    tempf = xf86SetRealOption(list, "FilterHalflife", 20);
-    xf86Msg(X_CONFIG, "%s: (accel) filter halflife %.1f ms\n", devname, tempf);
+    tempf = xf86SetRealOption(list, "FilterHalflife", -1);
     if(tempf > 0)
         tempf = 1.0 / tempf;   /* set reciprocal if possible */
-    else
-        tempf = 10000;   /* else set fairly high */
 
     tempf2 = xf86SetRealOption(list, "FilterChainProgression", 2.0);
     xf86Msg(X_CONFIG, "%s: (accel) filter chain progression: %.2f\n",
@@ -118,7 +115,9 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
     if(tempi < 1 || tempi > MAX_VELOCITY_FILTERS)
 	tempi = 1;
 
-    InitFilterChain(s, tempf, tempf2, tempi, 40);
+    if(tempf > 0.0f && tempi >= 1 && tempf2 >= 1.0f)
+	InitFilterChain(s, tempf, tempf2, tempi, 40);
+
     for(i = 0; i < tempi; i++)
 	xf86Msg(X_CONFIG, "%s: (accel) filter stage %i: %.2f ms\n",
                 devname, i, 1.0f / (s->filters[i].rdecay));
@@ -138,10 +137,12 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
         s->min_acceleration = 1.0 / tempf;   /* set minimum acceleration */
     }
 
-    tempf = xf86SetRealOption(list, "VelocityCoupling", 0.25);
-    xf86Msg(X_CONFIG, "%s: (accel) velocity coupling is %.1f%%\n", devname,
+    tempf = xf86SetRealOption(list, "VelocityCoupling", -1);
+    if(tempf >= 0){
+	xf86Msg(X_CONFIG, "%s: (accel) velocity coupling is %.1f%%\n", devname,
                 tempf*100.0);
-    s->coupling = tempf;
+	s->coupling = tempf;
+    }
 
     /*  Configure softening. If const deceleration is used, this is expected
      *  to provide better subpixel information so we enable
@@ -150,19 +151,22 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
     s->use_softening = xf86SetBoolOption(list, "Softening",
                                          s->const_acceleration == 1.0);
 
-    s->average_accel = xf86SetBoolOption(list, "AccelerationProfileAveraging", TRUE);
+    s->average_accel = xf86SetBoolOption(list, "AccelerationProfileAveraging",
+                                         s->average_accel);
 
-    s->reset_time = xf86SetIntOption(list, "VelocityReset", 300);
+    s->reset_time = xf86SetIntOption(list, "VelocityReset", s->reset_time);
 
     tempf = xf86SetRealOption(list, "ExpectedRate", 0);
     if(tempf > 0){
         s->corr_mul = 1000.0 / tempf;
     }else{
-        s->corr_mul = xf86SetRealOption(list, "VelocityScale", 10);
+        s->corr_mul = xf86SetRealOption(list, "VelocityScale", s->corr_mul);
     }
 
     /* select profile by number */
-    tempi= xf86SetIntOption(list, "AccelerationProfile", 0);
+    tempi= xf86SetIntOption(list, "AccelerationProfile",
+                            s->statistics.profile_number);
+
     if(SetAccelerationProfile(s, tempi)){
         xf86Msg(X_CONFIG, "%s: (accel) set acceleration profile %i\n", devname, tempi);
     }else{
commit 4f333d53510b82db57cfac1bfea22422cbb7be79
Author: Simon Thum <simon.thum at gmx.de>
Date:   Thu Jul 31 00:33:38 2008 +0200

    dix: simplify velocity tracking filters
    
    prefer fp-mul over fp-div and remove rather pointless check
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 64b1c35..56ce71b 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -272,8 +272,7 @@ QueryFilterChain(
 	    break;
 	cur = s->filters[fn].current;
 
-	if (fabs(value - cur) <= 1.0f ||
-	    fabs(value - cur) / (value + cur) <= s->coupling){
+	if (fabs(value - cur) <= (s->coupling * (value + cur))){
 	    result = cur;
 	    rfn = fn + 1; /*remember result determining filter */
 	} else if(cfn == -1){
commit bf084a0769eee36ff799e5e5f2d1e875c1ebcc51
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Aug 6 13:36:43 2008 -0700

    glcontextmodes.[hc] were not added with the removal of the meas symlinks patch.  Copied from mesa head 2008.08.06.
    (cherry picked from commit 409e1dd1e9524b5c1a1ae58a759da77e587e3780)

diff --git a/glx/Makefile.am b/glx/Makefile.am
index 4f723ac..edcf391 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -89,3 +89,6 @@ libglx_la_SOURCES = \
         swap_interval.c \
         unpack.h \
         xfont.c
+
+EXTRA_DIST = glcontextmodes.h \
+	     glcontextmodes.c 
diff --git a/glx/glcontextmodes.c b/glx/glcontextmodes.c
new file mode 100644
index 0000000..326c8b2
--- /dev/null
+++ b/glx/glcontextmodes.c
@@ -0,0 +1,550 @@
+/*
+ * (C) Copyright IBM Corporation 2003
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file glcontextmodes.c
+ * Utility routines for working with \c __GLcontextModes structures.  At
+ * some point most or all of these functions will be moved to the Mesa
+ * code base.
+ *
+ * \author Ian Romanick <idr at us.ibm.com>
+ */
+
+#if defined(IN_MINI_GLX)
+#include <GL/gl.h>
+#else
+#if defined(HAVE_DIX_CONFIG_H)
+# include <dix-config.h>
+#endif
+#include <X11/X.h>
+#include <GL/glx.h>
+#include "GL/glxint.h"
+#endif
+
+/* Memory macros */
+#if defined(IN_MINI_GLX)
+# include <stdlib.h>
+# include <string.h>
+# define _mesa_malloc(b) malloc(b)
+# define _mesa_free(m) free(m)
+# define _mesa_memset  memset
+#else
+# ifdef XFree86Server
+# include <os.h>
+# include <string.h>
+#  define _mesa_malloc(b) xalloc(b)
+#  define _mesa_free(m)   xfree(m)
+#  define _mesa_memset   memset
+# else
+#  include <X11/Xlibint.h>
+#  define _mesa_memset memset
+#  define _mesa_malloc(b) Xmalloc(b)
+#  define _mesa_free(m) Xfree(m)
+# endif /* XFree86Server */
+#endif /* !defined(IN_MINI_GLX) */
+
+#include "glcontextmodes.h"
+
+#if !defined(IN_MINI_GLX)
+#define NUM_VISUAL_TYPES   6
+
+/**
+ * Convert an X visual type to a GLX visual type.
+ * 
+ * \param visualType X visual type (i.e., \c TrueColor, \c StaticGray, etc.)
+ *        to be converted.
+ * \return If \c visualType is a valid X visual type, a GLX visual type will
+ *         be returned.  Otherwise \c GLX_NONE will be returned.
+ */
+GLint
+_gl_convert_from_x_visual_type( int visualType )
+{
+    static const int glx_visual_types[ NUM_VISUAL_TYPES ] = {
+	GLX_STATIC_GRAY,  GLX_GRAY_SCALE,
+	GLX_STATIC_COLOR, GLX_PSEUDO_COLOR,
+	GLX_TRUE_COLOR,   GLX_DIRECT_COLOR
+    };
+
+    return ( (unsigned) visualType < NUM_VISUAL_TYPES )
+	? glx_visual_types[ visualType ] : GLX_NONE;
+}
+
+
+/**
+ * Convert a GLX visual type to an X visual type.
+ * 
+ * \param visualType GLX visual type (i.e., \c GLX_TRUE_COLOR, 
+ *                   \c GLX_STATIC_GRAY, etc.) to be converted.
+ * \return If \c visualType is a valid GLX visual type, an X visual type will
+ *         be returned.  Otherwise -1 will be returned.
+ */
+GLint
+_gl_convert_to_x_visual_type( int visualType )
+{
+    static const int x_visual_types[ NUM_VISUAL_TYPES ] = {
+	TrueColor,   DirectColor,
+	PseudoColor, StaticColor,
+	GrayScale,   StaticGray
+    };
+
+    return ( (unsigned) (visualType - GLX_TRUE_COLOR) < NUM_VISUAL_TYPES )
+	? x_visual_types[ visualType - GLX_TRUE_COLOR ] : -1;
+}
+
+
+/**
+ * Copy a GLX visual config structure to a GL context mode structure.  All
+ * of the fields in \c config are copied to \c mode.  Additional fields in
+ * \c mode that can be derrived from the fields of \c config (i.e.,
+ * \c haveDepthBuffer) are also filled in.  The remaining fields in \c mode
+ * that cannot be derived are set to default values.
+ * 
+ * \param mode   Destination GL context mode.
+ * \param config Source GLX visual config.
+ * 
+ * \note
+ * The \c fbconfigID and \c visualID fields of the \c __GLcontextModes
+ * structure will be set to the \c vid of the \c __GLXvisualConfig structure.
+ */
+void
+_gl_copy_visual_to_context_mode( __GLcontextModes * mode,
+				 const __GLXvisualConfig * config )
+{
+    __GLcontextModes * const next = mode->next;
+
+    (void) _mesa_memset( mode, 0, sizeof( __GLcontextModes ) );
+    mode->next = next;
+
+    mode->visualID = config->vid;
+    mode->visualType = _gl_convert_from_x_visual_type( config->class );
+    mode->xRenderable = GL_TRUE;
+    mode->fbconfigID = config->vid;
+    mode->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT;
+
+    mode->rgbMode = (config->rgba != 0);
+    mode->renderType = (mode->rgbMode) ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT;
+
+    mode->colorIndexMode = !(mode->rgbMode);
+    mode->doubleBufferMode = (config->doubleBuffer != 0);
+    mode->stereoMode = (config->stereo != 0);
+
+    mode->haveAccumBuffer = ((config->accumRedSize +
+			      config->accumGreenSize +
+			      config->accumBlueSize +
+			      config->accumAlphaSize) > 0);
+    mode->haveDepthBuffer = (config->depthSize > 0);
+    mode->haveStencilBuffer = (config->stencilSize > 0);
+
+    mode->redBits = config->redSize;
+    mode->greenBits = config->greenSize;
+    mode->blueBits = config->blueSize;
+    mode->alphaBits = config->alphaSize;
+    mode->redMask = config->redMask;
+    mode->greenMask = config->greenMask;
+    mode->blueMask = config->blueMask;
+    mode->alphaMask = config->alphaMask;
+    mode->rgbBits = mode->rgbMode ? config->bufferSize : 0;
+    mode->indexBits = mode->colorIndexMode ? config->bufferSize : 0;
+
+    mode->accumRedBits = config->accumRedSize;
+    mode->accumGreenBits = config->accumGreenSize;
+    mode->accumBlueBits = config->accumBlueSize;
+    mode->accumAlphaBits = config->accumAlphaSize;
+    mode->depthBits = config->depthSize;
+    mode->stencilBits = config->stencilSize;
+
+    mode->numAuxBuffers = config->auxBuffers;
+    mode->level = config->level;
+
+    mode->visualRating = config->visualRating;
+    mode->transparentPixel = config->transparentPixel;
+    mode->transparentRed   = config->transparentRed;
+    mode->transparentGreen = config->transparentGreen;
+    mode->transparentBlue  = config->transparentBlue;
+    mode->transparentAlpha = config->transparentAlpha;
+    mode->transparentIndex = config->transparentIndex;
+    mode->samples = config->multiSampleSize;
+    mode->sampleBuffers = config->nMultiSampleBuffers;
+    /* mode->visualSelectGroup = config->visualSelectGroup; ? */
+
+    mode->swapMethod = GLX_SWAP_UNDEFINED_OML;
+
+    mode->bindToTextureRgb = (mode->rgbMode) ? GL_TRUE : GL_FALSE;
+    mode->bindToTextureRgba = (mode->rgbMode && mode->alphaBits) ?
+	GL_TRUE : GL_FALSE;
+    mode->bindToMipmapTexture = mode->rgbMode ? GL_TRUE : GL_FALSE;
+    mode->bindToTextureTargets = mode->rgbMode ?
+	GLX_TEXTURE_1D_BIT_EXT | GLX_TEXTURE_2D_BIT_EXT |
+	GLX_TEXTURE_RECTANGLE_BIT_EXT : 0;
+    mode->yInverted = GL_FALSE;
+}
+
+
+/**
+ * Get data from a GL context mode.
+ * 
+ * \param mode         GL context mode whose data is to be returned.
+ * \param attribute    Attribute of \c mode that is to be returned.
+ * \param value_return Location to store the data member of \c mode.
+ * \return  If \c attribute is a valid attribute of \c mode, zero is
+ *          returned.  Otherwise \c GLX_BAD_ATTRIBUTE is returned.
+ */
+int
+_gl_get_context_mode_data(const __GLcontextModes *mode, int attribute,
+			  int *value_return)
+{
+    switch (attribute) {
+      case GLX_USE_GL:
+	*value_return = GL_TRUE;
+	return 0;
+      case GLX_BUFFER_SIZE:
+	*value_return = mode->rgbBits;
+	return 0;
+      case GLX_RGBA:
+	*value_return = mode->rgbMode;
+	return 0;
+      case GLX_RED_SIZE:
+	*value_return = mode->redBits;
+	return 0;
+      case GLX_GREEN_SIZE:
+	*value_return = mode->greenBits;
+	return 0;
+      case GLX_BLUE_SIZE:
+	*value_return = mode->blueBits;
+	return 0;
+      case GLX_ALPHA_SIZE:
+	*value_return = mode->alphaBits;
+	return 0;
+      case GLX_DOUBLEBUFFER:
+	*value_return = mode->doubleBufferMode;
+	return 0;
+      case GLX_STEREO:
+	*value_return = mode->stereoMode;
+	return 0;
+      case GLX_AUX_BUFFERS:
+	*value_return = mode->numAuxBuffers;
+	return 0;
+      case GLX_DEPTH_SIZE:
+	*value_return = mode->depthBits;
+	return 0;
+      case GLX_STENCIL_SIZE:
+	*value_return = mode->stencilBits;
+	return 0;
+      case GLX_ACCUM_RED_SIZE:
+	*value_return = mode->accumRedBits;
+	return 0;
+      case GLX_ACCUM_GREEN_SIZE:
+	*value_return = mode->accumGreenBits;
+	return 0;
+      case GLX_ACCUM_BLUE_SIZE:
+	*value_return = mode->accumBlueBits;
+	return 0;
+      case GLX_ACCUM_ALPHA_SIZE:
+	*value_return = mode->accumAlphaBits;
+	return 0;
+      case GLX_LEVEL:
+	*value_return = mode->level;
+	return 0;
+      case GLX_TRANSPARENT_TYPE_EXT:
+	*value_return = mode->transparentPixel;
+	return 0;
+      case GLX_TRANSPARENT_RED_VALUE:
+	*value_return = mode->transparentRed;
+	return 0;
+      case GLX_TRANSPARENT_GREEN_VALUE:
+	*value_return = mode->transparentGreen;
+	return 0;
+      case GLX_TRANSPARENT_BLUE_VALUE:
+	*value_return = mode->transparentBlue;
+	return 0;
+      case GLX_TRANSPARENT_ALPHA_VALUE:
+	*value_return = mode->transparentAlpha;
+	return 0;
+      case GLX_TRANSPARENT_INDEX_VALUE:
+	*value_return = mode->transparentIndex;
+	return 0;
+      case GLX_X_VISUAL_TYPE:
+	*value_return = mode->visualType;
+	return 0;
+      case GLX_CONFIG_CAVEAT:
+	*value_return = mode->visualRating;
+	return 0;
+      case GLX_VISUAL_ID:
+	*value_return = mode->visualID;
+	return 0;
+      case GLX_DRAWABLE_TYPE:
+	*value_return = mode->drawableType;
+	return 0;
+      case GLX_RENDER_TYPE:
+	*value_return = mode->renderType;
+	return 0;
+      case GLX_X_RENDERABLE:
+	*value_return = mode->xRenderable;
+	return 0;
+      case GLX_FBCONFIG_ID:
+	*value_return = mode->fbconfigID;
+	return 0;
+      case GLX_MAX_PBUFFER_WIDTH:
+	*value_return = mode->maxPbufferWidth;
+	return 0;
+      case GLX_MAX_PBUFFER_HEIGHT:
+	*value_return = mode->maxPbufferHeight;
+	return 0;
+      case GLX_MAX_PBUFFER_PIXELS:
+	*value_return = mode->maxPbufferPixels;
+	return 0;
+      case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX:
+	*value_return = mode->optimalPbufferWidth;
+	return 0;
+      case GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX:
+	*value_return = mode->optimalPbufferHeight;
+	return 0;
+      case GLX_SWAP_METHOD_OML:
+	*value_return = mode->swapMethod;
+	return 0;
+      case GLX_SAMPLE_BUFFERS_SGIS:
+	*value_return = mode->sampleBuffers;
+	return 0;
+      case GLX_SAMPLES_SGIS:
+	*value_return = mode->samples;
+	return 0;
+      case GLX_BIND_TO_TEXTURE_RGB_EXT:
+	*value_return = mode->bindToTextureRgb;
+	return 0;
+      case GLX_BIND_TO_TEXTURE_RGBA_EXT:
+	*value_return = mode->bindToTextureRgba;
+	return 0;
+      case GLX_BIND_TO_MIPMAP_TEXTURE_EXT:
+	*value_return = mode->bindToMipmapTexture == GL_TRUE ? GL_TRUE :
+	    GL_FALSE;
+	return 0;
+      case GLX_BIND_TO_TEXTURE_TARGETS_EXT:
+	*value_return = mode->bindToTextureTargets;
+	return 0;
+      case GLX_Y_INVERTED_EXT:
+	*value_return = mode->yInverted;
+	return 0;
+
+      /* Applications are NOT allowed to query GLX_VISUAL_SELECT_GROUP_SGIX.
+       * It is ONLY for communication between the GLX client and the GLX
+       * server.
+       */
+      case GLX_VISUAL_SELECT_GROUP_SGIX:
+      default:
+	return GLX_BAD_ATTRIBUTE;
+    }
+}
+#endif /* !defined(IN_MINI_GLX) */
+
+
+/**
+ * Allocate a linked list of \c __GLcontextModes structures.  The fields of
+ * each structure will be initialized to "reasonable" default values.  In
+ * most cases this is the default value defined by table 3.4 of the GLX
+ * 1.3 specification.  This means that most values are either initialized to
+ * zero or \c GLX_DONT_CARE (which is -1).  As support for additional
+ * extensions is added, the new values will be initialized to appropriate
+ * values from the extension specification.
+ * 
+ * \param count         Number of structures to allocate.
+ * \param minimum_size  Minimum size of a structure to allocate.  This allows
+ *                      for differences in the version of the
+ *                      \c __GLcontextModes stucture used in libGL and in a
+ *                      DRI-based driver.
+ * \returns A pointer to the first element in a linked list of \c count
+ *          stuctures on success, or \c NULL on failure.
+ * 
+ * \warning Use of \c minimum_size does \b not guarantee binary compatibility.
+ *          The fundamental assumption is that if the \c minimum_size
+ *          specified by the driver and the size of the \c __GLcontextModes
+ *          structure in libGL is the same, then the meaning of each byte in
+ *          the structure is the same in both places.  \b Be \b careful!
+ *          Basically this means that fields have to be added in libGL and
+ *          then propagated to drivers.  Drivers should \b never arbitrarilly
+ *          extend the \c __GLcontextModes data-structure.
+ */
+__GLcontextModes *
+_gl_context_modes_create( unsigned count, size_t minimum_size )
+{
+   const size_t size = (minimum_size > sizeof( __GLcontextModes ))
+       ? minimum_size : sizeof( __GLcontextModes );
+   __GLcontextModes * base = NULL;
+   __GLcontextModes ** next;
+   unsigned   i;
+
+   next = & base;
+   for ( i = 0 ; i < count ; i++ ) {
+      *next = (__GLcontextModes *) _mesa_malloc( size );
+      if ( *next == NULL ) {
+	 _gl_context_modes_destroy( base );
+	 base = NULL;
+	 break;
+      }
+      
+      (void) _mesa_memset( *next, 0, size );
+      (*next)->visualID = GLX_DONT_CARE;
+      (*next)->visualType = GLX_DONT_CARE;
+      (*next)->visualRating = GLX_NONE;
+      (*next)->transparentPixel = GLX_NONE;
+      (*next)->transparentRed = GLX_DONT_CARE;
+      (*next)->transparentGreen = GLX_DONT_CARE;
+      (*next)->transparentBlue = GLX_DONT_CARE;
+      (*next)->transparentAlpha = GLX_DONT_CARE;
+      (*next)->transparentIndex = GLX_DONT_CARE;
+      (*next)->xRenderable = GLX_DONT_CARE;
+      (*next)->fbconfigID = GLX_DONT_CARE;
+      (*next)->swapMethod = GLX_SWAP_UNDEFINED_OML;
+      (*next)->bindToTextureRgb = GLX_DONT_CARE;
+      (*next)->bindToTextureRgba = GLX_DONT_CARE;
+      (*next)->bindToMipmapTexture = GLX_DONT_CARE;
+      (*next)->bindToTextureTargets = GLX_DONT_CARE;
+      (*next)->yInverted = GLX_DONT_CARE;
+
+      next = & ((*next)->next);
+   }
+
+   return base;
+}
+
+
+/**
+ * Destroy a linked list of \c __GLcontextModes structures created by
+ * \c _gl_context_modes_create.
+ * 
+ * \param modes  Linked list of structures to be destroyed.  All structres
+ *               in the list will be freed.
+ */
+void
+_gl_context_modes_destroy( __GLcontextModes * modes )
+{
+   while ( modes != NULL ) {
+      __GLcontextModes * const next = modes->next;
+
+      _mesa_free( modes );
+      modes = next;
+   }
+}
+
+
+/**
+ * Find a context mode matching a Visual ID.
+ *
+ * \param modes  List list of context-mode structures to be searched.
+ * \param vid    Visual ID to be found.
+ * \returns A pointer to a context-mode in \c modes if \c vid was found in
+ *          the list, or \c NULL if it was not.
+ */
+
+__GLcontextModes *
+_gl_context_modes_find_visual(__GLcontextModes *modes, int vid)
+{
+    __GLcontextModes *m;
+
+    for (m = modes; m != NULL; m = m->next)
+	if (m->visualID == vid)
+	    return m;
+
+    return NULL;
+}
+
+__GLcontextModes *
+_gl_context_modes_find_fbconfig(__GLcontextModes *modes, int fbid)
+{
+    __GLcontextModes *m;
+
+    for (m = modes; m != NULL; m = m->next)
+	if (m->fbconfigID == fbid)
+	    return m;
+
+    return NULL;
+}
+
+/**
+ * Determine if two context-modes are the same.  This is intended to be used
+ * by libGL implementations to compare to sets of driver generated FBconfigs.
+ * 
+ * \param a  Context-mode to be compared.
+ * \param b  Context-mode to be compared.
+ * \returns \c GL_TRUE if the two context-modes are the same.  \c GL_FALSE is
+ *          returned otherwise.
+ */
+GLboolean
+_gl_context_modes_are_same( const __GLcontextModes * a,
+			    const __GLcontextModes * b )
+{
+    return( (a->rgbMode == b->rgbMode) &&
+	    (a->floatMode == b->floatMode) &&
+	    (a->colorIndexMode == b->colorIndexMode) &&
+	    (a->doubleBufferMode == b->doubleBufferMode) &&
+	    (a->stereoMode == b->stereoMode) &&
+	    (a->redBits == b->redBits) &&
+	    (a->greenBits == b->greenBits) &&
+	    (a->blueBits == b->blueBits) &&
+	    (a->alphaBits == b->alphaBits) &&
+#if 0 /* For some reason these don't get set on the client-side in libGL. */
+	    (a->redMask == b->redMask) &&
+	    (a->greenMask == b->greenMask) &&
+	    (a->blueMask == b->blueMask) &&
+	    (a->alphaMask == b->alphaMask) &&
+#endif
+	    (a->rgbBits == b->rgbBits) &&
+	    (a->indexBits == b->indexBits) &&
+	    (a->accumRedBits == b->accumRedBits) &&
+	    (a->accumGreenBits == b->accumGreenBits) &&
+	    (a->accumBlueBits == b->accumBlueBits) &&
+	    (a->accumAlphaBits == b->accumAlphaBits) &&
+	    (a->depthBits == b->depthBits) &&
+	    (a->stencilBits == b->stencilBits) &&
+	    (a->numAuxBuffers == b->numAuxBuffers) &&
+	    (a->level == b->level) &&
+	    (a->pixmapMode == b->pixmapMode) &&
+	    (a->visualRating == b->visualRating) &&
+
+	    (a->transparentPixel == b->transparentPixel) &&
+
+	    ((a->transparentPixel != GLX_TRANSPARENT_RGB) ||
+	     ((a->transparentRed == b->transparentRed) &&
+	      (a->transparentGreen == b->transparentGreen) &&
+	      (a->transparentBlue == b->transparentBlue) &&
+	      (a->transparentAlpha == b->transparentAlpha))) &&
+
+	    ((a->transparentPixel != GLX_TRANSPARENT_INDEX) || 
+	     (a->transparentIndex == b->transparentIndex)) &&
+
+	    (a->sampleBuffers == b->sampleBuffers) &&
+	    (a->samples == b->samples) &&
+	    ((a->drawableType & b->drawableType) != 0) &&
+	    (a->renderType == b->renderType) &&
+	    (a->maxPbufferWidth == b->maxPbufferWidth) &&
+	    (a->maxPbufferHeight == b->maxPbufferHeight) &&
+	    (a->maxPbufferPixels == b->maxPbufferPixels) &&
+	    (a->optimalPbufferWidth == b->optimalPbufferWidth) &&
+	    (a->optimalPbufferHeight == b->optimalPbufferHeight) &&
+	    (a->swapMethod == b->swapMethod) &&
+	    (a->bindToTextureRgb == b->bindToTextureRgb) &&
+	    (a->bindToTextureRgba == b->bindToTextureRgba) &&
+	    (a->bindToMipmapTexture == b->bindToMipmapTexture) &&
+	    (a->bindToTextureTargets == b->bindToTextureTargets) &&
+	    (a->yInverted == b->yInverted) );
+}
diff --git a/glx/glcontextmodes.h b/glx/glcontextmodes.h
new file mode 100644
index 0000000..afd09cd
--- /dev/null
+++ b/glx/glcontextmodes.h
@@ -0,0 +1,54 @@
+/*
+ * (C) Copyright IBM Corporation 2003
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+ * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file glcontextmodes.h
+ * \author Ian Romanick <idr at us.ibm.com>
+ */
+
+#ifndef GLCONTEXTMODES_H
+#define GLCONTEXTMODES_H
+
+#include "GL/internal/glcore.h"
+
+#if !defined(IN_MINI_GLX)
+extern GLint _gl_convert_from_x_visual_type( int visualType );
+extern GLint _gl_convert_to_x_visual_type( int visualType );
+extern void _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
+    const __GLXvisualConfig * config );
+extern int _gl_get_context_mode_data( const __GLcontextModes *mode,
+    int attribute, int *value_return );
+#endif /* !defined(IN_MINI_GLX) */
+
+extern __GLcontextModes * _gl_context_modes_create( unsigned count,
+    size_t minimum_size );
+extern void _gl_context_modes_destroy( __GLcontextModes * modes );
+extern  __GLcontextModes *
+    _gl_context_modes_find_visual(__GLcontextModes *modes, int vid);
+extern __GLcontextModes *
+    _gl_context_modes_find_fbconfig(__GLcontextModes *modes, int fbid);
+extern GLboolean _gl_context_modes_are_same( const __GLcontextModes * a,
+    const __GLcontextModes * b );
+
+#endif /* GLCONTEXTMODES_H */
commit e72b1d21e44712e90595b1c31e67db6786d0d1bd
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Aug 6 10:23:31 2008 -0700

    XQuartz: Now properly disable xauth checking on launchd socket and mostly fix the xinitrc / launchd race condition

diff --git a/configure.ac b/configure.ac
index 8ad331d..570a688 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1545,7 +1545,7 @@ if test "x$XQUARTZ" = xyes; then
 
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
 
-	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA -DXQUARTZ_EXPORTS_LAUNCHD_FD"
+	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA"
 fi
 
 # Support for objc in autotools is minimal and not documented.
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 9b39baa..b731c72 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -343,12 +343,16 @@ static void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, in
     }
 }
 
+#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
 int xquartz_launchd_fd = -1;
+#endif
 
 void DarwinListenOnOpenFD(int fd) {
     ErrorF("DarwinListenOnOpenFD: %d\n", fd);
     
-#if 0
+#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
+    xquartz_launchd_fd = fd;
+#else
     pthread_mutex_lock(&fd_add_lock);
     if(fd_add_count < FD_ADD_MAX)
         fd_add[fd_add_count++] = fd;
@@ -357,8 +361,6 @@ void DarwinListenOnOpenFD(int fd) {
 
     pthread_cond_broadcast(&fd_add_ready_cond);
     pthread_mutex_unlock(&fd_add_lock);
-#else
-    xquartz_launchd_fd = fd;
 #endif
 }
 
@@ -378,7 +380,7 @@ static void kXquartzListenOnOpenFDHandler(int screenNum, xEventPtr xe, DeviceInt
     
     for (i=0; i<nevents; i++) {
         ErrorF("Calling ListenOnOpenFD() for new fd: %d\n", (int)xe[i].u.clientMessage.u.l.longs0);
-        ListenOnOpenFD((int)xe[i].u.clientMessage.u.l.longs0);
+        ListenOnOpenFD((int)xe[i].u.clientMessage.u.l.longs0, 1);
     }
 }
 
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index c138fe7..21a72d9 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -161,11 +161,18 @@ static void accept_fd_handoff(int connected_fd) {
     
     launchd_fd = *((int*)CMSG_DATA(cmsg));
     
-    if(launchd_fd == -1)
+    if(launchd_fd == -1) {
         fprintf(stderr, "X11.app: Error receiving $DISPLAY file descriptor, no descriptor received? %d\n", launchd_fd);
-        
-//    fprintf(stderr, "X11.app: Received new DISPLAY fd: %d ... sleeping before handoff to server thread\n", launchd_fd);
-//    sleep(5);
+        return;
+    }
+
+#ifndef XQUARTZ_EXPORTS_LAUNCHD_FD
+    fprintf(stderr, "X11.app: Received new DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd);
+
+    /* TODO: Clean up this race better... givint xinitrc time to run. */
+    sleep(2);
+#endif
+
     fprintf(stderr, "X11.app Handing off fd to server thread via DarwinListenOnOpenFD(%d)\n", launchd_fd);
     DarwinListenOnOpenFD(launchd_fd);
 }
@@ -328,10 +335,14 @@ int main(int argc, char **argv, char **envp) {
         if(display) {
             /* Could open the display, start the launcher */
             XCloseDisplay(display);
+
+#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
+            fprintf(stderr, "X11.app: Received new DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd);
             
             /* TODO: Clean up this race better... givint xinitrc time to run. */
             sleep(2);
-            
+#endif
+
             return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
         }
     }
@@ -359,7 +370,7 @@ int main(int argc, char **argv, char **envp) {
     noPanoramiXExtension = TRUE;
     
     fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
-    for(i=1; i < argc; i++) {
+    for(i=0; i < argc; i++) {
         fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
         if(!strcmp(argv[i], "--listenonly")) {
             listenOnly = TRUE;
diff --git a/include/os.h b/include/os.h
index 7c84772..ac418ce 100644
--- a/include/os.h
+++ b/include/os.h
@@ -166,7 +166,7 @@ extern void MakeClientGrabImpervious(ClientPtr /*client*/);
 extern void MakeClientGrabPervious(ClientPtr /*client*/);
 
 #ifdef XQUARTZ
-extern void ListenOnOpenFD(int /* fd */);
+extern void ListenOnOpenFD(int /* fd */, int /* noxauth */);
 #endif
 
 extern void AvailableClientInput(ClientPtr /* client */);
diff --git a/os/connection.c b/os/connection.c
index 8e9121b..c0bdd1a 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -74,9 +74,7 @@ SOFTWARE.
 #define TRANS_SERVER
 #define TRANS_REOPEN
 #include <X11/Xtrans/Xtrans.h>
-#ifdef HAVE_LAUNCHD
 #include <X11/Xtrans/Xtransint.h>
-#endif
 #include <errno.h>
 #include <signal.h>
 #include <stdio.h>
@@ -661,23 +659,22 @@ ClientAuthorized(ClientPtr client,
     XID	 		auth_id;
     char	 	*reason = NULL;
     XtransConnInfo	trans_conn;
-#ifdef HAVE_LAUNCHD
-    struct sockaddr     *saddr;
-#endif
 
     priv = (OsCommPtr)client->osPrivate;
     trans_conn = priv->trans_conn;
 
-#ifdef HAVE_LAUNCHD
-    saddr = (struct sockaddr *) (trans_conn->addr);
-    /* Allow any client to connect without authorization on a launchd socket,
-       because it is securely created -- this prevents a race condition on launch */
-    if (saddr->sa_len > 11 && saddr->sa_family == AF_UNIX &&
-        !strncmp(saddr->sa_data, "/tmp/launch", 11)) goto done;
+/* Make it compile for now, remove this once we have a new xtrans release and are depending on it in configure.ac */
+#ifndef TRANS_NOXAUTH
+#define TRANS_NOXAUTH 0
 #endif
 
-    auth_id = CheckAuthorization (proto_n, auth_proto,
-				  string_n, auth_string, client, &reason);
+    /* Allow any client to connect without authorization on a launchd socket,
+       because it is securely created -- this prevents a race condition on launch */
+    if(trans_conn->flags | TRANS_NOXAUTH) {
+        auth_id = (XID) 0L;
+    } else {
+        auth_id = CheckAuthorization (proto_n, auth_proto, string_n, auth_string, client, &reason);
+    }
 
     if (auth_id == (XID) ~0L)
     {
@@ -725,9 +722,6 @@ ClientAuthorized(ClientPtr client,
 	}
     }
     priv->auth_id = auth_id;
-#ifdef HAVE_LAUNCHD
- done:
-#endif
     priv->conn_time = 0;
 
 #ifdef XDMCP
@@ -1269,12 +1263,17 @@ MakeClientGrabPervious(ClientPtr client)
 
 #ifdef XQUARTZ
 /* Add a fd (from launchd) to our listeners */
-_X_EXPORT void ListenOnOpenFD(int fd) {
-    char port[20];
+_X_EXPORT void ListenOnOpenFD(int fd, int noxauth) {
+    char port[256];
     XtransConnInfo ciptr;
-    
-    /* Sigh for inconsistencies. */  
-    sprintf (port, ":%d", atoi(display));
+
+    if(!strncmp(getenv("DISPLAY"), "/tmp/launch", 11)) {
+        /* Make the path the launchd socket if our DISPLAY is set right */
+        strcpy(port, getenv("DISPLAY"));
+    } else {
+        /* Just some default so things don't break and die. */
+        sprintf(port, ":%d", atoi(display));
+    }
 
     /* Make our XtransConnInfo
      * TRANS_SOCKET_LOCAL_INDEX = 5 from Xtrans.c
@@ -1285,6 +1284,9 @@ _X_EXPORT void ListenOnOpenFD(int fd) {
         return;
     }
     
+    if(noxauth)
+        ciptr->flags = ciptr->flags | TRANS_NOXAUTH;
+
     /* Allocate space to store it */
     ListenTransFds = (int *) xrealloc(ListenTransFds, (ListenTransCount + 1) * sizeof (int));
     ListenTransConns = (XtransConnInfo *) xrealloc(ListenTransConns, (ListenTransCount + 1) * sizeof (XtransConnInfo));
@@ -1299,11 +1301,11 @@ _X_EXPORT void ListenOnOpenFD(int fd) {
     /* Increment the count */
     ListenTransCount++;
 
-    /* This *might* be needed, but it seems to be working fine without it... */
-    //ResetAuthorization();
-    //ResetHosts(display);
+    /* This *might* not be needed... /shrug */
+    ResetAuthorization();
+    ResetHosts(display);
 #ifdef XDMCP
-    //XdmcpReset();
+    XdmcpReset();
 #endif
 }
 
commit d1b96cdea96f5321e0d254abde81cdaab2eca979
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Wed Aug 6 10:37:32 2008 -0700

    Add an xf86PrintBacktrace wrapper around xorg_backtrace to aid driver debugging.

diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 753fa58..cd6da59 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -205,6 +205,7 @@ void xf86InterceptSignals(int *signo);
 void xf86InterceptSigIll(void (*sigillhandler)(void));
 Bool xf86EnableVTSwitch(Bool new);
 void xf86ProcessActionEvent(ActionEvent action, void *arg);
+void xf86PrintBacktrace(void);
 
 /* xf86Helper.c */
 
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 48af2eb..ff75a7d 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -632,6 +632,16 @@ xf86SigHandler(int signo)
   FatalError("Caught signal %d.  Server aborting\n", signo);
 }
 
+/*
+ * xf86PrintBacktrace --
+ *    Print a stack backtrace for debugging purposes.
+ */
+_X_EXPORT void
+xf86PrintBacktrace(void)
+{
+    xorg_backtrace();
+}
+
 #define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
 #define ModifierDown(k) ((keyc->state & (k)) == (k))
 
commit 26d31ad1c7f4c550d73419ecf76912d844186b30
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Aug 5 15:14:08 2008 -0700

    XQuartz: Added code and made comments more helpful for debugging first-client-auth bug.
    (cherry picked from commit a8f0d32216e321b8ae6da182be9b1ea792f6e004)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index da10e20..9b39baa 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -83,12 +83,28 @@ static int old_flags = 0;  // last known modifier state
 static int fd_add[FD_ADD_MAX];
 int fd_add_count = 0;
 static pthread_mutex_t fd_add_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_cond_t fd_add_ready_cond = PTHREAD_COND_INITIALIZER;
+static pthread_t fd_add_tid = NULL;
 
 static xEvent *darwinEvents = NULL;
 
 static pthread_mutex_t mieq_lock = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t mieq_ready_cond = PTHREAD_COND_INITIALIZER;
 
+/*** Pthread Magics ***/
+static pthread_t create_thread(void *func, void *arg) {
+    pthread_attr_t attr;
+    pthread_t tid;
+
+    pthread_attr_init (&attr);
+    pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM);
+    pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+    pthread_create (&tid, &attr, func, arg);
+    pthread_attr_destroy (&attr);
+
+    return tid;
+}
+
 static inline void darwinEvents_lock(void) {
     int err;
     if((err = pthread_mutex_lock(&mieq_lock))) {
@@ -339,18 +355,21 @@ void DarwinListenOnOpenFD(int fd) {
     else
         ErrorF("FD Addition buffer at max.  Dropping fd addition request.\n");
 
+    pthread_cond_broadcast(&fd_add_ready_cond);
     pthread_mutex_unlock(&fd_add_lock);
 #else
     xquartz_launchd_fd = fd;
 #endif
 }
 
-void DarwinProcessFDAdditionQueue() {
+static void DarwinProcessFDAdditionQueue_thread(void *args) {
     pthread_mutex_lock(&fd_add_lock);
-    while(fd_add_count) {
-        DarwinSendDDXEvent(kXquartzListenOnOpenFD, 1, fd_add[--fd_add_count]);
+    while(true) {
+        while(fd_add_count) {
+            DarwinSendDDXEvent(kXquartzListenOnOpenFD, 1, fd_add[--fd_add_count]);
+        }
+        pthread_cond_wait(&fd_add_ready_cond, &fd_add_lock);
     }
-    pthread_mutex_unlock(&fd_add_lock);
 }
 
 static void kXquartzListenOnOpenFDHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
@@ -358,7 +377,8 @@ static void kXquartzListenOnOpenFDHandler(int screenNum, xEventPtr xe, DeviceInt
     TA_SERVER();
     
     for (i=0; i<nevents; i++) {
-        ListenOnOpenFD(xe[i].u.clientMessage.u.l.longs0);
+        ErrorF("Calling ListenOnOpenFD() for new fd: %d\n", (int)xe[i].u.clientMessage.u.l.longs0);
+        ListenOnOpenFD((int)xe[i].u.clientMessage.u.l.longs0);
     }
 }
 
@@ -396,6 +416,9 @@ Bool DarwinEQInit(void) {
         darwinEvents_unlock();
     }
 
+    if(!fd_add_tid)
+        fd_add_tid = create_thread(DarwinProcessFDAdditionQueue_thread, NULL);
+    
     return TRUE;
 }
 
diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h
index 747dccb..7a1e8ca 100644
--- a/hw/xquartz/darwinEvents.h
+++ b/hw/xquartz/darwinEvents.h
@@ -41,9 +41,6 @@ void DarwinSendScrollEvents(float count_x, float count_y, int pointer_x, int poi
 void DarwinUpdateModKeys(int flags);
 void DarwinListenOnOpenFD(int fd);
 
-extern int fd_add_count;
-void DarwinProcessFDAdditionQueue(void);
-
 /*
  * Special ddx events understood by the X server
  */
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 61c2e86..c138fe7 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -155,16 +155,18 @@ static void accept_fd_handoff(int connected_fd) {
     *((int*)CMSG_DATA(cmsg)) = -1;
     
     if(recvmsg(connected_fd, &msg, 0) < 0) {
-        fprintf(stderr, "Error receiving $DISPLAY file descriptor.  recvmsg() error: %s\n", strerror(errno));
+        fprintf(stderr, "X11.app: Error receiving $DISPLAY file descriptor.  recvmsg() error: %s\n", strerror(errno));
         return;
     }
     
     launchd_fd = *((int*)CMSG_DATA(cmsg));
     
     if(launchd_fd == -1)
-        fprintf(stderr, "Error receiving $DISPLAY file descriptor, no descriptor received? %d\n", launchd_fd);
+        fprintf(stderr, "X11.app: Error receiving $DISPLAY file descriptor, no descriptor received? %d\n", launchd_fd);
         
-    fprintf(stderr, "Received new DISPLAY fd: %d\n", launchd_fd);
+//    fprintf(stderr, "X11.app: Received new DISPLAY fd: %d ... sleeping before handoff to server thread\n", launchd_fd);
+//    sleep(5);
+    fprintf(stderr, "X11.app Handing off fd to server thread via DarwinListenOnOpenFD(%d)\n", launchd_fd);
     DarwinListenOnOpenFD(launchd_fd);
 }
 
@@ -221,7 +223,7 @@ kern_return_t do_prep_fd_handoff(mach_port_t port, string_t filename) {
     create_thread(socket_handoff_thread, &handoff_fd);
    
 #ifdef DEBUG
-    fprintf(stderr, "X11.app: Thread created for handoff.  Returning success to tell sender to push the fd.\n");
+    fprintf(stderr, "X11.app: Thread created for handoff.  Returning success to tell caller to accept our connection and push the fd.\n");
 #endif
     
     return KERN_SUCCESS;
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index 003c4dd..4288753 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -261,7 +261,7 @@ int main(int argc, char **argv, char **envp) {
         /* This forking is ugly and will be cleaned up later */
         pid_t child = fork();
         if(child == -1) {
-            fprintf(stderr, "Could not fork: %s\n", strerror(errno));
+            fprintf(stderr, "XQuartz: Could not fork: %s\n", strerror(errno));
             return EXIT_FAILURE;
         }
 
@@ -270,7 +270,7 @@ int main(int argc, char **argv, char **envp) {
             _argv[0] = x11_path;
             _argv[1] = "--listenonly";
             _argv[2] = NULL;
-            fprintf(stderr, "Starting X server: %s --listenonly\n", x11_path);
+            fprintf(stderr, "XQuartz: Starting X server: %s --listenonly\n", x11_path);
             return execvp(x11_path, _argv);
         }
 
@@ -283,7 +283,7 @@ int main(int argc, char **argv, char **envp) {
         }
 
         if(kr != KERN_SUCCESS) {
-            fprintf(stderr, "bootstrap_look_up(): Timed out: %s\n", bootstrap_strerror(kr));
+            fprintf(stderr, "XQuartz: bootstrap_look_up(): Timed out: %s\n", bootstrap_strerror(kr));
             return EXIT_FAILURE;
         }
     }
@@ -300,7 +300,7 @@ int main(int argc, char **argv, char **envp) {
             close(handoff_fd);
             unlink(handoff_socket_filename);
         } else {
-            fprintf(stderr, "Unable to hand of $DISPLAY file descriptor\n");
+            fprintf(stderr, "XQuartz: Unable to hand of $DISPLAY file descriptor\n");
         }
     }
 
@@ -314,7 +314,7 @@ int main(int argc, char **argv, char **envp) {
     newenvp = (string_array_t)alloca(envpc * sizeof(string_t));
     
     if(!newargv || !newenvp) {
-        fprintf(stderr, "Memory allocation failure\n");
+        fprintf(stderr, "XQuartz: Memory allocation failure\n");
         exit(EXIT_FAILURE);
     }
     
@@ -327,7 +327,7 @@ int main(int argc, char **argv, char **envp) {
 
     kr = start_x11_server(mp, newargv, argc, newenvp, envpc);
     if (kr != KERN_SUCCESS) {
-        fprintf(stderr, "start_x11_server: %s\n", mach_error_string(kr));
+        fprintf(stderr, "XQuartz: start_x11_server: %s\n", mach_error_string(kr));
         return EXIT_FAILURE;
     }
     return EXIT_SUCCESS;
commit 0ef3243fb59fa993a7a07a08debbd4329254c265
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Aug 5 18:45:54 2008 -0700

    XQuartz: More fd handoff cleanup.
    (cherry picked from commit 199d2dcb708c9f9d6b9ede149ea0fe9fba6c007c)

diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 94c4c6e..61c2e86 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -168,97 +168,63 @@ static void accept_fd_handoff(int connected_fd) {
     DarwinListenOnOpenFD(launchd_fd);
 }
 
-typedef struct {
-    string_t socket_filename;
-    pthread_mutex_t lock;
-    pthread_cond_t cond;
-    kern_return_t retval;
-} handoff_data_t;
-
-/* This thread loops accepting incoming connections and handing off the file
+/* This thread accepts an incoming connection and hands off the file
  * descriptor for the new connection to accept_fd_handoff()
  */
 static void socket_handoff_thread(void *arg) {
-    handoff_data_t *data = (handoff_data_t *)arg;
-    string_t filename;
+    int handoff_fd = *(int *)arg;
+
+    /* Now actually get the passed file descriptor from this connection */
+    accept_fd_handoff(handoff_fd);
+
+    close(handoff_fd);
+}
+
+kern_return_t do_prep_fd_handoff(mach_port_t port, string_t filename) {
     struct sockaddr_un servaddr_un;
     struct sockaddr *servaddr;
     socklen_t servaddr_len;
     int handoff_fd;
 
-    /* We need to save it since data dies after we pthread_cond_broadcast */
-    strlcpy(filename, data->socket_filename, STRING_T_SIZE); 
-    
-    /* Make sure we only run once the dispatch thread is waiting for us */
-    pthread_mutex_lock(&data->lock);
+#ifdef DEBUG
+    fprintf(stderr, "X11.app: Prepping for fd handoff.\n");
+#endif
     
+    /* Initialize our data */
+
     /* Setup servaddr_un */
     memset (&servaddr_un, 0, sizeof (struct sockaddr_un));
     servaddr_un.sun_family  = AF_UNIX;
     strlcpy(servaddr_un.sun_path, filename, sizeof(servaddr_un.sun_path));
-
+    
     servaddr = (struct sockaddr *) &servaddr_un;
     servaddr_len = sizeof(struct sockaddr_un) - sizeof(servaddr_un.sun_path) + strlen(filename);
-    
+
+    /* Get a fd for the handoff */
     handoff_fd = socket(AF_UNIX, SOCK_STREAM, 0);
     if(handoff_fd == -1) {
         fprintf(stderr, "X11.app: Failed to create socket: %d - %s\n", errno, strerror(errno));
-
-        data->retval = EXIT_FAILURE;
-        pthread_cond_broadcast(&data->cond);
-        pthread_mutex_unlock(&data->lock);
-        return;
+        return KERN_FAILURE;
     }
+#ifdef DEBUG
+    fprintf(stderr, "X11.app: socket created for fd handoff: fd=%d\n", handoff_fd);
+#endif
 
-    /* Let the dispatch thread now tell the caller that we're ready */
-    data->retval = EXIT_SUCCESS;
-    pthread_cond_broadcast(&data->cond);
-    pthread_mutex_unlock(&data->lock);
-    
     if(connect(handoff_fd, servaddr, servaddr_len) < 0) {
         fprintf(stderr, "X11.app: Failed to connect to socket: %s - %d - %s\n", filename, errno, strerror(errno));
-        return;
+        return KERN_FAILURE;
     }
-
-    /* Now actually get the passed file descriptor from this connection */
-    accept_fd_handoff(handoff_fd);
-
-    close(handoff_fd);
-}
-
-kern_return_t do_prep_fd_handoff(mach_port_t port, string_t socket_filename) {
-    handoff_data_t handoff_data;
-
 #ifdef DEBUG
-    fprintf(stderr, "X11.app: Prepping for fd handoff.\n");
-#endif
-    
-    /* Initialize our data */
-    pthread_mutex_init(&handoff_data.lock, NULL);
-    pthread_cond_init(&handoff_data.cond, NULL);
-    strlcpy(handoff_data.socket_filename, socket_filename, STRING_T_SIZE); 
-
-    pthread_mutex_lock(&handoff_data.lock);
-    
-    create_thread(socket_handoff_thread, &handoff_data);
-
-#ifdef DEBUG
-    fprintf(stderr, "X11.app: Thread created for handoff.  Waiting on return value.\n");
+    fprintf(stderr, "X11.app: Connection established for fd handoff: fd=%d\n", handoff_fd);
 #endif
     
-    /* Wait for our return value */
-    pthread_cond_wait(&handoff_data.cond, &handoff_data.lock);
-    pthread_mutex_unlock(&handoff_data.lock);
-
-    /* Cleanup */
-    pthread_cond_destroy(&handoff_data.cond);
-    pthread_mutex_destroy(&handoff_data.lock);
-
+    create_thread(socket_handoff_thread, &handoff_fd);
+   
 #ifdef DEBUG
-    fprintf(stderr, "X11.app: Sending return value: %d\n", handoff_data.retval);
+    fprintf(stderr, "X11.app: Thread created for handoff.  Returning success to tell sender to push the fd.\n");
 #endif
     
-    return handoff_data.retval;
+    return KERN_SUCCESS;
 }
 
 /*** Server Startup ***/
commit e7dd3dd8f311d3872e0c4c9c2ca22c00f9d11f59
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Aug 5 14:33:03 2008 -0700

    XQuartz: Fixed some errors / typos in the preferences pane.
    (cherry picked from commit e1e0c398bbb50394b164394e1f1870016489c25b)

diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
index 69cfa0b..8357655 100644
--- a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
@@ -8,8 +8,6 @@
 		<string key="IBDocument.HIToolboxVersion">352.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<integer value="57"/>
-			<integer value="286"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -474,7 +472,7 @@
 										<characters key="NS.bytes">1</characters>
 									</object>
 									<object class="NSView" key="NSView" id="596750588">
-										<reference key="NSNextResponder" ref="448510093"/>
+										<nil key="NSNextResponder"/>
 										<int key="NSvFlags">256</int>
 										<object class="NSMutableArray" key="NSSubviews">
 											<bool key="EncodedWithXMLCoder">YES</bool>
@@ -544,14 +542,14 @@
 											<object class="NSTextField" id="282885445">
 												<reference key="NSNextResponder" ref="596750588"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 147}, {385, 29}}</string>
+												<string key="NSFrame">{{36, 134}, {385, 42}}</string>
 												<reference key="NSSuperview" ref="596750588"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="649334366">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
-													<string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs
-ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
+													<string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gb3IgQ29udHJvbCB3aGlsZSBjbGlja2luZyB0byBhY3RpdmF0ZSB0aGUgbWlkZGxl
+IG9yIHJpZ2h0IG1vdXNlIGJ1dHRvbnMuCg</string>
 													<reference key="NSSupport" ref="26"/>
 													<reference key="NSControlView" ref="282885445"/>
 													<reference key="NSBackgroundColor" ref="57160303"/>
@@ -618,7 +616,6 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											</object>
 										</object>
 										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
-										<reference key="NSSuperview" ref="448510093"/>
 									</object>
 									<string key="NSLabel">Input</string>
 									<reference key="NSColor" ref="57160303"/>
@@ -842,7 +839,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 										<characters key="NS.bytes">2</characters>
 									</object>
 									<object class="NSView" key="NSView" id="184765684">
-										<nil key="NSNextResponder"/>
+										<reference key="NSNextResponder" ref="448510093"/>
 										<int key="NSvFlags">256</int>
 										<object class="NSMutableArray" key="NSSubviews">
 											<bool key="EncodedWithXMLCoder">YES</bool>
@@ -913,7 +910,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 												<object class="NSTextFieldCell" key="NSCell" id="183409141">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">X11 window focus follows the cursor</string>
+													<string key="NSContents">X11 window focus follows the cursor.  This has some adverse effects.</string>
 													<reference key="NSSupport" ref="26"/>
 													<reference key="NSControlView" ref="138261120"/>
 													<reference key="NSBackgroundColor" ref="57160303"/>
@@ -959,6 +956,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											</object>
 										</object>
 										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
+										<reference key="NSSuperview" ref="448510093"/>
 									</object>
 									<string key="NSLabel">Windows</string>
 									<reference key="NSColor" ref="57160303"/>
@@ -1070,14 +1068,14 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 									<reference key="NSTabView" ref="448510093"/>
 								</object>
 							</object>
-							<reference key="NSSelectedTabViewItem" ref="287591690"/>
+							<reference key="NSSelectedTabViewItem" ref="10973343"/>
 							<reference key="NSFont" ref="463863101"/>
 							<int key="NSTvFlags">0</int>
 							<bool key="NSAllowTruncatedLabels">YES</bool>
 							<bool key="NSDrawsBackground">YES</bool>
 							<object class="NSMutableArray" key="NSSubviews">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<reference ref="596750588"/>
+								<reference ref="184765684"/>
 							</object>
 						</object>
 					</object>
@@ -1101,7 +1099,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSWindowContentMinSize">{320, 240}</string>
 				<object class="NSView" key="NSWindowView" id="85544634">
-					<reference key="NSNextResponder"/>
+					<nil key="NSNextResponder"/>
 					<int key="NSvFlags">256</int>
 					<object class="NSMutableArray" key="NSSubviews">
 						<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1317,7 +1315,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 									</object>
 									<string key="NSFrame">{{1, 17}, {301, 198}}</string>
 									<reference key="NSSuperview" ref="1063387772"/>
-									<reference key="NSNextKeyView" ref="905092943"/>
 									<reference key="NSDocView" ref="905092943"/>
 									<reference key="NSBGColor" ref="812484075"/>
 									<int key="NScvFlags">4</int>
@@ -1350,7 +1347,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 									</object>
 									<string key="NSFrame">{{1, 0}, {301, 17}}</string>
 									<reference key="NSSuperview" ref="1063387772"/>
-									<reference key="NSNextKeyView" ref="792419186"/>
 									<reference key="NSDocView" ref="792419186"/>
 									<reference key="NSBGColor" ref="812484075"/>
 									<int key="NScvFlags">4</int>
@@ -1359,7 +1355,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							</object>
 							<string key="NSFrame">{{20, 20}, {318, 231}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
-							<reference key="NSNextKeyView" ref="580565898"/>
 							<int key="NSsFlags">50</int>
 							<reference key="NSVScroller" ref="842897584"/>
 							<reference key="NSHScroller" ref="17278747"/>
@@ -1395,7 +1390,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 					</object>
 					<string key="NSFrameSize">{454, 271}</string>
-					<reference key="NSSuperview"/>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
 				<string key="NSMinSize">{320, 262}</string>
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib
index 67775ef..aaaf0c2 100644
Binary files a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib differ
commit 6836f9aac801c3add0ae4aece05b32e85a0c5f85
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Aug 5 14:24:25 2008 -0700

    XQUartz: UI Cleanup.  Removed done/cancel buttons from Applications->Customize
    (cherry picked from commit d3157ca45c1f88edd040d721c1e944b9d2c090aa)

diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
index a5222b2..69cfa0b 100644
--- a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
@@ -9,6 +9,7 @@
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
 			<integer value="57"/>
+			<integer value="286"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1090,7 +1091,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 			<object class="NSWindowTemplate" id="604417141">
 				<int key="NSWindowStyleMask">11</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{302, 400}, {454, 311}}</string>
+				<string key="NSWindowRect">{{302, 440}, {454, 271}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Application Menu</string>
 				<string key="NSWindowClass">NSPanel</string>
@@ -1100,14 +1101,14 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSWindowContentMinSize">{320, 240}</string>
 				<object class="NSView" key="NSWindowView" id="85544634">
-					<nil key="NSNextResponder"/>
+					<reference key="NSNextResponder"/>
 					<int key="NSvFlags">256</int>
 					<object class="NSMutableArray" key="NSSubviews">
 						<bool key="EncodedWithXMLCoder">YES</bool>
 						<object class="NSButton" id="671954382">
 							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">265</int>
-							<string key="NSFrame">{{340, 231}, {100, 32}}</string>
+							<string key="NSFrame">{{340, 191}, {100, 32}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSButtonCell" key="NSCell" id="143554520">
@@ -1136,7 +1137,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<object class="NSButton" id="492358940">
 							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">265</int>
-							<string key="NSFrame">{{340, 199}, {100, 32}}</string>
+							<string key="NSFrame">{{340, 159}, {100, 32}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSButtonCell" key="NSCell" id="8201128">
@@ -1356,7 +1357,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								</object>
 								<reference ref="898633680"/>
 							</object>
-							<string key="NSFrame">{{20, 60}, {318, 231}}</string>
+							<string key="NSFrame">{{20, 20}, {318, 231}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
 							<reference key="NSNextKeyView" ref="580565898"/>
 							<int key="NSsFlags">50</int>
@@ -1370,7 +1371,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<object class="NSButton" id="758204686">
 							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">265</int>
-							<string key="NSFrame">{{340, 263}, {100, 32}}</string>
+							<string key="NSFrame">{{340, 223}, {100, 32}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSButtonCell" key="NSCell" id="1025474039">
@@ -1392,56 +1393,9 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								<int key="NSPeriodicInterval">25</int>
 							</object>
 						</object>
-						<object class="NSButton" id="125703429">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">257</int>
-							<string key="NSFrame">{{356, 12}, {84, 32}}</string>
-							<reference key="NSSuperview" ref="85544634"/>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="892296813">
-								<int key="NSCellFlags">-2080244224</int>
-								<int key="NSCellFlags2">137887744</int>
-								<string key="NSContents">Cancel</string>
-								<reference key="NSSupport" ref="463863101"/>
-								<reference key="NSControlView" ref="125703429"/>
-								<int key="NSButtonFlags">-2038284033</int>
-								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="549406736"/>
-								<object class="NSMutableString" key="NSAlternateContents">
-									<characters key="NS.bytes"/>
-								</object>
-								<object class="NSMutableString" key="NSKeyEquivalent">
-									<characters key="NS.bytes"/>
-								</object>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-						<object class="NSButton" id="724002248">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">257</int>
-							<string key="NSFrame">{{272, 12}, {84, 32}}</string>
-							<reference key="NSSuperview" ref="85544634"/>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="809610613">
-								<int key="NSCellFlags">-2080244224</int>
-								<int key="NSCellFlags2">137887744</int>
-								<string key="NSContents">Done</string>
-								<reference key="NSSupport" ref="463863101"/>
-								<reference key="NSControlView" ref="724002248"/>
-								<int key="NSButtonFlags">-2038284033</int>
-								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="549406736"/>
-								<string key="NSAlternateContents"/>
-								<object class="NSMutableString" key="NSKeyEquivalent">
-									<characters key="NS.bytes"/>
-								</object>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
 					</object>
-					<string key="NSFrameSize">{454, 311}</string>
+					<string key="NSFrameSize">{454, 271}</string>
+					<reference key="NSSuperview"/>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
 				<string key="NSMinSize">{320, 262}</string>
@@ -1620,14 +1574,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_done:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="724002248"/>
-					</object>
-					<int key="connectionID">302</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
 						<string key="label">apps_table_delete:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="492358940"/>
@@ -1652,14 +1598,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_cancel:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="125703429"/>
-					</object>
-					<int key="connectionID">309</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
 						<string key="label">apps_table_new:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="758204686"/>
@@ -2614,8 +2552,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<reference ref="758204686"/>
 							<reference ref="671954382"/>
 							<reference ref="492358940"/>
-							<reference ref="125703429"/>
-							<reference ref="724002248"/>
 						</object>
 						<reference key="parent" ref="604417141"/>
 					</object>
@@ -2913,34 +2849,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<reference key="parent" ref="492358940"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">299</int>
-						<reference key="object" ref="125703429"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="892296813"/>
-						</object>
-						<reference key="parent" ref="85544634"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100299</int>
-						<reference key="object" ref="892296813"/>
-						<reference key="parent" ref="125703429"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">291</int>
-						<reference key="object" ref="724002248"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="809610613"/>
-						</object>
-						<reference key="parent" ref="85544634"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100291</int>
-						<reference key="object" ref="809610613"/>
-						<reference key="parent" ref="724002248"/>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">300330</int>
 						<reference key="object" ref="444952046"/>
 						<reference key="parent" ref="96874957"/>
@@ -3153,8 +3061,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>29.IBPluginDependency</string>
 					<string>29.ImportedFromIB2</string>
 					<string>29.editorWindowContentRectSynchronizationRect</string>
-					<string>291.IBPluginDependency</string>
-					<string>291.ImportedFromIB2</string>
 					<string>292.IBPluginDependency</string>
 					<string>292.ImportedFromIB2</string>
 					<string>293.IBPluginDependency</string>
@@ -3167,8 +3073,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>297.ImportedFromIB2</string>
 					<string>298.IBPluginDependency</string>
 					<string>298.ImportedFromIB2</string>
-					<string>299.IBPluginDependency</string>
-					<string>299.ImportedFromIB2</string>
 					<string>300295.IBShouldRemoveOnLegacySave</string>
 					<string>300330.IBPluginDependency</string>
 					<string>300330.ImportedFromIB2</string>
@@ -3381,11 +3285,11 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>{{100, 746}, {155, 33}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<string>{{407, 545}, {454, 311}}</string>
+					<string>{{407, 585}, {454, 271}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<reference ref="9"/>
-					<string>{{407, 545}, {454, 311}}</string>
+					<string>{{407, 585}, {454, 271}}</string>
 					<reference ref="9"/>
 					<string>{{433, 406}, {486, 327}}</string>
 					<integer value="0"/>
@@ -3410,10 +3314,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib
index 9e8b977..67775ef 100644
Binary files a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 7c4d52c..94c4c6e 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -155,7 +155,7 @@ static void accept_fd_handoff(int connected_fd) {
     *((int*)CMSG_DATA(cmsg)) = -1;
     
     if(recvmsg(connected_fd, &msg, 0) < 0) {
-        fprintf(stderr, "Error receiving $DISPLAY file descriptor: %s\n", strerror(errno));
+        fprintf(stderr, "Error receiving $DISPLAY file descriptor.  recvmsg() error: %s\n", strerror(errno));
         return;
     }
     
commit c06e27b2f6fd9f7b9f827623a48876a225264132
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 16:42:15 2008 +0930

    xkb: ProcXkbSetDeviceInfo should work on all attached SDs.
    
    If called with XkbUseCoreKbd, run through all attached SDs and replicate the
    call. This way, we keep the SDs in sync with the MD as long as core clients
    control the MDs.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index ff6a471..56be6e2 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -6413,25 +6413,15 @@ DeviceIntPtr			kbd;
     return (char *)ledWire;
 }
 
-/* FIXME: Needs to set info on all core-sending devices. */
-int
-ProcXkbSetDeviceInfo(ClientPtr client)
-{
-DeviceIntPtr		dev;
-unsigned		change;
-char *			wire;
-xkbExtensionDeviceNotify ed;
-
-    REQUEST(xkbSetDeviceInfoReq);
-    REQUEST_AT_LEAST_SIZE(xkbSetDeviceInfoReq);
-
-    if (!(client->xkbClientFlags&_XkbClientInitialized))
-	return BadAccess;
 
-    change= stuff->change;
+static int
+_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev,
+                  xkbSetDeviceInfoReq *stuff)
+{
+    unsigned                    change;
+    char                       *wire;
 
-    CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
-    CHK_MASK_LEGAL(0x01,change,XkbXI_AllFeaturesMask);
+    change = stuff->change;
 
     wire= (char *)&stuff[1];
     if (change&XkbXI_ButtonActionsMask) {
@@ -6456,6 +6446,17 @@ xkbExtensionDeviceNotify ed;
     if (((wire-((char *)stuff))/4)!=stuff->length)
 	return BadLength;
 
+    return Success;
+}
+
+static int
+_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
+                       xkbSetDeviceInfoReq *stuff)
+{
+    unsigned                    change;
+    char                       *wire;
+    xkbExtensionDeviceNotify    ed;
+
     bzero((char *)&ed,SIZEOF(xkbExtensionDeviceNotify));
     ed.deviceID=	dev->id;
     wire= (char *)&stuff[1];
@@ -6496,6 +6497,77 @@ xkbExtensionDeviceNotify ed;
     }
     if ((stuff->change)&&(ed.reason))
 	XkbSendExtensionDeviceNotify(dev,client,&ed);
+    return Success;
+}
+
+int
+ProcXkbSetDeviceInfo(ClientPtr client)
+{
+    unsigned int        change;
+    DeviceIntPtr        dev;
+    int                 rc;
+
+    REQUEST(xkbSetDeviceInfoReq);
+    REQUEST_AT_LEAST_SIZE(xkbSetDeviceInfoReq);
+
+    if (!(client->xkbClientFlags&_XkbClientInitialized))
+	return BadAccess;
+
+    change = stuff->change;
+
+    CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+    CHK_MASK_LEGAL(0x01,change,XkbXI_AllFeaturesMask);
+
+    rc = _XkbSetDeviceInfoCheck(client, dev, stuff);
+
+    if (rc != Success)
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if (((other != dev) && !other->isMaster && (other->u.master == dev)) &&
+                ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
+                (stuff->deviceSpec == XkbUseCorePtr && other->button)))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                {
+                    rc = _XkbSetDeviceInfoCheck(client, other, stuff);
+                    if (rc != Success)
+                        return rc;
+                }
+            }
+        }
+    }
+
+    /* checks done, apply */
+    rc = _XkbSetDeviceInfo(client, dev, stuff);
+    if (rc != Success)
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if (((other != dev) && !other->isMaster && (other->u.master == dev)) &&
+                ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
+                (stuff->deviceSpec == XkbUseCorePtr && other->button)))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                {
+                    rc = _XkbSetDeviceInfo(client, other, stuff);
+                    if (rc != Success)
+                        return rc;
+                }
+            }
+        }
+    }
+
     return client->noClientException;
 }
 
commit d9ca9819e975e0f6832a320f8be5958e5d942f85
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 16:41:40 2008 +0930

    xkb: ProcXkbSetGeometry should work on all attached SDs.
    
    If called with XkbUseCoreKbd, run through all attached SDs and replicate the
    call. This way, we keep the SDs in sync with the MD as long as core clients
    control the MDs.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index b7eeacc..ff6a471 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -5242,60 +5242,49 @@ char *		wire;
     return Success;
 }
 
-/* FIXME: Needs to set geom on all core-sending devices. */
-int
-ProcXkbSetGeometry(ClientPtr client)
+static int
+_XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq *stuff)
 {
-    DeviceIntPtr 	dev;
-    XkbGeometryPtr	geom,old;
-    XkbGeometrySizesRec	sizes;
-    Status		status;
     XkbDescPtr		xkb;
     Bool		new_name;
     xkbNewKeyboardNotify	nkn;
-
-    REQUEST(xkbSetGeometryReq);
-    REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq);
-
-    if (!(client->xkbClientFlags&_XkbClientInitialized))
-	return BadAccess;
-
-    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
-    CHK_ATOM_OR_NONE(stuff->name);
+    XkbGeometryPtr	geom,old;
+    XkbGeometrySizesRec	sizes;
+    Status		status;
 
     xkb= dev->key->xkbInfo->desc;
     old= xkb->geom;
     xkb->geom= NULL;
 
-    sizes.which= 		XkbGeomAllMask;
+    sizes.which=		XkbGeomAllMask;
     sizes.num_properties=	stuff->nProperties;
-    sizes.num_colors=	  	stuff->nColors;
-    sizes.num_shapes=	  	stuff->nShapes;
-    sizes.num_sections=	  	stuff->nSections;
-    sizes.num_doodads=	  	stuff->nDoodads;
+    sizes.num_colors=	stuff->nColors;
+    sizes.num_shapes=	stuff->nShapes;
+    sizes.num_sections=	stuff->nSections;
+    sizes.num_doodads=	stuff->nDoodads;
     sizes.num_key_aliases=	stuff->nKeyAliases;
     if ((status= XkbAllocGeometry(xkb,&sizes))!=Success) {
-	xkb->geom= old;
-	return status;
+        xkb->geom= old;
+        return status;
     }
     geom= xkb->geom;
     geom->name= stuff->name;
     geom->width_mm= stuff->widthMM;
     geom->height_mm= stuff->heightMM;
     if ((status= _CheckSetGeom(geom,stuff,client))!=Success) {
-	XkbFreeGeometry(geom,XkbGeomAllMask,True);
-	xkb->geom= old;
-	return status;
+        XkbFreeGeometry(geom,XkbGeomAllMask,True);
+        xkb->geom= old;
+        return status;
     }
     new_name= (xkb->names->geometry!=geom->name);
     xkb->names->geometry= geom->name;
     if (old)
-    	XkbFreeGeometry(old,XkbGeomAllMask,True);
+        XkbFreeGeometry(old,XkbGeomAllMask,True);
     if (new_name) {
-	xkbNamesNotify	nn;
-	bzero(&nn,sizeof(xkbNamesNotify));
-	nn.changed= XkbGeometryNameMask;
-	XkbSendNamesNotify(dev,&nn);
+        xkbNamesNotify	nn;
+        bzero(&nn,sizeof(xkbNamesNotify));
+        nn.changed= XkbGeometryNameMask;
+        XkbSendNamesNotify(dev,&nn);
     }
     nkn.deviceID= nkn.oldDeviceID= dev->id;
     nkn.minKeyCode= nkn.oldMinKeyCode= xkb->min_key_code;
@@ -5307,6 +5296,42 @@ ProcXkbSetGeometry(ClientPtr client)
     return Success;
 }
 
+int
+ProcXkbSetGeometry(ClientPtr client)
+{
+    DeviceIntPtr        dev;
+    int                 rc;
+
+    REQUEST(xkbSetGeometryReq);
+    REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq);
+
+    if (!(client->xkbClientFlags&_XkbClientInitialized))
+	return BadAccess;
+
+    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+    CHK_ATOM_OR_NONE(stuff->name);
+
+    rc = _XkbSetGeometry(client, dev, stuff);
+    if (rc != Success)
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                    _XkbSetGeometry(client, other, stuff);
+            }
+        }
+    }
+
+    return Success;
+}
+
 /***====================================================================***/
 
 int
commit 5ba87c3327786dd7c6e8e265a19c858e8faae8fd
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 16:41:08 2008 +0930

    xkb: ProcXkbSetNames should work on all attached SDs.
    
    If called with XkbUseCoreKbd, run through all attached SDs and replicate the
    call. This way, we keep the SDs in sync with the MD as long as core clients
    control the MDs.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 6d79501..b7eeacc 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3862,17 +3862,323 @@ char *	str;
     return True;
 }
 
-/* FIXME: Needs to set names on all core-sending devices. */
-int
-ProcXkbSetNames(ClientPtr client)
+/**
+ * Check the device-dependent data in the request against the device. Returns
+ * Success, or the appropriate error code.
+ */
+static int
+_XkbSetNamesCheck(ClientPtr client, DeviceIntPtr dev,
+                  xkbSetNamesReq *stuff, CARD32 *data)
 {
-    DeviceIntPtr	 dev;
     XkbDescRec		*xkb;
     XkbNamesRec		*names;
-    xkbNamesNotify	 nn;
     CARD32		*tmp;
     Atom		 bad;
 
+    tmp = data;
+    xkb = dev->key->xkbInfo->desc;
+    names = xkb->names;
+
+
+    if (stuff->which & XkbKeyTypeNamesMask) {
+        int i;
+        CARD32	*old;
+        if ( stuff->nTypes<1 ) {
+            client->errorValue = _XkbErrCode2(0x02,stuff->nTypes);
+            return BadValue;
+        }
+        if ((unsigned)(stuff->firstType+stuff->nTypes-1)>=xkb->map->num_types) {
+            client->errorValue = _XkbErrCode4(0x03,stuff->firstType,
+                    stuff->nTypes,
+                    xkb->map->num_types);
+            return BadValue;
+        }
+        if (((unsigned)stuff->firstType)<=XkbLastRequiredType) {
+            client->errorValue = _XkbErrCode2(0x04,stuff->firstType);
+            return BadAccess;
+        }
+        old= tmp;
+        tmp= _XkbCheckAtoms(tmp,stuff->nTypes,client->swapped,&bad);
+        if (!tmp) {
+            client->errorValue= bad;
+            return BadAtom;
+        }
+        for (i=0;i<stuff->nTypes;i++,old++) {
+            if (!_XkbCheckTypeName((Atom)*old,stuff->firstType+i))
+                client->errorValue= _XkbErrCode2(0x05,i);
+        }
+    }
+    if (stuff->which&XkbKTLevelNamesMask) {
+        unsigned i;
+        XkbKeyTypePtr	type;
+        CARD8 *		width;
+        if ( stuff->nKTLevels<1 ) {
+            client->errorValue = _XkbErrCode2(0x05,stuff->nKTLevels);
+            return BadValue;
+        }
+        if ((unsigned)(stuff->firstKTLevel+stuff->nKTLevels-1)>=
+                xkb->map->num_types) {
+            client->errorValue = _XkbErrCode4(0x06,stuff->firstKTLevel,
+                    stuff->nKTLevels,xkb->map->num_types);
+            return BadValue;
+        }
+        width = (CARD8 *)tmp;
+        tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
+        type = &xkb->map->types[stuff->firstKTLevel];
+        for (i=0;i<stuff->nKTLevels;i++,type++) {
+            if (width[i]==0)
+                continue;
+            else if (width[i]!=type->num_levels) {
+                client->errorValue= _XkbErrCode4(0x07,i+stuff->firstKTLevel,
+                        type->num_levels,width[i]);
+                return BadMatch;
+            }
+            tmp= _XkbCheckAtoms(tmp,width[i],client->swapped,&bad);
+            if (!tmp) {
+                client->errorValue= bad;
+                return BadAtom;
+            }
+        }
+    }
+    if (stuff->which&XkbIndicatorNamesMask) {
+        if (stuff->indicators==0) {
+            client->errorValue= 0x08;
+            return BadMatch;
+        }
+        tmp= _XkbCheckMaskedAtoms(tmp,XkbNumIndicators,stuff->indicators,
+                client->swapped,&bad);
+        if (!tmp) {
+            client->errorValue= bad;
+            return BadAtom;
+        }
+    }
+    if (stuff->which&XkbVirtualModNamesMask) {
+        if (stuff->virtualMods==0) {
+            client->errorValue= 0x09;
+            return BadMatch;
+        }
+        tmp= _XkbCheckMaskedAtoms(tmp,XkbNumVirtualMods,
+                (CARD32)stuff->virtualMods,
+                client->swapped,&bad);
+        if (!tmp) {
+            client->errorValue = bad;
+            return BadAtom;
+        }
+    }
+    if (stuff->which&XkbGroupNamesMask) {
+        if (stuff->groupNames==0) {
+            client->errorValue= 0x0a;
+            return BadMatch;
+        }
+        tmp= _XkbCheckMaskedAtoms(tmp,XkbNumKbdGroups,
+                (CARD32)stuff->groupNames,
+                client->swapped,&bad);
+        if (!tmp) {
+            client->errorValue = bad;
+            return BadAtom;
+        }
+    }
+    if (stuff->which&XkbKeyNamesMask) {
+        if (stuff->firstKey<(unsigned)xkb->min_key_code) {
+            client->errorValue= _XkbErrCode3(0x0b,xkb->min_key_code,
+                    stuff->firstKey);
+            return BadValue;
+        }
+        if (((unsigned)(stuff->firstKey+stuff->nKeys-1)>xkb->max_key_code)||
+                (stuff->nKeys<1)) {
+            client->errorValue= _XkbErrCode4(0x0c,xkb->max_key_code,
+                    stuff->firstKey,stuff->nKeys);
+            return BadValue;
+        }
+        tmp+= stuff->nKeys;
+    }
+    if ((stuff->which&XkbKeyAliasesMask)&&(stuff->nKeyAliases>0)) {
+        tmp+= stuff->nKeyAliases*2;
+    }
+    if (stuff->which&XkbRGNamesMask) {
+        if ( stuff->nRadioGroups<1 ) {
+            client->errorValue= _XkbErrCode2(0x0d,stuff->nRadioGroups);
+            return BadValue;
+        }
+        tmp= _XkbCheckAtoms(tmp,stuff->nRadioGroups,client->swapped,&bad);
+        if (!tmp) {
+            client->errorValue= bad;
+            return BadAtom;
+        }
+    }
+    if ((tmp-((CARD32 *)stuff))!=stuff->length) {
+        client->errorValue = stuff->length;
+        return BadLength;
+    }
+
+
+
+    return Success;
+}
+
+static int
+_XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff)
+{
+    XkbDescRec		*xkb;
+    XkbNamesRec		*names;
+    CARD32		*tmp;
+    xkbNamesNotify	 nn;
+
+    tmp = (CARD32 *)&stuff[1];
+    xkb = dev->key->xkbInfo->desc;
+    names = xkb->names;
+
+    if (XkbAllocNames(xkb,stuff->which,stuff->nRadioGroups,
+                stuff->nKeyAliases)!=Success) {
+        return BadAlloc;
+    }
+
+    bzero(&nn,sizeof(xkbNamesNotify));
+    nn.changed= stuff->which;
+    tmp = (CARD32 *)&stuff[1];
+    if (stuff->which&XkbKeycodesNameMask)
+        names->keycodes= *tmp++;
+    if (stuff->which&XkbGeometryNameMask)
+        names->geometry= *tmp++;
+    if (stuff->which&XkbSymbolsNameMask)
+        names->symbols= *tmp++;
+    if (stuff->which&XkbPhysSymbolsNameMask)
+        names->phys_symbols= *tmp++;
+    if (stuff->which&XkbTypesNameMask)
+        names->types= *tmp++;
+    if (stuff->which&XkbCompatNameMask)
+        names->compat= *tmp++;
+    if ((stuff->which&XkbKeyTypeNamesMask)&&(stuff->nTypes>0)) {
+        register unsigned i;
+        register XkbKeyTypePtr type;
+
+        type= &xkb->map->types[stuff->firstType];
+        for (i=0;i<stuff->nTypes;i++,type++) {
+            type->name= *tmp++;
+        }
+        nn.firstType= stuff->firstType;
+        nn.nTypes= stuff->nTypes;
+    }
+    if (stuff->which&XkbKTLevelNamesMask) {
+        register XkbKeyTypePtr	type;
+        register unsigned i;
+        CARD8 *width;
+
+        width = (CARD8 *)tmp;
+        tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
+        type= &xkb->map->types[stuff->firstKTLevel];
+        for (i=0;i<stuff->nKTLevels;i++,type++) {
+            if (width[i]>0) {
+                if (type->level_names) {
+                    register unsigned n;
+                    for (n=0;n<width[i];n++) {
+                        type->level_names[n]= tmp[n];
+                    }
+                }
+                tmp+= width[i];
+            }
+        }
+        nn.firstLevelName= 0;
+        nn.nLevelNames= stuff->nTypes;
+    }
+    if (stuff->which&XkbIndicatorNamesMask) {
+        tmp= _XkbCopyMaskedAtoms(tmp,names->indicators,XkbNumIndicators,
+                stuff->indicators);
+        nn.changedIndicators= stuff->indicators;
+    }
+    if (stuff->which&XkbVirtualModNamesMask) {
+        tmp= _XkbCopyMaskedAtoms(tmp,names->vmods,XkbNumVirtualMods,
+                stuff->virtualMods);
+        nn.changedVirtualMods= stuff->virtualMods;
+    }
+    if (stuff->which&XkbGroupNamesMask) {
+        tmp= _XkbCopyMaskedAtoms(tmp,names->groups,XkbNumKbdGroups,
+                stuff->groupNames);
+        nn.changedVirtualMods= stuff->groupNames;
+    }
+    if (stuff->which&XkbKeyNamesMask) {
+        memcpy((char*)&names->keys[stuff->firstKey],(char *)tmp,
+                stuff->nKeys*XkbKeyNameLength);
+        tmp+= stuff->nKeys;
+        nn.firstKey= stuff->firstKey;
+        nn.nKeys= stuff->nKeys;
+    }
+    if (stuff->which&XkbKeyAliasesMask) {
+        if (stuff->nKeyAliases>0) {
+            register int na= stuff->nKeyAliases;	
+            if (XkbAllocNames(xkb,XkbKeyAliasesMask,0,na)!=Success)
+                return BadAlloc;
+            memcpy((char *)names->key_aliases,(char *)tmp,
+                    stuff->nKeyAliases*sizeof(XkbKeyAliasRec));
+            tmp+= stuff->nKeyAliases*2;
+        }
+        else if (names->key_aliases!=NULL) {
+            _XkbFree(names->key_aliases);
+            names->key_aliases= NULL;
+            names->num_key_aliases= 0;
+        }
+        nn.nAliases= names->num_key_aliases;
+    }
+    if (stuff->which&XkbRGNamesMask) {
+        if (stuff->nRadioGroups>0) {
+            register unsigned i,nrg;
+            nrg= stuff->nRadioGroups;
+            if (XkbAllocNames(xkb,XkbRGNamesMask,nrg,0)!=Success)
+                return BadAlloc;
+
+            for (i=0;i<stuff->nRadioGroups;i++) {
+                names->radio_groups[i]= tmp[i];
+            }
+            tmp+= stuff->nRadioGroups;
+        }
+        else if (names->radio_groups) {
+            _XkbFree(names->radio_groups);
+            names->radio_groups= NULL;
+            names->num_rg= 0;
+        }
+        nn.nRadioGroups= names->num_rg;
+    }
+    if (nn.changed) {
+        Bool needExtEvent;
+        needExtEvent= (nn.changed&XkbIndicatorNamesMask)!=0;
+        XkbSendNamesNotify(dev,&nn);
+        if (needExtEvent) {
+            XkbSrvLedInfoPtr		sli;
+            xkbExtensionDeviceNotify	edev;
+            register int		i;
+            register unsigned		bit;
+
+            sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,
+                    XkbXI_IndicatorsMask);
+            sli->namesPresent= 0;
+            for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
+                if (names->indicators[i]!=None)
+                    sli->namesPresent|= bit;
+            }
+            bzero(&edev,sizeof(xkbExtensionDeviceNotify));
+            edev.reason=	XkbXI_IndicatorNamesMask;
+            edev.ledClass=	KbdFeedbackClass;
+            edev.ledID=		dev->kbdfeed->ctrl.id;
+            edev.ledsDefined= 	sli->namesPresent|sli->mapsPresent;
+            edev.ledState=	sli->effectiveState;
+            edev.firstBtn=	0;
+            edev.nBtns=		0;
+            edev.supported=	XkbXI_AllFeaturesMask;
+            edev.unsupported=	0;
+            XkbSendExtensionDeviceNotify(dev,client,&edev);
+        }
+    }
+    return Success;
+}
+
+int
+ProcXkbSetNames(ClientPtr client)
+{
+    DeviceIntPtr	 dev;
+    CARD32		*tmp;
+    Atom                 bad;
+    int                  rc;
+
     REQUEST(xkbSetNamesReq);
     REQUEST_AT_LEAST_SIZE(xkbSetNamesReq);
 
@@ -3882,8 +4188,7 @@ ProcXkbSetNames(ClientPtr client)
     CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
     CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
 
-    xkb = dev->key->xkbInfo->desc;
-    names = xkb->names;
+    /* check device-independent stuff */
     tmp = (CARD32 *)&stuff[1];
 
     if (stuff->which&XkbKeycodesNameMask) {
@@ -3928,277 +4233,54 @@ ProcXkbSetNames(ClientPtr client)
 	    return BadAtom;
 	}
     }
-    if (stuff->which&XkbKeyTypeNamesMask) {
-	register int i;
-	CARD32	*old;
-	if ( stuff->nTypes<1 ) {
-	    client->errorValue = _XkbErrCode2(0x02,stuff->nTypes);
-	    return BadValue;
-	}
-	if ((unsigned)(stuff->firstType+stuff->nTypes-1)>=xkb->map->num_types) {
-	    client->errorValue = _XkbErrCode4(0x03,stuff->firstType,
-							stuff->nTypes,
-							xkb->map->num_types);
-	    return BadValue;
-	}
-	if (((unsigned)stuff->firstType)<=XkbLastRequiredType) {
-	    client->errorValue = _XkbErrCode2(0x04,stuff->firstType);
-	    return BadAccess;
-	}
-	old= tmp;
-	tmp= _XkbCheckAtoms(tmp,stuff->nTypes,client->swapped,&bad);
-	if (!tmp) {
-	    client->errorValue= bad;
-	    return BadAtom;
-	}
-	for (i=0;i<stuff->nTypes;i++,old++) {
-	    if (!_XkbCheckTypeName((Atom)*old,stuff->firstType+i))
-		client->errorValue= _XkbErrCode2(0x05,i);
-	}
-    }
-    if (stuff->which&XkbKTLevelNamesMask) {
-	register unsigned i;
-	XkbKeyTypePtr	type;
-	CARD8 *		width;
-	if ( stuff->nKTLevels<1 ) {
-	    client->errorValue = _XkbErrCode2(0x05,stuff->nKTLevels);
-	    return BadValue;
-	}
-	if ((unsigned)(stuff->firstKTLevel+stuff->nKTLevels-1)>=
-							xkb->map->num_types) {
-	    client->errorValue = _XkbErrCode4(0x06,stuff->firstKTLevel,
-				stuff->nKTLevels,xkb->map->num_types);
-	    return BadValue;
-	}
-	width = (CARD8 *)tmp;
-	tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
-	type = &xkb->map->types[stuff->firstKTLevel];
-	for (i=0;i<stuff->nKTLevels;i++,type++) {
-	    if (width[i]==0)
-		continue;
-	    else if (width[i]!=type->num_levels) {
-		client->errorValue= _XkbErrCode4(0x07,i+stuff->firstKTLevel,
-						type->num_levels,width[i]);
-		return BadMatch;
-	    }
-	    tmp= _XkbCheckAtoms(tmp,width[i],client->swapped,&bad);
-	    if (!tmp) {
-		client->errorValue= bad;
-		return BadAtom;
-	    }
-	}
-    }
-    if (stuff->which&XkbIndicatorNamesMask) {
-	if (stuff->indicators==0) {
-	    client->errorValue= 0x08;
-	    return BadMatch;
-	}
-	tmp= _XkbCheckMaskedAtoms(tmp,XkbNumIndicators,stuff->indicators,
-							client->swapped,&bad);
-	if (!tmp) {
-	    client->errorValue= bad;
-	    return BadAtom;
-	}
-    }
-    if (stuff->which&XkbVirtualModNamesMask) {
-	if (stuff->virtualMods==0) {
-	    client->errorValue= 0x09;
-	    return BadMatch;
-	}
-	tmp= _XkbCheckMaskedAtoms(tmp,XkbNumVirtualMods,
-						(CARD32)stuff->virtualMods,
-						client->swapped,&bad);
-	if (!tmp) {
-	    client->errorValue = bad;
-	    return BadAtom;
-	}
-    }
-    if (stuff->which&XkbGroupNamesMask) {
-	if (stuff->groupNames==0) {
-	    client->errorValue= 0x0a;
-	    return BadMatch;
-	}
-	tmp= _XkbCheckMaskedAtoms(tmp,XkbNumKbdGroups,
-						(CARD32)stuff->groupNames,
-						client->swapped,&bad);
-	if (!tmp) {
-	    client->errorValue = bad;
-	    return BadAtom;
-	}
-    }
-    if (stuff->which&XkbKeyNamesMask) {
-	if (stuff->firstKey<(unsigned)xkb->min_key_code) {
-	    client->errorValue= _XkbErrCode3(0x0b,xkb->min_key_code,
-							stuff->firstKey);
-	    return BadValue;
-	}
-	if (((unsigned)(stuff->firstKey+stuff->nKeys-1)>xkb->max_key_code)||
-							(stuff->nKeys<1)) {
-	    client->errorValue= _XkbErrCode4(0x0c,xkb->max_key_code,
-						stuff->firstKey,stuff->nKeys);
-	    return BadValue;
-	}
-	tmp+= stuff->nKeys;
-    }
-    if ((stuff->which&XkbKeyAliasesMask)&&(stuff->nKeyAliases>0)) {
-	tmp+= stuff->nKeyAliases*2;
-    }
-    if (stuff->which&XkbRGNamesMask) {
-	if ( stuff->nRadioGroups<1 ) {
-	    client->errorValue= _XkbErrCode2(0x0d,stuff->nRadioGroups);
-	    return BadValue;
-	}
-	tmp= _XkbCheckAtoms(tmp,stuff->nRadioGroups,client->swapped,&bad);
-	if (!tmp) {
-	    client->errorValue= bad;
-	    return BadAtom;
-	}
-    }
-    if ((tmp-((CARD32 *)stuff))!=stuff->length) {
-	client->errorValue = stuff->length;
-	return BadLength;
-    }
-    if (XkbAllocNames(xkb,stuff->which,stuff->nRadioGroups,
-					stuff->nKeyAliases)!=Success) {
-	return BadAlloc;
+
+    /* start of device-dependent tests */
+    rc = _XkbSetNamesCheck(client, dev, stuff, tmp);
+    if (rc != Success)
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
+
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                {
+                    rc = _XkbSetNamesCheck(client, other, stuff, tmp);
+                    if (rc != Success)
+                        return rc;
+                }
+            }
+        }
     }
 
     /* everything is okay -- update names */
-    bzero(&nn,sizeof(xkbNamesNotify));
-    nn.changed= stuff->which;
-    tmp = (CARD32 *)&stuff[1];
-    if (stuff->which&XkbKeycodesNameMask)
-	names->keycodes= *tmp++;
-    if (stuff->which&XkbGeometryNameMask)
-	names->geometry= *tmp++;
-    if (stuff->which&XkbSymbolsNameMask)
-	names->symbols= *tmp++;
-    if (stuff->which&XkbPhysSymbolsNameMask)
-	names->phys_symbols= *tmp++;
-    if (stuff->which&XkbTypesNameMask)
-	names->types= *tmp++;
-    if (stuff->which&XkbCompatNameMask) 
-	names->compat= *tmp++;
-    if ((stuff->which&XkbKeyTypeNamesMask)&&(stuff->nTypes>0)) {
-	register unsigned i;
-	register XkbKeyTypePtr type;
 
-	type= &xkb->map->types[stuff->firstType];
-	for (i=0;i<stuff->nTypes;i++,type++) {
-	    type->name= *tmp++;
-	}
-	nn.firstType= stuff->firstType;
-	nn.nTypes= stuff->nTypes;
-    }
-    if (stuff->which&XkbKTLevelNamesMask) {
-	register XkbKeyTypePtr	type;
-	register unsigned i;
-	CARD8 *width;
-
-	width = (CARD8 *)tmp;
-	tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
-	type= &xkb->map->types[stuff->firstKTLevel];
-	for (i=0;i<stuff->nKTLevels;i++,type++) {
-	    if (width[i]>0) {
-		if (type->level_names) {
-		    register unsigned n;
-		    for (n=0;n<width[i];n++) {
-			type->level_names[n]= tmp[n];
-		    }
-		}
-		tmp+= width[i];
-	    }
-	}
-	nn.firstLevelName= 0;
-	nn.nLevelNames= stuff->nTypes;
-    }
-    if (stuff->which&XkbIndicatorNamesMask) {
-	tmp= _XkbCopyMaskedAtoms(tmp,names->indicators,XkbNumIndicators,
-							stuff->indicators);
-	nn.changedIndicators= stuff->indicators;
-    }
-    if (stuff->which&XkbVirtualModNamesMask) {
-	tmp= _XkbCopyMaskedAtoms(tmp,names->vmods,XkbNumVirtualMods,
-							stuff->virtualMods);
-	nn.changedVirtualMods= stuff->virtualMods;
-    }
-    if (stuff->which&XkbGroupNamesMask) {
-	tmp= _XkbCopyMaskedAtoms(tmp,names->groups,XkbNumKbdGroups,
-							stuff->groupNames);
-	nn.changedVirtualMods= stuff->groupNames;
-    }
-    if (stuff->which&XkbKeyNamesMask) {
-	memcpy((char*)&names->keys[stuff->firstKey],(char *)tmp,
-						stuff->nKeys*XkbKeyNameLength);
-	tmp+= stuff->nKeys;
-	nn.firstKey= stuff->firstKey;
-	nn.nKeys= stuff->nKeys;
-    }
-    if (stuff->which&XkbKeyAliasesMask) {
-	if (stuff->nKeyAliases>0) {
-	    register int na= stuff->nKeyAliases;	
-	    if (XkbAllocNames(xkb,XkbKeyAliasesMask,0,na)!=Success)
-		return BadAlloc;
-	    memcpy((char *)names->key_aliases,(char *)tmp,
-				stuff->nKeyAliases*sizeof(XkbKeyAliasRec));
-	    tmp+= stuff->nKeyAliases*2;
-	}
-	else if (names->key_aliases!=NULL) {
-	    _XkbFree(names->key_aliases);
-	    names->key_aliases= NULL;
-	    names->num_key_aliases= 0;
-	}
-	nn.nAliases= names->num_key_aliases;
-    }
-    if (stuff->which&XkbRGNamesMask) {
-	if (stuff->nRadioGroups>0) {
-	    register unsigned i,nrg;
-	    nrg= stuff->nRadioGroups;
-	    if (XkbAllocNames(xkb,XkbRGNamesMask,nrg,0)!=Success)
-		return BadAlloc;
+    rc = _XkbSetNames(client, dev, stuff);
+    if (rc != Success)
+        return rc;
 
-	    for (i=0;i<stuff->nRadioGroups;i++) {
-		names->radio_groups[i]= tmp[i];
-	    }
-	    tmp+= stuff->nRadioGroups;
-	}
-	else if (names->radio_groups) {
-	    _XkbFree(names->radio_groups);
-	    names->radio_groups= NULL;
-	    names->num_rg= 0;
-	}
-	nn.nRadioGroups= names->num_rg;
-    }
-    if (nn.changed) {
-	Bool needExtEvent;
-	needExtEvent= (nn.changed&XkbIndicatorNamesMask)!=0;
-	XkbSendNamesNotify(dev,&nn);
-	if (needExtEvent) {
-	    XkbSrvLedInfoPtr		sli;
-	    xkbExtensionDeviceNotify	edev;
-	    register int		i;
-	    register unsigned		bit;
+    if (stuff->deviceSpec == XkbUseCoreKbd)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
 
-	    sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,
-							XkbXI_IndicatorsMask);
-	    sli->namesPresent= 0;
-	    for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
-		if (names->indicators[i]!=None)
-		    sli->namesPresent|= bit;
-	    }
-	    bzero(&edev,sizeof(xkbExtensionDeviceNotify));
-	    edev.reason=	XkbXI_IndicatorNamesMask;
-	    edev.ledClass=	KbdFeedbackClass;
-	    edev.ledID=		dev->kbdfeed->ctrl.id;
-	    edev.ledsDefined= 	sli->namesPresent|sli->mapsPresent;
-	    edev.ledState=	sli->effectiveState;
-	    edev.firstBtn=	0;
-	    edev.nBtns=		0;
-	    edev.supported=	XkbXI_AllFeaturesMask;
-	    edev.unsupported=	0;
-	    XkbSendExtensionDeviceNotify(dev,client,&edev);
-	}
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                    _XkbSetNames(client, other, stuff);
+            }
+        }
     }
+
+    /* everything is okay -- update names */
+
     return client->noClientException;
 }
 
commit 7e45c80204e06562d4475741caea65bc8758f3c7
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 16:40:25 2008 +0930

    xkb: ProcXkbSetNamedIndicator should work on all attached SDs.
    
    If called with XkbUseCoreKbd, run through all attached SDs and replicate the
    call. This way, we keep the SDs in sync with the MD as long as core clients
    control the MDs.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 0628101..6d79501 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3264,96 +3264,205 @@ ProcXkbGetNamedIndicator(ClientPtr client)
     return client->noClientException;
 }
 
-/* FIXME: Needs to set indicator on all core-sending devices. */
-int
-ProcXkbSetNamedIndicator(ClientPtr client)
-{
-    DeviceIntPtr 		dev,kbd;
-    XkbIndicatorMapPtr		map;
-    XkbSrvLedInfoPtr 		sli;
-    register int		led = 0;
-    unsigned			extDevReason;
-    unsigned			statec,namec,mapc;
-    XkbEventCauseRec		cause;
-    xkbExtensionDeviceNotify	ed;
-    XkbChangesRec		changes;
 
-    REQUEST(xkbSetNamedIndicatorReq);
-    REQUEST_SIZE_MATCH(xkbSetNamedIndicatorReq);
-
-    if (!(client->xkbClientFlags&_XkbClientInitialized))
-	return BadAccess;
-
-    CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
-    CHK_ATOM_ONLY(stuff->indicator);
-    CHK_MASK_LEGAL(0x10,stuff->whichGroups,XkbIM_UseAnyGroup);
-    CHK_MASK_LEGAL(0x11,stuff->whichMods,XkbIM_UseAnyMods);
-
-    extDevReason= 0;
-
-    sli= XkbFindSrvLedInfo(dev,stuff->ledClass,stuff->ledID,
-							XkbXI_IndicatorsMask);
-    if (!sli)
-	return BadAlloc;
+/**
+ * Find the IM on the device.
+ * Returns the map, or NULL if the map doesn't exist.
+ * If the return value is NULL, led_return is undefined. Otherwise, led_return
+ * is set to the led index of the map.
+ */
+static XkbIndicatorMapPtr
+_XkbFindNamedIndicatorMap(XkbSrvLedInfoPtr sli, Atom indicator,
+                          int *led_return)
+{
+    XkbIndicatorMapPtr  map;
+    int                 led;
 
-    statec= mapc= namec= 0;
-    map= NULL;
+    /* search for the right indicator */
+    map = NULL;
     if (sli->names && sli->maps) {
-	for (led=0;(led<XkbNumIndicators)&&(map==NULL);led++) {
-	    if (sli->names[led]==stuff->indicator) {
+	for (led = 0; (led < XkbNumIndicators) && (map == NULL); led++) {
+	    if (sli->names[led] == indicator) {
 		map= &sli->maps[led];
 		break;
 	    }
 	}
     }
-    if (map==NULL) {
-	if (!stuff->createMap)
-	    return client->noClientException;
-	for (led=0,map=NULL;(led<XkbNumIndicators)&&(map==NULL);led++) {
-	    if ((sli->names)&&(sli->maps)&&(sli->names[led]==None)&&
-                (!XkbIM_InUse(&sli->maps[led]))) {
-		map= &sli->maps[led];
-		sli->names[led]= stuff->indicator;
-		break;
-	    }
-	}
-	if (map==NULL)
-	    return client->noClientException;
-	namec|= (1<<led);
-	sli->namesPresent|= ((stuff->indicator!=None)?(1<<led):0);
-	extDevReason|= XkbXI_IndicatorNamesMask;
+
+    *led_return = led;
+    return map;
+}
+
+/**
+ * Creates an indicator map on the device. If dryRun is True, it only checks
+ * if creation is possible, but doesn't actually create it.
+ */
+static int
+_XkbCreateIndicatorMap(DeviceIntPtr dev, Atom indicator,
+                       int ledClass, int ledID,
+                       XkbIndicatorMapPtr *map_return, int *led_return,
+                       Bool dryRun)
+{
+    XkbSrvLedInfoPtr    sli;
+    XkbIndicatorMapPtr  map;
+    int                 led;
+
+    sli = XkbFindSrvLedInfo(dev, ledClass, ledID, XkbXI_IndicatorsMask);
+    if (!sli)
+        return BadAlloc;
+
+    map = _XkbFindNamedIndicatorMap(sli, indicator, &led);
+
+    if (!map)
+    {
+        /* find first unused indicator maps and assign the name to it */
+        for (led = 0, map = NULL; (led < XkbNumIndicators) && (map == NULL); led++) {
+            if ((sli->names) && (sli->maps) && (sli->names[led] == None) &&
+                    (!XkbIM_InUse(&sli->maps[led])))
+            {
+                map = &sli->maps[led];
+                if (!dryRun)
+                    sli->names[led] = indicator;
+                break;
+            }
+        }
     }
 
+    if (!map)
+        return BadAlloc;
+
+    *led_return = led;
+    *map_return = map;
+    return Success;
+}
+
+static int
+_XkbSetNamedIndicator(ClientPtr client, DeviceIntPtr dev,
+                      xkbSetNamedIndicatorReq *stuff)
+{
+    unsigned int                extDevReason;
+    unsigned int                statec, namec, mapc;
+    XkbSrvLedInfoPtr            sli;
+    int                         led = 0;
+    XkbIndicatorMapPtr          map;
+    DeviceIntPtr                kbd;
+    XkbEventCauseRec            cause;
+    xkbExtensionDeviceNotify    ed;
+    XkbChangesRec               changes;
+    int                         rc;
+
+    rc = _XkbCreateIndicatorMap(dev, stuff->indicator, stuff->ledClass,
+                                stuff->ledID, &map, &led, FALSE);
+    if (rc != Success || !map) /* oh-oh */
+        return rc;
+
+    namec = mapc = statec = 0;
+    extDevReason = 0;
+
+    namec |= (1<<led);
+    sli->namesPresent |= ((stuff->indicator != None) ? (1 << led) : 0);
+    extDevReason |= XkbXI_IndicatorNamesMask;
+
     if (stuff->setMap) {
-	map->flags = stuff->flags;
-	map->which_groups = stuff->whichGroups;
-	map->groups = stuff->groups;
-	map->which_mods = stuff->whichMods;
-	map->mods.mask = stuff->realMods;
-	map->mods.real_mods = stuff->realMods;
-	map->mods.vmods= stuff->virtualMods;
-	map->ctrls = stuff->ctrls;
-	mapc|= (1<<led);
-    }
-    if ((stuff->setState)&&((map->flags&XkbIM_NoExplicit)==0)) {
-	if (stuff->on)	sli->explicitState|=  (1<<led);
-	else		sli->explicitState&= ~(1<<led);
-	statec|= ((sli->effectiveState^sli->explicitState)&(1<<led));
+        map->flags = stuff->flags;
+        map->which_groups = stuff->whichGroups;
+        map->groups = stuff->groups;
+        map->which_mods = stuff->whichMods;
+        map->mods.mask = stuff->realMods;
+        map->mods.real_mods = stuff->realMods;
+        map->mods.vmods= stuff->virtualMods;
+        map->ctrls = stuff->ctrls;
+        mapc|= (1<<led);
+    }
+
+    if ((stuff->setState) && ((map->flags & XkbIM_NoExplicit) == 0))
+    {
+        if (stuff->on)	sli->explicitState |=  (1<<led);
+        else		sli->explicitState &= ~(1<<led);
+        statec |= ((sli->effectiveState ^ sli->explicitState) & (1 << led));
     }
+
     bzero((char *)&ed,sizeof(xkbExtensionDeviceNotify));
     bzero((char *)&changes,sizeof(XkbChangesRec));
     XkbSetCauseXkbReq(&cause,X_kbSetNamedIndicator,client);
     if (namec)
-	XkbApplyLedNameChanges(dev,sli,namec,&ed,&changes,&cause);
+        XkbApplyLedNameChanges(dev,sli,namec,&ed,&changes,&cause);
     if (mapc)
-	XkbApplyLedMapChanges(dev,sli,mapc,&ed,&changes,&cause);
+        XkbApplyLedMapChanges(dev,sli,mapc,&ed,&changes,&cause);
     if (statec)
-	XkbApplyLedStateChanges(dev,sli,statec,&ed,&changes,&cause);
+        XkbApplyLedStateChanges(dev,sli,statec,&ed,&changes,&cause);
 
-    kbd= dev;
+    kbd = dev;
     if ((sli->flags&XkbSLI_HasOwnState)==0)
-	kbd = inputInfo.keyboard;
-    XkbFlushLedEvents(dev,kbd,sli,&ed,&changes,&cause);
+        kbd = inputInfo.keyboard;
+    XkbFlushLedEvents(dev, kbd, sli, &ed, &changes, &cause);
+
+    return Success;
+}
+
+int
+ProcXkbSetNamedIndicator(ClientPtr client)
+{
+    int                         rc;
+    DeviceIntPtr                dev;
+    int                         led = 0;
+    XkbIndicatorMapPtr          map;
+
+    REQUEST(xkbSetNamedIndicatorReq);
+    REQUEST_SIZE_MATCH(xkbSetNamedIndicatorReq);
+
+    if (!(client->xkbClientFlags&_XkbClientInitialized))
+	return BadAccess;
+
+    CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+    CHK_ATOM_ONLY(stuff->indicator);
+    CHK_MASK_LEGAL(0x10,stuff->whichGroups,XkbIM_UseAnyGroup);
+    CHK_MASK_LEGAL(0x11,stuff->whichMods,XkbIM_UseAnyMods);
+
+    /* Dry-run for checks */
+    rc = _XkbCreateIndicatorMap(dev, stuff->indicator,
+                                stuff->ledClass, stuff->ledID,
+                                &map, &led, TRUE);
+    if (rc != Success || !map) /* couldn't be created or didn't exist */
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd ||
+        stuff->deviceSpec == XkbUseCorePtr)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && !other->isMaster && (other->u.master == dev) &&
+                (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
+            {
+                rc = _XkbCreateIndicatorMap(other, stuff->indicator,
+                                            stuff->ledClass, stuff->ledID,
+                                            &map, &led, TRUE);
+                if (rc != Success || !map)
+                    return rc;
+            }
+        }
+    }
+
+    /* All checks passed, let's do it */
+    rc = _XkbSetNamedIndicator(client, dev, stuff);
+    if (rc != Success)
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd ||
+        stuff->deviceSpec == XkbUseCorePtr)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && !other->isMaster && (other->u.master == dev) &&
+                (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
+            {
+                _XkbSetNamedIndicator(client, other, stuff);
+            }
+        }
+    }
+
     return client->noClientException;
 }
 
commit a609dbed7cf854a6ee9d33c7cf45615db9da1fb9
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 16:38:59 2008 +0930

    xkb: ProcXkbSetIndicatorMap should work on all attached SDs.
    
    If called with XkbUseCoreKbd, run through all attached SDs and replicate the
    call. This way, we keep the SDs in sync with the MD as long as core clients
    control the MDs.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index ea11e6f..0628101 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3071,17 +3071,59 @@ XkbIndicatorPtr		leds;
     return XkbSendIndicatorMap(client,leds,&rep);
 }
 
-/* FIXME: Needs to set indicator map on all core-sending devices. */
+/**
+ * Apply the given map to the given device. Which specifies which components
+ * to apply.
+ */
+static int
+_XkbSetIndicatorMap(ClientPtr client, DeviceIntPtr dev,
+                    int which, xkbIndicatorMapWireDesc *desc)
+{
+    XkbSrvInfoPtr       xkbi;
+    XkbSrvLedInfoPtr    sli;
+    XkbEventCauseRec    cause;
+    int                 i, bit;
+
+    xkbi = dev->key->xkbInfo;
+
+    sli= XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId,
+						XkbXI_IndicatorMapsMask);
+    if (!sli)
+	return BadAlloc;
+
+    for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) {
+	if (which & bit) {
+	    sli->maps[i].flags = desc->flags;
+	    sli->maps[i].which_groups = desc->whichGroups;
+	    sli->maps[i].groups = desc->groups;
+	    sli->maps[i].which_mods = desc->whichMods;
+	    sli->maps[i].mods.mask = desc->mods;
+	    sli->maps[i].mods.real_mods = desc->mods;
+	    sli->maps[i].mods.vmods= desc->virtualMods;
+	    sli->maps[i].ctrls = desc->ctrls;
+	    if (desc->virtualMods!=0) {
+		unsigned tmp;
+		tmp= XkbMaskForVMask(xkbi->desc,desc->virtualMods);
+		sli->maps[i].mods.mask= desc->mods|tmp;
+	    }
+	    desc++;
+	}
+    }
+
+    XkbSetCauseXkbReq(&cause,X_kbSetIndicatorMap,client);
+    XkbApplyLedMapChanges(dev,sli,which,NULL,NULL,&cause);
+
+    return Success;
+}
+
 int
 ProcXkbSetIndicatorMap(ClientPtr client)
 {
-    register int 	i,bit;
-    int			nIndicators;
-    DeviceIntPtr 	dev;
-    XkbSrvInfoPtr	xkbi;
-    xkbIndicatorMapWireDesc *from;
-    XkbSrvLedInfoPtr	sli;
-    XkbEventCauseRec	cause;
+    int                 i, bit;
+    int                 nIndicators;
+    DeviceIntPtr        dev;
+    xkbIndicatorMapWireDesc     *from;
+    int                 rc;
 
     REQUEST(xkbSetIndicatorMapReq);
     REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq);
@@ -3091,8 +3133,6 @@ ProcXkbSetIndicatorMap(ClientPtr client)
 
     CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
 
-    xkbi= dev->key->xkbInfo;
-
     if (stuff->which==0)
 	return client->noClientException;
 
@@ -3105,16 +3145,11 @@ ProcXkbSetIndicatorMap(ClientPtr client)
 	return BadLength;
     }
 
-    sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,
-						XkbXI_IndicatorMapsMask);
-    if (!sli)
-	return BadAlloc;
-
     from = (xkbIndicatorMapWireDesc *)&stuff[1];
     for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
 	if (stuff->which&bit) {
 	    if (client->swapped) {
-		register int n;
+		int n;
 		swaps(&from->virtualMods,n);
 		swapl(&from->ctrls,n);
 	    }
@@ -3125,28 +3160,25 @@ ProcXkbSetIndicatorMap(ClientPtr client)
     }
 
     from = (xkbIndicatorMapWireDesc *)&stuff[1];
-    for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
-	if (stuff->which&bit) {
-	    sli->maps[i].flags = from->flags;
-	    sli->maps[i].which_groups = from->whichGroups;
-	    sli->maps[i].groups = from->groups;
-	    sli->maps[i].which_mods = from->whichMods;
-	    sli->maps[i].mods.mask = from->mods;
-	    sli->maps[i].mods.real_mods = from->mods;
-	    sli->maps[i].mods.vmods= from->virtualMods;
-	    sli->maps[i].ctrls = from->ctrls;
-	    if (from->virtualMods!=0) {
-		unsigned tmp;
-		tmp= XkbMaskForVMask(xkbi->desc,from->virtualMods);
-		sli->maps[i].mods.mask= from->mods|tmp;
-	    }
-	    from++;
-	}
+    rc = _XkbSetIndicatorMap(client, dev, stuff->which, from);
+    if (rc != Success)
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess);
+                if (rc == Success)
+                    _XkbSetIndicatorMap(client, other, stuff->which, from);
+            }
+        }
     }
 
-    XkbSetCauseXkbReq(&cause,X_kbSetIndicatorMap,client);
-    XkbApplyLedMapChanges(dev,sli,stuff->which,NULL,NULL,&cause);
-    return client->noClientException;
+    return Success;
 }
 
 /***====================================================================***/
commit e8c2a3d7c996cb41c4c44ba67acae5ff9438fc06
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 16:37:39 2008 +0930

    xkb: ProcXkbSetCompatMap should work on all attached SDs.
    
    If called with XkbUseCoreKbd, run through all attached SDs and replicate the
    call. This way, we keep the SDs in sync with the MD as long as core clients
    control the MDs.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 722c13b..ea11e6f 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -2727,57 +2727,58 @@ ProcXkbGetCompatMap(ClientPtr client)
     return XkbSendCompatMap(client,compat,&rep);
 }
 
-/* FIXME: Needs to set compat map on all core-sending devices. */
-int
-ProcXkbSetCompatMap(ClientPtr client)
+/**
+ * Apply the given request on the given device.
+ * If dryRun is True, then value checks are performed, but the device isn't
+ * modified.
+ */
+static int
+_XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
+                 xkbSetCompatMapReq *req, char* data, BOOL dryRun)
 {
-    DeviceIntPtr 	dev;
-    XkbSrvInfoPtr 	xkbi;
-    XkbDescPtr		xkb;
-    XkbCompatMapPtr 	compat;
-    char	*	data;
-    int		 	nGroups;
-    register unsigned	i,bit;
-
-    REQUEST(xkbSetCompatMapReq);
-    REQUEST_AT_LEAST_SIZE(xkbSetCompatMapReq);
-
-    if (!(client->xkbClientFlags&_XkbClientInitialized))
-	return BadAccess;
-
-    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+    XkbSrvInfoPtr       xkbi;
+    XkbDescPtr          xkb;
+    XkbCompatMapPtr     compat;
+    int                 nGroups;
+    unsigned            i,bit;
 
-    data = (char *)&stuff[1];
     xkbi = dev->key->xkbInfo;
-    xkb= xkbi->desc;
-    compat= xkb->compat;
-    if ((stuff->nSI>0)||(stuff->truncateSI)) {
+    xkb = xkbi->desc;
+    compat = xkb->compat;
+
+    if ((req->nSI>0)||(req->truncateSI)) {
 	xkbSymInterpretWireDesc *wire;
-	if (stuff->firstSI>compat->num_si) {
+	if (req->firstSI>compat->num_si) {
 	    client->errorValue = _XkbErrCode2(0x02,compat->num_si);
 	    return BadValue;
 	}
 	wire= (xkbSymInterpretWireDesc *)data;
-	wire+= stuff->nSI;
+	wire+= req->nSI;
 	data = (char *)wire;
     }
+
     nGroups= 0;
-    if (stuff->groups!=0) {
+    if (req->groups!=0) {
 	for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
-	    if ( stuff->groups&bit )
+	    if ( req->groups&bit )
 		nGroups++;
 	}
     }
     data+= nGroups*SIZEOF(xkbModsWireDesc);
-    if (((data-((char *)stuff))/4)!=stuff->length) {
+    if (((data-((char *)req))/4)!=req->length) {
 	return BadLength;
     }
-    data = (char *)&stuff[1];
-    if (stuff->nSI>0) {
+
+    /* Done all the checks we can do */
+    if (dryRun)
+        return Success;
+
+    data = (char *)&req[1];
+    if (req->nSI>0) {
 	xkbSymInterpretWireDesc *wire = (xkbSymInterpretWireDesc *)data;
 	XkbSymInterpretPtr	sym;
-	if ((unsigned)(stuff->firstSI+stuff->nSI)>compat->num_si) {
-	    compat->num_si= stuff->firstSI+stuff->nSI;
+	if ((unsigned)(req->firstSI+req->nSI)>compat->num_si) {
+	    compat->num_si= req->firstSI+req->nSI;
 	    compat->sym_interpret= _XkbTypedRealloc(compat->sym_interpret,
 						   compat->num_si,
 						   XkbSymInterpretRec);
@@ -2786,13 +2787,13 @@ ProcXkbSetCompatMap(ClientPtr client)
 		return BadAlloc;
 	    }
 	}
-	else if (stuff->truncateSI) {
-	    compat->num_si = stuff->firstSI+stuff->nSI;
+	else if (req->truncateSI) {
+	    compat->num_si = req->firstSI+req->nSI;
 	}
-	sym = &compat->sym_interpret[stuff->firstSI];
-	for (i=0;i<stuff->nSI;i++,wire++,sym++) {
+	sym = &compat->sym_interpret[req->firstSI];
+	for (i=0;i<req->nSI;i++,wire++,sym++) {
 	    if (client->swapped) {
-		register int n;
+		int n;
 		swapl(&wire->sym,n);
 	    }
 	    sym->sym= wire->sym;
@@ -2801,21 +2802,21 @@ ProcXkbSetCompatMap(ClientPtr client)
 	    sym->flags= wire->flags;
 	    sym->virtual_mod= wire->virtualMod;
 	    memcpy((char *)&sym->act,(char *)&wire->act,
-	    					SIZEOF(xkbActionWireDesc));
+                   SIZEOF(xkbActionWireDesc));
 	}
 	data = (char *)wire;
     }
-    else if (stuff->truncateSI) {
-	compat->num_si = stuff->firstSI;
+    else if (req->truncateSI) {
+	compat->num_si = req->firstSI;
     }
 
-    if (stuff->groups!=0) {
-	register unsigned i,bit;
+    if (req->groups!=0) {
+	unsigned i, bit;
 	xkbModsWireDesc *wire = (xkbModsWireDesc *)data;
-	for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
-	    if (stuff->groups&bit) {
+	for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) {
+	    if (req->groups & bit) {
 		if (client->swapped) {
-		    register int n;
+		    int n;
 		    swaps(&wire->virtualMods,n);
 		}
 		compat->groups[i].mask= wire->realMods;
@@ -2831,23 +2832,23 @@ ProcXkbSetCompatMap(ClientPtr client)
 	    }
 	}
     }
-    i= XkbPaddedSize((data-((char *)stuff)));
-    if ((i/4)!=stuff->length) {
-	ErrorF("[xkb] Internal length error on read in ProcXkbSetCompatMap\n");
+    i= XkbPaddedSize((data-((char *)req)));
+    if ((i/4)!=req->length) {
+	ErrorF("[xkb] Internal length error on read in _XkbSetCompatMap\n");
 	return BadLength;
     }
-    
+
     if (dev->xkb_interest) {
 	xkbCompatMapNotify ev;
 	ev.deviceID = dev->id;
-	ev.changedGroups = stuff->groups;
-	ev.firstSI = stuff->firstSI;
-	ev.nSI = stuff->nSI;
+	ev.changedGroups = req->groups;
+	ev.firstSI = req->firstSI;
+	ev.nSI = req->nSI;
 	ev.nTotalSI = compat->num_si;
 	XkbSendCompatMapNotify(dev,&ev);
     }
 
-    if (stuff->recomputeActions) {
+    if (req->recomputeActions) {
 	XkbChangesRec		change;
 	unsigned		check;
 	XkbEventCauseRec	cause;
@@ -2861,6 +2862,71 @@ ProcXkbSetCompatMap(ClientPtr client)
 	XkbUpdateCoreDescription(dev,False);
 	XkbSendNotification(dev,&change,&cause);
     }
+    return Success;
+}
+
+int
+ProcXkbSetCompatMap(ClientPtr client)
+{
+    DeviceIntPtr        dev;
+    char                *data;
+    int                 rc;
+
+    REQUEST(xkbSetCompatMapReq);
+    REQUEST_AT_LEAST_SIZE(xkbSetCompatMapReq);
+
+    if (!(client->xkbClientFlags&_XkbClientInitialized))
+	return BadAccess;
+
+    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+
+    data = (char *)&stuff[1];
+
+    /* check first using a dry-run */
+    rc = _XkbSetCompatMap(client, dev, stuff, data, TRUE);
+    if (rc != Success)
+        return rc;
+    if (stuff->deviceSpec == XkbUseCoreKbd)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                {
+                    /* dry-run */
+                    rc = _XkbSetCompatMap(client, other, stuff, data, TRUE);
+                    if (rc != Success)
+                        return rc;
+                }
+            }
+        }
+    }
+
+    /* Yay, the dry-runs succeed. Let's apply */
+    rc = _XkbSetCompatMap(client, dev, stuff, data, TRUE);
+    if (rc != Success)
+        return rc;
+    if (stuff->deviceSpec == XkbUseCoreKbd)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                {
+                    rc = _XkbSetCompatMap(client, other, stuff, data, TRUE);
+                    if (rc != Success)
+                        return rc;
+                }
+            }
+        }
+    }
+
     return client->noClientException;
 }
 
commit 3c7740aa8f21c1fda4190a1bf5d6ce089db5e35b
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 16:36:00 2008 +0930

    xkb: ProcXkbSetMap should work on all attached SDs.
    
    If called with XkbUseCoreKbd, run through all attached SDs and replicate the
    call. This way, we keep the SDs in sync with the MD as long as core clients
    control the MDs.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index bad6843..722c13b 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -2332,158 +2332,165 @@ XkbServerMapPtr		srv = xkbi->desc->server;
     return (char *)wire;
 }
 
-/* FIXME: Needs to set map on all core-sending devices. */
-int
-ProcXkbSetMap(ClientPtr client)
+/**
+ * Check if the given request can be applied to the given device but don't
+ * actually do anything..
+ */
+static int
+_XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char* values)
 {
-    DeviceIntPtr	dev;
-    XkbSrvInfoPtr	xkbi;
-    XkbDescPtr		xkb;
-    XkbChangesRec	change;
-    XkbEventCauseRec	cause;
-    int			nTypes = 0,nActions,error;
-    char *		tmp;
-    CARD8	 	mapWidths[XkbMaxLegalKeyCode+1];
-    CARD16	 	symsPerKey[XkbMaxLegalKeyCode+1];
-    Bool		sentNKN;
+    XkbSrvInfoPtr       xkbi;
+    XkbDescPtr          xkb;
+    int                 error;
+    int                 nTypes = 0, nActions;
+    CARD8               mapWidths[XkbMaxLegalKeyCode + 1];
+    CARD16              symsPerKey[XkbMaxLegalKeyCode + 1];
 
-    REQUEST(xkbSetMapReq);
-    REQUEST_AT_LEAST_SIZE(xkbSetMapReq);
-
-    if (!(client->xkbClientFlags&_XkbClientInitialized))
-	return BadAccess;
-
-    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
-    CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask);
-
-    XkbSetCauseXkbReq(&cause,X_kbSetMap,client);
     xkbi= dev->key->xkbInfo;
     xkb = xkbi->desc;
 
-    if ((xkb->min_key_code!=stuff->minKeyCode)||
-    				(xkb->max_key_code!=stuff->maxKeyCode)) {
+    if ((xkb->min_key_code != req->minKeyCode)||
+        (xkb->max_key_code != req->maxKeyCode)) {
 	if (client->vMajor!=1) { /* pre 1.0 versions of Xlib have a bug */
-	    stuff->minKeyCode= xkb->min_key_code;
-	    stuff->maxKeyCode= xkb->max_key_code;
+	    req->minKeyCode= xkb->min_key_code;
+	    req->maxKeyCode= xkb->max_key_code;
 	}
 	else {
-	    if (!XkbIsLegalKeycode(stuff->minKeyCode)) {
-		client->errorValue= _XkbErrCode3(2,stuff->minKeyCode,
-							stuff->maxKeyCode);
+	    if (!XkbIsLegalKeycode(req->minKeyCode)) {
+		client->errorValue = _XkbErrCode3(2, req->minKeyCode, req->maxKeyCode);
 		return BadValue;
 	    }
-	    if (stuff->minKeyCode>stuff->maxKeyCode) {
-		client->errorValue= _XkbErrCode3(3,stuff->minKeyCode,
-							stuff->maxKeyCode);
+	    if (req->minKeyCode > req->maxKeyCode) {
+		client->errorValue = _XkbErrCode3(3, req->minKeyCode, req->maxKeyCode);
 		return BadMatch;
 	    }
 	}
     }
 
-    tmp = (char *)&stuff[1];
-    if ((stuff->present&XkbKeyTypesMask)&&
-	(!CheckKeyTypes(client,xkb,stuff,(xkbKeyTypeWireDesc **)&tmp,
+    if ((req->present & XkbKeyTypesMask) &&
+	(!CheckKeyTypes(client,xkb,req,(xkbKeyTypeWireDesc **)&values,
 						&nTypes,mapWidths))) {
 	client->errorValue = nTypes;
 	return BadValue;
     }
-    if ((stuff->present&XkbKeySymsMask)&&
-	(!CheckKeySyms(client,xkb,stuff,nTypes,mapWidths,symsPerKey,
-					(xkbSymMapWireDesc **)&tmp,&error))) {
+    if ((req->present & XkbKeySymsMask) &&
+	(!CheckKeySyms(client,xkb,req,nTypes,mapWidths,symsPerKey,
+					(xkbSymMapWireDesc **)&values,&error))) {
 	client->errorValue = error;
 	return BadValue;
     }
 
-    if ((stuff->present&XkbKeyActionsMask)&&
-	(!CheckKeyActions(xkb,stuff,nTypes,mapWidths,symsPerKey,
-						(CARD8 **)&tmp,&nActions))) {
+    if ((req->present & XkbKeyActionsMask) &&
+	(!CheckKeyActions(xkb,req,nTypes,mapWidths,symsPerKey,
+						(CARD8 **)&values,&nActions))) {
 	client->errorValue = nActions;
 	return BadValue;
     }
 
-    if ((stuff->present&XkbKeyBehaviorsMask)&&
-	(!CheckKeyBehaviors(xkb,stuff,(xkbBehaviorWireDesc**)&tmp,&error))) {
+    if ((req->present & XkbKeyBehaviorsMask) &&
+	(!CheckKeyBehaviors(xkb,req,(xkbBehaviorWireDesc**)&values,&error))) {
 	client->errorValue = error;
 	return BadValue;
     }
 
-    if ((stuff->present&XkbVirtualModsMask)&&
-	(!CheckVirtualMods(xkb,stuff,(CARD8 **)&tmp,&error))) {
+    if ((req->present & XkbVirtualModsMask) &&
+	(!CheckVirtualMods(xkb,req,(CARD8 **)&values,&error))) {
 	client->errorValue= error;
 	return BadValue;
     }
-    if ((stuff->present&XkbExplicitComponentsMask)&&
-	(!CheckKeyExplicit(xkb,stuff,(CARD8 **)&tmp,&error))) {
+    if ((req->present&XkbExplicitComponentsMask) &&
+	(!CheckKeyExplicit(xkb,req,(CARD8 **)&values,&error))) {
 	client->errorValue= error;
 	return BadValue;
     }
-    if ((stuff->present&XkbModifierMapMask)&&
-	(!CheckModifierMap(xkb,stuff,(CARD8 **)&tmp,&error))) {
+    if ((req->present&XkbModifierMapMask) &&
+	(!CheckModifierMap(xkb,req,(CARD8 **)&values,&error))) {
 	client->errorValue= error;
 	return BadValue;
     }
-    if ((stuff->present&XkbVirtualModMapMask)&&
-	(!CheckVirtualModMap(xkb,stuff,(xkbVModMapWireDesc **)&tmp,&error))) {
+    if ((req->present&XkbVirtualModMapMask) &&
+	(!CheckVirtualModMap(xkb,req,(xkbVModMapWireDesc **)&values,&error))) {
 	client->errorValue= error;
 	return BadValue;
     }
-    if (((tmp-((char *)stuff))/4)!=stuff->length) {
+
+    if (((values-((char *)req))/4)!= req->length) {
 	ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after check)\n");
-	client->errorValue = tmp-((char *)&stuff[1]);
+	client->errorValue = values-((char *)&req[1]);
 	return BadLength;
     }
-    bzero(&change,sizeof(change));
-    sentNKN= False;
-    if ((xkb->min_key_code!=stuff->minKeyCode)||
-    				(xkb->max_key_code!=stuff->maxKeyCode)) {
+
+    return Success;
+}
+
+/**
+ * Apply the given request on the given device.
+ */
+static int
+_XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char *values)
+{
+    XkbEventCauseRec	cause;
+    XkbChangesRec	change;
+    Bool		sentNKN;
+    XkbSrvInfoPtr       xkbi;
+    XkbDescPtr          xkb;
+
+    xkbi= dev->key->xkbInfo;
+    xkb = xkbi->desc;
+
+    XkbSetCauseXkbReq(&cause,X_kbSetMap,client);
+    bzero(&change, sizeof(change));
+    sentNKN = False;
+    if ((xkb->min_key_code!=req->minKeyCode)||
+        (xkb->max_key_code!=req->maxKeyCode)) {
 	Status			status;
 	xkbNewKeyboardNotify	nkn;
-	nkn.deviceID= nkn.oldDeviceID= dev->id;
-	nkn.oldMinKeyCode= xkb->min_key_code;
-	nkn.oldMaxKeyCode= xkb->max_key_code;
-	status= XkbChangeKeycodeRange(xkb,stuff->minKeyCode,stuff->maxKeyCode,
-								&change);
-	if (status!=Success)
-	    return status;
-	nkn.minKeyCode= xkb->min_key_code;
-	nkn.maxKeyCode= xkb->max_key_code;
-	nkn.requestMajor= XkbReqCode;
-	nkn.requestMinor= X_kbSetMap;
-	nkn.changed= XkbNKN_KeycodesMask;
+	nkn.deviceID = nkn.oldDeviceID = dev->id;
+	nkn.oldMinKeyCode = xkb->min_key_code;
+	nkn.oldMaxKeyCode = xkb->max_key_code;
+	status= XkbChangeKeycodeRange(xkb, req->minKeyCode,
+                                      req->maxKeyCode, &change);
+	if (status != Success)
+	    return status; /* oh-oh. what about the other keyboards? */
+	nkn.minKeyCode = xkb->min_key_code;
+	nkn.maxKeyCode = xkb->max_key_code;
+	nkn.requestMajor = XkbReqCode;
+	nkn.requestMinor = X_kbSetMap;
+	nkn.changed = XkbNKN_KeycodesMask;
 	XkbSendNewKeyboardNotify(dev,&nkn);
-	sentNKN= True;
-    }
-    tmp = (char *)&stuff[1];
-    if (stuff->present&XkbKeyTypesMask) {
-	tmp = SetKeyTypes(xkb,stuff,(xkbKeyTypeWireDesc *)tmp,&change);
-	if (!tmp)	goto allocFailure;
-    }
-    if (stuff->present&XkbKeySymsMask) {
-	tmp = SetKeySyms(client,xkb,stuff,(xkbSymMapWireDesc *)tmp,&change,dev);
-	if (!tmp)	goto allocFailure;
-    }
-    if (stuff->present&XkbKeyActionsMask) {
-	tmp = SetKeyActions(xkb,stuff,(CARD8 *)tmp,&change);
-	if (!tmp)	goto allocFailure;
-    }
-    if (stuff->present&XkbKeyBehaviorsMask) {
-	tmp= SetKeyBehaviors(xkbi,stuff,(xkbBehaviorWireDesc *)tmp,&change);
-	if (!tmp)	goto allocFailure;
-    }
-    if (stuff->present&XkbVirtualModsMask)
-	tmp= SetVirtualMods(xkbi,stuff,(CARD8 *)tmp,&change);
-    if (stuff->present&XkbExplicitComponentsMask)
-	tmp= SetKeyExplicit(xkbi,stuff,(CARD8 *)tmp,&change);
-    if (stuff->present&XkbModifierMapMask)
-	tmp= SetModifierMap(xkbi,stuff,(CARD8 *)tmp,&change);
-    if (stuff->present&XkbVirtualModMapMask)
-	tmp= SetVirtualModMap(xkbi,stuff,(xkbVModMapWireDesc *)tmp,&change);
-    if (((tmp-((char *)stuff))/4)!=stuff->length) {
+	sentNKN = True;
+    }
+
+    if (req->present&XkbKeyTypesMask) {
+	values = SetKeyTypes(xkb,req,(xkbKeyTypeWireDesc *)values,&change);
+	if (!values)	goto allocFailure;
+    }
+    if (req->present&XkbKeySymsMask) {
+	values = SetKeySyms(client,xkb,req,(xkbSymMapWireDesc *)values,&change,dev);
+	if (!values)	goto allocFailure;
+    }
+    if (req->present&XkbKeyActionsMask) {
+	values = SetKeyActions(xkb,req,(CARD8 *)values,&change);
+	if (!values)	goto allocFailure;
+    }
+    if (req->present&XkbKeyBehaviorsMask) {
+	values= SetKeyBehaviors(xkbi,req,(xkbBehaviorWireDesc *)values,&change);
+	if (!values)	goto allocFailure;
+    }
+    if (req->present&XkbVirtualModsMask)
+	values= SetVirtualMods(xkbi,req,(CARD8 *)values,&change);
+    if (req->present&XkbExplicitComponentsMask)
+	values= SetKeyExplicit(xkbi,req,(CARD8 *)values,&change);
+    if (req->present&XkbModifierMapMask)
+	values= SetModifierMap(xkbi,req,(CARD8 *)values,&change);
+    if (req->present&XkbVirtualModMapMask)
+	values= SetVirtualModMap(xkbi,req,(xkbVModMapWireDesc *)values,&change);
+    if (((values-((char *)req))/4)!=req->length) {
 	ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after set)\n");
-	client->errorValue = tmp-((char *)&stuff[1]);
+	client->errorValue = values-((char *)&req[1]);
 	return BadLength;
     }
-    if (stuff->flags&XkbSetMapRecomputeActions) {
+    if (req->flags&XkbSetMapRecomputeActions) {
 	KeyCode		first,last,firstMM,lastMM;
 	if (change.map.num_key_syms>0) {
 	    first= change.map.first_key_sym;
@@ -2516,11 +2523,82 @@ ProcXkbSetMap(ClientPtr client)
 	XkbSendNotification(dev,&change,&cause);
 
     XkbUpdateCoreDescription(dev,False);
-    return client->noClientException;
+    return Success;
 allocFailure:
     return BadAlloc;
 }
 
+
+int
+ProcXkbSetMap(ClientPtr client)
+{
+    DeviceIntPtr	dev;
+    char *		tmp;
+    int                 rc;
+
+    REQUEST(xkbSetMapReq);
+    REQUEST_AT_LEAST_SIZE(xkbSetMapReq);
+
+    if (!(client->xkbClientFlags&_XkbClientInitialized))
+	return BadAccess;
+
+    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
+    CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask);
+
+    tmp = (char *)&stuff[1];
+
+    /* Check if we can to the SetMap on the requested device. If this
+       succeeds, do the same thing for all extension devices (if needed).
+       If any of them fails, fail.  */
+    rc = _XkbSetMapChecks(client, dev, stuff, tmp);
+
+    if (rc != Success)
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                {
+                    rc = _XkbSetMapChecks(client, other, stuff, tmp);
+                    if (rc != Success)
+                        return rc;
+                }
+            }
+        }
+    }
+
+    /* We know now that we will succed with the SetMap. In theory anyway. */
+    rc = _XkbSetMap(client, dev, stuff, tmp);
+    if (rc != Success)
+        return rc;
+
+    if (stuff->deviceSpec == XkbUseCoreKbd)
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
+                if (rc == Success)
+                    _XkbSetMap(client, other, stuff, tmp);
+                /* ignore rc. if the SetMap failed although the check above
+                   reported true there isn't much we can do. we still need to
+                   set all other devices, hoping that at least they stay in
+                   sync. */
+            }
+        }
+    }
+
+    return client->noClientException;
+}
+
 /***====================================================================***/
 
 static Status
commit 31afd51dd49c0d0db2465fbc987044fab8b89f22
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 16:32:37 2008 +0930

    xkb: ProcXkbBell should work on all attached SDs.
    
    If called with XkbUseCoreKbd, run through all attached SDs and replicate the
    call. This way, we keep the SDs in sync with the MD as long as core clients
    control the MDs.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 696586a..bad6843 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -348,17 +348,119 @@ ProcXkbSelectEvents(ClientPtr client)
 }
 
 /***====================================================================***/
+/**
+ * Ring a bell on the given device for the given client.
+ */
+static int
+_XkbBell(ClientPtr client, DeviceIntPtr dev, WindowPtr pWin,
+         int bellClass, int bellID, int pitch, int duration,
+         int percent, int forceSound, int eventOnly, Atom name)
+{
+    int         base;
+    pointer     ctrl;
+    int         oldPitch, oldDuration;
+    int         newPercent;
+
+    if (bellClass == KbdFeedbackClass) {
+        KbdFeedbackPtr	k;
+        if (bellID==XkbDfltXIId)
+            k= dev->kbdfeed;
+        else {
+            for (k=dev->kbdfeed; k; k=k->next) {
+                if (k->ctrl.id == bellID)
+                    break;
+            }
+        }
+        if (!k) {
+            client->errorValue = _XkbErrCode2(0x5,bellID);
+            return BadValue;
+        }
+        base = k->ctrl.bell;
+        ctrl = (pointer) &(k->ctrl);
+        oldPitch= k->ctrl.bell_pitch;
+        oldDuration= k->ctrl.bell_duration;
+        if (pitch!=0) {
+            if (pitch==-1)
+                k->ctrl.bell_pitch= defaultKeyboardControl.bell_pitch;
+            else k->ctrl.bell_pitch= pitch;
+        }
+        if (duration!=0) {
+            if (duration==-1)
+                k->ctrl.bell_duration= defaultKeyboardControl.bell_duration;
+            else k->ctrl.bell_duration= duration;
+        }
+    }
+    else if (bellClass == BellFeedbackClass) {
+        BellFeedbackPtr	b;
+        if (bellID==XkbDfltXIId)
+            b= dev->bell;
+        else {
+            for (b=dev->bell; b; b=b->next) {
+                if (b->ctrl.id == bellID)
+                    break;
+            }
+        }
+        if (!b) {
+            client->errorValue = _XkbErrCode2(0x6,bellID);
+            return BadValue;
+        }
+        base = b->ctrl.percent;
+        ctrl = (pointer) &(b->ctrl);
+        oldPitch= b->ctrl.pitch;
+        oldDuration= b->ctrl.duration;
+        if (pitch!=0) {
+            if (pitch==-1)
+                b->ctrl.pitch= defaultKeyboardControl.bell_pitch;
+            else b->ctrl.pitch= pitch;
+        }
+        if (duration!=0) {
+            if (duration==-1)
+                b->ctrl.duration= defaultKeyboardControl.bell_duration;
+            else b->ctrl.duration= duration;
+        }
+    }
+    else {
+        client->errorValue = _XkbErrCode2(0x7, bellClass);;
+        return BadValue;
+    }
+
+    newPercent = (base * percent)/100;
+    if (percent < 0)
+         newPercent = base + newPercent;
+    else newPercent = base - newPercent + percent;
+
+    XkbHandleBell(forceSound, eventOnly,
+                  dev, newPercent, ctrl, bellClass,
+                  name, pWin, client);
+    if ((pitch!=0)||(duration!=0)) {
+        if (bellClass == KbdFeedbackClass) {
+            KbdFeedbackPtr      k;
+            k= (KbdFeedbackPtr)ctrl;
+            if (pitch!=0)
+                k->ctrl.bell_pitch= oldPitch;
+            if (duration!=0)
+                k->ctrl.bell_duration= oldDuration;
+        }
+        else {
+            BellFeedbackPtr     b;
+            b= (BellFeedbackPtr)ctrl;
+            if (pitch!=0)
+                b->ctrl.pitch= oldPitch;
+            if (duration!=0)
+                b->ctrl.duration= oldDuration;
+        }
+    }
+
+    return Success;
+}
 
-/* FIXME: Needs to ding on all core-sending devices. */
 int
 ProcXkbBell(ClientPtr client)
 {
     REQUEST(xkbBellReq);
     DeviceIntPtr dev;
     WindowPtr	 pWin;
-    int rc, base;
-    int newPercent,oldPitch,oldDuration;
-    pointer ctrl;
+    int rc;
 
     REQUEST_SIZE_MATCH(xkbBellReq);
 
@@ -368,6 +470,7 @@ ProcXkbBell(ClientPtr client)
     CHK_BELL_DEVICE(dev, stuff->deviceSpec, client, DixBellAccess);
     CHK_ATOM_OR_NONE(stuff->name);
 
+    /* device-independent checks request for sane values */
     if ((stuff->forceSound)&&(stuff->eventOnly)) {
 	client->errorValue=_XkbErrCode3(0x1,stuff->forceSound,stuff->eventOnly);
 	return BadMatch;
@@ -390,68 +493,7 @@ ProcXkbBell(ClientPtr client)
 	     stuff->bellClass= KbdFeedbackClass;
 	else stuff->bellClass= BellFeedbackClass;
     }
-    if (stuff->bellClass == KbdFeedbackClass) {
-	KbdFeedbackPtr	k;
-	if (stuff->bellID==XkbDfltXIId) 
-	    k= dev->kbdfeed;
-	else {
-	    for (k=dev->kbdfeed; k; k=k->next) {
-		if (k->ctrl.id == stuff->bellID)
-		    break;
-	    }
-	}
-	if (!k) {
-	    client->errorValue= _XkbErrCode2(0x5,stuff->bellID);
-	    return BadValue;
-	}
-	base = k->ctrl.bell;
-	ctrl = (pointer) &(k->ctrl);
-	oldPitch= k->ctrl.bell_pitch;
-	oldDuration= k->ctrl.bell_duration;
-	if (stuff->pitch!=0) {
-	    if (stuff->pitch==-1)
-		 k->ctrl.bell_pitch= defaultKeyboardControl.bell_pitch;
-	    else k->ctrl.bell_pitch= stuff->pitch;
-	}
-	if (stuff->duration!=0) {
-	    if (stuff->duration==-1)
-		 k->ctrl.bell_duration= defaultKeyboardControl.bell_duration;
-	    else k->ctrl.bell_duration= stuff->duration;
-	}
-    }
-    else if (stuff->bellClass == BellFeedbackClass) {
-	BellFeedbackPtr	b;
-	if (stuff->bellID==XkbDfltXIId)
-	    b= dev->bell;
-	else {
-	    for (b=dev->bell; b; b=b->next) {
-		if (b->ctrl.id == stuff->bellID)
-		    break;
-	    }
-	}
-	if (!b) {
-	    client->errorValue = _XkbErrCode2(0x6,stuff->bellID);
-	    return BadValue;
-	}
-	base = b->ctrl.percent;
-	ctrl = (pointer) &(b->ctrl);
-	oldPitch= b->ctrl.pitch;
-	oldDuration= b->ctrl.duration;
-	if (stuff->pitch!=0) {
-	    if (stuff->pitch==-1)
-		 b->ctrl.pitch= defaultKeyboardControl.bell_pitch;
-	    else b->ctrl.pitch= stuff->pitch;
-	}
-	if (stuff->duration!=0) {
-	    if (stuff->duration==-1)
-		 b->ctrl.duration= defaultKeyboardControl.bell_duration;
-	    else b->ctrl.duration= stuff->duration;
-	}
-    }
-    else {
-	client->errorValue = _XkbErrCode2(0x7,stuff->bellClass);;
-	return BadValue;
-    }
+
     if (stuff->window!=None) {
 	rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
 	if (rc != Success) {
@@ -461,32 +503,39 @@ ProcXkbBell(ClientPtr client)
     }
     else pWin= NULL;
 
-    newPercent= (base*stuff->percent)/100;
-    if (stuff->percent < 0)
-         newPercent= base+newPercent;
-    else newPercent= base-newPercent+stuff->percent;
-    XkbHandleBell(stuff->forceSound, stuff->eventOnly,
-				dev, newPercent, ctrl, stuff->bellClass, 
-				stuff->name, pWin, client);
-    if ((stuff->pitch!=0)||(stuff->duration!=0)) {
-	if (stuff->bellClass == KbdFeedbackClass) {
-	    KbdFeedbackPtr	k;
-	    k= (KbdFeedbackPtr)ctrl;
-	    if (stuff->pitch!=0)
-		k->ctrl.bell_pitch= oldPitch;
-	    if (stuff->duration!=0)
-		k->ctrl.bell_duration= oldDuration;
-	}
-	else {
-	    BellFeedbackPtr	b;
-	    b= (BellFeedbackPtr)ctrl;
-	    if (stuff->pitch!=0)
-		b->ctrl.pitch= oldPitch;
-	    if (stuff->duration!=0)
-		b->ctrl.duration= oldDuration;
-	}
+    /* Client wants to ring a bell on the core keyboard?
+       Ring the bell on the core keyboard (which does nothing, but if that
+       fails the client is screwed anyway), and then on all extension devices.
+       Fail if the core keyboard fails but not the extension devices.  this
+       may cause some keyboards to ding and others to stay silent. Fix
+       your client to use explicit keyboards to avoid this.
+
+       dev is the device the client requested.
+     */
+    rc = _XkbBell(client, dev, pWin, stuff->bellClass, stuff->bellID,
+                  stuff->pitch, stuff->duration, stuff->percent,
+                  stuff->forceSound, stuff->eventOnly, stuff->name);
+
+    if ((rc == Success) && ((stuff->deviceSpec == XkbUseCoreKbd) ||
+                            (stuff->deviceSpec == XkbUseCorePtr)))
+    {
+        DeviceIntPtr other;
+        for (other = inputInfo.devices; other; other = other->next)
+        {
+            if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
+            {
+                rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixBellAccess);
+                if (rc == Success)
+                    _XkbBell(client, other, pWin, stuff->bellClass,
+                             stuff->bellID, stuff->pitch, stuff->duration,
+                             stuff->percent, stuff->forceSound,
+                             stuff->eventOnly, stuff->name);
+            }
+        }
+        rc = Success; /* reset to success, that's what we got for the VCK */
     }
-    return Success;
+
+    return rc;
 }
 
 /***====================================================================***/
commit de4936d7482f820728efeef338a2041c7a9186d2
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Aug 4 20:11:45 2008 -0700

    XQuartz: Fixed proper processing of tablet button presses
    (cherry picked from commit ca0babafa4e9cf1b67ec460655bffe569ac9c3e9)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index c6c9c59..bdd075b 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -861,6 +861,7 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
 	tilt_y = 0;
 
 	switch (type) {
+		case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto check_subtype;
 		case NSLeftMouseDown:    ev_button=1; ev_type=ButtonPress; goto check_subtype;
 		case NSOtherMouseDown:   ev_button=2; ev_type=ButtonPress; goto check_subtype;
 		case NSRightMouseDown:   ev_button=3; ev_type=ButtonPress; goto check_subtype;
@@ -872,16 +873,16 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
 		case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto check_subtype;
 		
 check_subtype:
-			if ([e subtype] != NSTabletPointEventSubtype) goto handle_mouse;
+			if ([e subtype] != NSTabletPointEventSubtype) 
+                goto handle_mouse;
 			// fall through to get tablet data
 		case NSTabletPoint:
 			pressure = [e pressure];
 			tilt_x = [e tilt].x;
 			tilt_y = [e tilt].y; 
+            goto handle_mouse;
 			// fall through to normal mouse handling
 
-		case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
-
 handle_mouse:
 		DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y,
 			pressure, tilt_x, tilt_y);
commit b70a8ba3dc52b277194ab267a101a3fd15062685
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Jul 15 17:48:29 2008 -0700

    XQuartz: Nuke Sparkle.
    (cherry picked from commit 4991f54a8d84a9a8df89a99dbfc09391195578f8)

diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index 89d04c7..7b76f84 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -64,208 +64,4 @@ EXTRA_DIST = \
 	Resources/zh_CN.lproj/main.nib/keyedobjects.nib \
 	Resources/zh_TW.lproj/InfoPlist.strings \
 	Resources/zh_TW.lproj/Localizable.strings \
-	Resources/zh_TW.lproj/main.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h \
-	Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h \
-	Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h \
-	Sparkle.framework/Versions/A/Headers/NSString+extras.h \
-	Sparkle.framework/Versions/A/Headers/RSS.h \
-	Sparkle.framework/Versions/A/Headers/Sparkle.h \
-	Sparkle.framework/Versions/A/Headers/SUAppcast.h \
-	Sparkle.framework/Versions/A/Headers/SUAppcastItem.h \
-	Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h \
-	Sparkle.framework/Versions/A/Headers/SUConstants.h \
-	Sparkle.framework/Versions/A/Headers/SUStatusChecker.h \
-	Sparkle.framework/Versions/A/Headers/SUStatusController.h \
-	Sparkle.framework/Versions/A/Headers/SUUnarchiver.h \
-	Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h \
-	Sparkle.framework/Versions/A/Headers/SUUpdater.h \
-	Sparkle.framework/Versions/A/Headers/SUUtilities.h \
-	Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/Info.plist \
-	Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings \
-	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib \
-	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib \
-	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib \
-	Sparkle.framework/Versions/A/Sparkle
-
+	Resources/zh_TW.lproj/main.nib/keyedobjects.nib
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
index c93d023..a5222b2 100644
--- a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
@@ -2,12 +2,13 @@
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
 	<data>
 		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">9C7010</string>
-		<string key="IBDocument.InterfaceBuilderVersion">639</string>
-		<string key="IBDocument.AppKitVersion">949.26</string>
+		<string key="IBDocument.SystemVersion">9E17</string>
+		<string key="IBDocument.InterfaceBuilderVersion">670</string>
+		<string key="IBDocument.AppKitVersion">949.33</string>
 		<string key="IBDocument.HIToolboxVersion">352.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
+			<integer value="57"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -66,14 +67,6 @@
 									<reference key="NSOnImage" ref="531645050"/>
 									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
-								<object class="NSMenuItem" id="858487910">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Check for updates...</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
 								<object class="NSMenuItem" id="272876017">
 									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
@@ -462,7 +455,7 @@
 					<characters key="NS.bytes">View</characters>
 				</object>
 				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
-				<string key="NSWindowContentMinSize">{213, 107}</string>
+				<string key="NSWindowContentMinSize">{320, 240}</string>
 				<object class="NSView" key="NSWindowView" id="941366957">
 					<nil key="NSNextResponder"/>
 					<int key="NSvFlags">256</int>
@@ -1104,7 +1097,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				<object class="NSMutableString" key="NSViewClass">
 					<characters key="NS.bytes">View</characters>
 				</object>
-				<string key="NSWindowContentMaxSize">{10000, 10000}</string>
+				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSWindowContentMinSize">{320, 240}</string>
 				<object class="NSView" key="NSWindowView" id="85544634">
 					<nil key="NSNextResponder"/>
@@ -1452,6 +1445,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
 				<string key="NSMinSize">{320, 262}</string>
+				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSFrameAutosaveName">x11_apps</string>
 			</object>
 			<object class="NSMenu" id="294137138">
@@ -1508,9 +1502,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<string key="NSName"/>
 			</object>
-			<object class="NSCustomObject" id="556755705">
-				<string key="NSClassName">SUUpdater</string>
-			</object>
 		</object>
 		<object class="IBObjectContainer" key="IBDocument.Objects">
 			<object class="NSMutableArray" key="connectionRecords">
@@ -2011,14 +2002,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					</object>
 					<int key="connectionID">300394</int>
 				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">checkForUpdates:</string>
-						<reference key="source" ref="556755705"/>
-						<reference key="destination" ref="858487910"/>
-					</object>
-					<int key="connectionID">300397</int>
-				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
@@ -2155,7 +2138,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<reference ref="1023546148"/>
 							<reference ref="6876565"/>
 							<reference ref="479677589"/>
-							<reference ref="858487910"/>
 						</object>
 						<reference key="parent" ref="365880285"/>
 					</object>
@@ -3070,17 +3052,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<reference key="object" ref="989804990"/>
 						<reference key="parent" ref="57161931"/>
 					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300395</int>
-						<reference key="object" ref="556755705"/>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">Updater</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300396</int>
-						<reference key="object" ref="858487910"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
@@ -3217,8 +3188,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>300368.ImportedFromIB2</string>
 					<string>300370.IBPluginDependency</string>
 					<string>300370.ImportedFromIB2</string>
-					<string>300395.IBPluginDependency</string>
-					<string>300396.IBPluginDependency</string>
 					<string>305.IBPluginDependency</string>
 					<string>305.ImportedFromIB2</string>
 					<string>310.IBPluginDependency</string>
@@ -3465,8 +3434,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
@@ -3607,6 +3574,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<object class="IBPartialClassDescription">
 					<string key="className">FirstResponder</string>
+					<string key="superclassName">NSObject</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
 						<string key="majorKey">IBUserSource</string>
 						<string key="minorKey"/>
@@ -3614,6 +3582,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBPartialClassDescription">
 					<string key="className">NSFormatter</string>
+					<string key="superclassName">NSObject</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
 						<string key="majorKey">IBUserSource</string>
 						<string key="minorKey"/>
@@ -3628,123 +3597,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					</object>
 				</object>
 			</object>
-			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">SUUpdater</string>
-					<string key="superclassName">NSObject</string>
-					<object class="NSMutableDictionary" key="actions">
-						<string key="NS.key.0">checkForUpdates:</string>
-						<string key="NS.object.0">id</string>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBDocumentRelativeSource</string>
-						<string key="minorKey">../Sparkle.framework/Versions/A/Headers/SUUpdater.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">X11Controller</string>
-					<string key="superclassName">NSObject</string>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSMutableArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>apps_table_cancel:</string>
-							<string>apps_table_delete:</string>
-							<string>apps_table_done:</string>
-							<string>apps_table_duplicate:</string>
-							<string>apps_table_new:</string>
-							<string>apps_table_show:</string>
-							<string>bring_to_front:</string>
-							<string>close_window:</string>
-							<string>enable_fullscreen_changed:</string>
-							<string>minimize_window:</string>
-							<string>next_window:</string>
-							<string>prefs_changed:</string>
-							<string>prefs_show:</string>
-							<string>previous_window:</string>
-							<string>quit:</string>
-							<string>toggle_fullscreen:</string>
-							<string>x11_help:</string>
-							<string>zoom_window:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSMutableArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>apps_separator</string>
-							<string>apps_table</string>
-							<string>click_through</string>
-							<string>depth</string>
-							<string>dock_apps_menu</string>
-							<string>dock_menu</string>
-							<string>dock_window_separator</string>
-							<string>enable_auth</string>
-							<string>enable_fullscreen</string>
-							<string>enable_keyequivs</string>
-							<string>enable_tcp</string>
-							<string>fake_buttons</string>
-							<string>focus_follows_mouse</string>
-							<string>focus_on_new_window</string>
-							<string>prefs_panel</string>
-							<string>sync_keymap</string>
-							<string>toggle_fullscreen_item</string>
-							<string>use_sysbeep</string>
-							<string>window_separator</string>
-							<string>x11_about_item</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>NSMenuItem</string>
-							<string>NSTableView</string>
-							<string>NSButton</string>
-							<string>NSPopUpButton</string>
-							<string>NSMenu</string>
-							<string>NSMenu</string>
-							<string>NSMenuItem</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSPanel</string>
-							<string>NSButton</string>
-							<string>NSMenuItem</string>
-							<string>NSButton</string>
-							<string>NSMenuItem</string>
-							<string>NSMenuItem</string>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBDocumentRelativeSource</string>
-						<string key="minorKey">../../X11Controller.h</string>
-					</object>
-				</object>
-			</object>
 		</object>
 		<int key="IBDocument.localizationMode">0</int>
 		<string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib
index 066fdbe..9e8b977 100644
Binary files a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Headers b/hw/xquartz/bundle/Sparkle.framework/Headers
deleted file mode 120000
index a177d2a..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Headers
+++ /dev/null
@@ -1 +0,0 @@
-Versions/Current/Headers
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Resources b/hw/xquartz/bundle/Sparkle.framework/Resources
deleted file mode 120000
index 953ee36..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Resources
+++ /dev/null
@@ -1 +0,0 @@
-Versions/Current/Resources
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Sparkle b/hw/xquartz/bundle/Sparkle.framework/Sparkle
deleted file mode 120000
index b2c5273..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Sparkle
+++ /dev/null
@@ -1 +0,0 @@
-Versions/Current/Sparkle
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h
deleted file mode 100644
index ee901e6..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-//  NSApplication+AppCopies.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/16/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
- at interface NSApplication (SUAppCopies)
-- (int)copiesRunning;
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h
deleted file mode 100644
index c995911..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-//  NSFileManager+Authentication.m
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/9/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
- at interface NSFileManager (SUAuthenticationAdditions)
-- (BOOL)movePathWithAuthentication:(NSString *)src toPath:(NSString *)dst;
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h
deleted file mode 100644
index f0ce7c2..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-//  NSFileManager+Verification.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/16/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-// For the paranoid folks!
- at interface NSFileManager (SUVerification)
-- (BOOL)validatePath:(NSString *)path withMD5Hash:(NSString *)hash;
-- (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature;
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h
deleted file mode 100755
index 498e4d0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-
-BSD License
-
-Copyright (c) 2002, Brent Simmons
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-*	Redistributions of source code must retain the above copyright notice,
-	this list of conditions and the following disclaimer.
-*	Redistributions in binary form must reproduce the above copyright notice,
-	this list of conditions and the following disclaimer in the documentation
-	and/or other materials provided with the distribution.
-*	Neither the name of ranchero.com or Brent Simmons nor the names of its
-	contributors may be used to endorse or promote products derived
-	from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-*/
-
-
-/*
-	NSString+extras.h
-	NetNewsWire
-
-	Created by Brent Simmons on Fri Jun 14 2002.
-	Copyright (c) 2002 Brent Simmons. All rights reserved.
-*/
-
-
-#import <Foundation/Foundation.h>
-#import <CoreFoundation/CoreFoundation.h>
-
-
- at interface NSString (extras)
-
-- (NSString *)stringWithSubstitute:(NSString *)subs forCharactersFromSet:(NSCharacterSet *)set;
-
-- (NSString *) trimWhiteSpace;
-
-- (NSString *) stripHTML;
-
-- (NSString *) ellipsizeAfterNWords: (int) n;
-
-+ (BOOL) stringIsEmpty: (NSString *) s;
-
-
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h
deleted file mode 100755
index 82da04a..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-
-BSD License
-
-Copyright (c) 2002, Brent Simmons
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-*	Redistributions of source code must retain the above copyright notice,
-	this list of conditions and the following disclaimer.
-*	Redistributions in binary form must reproduce the above copyright notice,
-	this list of conditions and the following disclaimer in the documentation
-	and/or other materials provided with the distribution.
-*	Neither the name of ranchero.com or Brent Simmons nor the names of its
-	contributors may be used to endorse or promote products derived
-	from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-*/
-
-/*
-	RSS.h
-	A class for reading RSS feeds.
-
-	Created by Brent Simmons on Wed Apr 17 2002.
-	Copyright (c) 2002 Brent Simmons. All rights reserved.
-*/
-
-
-#import <Cocoa/Cocoa.h>
-#import <CoreFoundation/CoreFoundation.h>
-#import "NSString+extras.h"
-
-
- at interface RSS : NSObject {
-	
-	NSDictionary *headerItems;
-	NSMutableArray *newsItems;
-	NSString *version;
-	
-	BOOL flRdf;
-	BOOL normalize;
-	}
-
-
-/*Public*/
-
-- (RSS *) initWithTitle: (NSString *) title andDescription: (NSString *) description;
-
-- (RSS *) initWithData: (NSData *) rssData normalize: (BOOL) fl;
-
-- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl;
-- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl userAgent:(NSString *)userAgent;
-
-- (NSDictionary *) headerItems;
-
-- (NSMutableArray *) newsItems;
-
-- (NSString *) version;
-
-// AMM's extensions for Sparkle
-- (NSDictionary *)newestItem;
-
-
-/*Private*/
-
-- (void) createheaderdictionary: (CFXMLTreeRef) tree;
-
-- (void) createitemsarray: (CFXMLTreeRef) tree;
-
-- (void) setversionstring: (CFXMLTreeRef) tree;
-
-- (void) flattenimagechildren: (CFXMLTreeRef) tree into: (NSMutableDictionary *) dictionary;
-
-- (void) flattensourceattributes: (CFXMLNodeRef) node into: (NSMutableDictionary *) dictionary;
-
-- (CFXMLTreeRef) getchanneltree: (CFXMLTreeRef) tree;
-
-- (CFXMLTreeRef) getnamedtree: (CFXMLTreeRef) currentTree name: (NSString *) name;
-
-- (void) normalizeRSSItem: (NSMutableDictionary *) rssItem;
-
-- (NSString *) getelementvalue: (CFXMLTreeRef) tree;
-
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h
deleted file mode 100644
index 209fe20..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-//  SUAppcast.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/12/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
- at class RSS, SUAppcastItem;
- at interface SUAppcast : NSObject {
-	NSArray *items;
-	id delegate;
-}
-
-- (void)fetchAppcastFromURL:(NSURL *)url;
-- (void)setDelegate:delegate;
-
-- (SUAppcastItem *)newestItem;
-- (NSArray *)items;
-
- at end
-
- at interface NSObject (SUAppcastDelegate)
-- appcastDidFinishLoading:(SUAppcast *)appcast;
- at end
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
deleted file mode 100644
index c0202e3..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-//  SUAppcastItem.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/12/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-
- at interface SUAppcastItem : NSObject {
-	NSString *title;
-	NSDate *date;
-	NSString *description;
-	
-	NSURL *releaseNotesURL;
-	
-	NSString *DSASignature;
-	NSString *MD5Sum;
-	
-	NSURL *fileURL;
-	NSString *fileVersion;
-	NSString *versionString;
-}
-
-// Initializes with data from a dictionary provided by the RSS class.
-- initWithDictionary:(NSDictionary *)dict;
-
-- (NSString *)title;
-- (void)setTitle:(NSString *)aTitle;
-
-- (NSDate *)date;
-- (void)setDate:(NSDate *)aDate;
-
-- (NSString *)description;
-- (void)setDescription:(NSString *)aDescription;
-
-- (NSURL *)releaseNotesURL;
-- (void)setReleaseNotesURL:(NSURL *)aReleaseNotesURL;
-
-- (NSString *)DSASignature;
-- (void)setDSASignature:(NSString *)aDSASignature;
-
-- (NSString *)MD5Sum;
-- (void)setMD5Sum:(NSString *)aMd5Sum;
-
-- (NSURL *)fileURL;
-- (void)setFileURL:(NSURL *)aFileURL;
-
-- (NSString *)fileVersion;
-- (void)setFileVersion:(NSString *)aFileVersion;
-
-- (NSString *)versionString;
-- (void)setVersionString:(NSString *)versionString;
-
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h
deleted file mode 100644
index fc0ac9f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-//  SUAutomaticUpdateAlert.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/18/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
- at class SUAppcastItem;
- at interface SUAutomaticUpdateAlert : NSWindowController {
-	SUAppcastItem *updateItem;
-}
-
-- initWithAppcastItem:(SUAppcastItem *)item;
-
-- (IBAction)relaunchNow:sender;
-- (IBAction)relaunchLater:sender;
-
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h
deleted file mode 100644
index bfbe625..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-//  SUConstants.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/16/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-extern NSString *SUUpdaterWillRestartNotification;
-
-extern NSString *SUCheckAtStartupKey;
-extern NSString *SUFeedURLKey;
-extern NSString *SUShowReleaseNotesKey;
-extern NSString *SUSkippedVersionKey;
-extern NSString *SUScheduledCheckIntervalKey;
-extern NSString *SULastCheckTimeKey;
-extern NSString *SUExpectsDSASignatureKey;
-extern NSString *SUPublicDSAKeyKey;
-extern NSString *SUAutomaticallyUpdateKey;
-extern NSString *SUAllowsAutomaticUpdatesKey;
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h
deleted file mode 100644
index e83d152..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-//  SUStatusChecker.h
-//  Sparkle
-//
-//  Created by Evan Schoenberg on 7/6/06.
-//
-
-#import <Cocoa/Cocoa.h>
-#import <Sparkle/SUUpdater.h>
-
- at class SUStatusChecker;
-
- at protocol SUStatusCheckerDelegate <NSObject>
-//versionString will be nil and isNewVersion will be NO if version checking fails.
-- (void)statusChecker:(SUStatusChecker *)statusChecker foundVersion:(NSString *)versionString isNewVersion:(BOOL)isNewVersion;
- at end
-
- at interface SUStatusChecker : SUUpdater {
-	id<SUStatusCheckerDelegate> scDelegate;
-}
-
-// Create a status checker which will notifiy delegate once the appcast version is determined.
-// Notification occurs via the method defined in the SUStatusCheckerDelegate informal protocol.
-+ (SUStatusChecker *)statusCheckerForDelegate:(id<SUStatusCheckerDelegate>)delegate;
-
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h
deleted file mode 100644
index 19a3f89..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-//  SUStatusController.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/14/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-
- at interface SUStatusController : NSWindowController {
-	double progressValue, maxProgressValue;
-	NSString *title, *statusText, *buttonTitle;
-	IBOutlet NSButton *actionButton;
-}
-
-// Pass 0 for the max progress value to get an indeterminate progress bar.
-// Pass nil for the status text to not show it.
-- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText;
-
-// If isDefault is YES, the button's key equivalent will be \r.
-- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault;
-- (void)setButtonEnabled:(BOOL)enabled;
-
-- (double)progressValue;
-- (void)setProgressValue:(double)value;
-- (double)maxProgressValue;
-- (void)setMaxProgressValue:(double)value;
-
-- (void)setStatusText:(NSString *)statusText;
-
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h
deleted file mode 100644
index da111c1..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-//  SUUnarchiver.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/16/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-
- at interface SUUnarchiver : NSObject {
-	id delegate;
-}
-
-- (void)unarchivePath:(NSString *)path;
-- (void)setDelegate:delegate;
-
- at end
-
- at interface NSObject (SUUnarchiverDelegate)
-- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length;
-- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver;
-- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver;
- at end
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h
deleted file mode 100644
index 69c2817..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-//  SUUpdateAlert.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/12/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-typedef enum
-{
-	SUInstallUpdateChoice,
-	SURemindMeLaterChoice,
-	SUSkipThisVersionChoice
-} SUUpdateAlertChoice;
-
- at class WebView, SUAppcastItem;
- at interface SUUpdateAlert : NSWindowController {
-	SUAppcastItem *updateItem;
-	id delegate;
-	
-	IBOutlet WebView *releaseNotesView;
-	IBOutlet NSTextField *description;
-	NSProgressIndicator *releaseNotesSpinner;
-	BOOL webViewFinishedLoading;
-}
-
-- initWithAppcastItem:(SUAppcastItem *)item;
-- (void)setDelegate:delegate;
-
-- (IBAction)installUpdate:sender;
-- (IBAction)skipThisVersion:sender;
-- (IBAction)remindMeLater:sender;
-
- at end
-
- at interface NSObject (SUUpdateAlertDelegate)
-- (void)updateAlert:(SUUpdateAlert *)updateAlert finishedWithChoice:(SUUpdateAlertChoice)updateChoice;
- at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h
deleted file mode 100644
index 5f82914..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-//  SUUpdater.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 1/4/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-// Before you use Sparkle in your app, you must set SUFeedURL in Info.plist to the
-// address of the appcast on your webserver. If you don't already have an 
-// appcast, please see the Sparkle documentation to learn about how to set one up.
-
-// .zip, .dmg, .tar, .tbz, .tgz archives are supported at this time.
-
-// By default, Sparkle offers to show the user the release notes of the build they'll be
-// getting, which it assumes are in the description (or body) field of the relevant RSS item.
-// Set SUShowReleaseNotes to <false/> in Info.plist to hide the button.
-
- at class SUAppcastItem, SUUpdateAlert, SUStatusController;
- at interface SUUpdater : NSObject {
-	SUAppcastItem *updateItem;
-	
-	SUStatusController *statusController;
-	SUUpdateAlert *updateAlert;
-	
-	NSURLDownload *downloader;
-	NSString *downloadPath;
-			
-	NSTimer *checkTimer;
-	NSTimeInterval checkInterval;	
-	
-	BOOL verbose;
-	BOOL updateInProgress;
-}
-
-// This IBAction is meant for a main menu item. Hook up any menu item to this action,
-// and Sparkle will check for updates and report back its findings verbosely.
-- (IBAction)checkForUpdates:sender;
-
-// This method is similar to the above, but it's intended for updates initiated by
-// the computer instead of by the user. It does not alert the user when he is up to date,
-// and it remains silent about network errors in fetching the feed. This is what you
-// want to call to update programmatically; only use checkForUpdates: with buttons and menu items.
-- (void)checkForUpdatesInBackground;
-
-// This method allows you to schedule a check to run every time interval. You can
-// pass 0 to this method to cancel a previously scheduled timer. You probably don't want
-// to call this directly: if you set a SUScheduledCheckInterval key in Info.plist or
-// the user defaults, Sparkle will set this up for you automatically on startup. You might
-// just want to call this every time the user changes the setting in the preferences.
-- (void)scheduleCheckWithInterval:(NSTimeInterval)interval;
-
- at end
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h
deleted file mode 100644
index 5af3550..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-//  SUUtilities.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/12/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-id SUInfoValueForKey(NSString *key);
-NSString *SUHostAppName();
-NSString *SUHostAppDisplayName();
-NSString *SUHostAppVersion();
-NSString *SUHostAppVersionString();
-
-NSComparisonResult SUStandardVersionComparison(NSString * versionA, NSString * versionB);
-
-// If running make localizable-strings for genstrings, ignore the error on this line.
-NSString *SULocalizedString(NSString *key, NSString *comment);
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h
deleted file mode 100644
index 13e9b21..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-//  Sparkle.h
-//  Sparkle
-//
-//  Created by Andy Matuschak on 3/16/06.
-//  Copyright 2006 Andy Matuschak. All rights reserved.
-//
-
-#import "SUUpdater.h"
-#import "SUUtilities.h"
-#import "SUConstants.h"
-#import "SUAppcast.h"
-#import "SUAppcastItem.h"
-#import "SUUpdateAlert.h"
-#import "SUAutomaticUpdateAlert.h"
-#import "SUStatusController.h"
-#import "SUUnarchiver.h"
-#import "SUStatusChecker.h"
-
-#import "NSApplication+AppCopies.h"
-#import "NSFileManager+Authentication.h"
-#import "NSFileManager+Verification.h"
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist
deleted file mode 100644
index c154cb6..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>Sparkle</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.andymatuschak.Sparkle</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>Sparkle</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.1</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib
deleted file mode 100644
index ff40c9d..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            CLASS = SUStatusController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {actionButton = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib
deleted file mode 100644
index 9918344..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>69 10 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8H14</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib
deleted file mode 100644
index 378b22f..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 15daf30..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 17f2f3d..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings
deleted file mode 100644
index 329426c..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 0820302..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>136 94 356 240 0 0 1024 746 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index ac43a0c..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 2084963..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings
deleted file mode 100644
index 232852c..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 81c59b7..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings
deleted file mode 100644
index 08538d3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index d371ff2..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index d51f9ad..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings
deleted file mode 100644
index f979099..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 0808fc6..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index aeec008..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings
deleted file mode 100644
index 92064db..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 2f65f2f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8H14</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index c4201cf..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index be3dbd9..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings
deleted file mode 100644
index 6bf42f7..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 236c082..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings
deleted file mode 100644
index 08538d3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index e7f6143..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index ac21bcb..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings
deleted file mode 100644
index c52cf30..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 26ef484..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>439.0</string>
-	<key>IBSystem Version</key>
-	<string>8J133</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 552a5bd..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index b0e7f7b..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 51 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>439.0</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8J133</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 0cd65e6..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings
deleted file mode 100644
index 9cca1c3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 0820302..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>136 94 356 240 0 0 1024 746 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index e4c7ba0..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index af7bfbb..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings
deleted file mode 100644
index 60da7d5..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 4fbd2d6..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings
deleted file mode 100644
index 08538d3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index c815112..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings
deleted file mode 100644
index 08538d3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 44b9da5..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings
deleted file mode 100644
index 85c1567..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 53fa5b3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 0e8d6a6..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings
deleted file mode 100644
index 7a5a384..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 0820302..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>136 94 356 240 0 0 1024 746 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index d317046..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index f213cf3..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>531 94 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 00b088d..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings
deleted file mode 100644
index 6c2e6ea..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index aeb4628..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings
deleted file mode 100644
index 08538d3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 26b2e8a..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings
deleted file mode 100644
index 08538d3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index a28ff7a..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>528 61 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 36947a7..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings
deleted file mode 100644
index 2c98929..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 0820302..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>136 94 356 240 0 0 1024 746 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 6da4ab1..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index dc2fbf3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings
deleted file mode 100644
index 32c7567..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b2f8b50..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings
deleted file mode 100644
index 7c8b8ea..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 0820302..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>136 94 356 240 0 0 1024 746 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 7a79f4d..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 13cdb31..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings
deleted file mode 100644
index fd3ec52..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index c4116cc..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings
deleted file mode 100644
index 9d3a515..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 2b1c6e3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings
deleted file mode 100644
index 08538d3..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 0820302..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>136 94 356 240 0 0 1024 746 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 6e20460..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 4f31fd7..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings
deleted file mode 100644
index c15c890..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 0820302..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>136 94 356 240 0 0 1024 746 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index f165c1a..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0071ac0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 2b25ad0..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>425 40 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>446.1</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 0d56dd1..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings
deleted file mode 100644
index 9f7b390..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib
deleted file mode 100644
index 3e65b1f..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {
-            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
-            CLASS = SUAutomaticUpdateAlert; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib
deleted file mode 100644
index 5a75680..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>188 142 356 240 0 0 1280 1002 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index b619eb4..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib
deleted file mode 100644
index 0ac32ad..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NSObject; LANGUAGE = ObjC; }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlert; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {delegate = id; description = id; releaseNotesView = WebView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {
-            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
-            CLASS = SUUpdateAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {releaseNotesView = id; }; 
-            SUPERCLASS = NSWindowController; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib
deleted file mode 100644
index 83a4377..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBDocumentLocation</key>
-	<string>62 61 356 240 0 0 1280 832 </string>
-	<key>IBFramework Version</key>
-	<string>443.0</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>5</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>8I127</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib
deleted file mode 100644
index 9be9428..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings
deleted file mode 100644
index a548680..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle
deleted file mode 100755
index 9dbf9e7..0000000
Binary files a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle and /dev/null differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/Current b/hw/xquartz/bundle/Sparkle.framework/Versions/Current
deleted file mode 120000
index 8c7e5a6..0000000
--- a/hw/xquartz/bundle/Sparkle.framework/Versions/Current
+++ /dev/null
@@ -1 +0,0 @@
-A
\ No newline at end of file
commit 30851efdd4313506e92aeb6d3e5099dea99ab99c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Aug 5 12:54:51 2008 -0700

    XQuartz: Fixed first-client-can't-connect bug
    Readded the old exec() server startup path for regression testing.
    Don't use the dynamic fd addition code since it's not quite working correctly.
    (cherry picked from commit 08f3fe153edc5ab4ca010e8ce82d5c3fc0ddb72c)

diff --git a/configure.ac b/configure.ac
index 570a688..8ad331d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1545,7 +1545,7 @@ if test "x$XQUARTZ" = xyes; then
 
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
 
-	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA"
+	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA -DXQUARTZ_EXPORTS_LAUNCHD_FD"
 fi
 
 # Support for objc in autotools is minimal and not documented.
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 1f90b24..c6c9c59 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -202,12 +202,6 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 	for_appkit = YES;
 	for_x = YES;
   
-//    fprintf(stderr, "fd_add_count: %d\n", fd_add_count);
-    if(fd_add_count) {
-        DarwinProcessFDAdditionQueue();
-        fprintf(stderr, "ran it - fd_add_count: %d\n", fd_add_count);
-    }
-    
 	switch (type) {
 		case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
 		case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 900ee43..da10e20 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -327,9 +327,12 @@ static void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, in
     }
 }
 
+int xquartz_launchd_fd = -1;
+
 void DarwinListenOnOpenFD(int fd) {
     ErrorF("DarwinListenOnOpenFD: %d\n", fd);
     
+#if 0
     pthread_mutex_lock(&fd_add_lock);
     if(fd_add_count < FD_ADD_MAX)
         fd_add[fd_add_count++] = fd;
@@ -337,6 +340,9 @@ void DarwinListenOnOpenFD(int fd) {
         ErrorF("FD Addition buffer at max.  Dropping fd addition request.\n");
 
     pthread_mutex_unlock(&fd_add_lock);
+#else
+    xquartz_launchd_fd = fd;
+#endif
 }
 
 void DarwinProcessFDAdditionQueue() {
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 2da3062..9b2619d 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -1,12 +1,13 @@
 AM_CPPFLAGS = \
 	-DBUILD_DATE=\"$(BUILD_DATE)\" \
-	-DXSERVER_VERSION=\"$(VERSION)\"
+	-DXSERVER_VERSION=\"$(VERSION)\" \
+	-DMACHO_STARTUP
 
 x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS
 x11app_PROGRAMS = X11
 
 dist_X11_SOURCES = \
-	bundle-main.c
+	bundle-main.c 
 #	launchd_fd.c
 
 nodist_X11_SOURCES = \
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 9894ae8..7c4d52c 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -82,6 +82,7 @@ static pthread_t create_thread(void *func, void *arg) {
     return tid;
 }
 
+#ifdef MACHO_STARTUP
 /*** Mach-O IPC Stuffs ***/
 
 union MaxMsgSize {
@@ -293,13 +294,18 @@ kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv,
 }
 
 int startup_trigger(int argc, char **argv, char **envp) {
+#else
+void *add_launchd_display_thread(void *data);
+
+int main(int argc, char **argv, char **envp) {
+#endif
     Display *display;
     const char *s;
     
-    size_t i;
-    
     /* Take care of the case where we're called like a normal DDX */
     if(argc > 1 && argv[1][0] == ':') {
+#ifdef MACHO_STARTUP
+        size_t i;
         kern_return_t kr;
         mach_port_t mp;
         string_array_t newenvp;
@@ -339,6 +345,10 @@ int startup_trigger(int argc, char **argv, char **envp) {
             exit(EXIT_FAILURE);
         }
         exit(EXIT_SUCCESS);
+#else
+        create_thread(add_launchd_display_thread, NULL);
+        return server_main(argc, argv, envp);
+#endif
     }
 
     /* If we have a process serial number and it's our only arg, act as if
@@ -368,6 +378,7 @@ int startup_trigger(int argc, char **argv, char **envp) {
     return execute(command_from_prefs("startx_script", DEFAULT_STARTX));
 }
 
+#ifdef MACHO_STARTUP
 /*** Main ***/
 int main(int argc, char **argv, char **envp) {
     Bool listenOnly = FALSE;
@@ -412,6 +423,17 @@ int main(int argc, char **argv, char **envp) {
     
     return EXIT_SUCCESS;
 }
+#else
+
+void *add_launchd_display_thread(void *data) {
+    /* Start listening on the launchd fd */
+    int launchd_fd = launchd_display_fd();
+    if(launchd_fd != -1) {
+        DarwinListenOnOpenFD(launchd_fd);
+    }
+    return NULL;
+}
+#endif
     
 static int execute(const char *command) {
     const char *newargv[7];
@@ -427,7 +449,7 @@ static int execute(const char *command) {
     
     fprintf(stderr, "X11.app: Launching %s:\n", command);
     for(s=newargv; *s; s++) {
-        fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s);
+        fprintf(stderr, "\targv[%ld] = %s\n", (long int)(s - newargv), *s);
     }
 
     execvp (newargv[0], (char * const *) newargv);
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index 9928aa9..003c4dd 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -115,6 +115,7 @@ static void set_x11_path() {
     }
 }
 
+#ifdef MACHO_STARTUP
 static int create_socket(char *filename_out) {
     struct sockaddr_un servaddr_un;
     struct sockaddr *servaddr;
@@ -218,7 +219,10 @@ static void send_fd_handoff(int handoff_fd, int launchd_fd) {
 #endif
 }
 
+#endif
+
 int main(int argc, char **argv, char **envp) {
+#ifdef MACHO_STARTUP
     int envpc;
     kern_return_t kr;
     mach_port_t mp;
@@ -227,6 +231,7 @@ int main(int argc, char **argv, char **envp) {
     size_t i;
     int launchd_fd;
     string_t handoff_socket_filename;
+#endif
     sig_t handler;
 
     if(argc == 2 && !strcmp(argv[1], "-version")) {
@@ -244,7 +249,8 @@ int main(int argc, char **argv, char **envp) {
     if(handler == SIG_IGN)
         kill(getppid(), SIGUSR1);
     signal(SIGUSR1, handler);
-    
+
+#ifdef MACHO_STARTUP
     /* Get the $DISPLAY FD */
     launchd_fd = launchd_display_fd();
 
@@ -325,4 +331,9 @@ int main(int argc, char **argv, char **envp) {
         return EXIT_FAILURE;
     }
     return EXIT_SUCCESS;
+#else
+    set_x11_path();
+    argv[0] = x11_path;
+    return execvp(x11_path, argv);
+#endif
 }
commit 277a74bcbb7d0a93c4f2e1de11daabd8c5f93ee8
Author: Tomas Carnecky <tom at dbservice.com>
Date:   Mon Aug 4 23:26:00 2008 +0300

    Redefine clients as a fixed array
    
    This removes yet another xalloc() each server generation. Also, I
    couldn't find the corresponding xfree() so I guess that used to be a
    memory leak there.

diff --git a/dix/globals.c b/dix/globals.c
index d3dd331..a9134c3 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -78,7 +78,7 @@ PtrCtrl defaultPointerControl = {
 	DEFAULT_PTR_THRESHOLD,
 	0};
 
-_X_EXPORT ClientPtr *clients;
+_X_EXPORT ClientPtr  clients[MAXCLIENTS];
 _X_EXPORT ClientPtr  serverClient;
 _X_EXPORT int  currentMaxClients;   /* current size of clients array */
 _X_EXPORT long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
diff --git a/dix/main.c b/dix/main.c
index c34bc8a..35e59bd 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -284,10 +284,7 @@ int main(int argc, char *argv[], char *envp[])
 	{
 	    CreateWellKnownSockets();
 	    InitProcVectors();
-	    clients = (ClientPtr *)xalloc(MAXCLIENTS * sizeof(ClientPtr));
-	    if (!clients)
-		FatalError("couldn't create client array");
-	    for (i=1; i<MAXCLIENTS; i++) 
+	    for (i=1; i<MAXCLIENTS; i++)
 		clients[i] = NullClient;
 	    serverClient = (ClientPtr)xalloc(sizeof(ClientRec));
 	    if (!serverClient)
diff --git a/include/dix.h b/include/dix.h
index 4b8a96e..64e3d78 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -119,7 +119,7 @@ typedef struct _Client *ClientPtr; /* also in misc.h */
 
 typedef struct _WorkQueue	*WorkQueuePtr;
 
-extern ClientPtr *clients;
+extern ClientPtr clients[MAXCLIENTS];
 extern ClientPtr serverClient;
 extern int currentMaxClients;
 extern char dispatchExceptionAtReset;
commit 5532d63488ec45953ff7f925cfb4f87adb3b04a0
Author: Tomas Carnecky <tom at dbservice.com>
Date:   Mon Aug 4 23:06:08 2008 +0300

    Redefine WindowTable as a fixed array
    
    Instead of xalloc'ing it every server generation. The array is always
    the same size (MAXSCREENS), anyway.

diff --git a/Xext/mbufbf.c b/Xext/mbufbf.c
index afa6177..e929ab5 100644
--- a/Xext/mbufbf.c
+++ b/Xext/mbufbf.c
@@ -47,6 +47,7 @@ in this Software without prior written authorization from The Open Group.
 #include "gcstruct.h"
 #include "inputstr.h"
 #include "validate.h"
+#include "globals.h"
 #include <sys/time.h>
 
 #define _MULTIBUF_SERVER_	/* don't want Xlib structures */
@@ -199,8 +200,6 @@ static Bool bufChangeWindowAttributes();
 static void bufClearToBackground();
 static void bufCopyWindow();
 
-extern WindowPtr *WindowTable;
-
 static Bool
 bufMultibufferInit(pScreen, pMBScreen)
     ScreenPtr pScreen;
diff --git a/dix/events.c b/dix/events.c
index d6b3ecb..f04433b 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -150,7 +150,6 @@ typedef const char *string;
 #endif
 
 #ifdef XEVIE
-extern WindowPtr *WindowTable;
 extern int       xevieFlag;
 extern int       xevieClientIndex;
 extern DeviceIntPtr     xeviemouse;
diff --git a/dix/globals.c b/dix/globals.c
index 210c784..d3dd331 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -83,7 +83,7 @@ _X_EXPORT ClientPtr  serverClient;
 _X_EXPORT int  currentMaxClients;   /* current size of clients array */
 _X_EXPORT long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
 
-_X_EXPORT WindowPtr *WindowTable;
+_X_EXPORT WindowPtr WindowTable[MAXSCREENS];
 
 _X_EXPORT unsigned long globalSerialNumber = 0;
 _X_EXPORT unsigned long serverGeneration = 0;
diff --git a/dix/main.c b/dix/main.c
index ab6ca57..c34bc8a 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -305,9 +305,6 @@ int main(int argc, char *argv[], char *envp[])
 	SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]);
 	screenInfo.arraySize = MAXSCREENS;
 	screenInfo.numScreens = 0;
-	WindowTable = (WindowPtr *)xalloc(MAXSCREENS * sizeof(WindowPtr));
-	if (!WindowTable)
-	    FatalError("couldn't create root window table");
 
 	InitAtoms();
 	InitEvents();
@@ -417,7 +414,7 @@ int main(int argc, char *argv[], char *envp[])
 
         config_fini();
 
-        memset(WindowTable, 0, MAXSCREENS * sizeof(WindowPtr));
+        memset(WindowTable, 0, sizeof(WindowTable));
 	CloseDownDevices();
 	CloseDownEvents();
 
@@ -431,8 +428,6 @@ int main(int argc, char *argv[], char *envp[])
 	    xfree(screenInfo.screens[i]);
 	    screenInfo.numScreens = i;
 	}
-	xfree(WindowTable);
-	WindowTable = NULL;
 	FreeFonts();
 
 	FreeAuditTimer();
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index e31cc25..754b942 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -93,7 +93,6 @@ static Bool         kdCaughtSignal = FALSE;
  */
 
 KdOsFuncs	*kdOsFuncs;
-extern WindowPtr *WindowTable;
 
 void
 KdSetRootClip (ScreenPtr pScreen, BOOL enable)
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index e3878e2..3987cb0 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -43,13 +43,12 @@
 #include "fboverlay.h"
 #include "shadow.h"
 #include "randrstr.h"
+#include "globals.h"
 
 #ifdef XKB
 #include <X11/extensions/XKBstr.h>
 #endif
 
-extern WindowPtr    *WindowTable;
-
 #define KD_DPMS_NORMAL	    0
 #define KD_DPMS_STANDBY	    1
 #define KD_DPMS_SUSPEND	    2
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 91d5865..559f18b 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -48,6 +48,7 @@ from Kaleb S. KEITHLEY
 #include "swaprep.h"
 #include "xf86.h"
 #include "vidmodeproc.h"
+#include "globals.h"
 
 #define DEFAULT_XF86VIDMODE_VERBOSITY	3
 
@@ -122,8 +123,6 @@ static void SXF86VidModeNotifyEvent();
     xXF86VidModeNotifyEvent * /* to */
 );
 
-extern WindowPtr *WindowTable;
-
 static RESTYPE EventType;	/* resource type for event masks */
 
 typedef struct _XF86VidModeEvent *XF86VidModeEventPtr;
diff --git a/include/globals.h b/include/globals.h
index a95096f..607bc48 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -20,7 +20,7 @@ extern int monitorResolution;
 extern int defaultColorVisualClass;
 
 extern Bool Must_have_memory;
-extern WindowPtr *WindowTable;
+extern WindowPtr WindowTable[MAXSCREENS];
 extern int GrabInProgress;
 extern Bool noTestExtensions;
 
commit e882ee7056f370e0619d137b4ec3973ecb4e3479
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Jul 29 17:52:11 2008 +0300

    EXA: Remove unnecessary #includes
    
    There wasn't actually any font code here, so no problem.

diff --git a/exa/exa.c b/exa/exa.c
index 48352bd..b8294bb 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -35,8 +35,6 @@
 #include <stdlib.h>
 
 #include "exa_priv.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
 #include "exa.h"
 #include "cw.h"
 
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 3c79f68..25ea73d 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -33,8 +33,6 @@
 #include <string.h>
 
 #include "exa_priv.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
 #include "exa.h"
 #include "cw.h"
 
commit 6c1bb64c6f2efd81856ca00591df37916713b142
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Aug 4 15:19:45 2008 +0930

    xkb: break up XkbCopyKeymap into bite-sized chunks.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 8409ece..486446a 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -23,6 +23,30 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
 THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ********************************************************/
+/*
+
+Copyright © 2008 Red Hat Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+*/
 
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
@@ -909,44 +933,12 @@ XkbConvertCase(register KeySym sym, KeySym *lower, KeySym *upper)
     }
 }
 
-
-/**
- * Copy an XKB map from src to dst, reallocating when necessary: if some
- * map components are present in one, but not in the other, the destination
- * components will be allocated or freed as necessary.
- *
- * Basic map consistency is assumed on both sides, so maps with random
- * uninitialised data (e.g. names->radio_grous == NULL, names->num_rg == 19)
- * _will_ cause failures.  You've been warned.
- *
- * Returns TRUE on success, or FALSE on failure.  If this function fails,
- * dst may be in an inconsistent state: all its pointers are guaranteed
- * to remain valid, but part of the map may be from src and part from dst.
- *
- * FIXME: This function wants to be broken up into multiple functions.
- */
-Bool
-XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
+static Bool
+_XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst)
 {
-    int i = 0, j = 0, k = 0;
     void *tmp = NULL;
-    XkbColorPtr scolor = NULL, dcolor = NULL;
-    XkbDoodadPtr sdoodad = NULL, ddoodad = NULL;
+    int i;
     XkbKeyTypePtr stype = NULL, dtype = NULL;
-    XkbOutlinePtr soutline = NULL, doutline = NULL;
-    XkbPropertyPtr sprop = NULL, dprop = NULL;
-    XkbRowPtr srow = NULL, drow = NULL;
-    XkbSectionPtr ssection = NULL, dsection = NULL;
-    XkbShapePtr sshape = NULL, dshape = NULL;
-    DeviceIntPtr pDev = NULL, tmpDev = NULL;
-    xkbMapNotify mn;
-    xkbNewKeyboardNotify nkn;
-
-    if (src == dst)
-        return TRUE;
-
-    if (!src || !dst)
-        return FALSE;
 
     /* client map */
     if (src->map) {
@@ -1195,6 +1187,14 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             XkbFreeClientMap(dst, XkbAllClientInfoMask, True);
     }
 
+    return TRUE;
+}
+
+static Bool
+_XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst)
+{
+    void *tmp = NULL;
+
     /* server map */
     if (src->server) {
         if (!dst->server) {
@@ -1323,37 +1323,13 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             XkbFreeServerMap(dst, XkbAllServerInfoMask, True);
     }
 
-    /* indicators */
-    if (src->indicators) {
-        if (!dst->indicators) {
-            dst->indicators = xalloc(sizeof(XkbIndicatorRec));
-            if (!dst->indicators)
-                return FALSE;
-        }
-        memcpy(dst->indicators, src->indicators, sizeof(XkbIndicatorRec));
-    }
-    else {
-        if (dst->indicators) {
-            xfree(dst->indicators);
-            dst->indicators = NULL;
-        }
-    }
+    return TRUE;
+}
 
-    /* controls */
-    if (src->ctrls) {
-        if (!dst->ctrls) {
-            dst->ctrls = xalloc(sizeof(XkbControlsRec));
-            if (!dst->ctrls)
-                return FALSE;
-        }
-        memcpy(dst->ctrls, src->ctrls, sizeof(XkbControlsRec));
-    }
-    else {
-        if (dst->ctrls) {
-            xfree(dst->ctrls);
-            dst->ctrls = NULL;
-        }
-    }
+static Bool
+_XkbCopyNames(XkbDescPtr src, XkbDescPtr dst)
+{
+    void *tmp = NULL;
 
     /* names */
     if (src->names) {
@@ -1448,6 +1424,14 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             XkbFreeNames(dst, XkbAllNamesMask, True);
     }
 
+    return TRUE;
+}
+
+static Bool
+_XkbCopyCompat(XkbDescPtr src, XkbDescPtr dst)
+{
+    void *tmp = NULL;
+
     /* compat */
     if (src->compat) {
         if (!dst->compat) {
@@ -1492,6 +1476,22 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             XkbFreeCompatMap(dst, XkbAllCompatMask, True);
     }
 
+    return TRUE;
+}
+
+static Bool
+_XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
+{
+    void *tmp = NULL;
+    int i = 0, j = 0, k = 0;
+    XkbColorPtr scolor = NULL, dcolor = NULL;
+    XkbDoodadPtr sdoodad = NULL, ddoodad = NULL;
+    XkbOutlinePtr soutline = NULL, doutline = NULL;
+    XkbPropertyPtr sprop = NULL, dprop = NULL;
+    XkbRowPtr srow = NULL, drow = NULL;
+    XkbSectionPtr ssection = NULL, dsection = NULL;
+    XkbShapePtr sshape = NULL, dshape = NULL;
+
     /* geometry */
     if (src->geom) {
         if (!dst->geom) {
@@ -2014,20 +2014,111 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
         }
     }
 
-    for (tmpDev = inputInfo.devices; tmpDev && !pDev;
-            tmpDev = tmpDev->next) {
-        if (tmpDev->key && tmpDev->key->xkbInfo &&
-                tmpDev->key->xkbInfo->desc == dst) {
-            pDev = tmpDev;
-            break;
+    return TRUE;
+}
+
+static Bool
+_XkbCopyIndicators(XkbDescPtr src, XkbDescPtr dst)
+{
+    /* indicators */
+    if (src->indicators) {
+        if (!dst->indicators) {
+            dst->indicators = xalloc(sizeof(XkbIndicatorRec));
+            if (!dst->indicators)
+                return FALSE;
+        }
+        memcpy(dst->indicators, src->indicators, sizeof(XkbIndicatorRec));
+    }
+    else {
+        if (dst->indicators) {
+            xfree(dst->indicators);
+            dst->indicators = NULL;
+        }
+    }
+    return TRUE;
+}
+
+static Bool
+_XkbCopyControls(XkbDescPtr src, XkbDescPtr dst)
+{
+    /* controls */
+    if (src->ctrls) {
+        if (!dst->ctrls) {
+            dst->ctrls = xalloc(sizeof(XkbControlsRec));
+            if (!dst->ctrls)
+                return FALSE;
+        }
+        memcpy(dst->ctrls, src->ctrls, sizeof(XkbControlsRec));
+    }
+    else {
+        if (dst->ctrls) {
+            xfree(dst->ctrls);
+            dst->ctrls = NULL;
         }
     }
-    for (tmpDev = inputInfo.off_devices; tmpDev && !pDev;
-            tmpDev = tmpDev->next) {
-        if (tmpDev->key && tmpDev->key->xkbInfo &&
+    return TRUE;
+}
+
+/**
+ * Copy an XKB map from src to dst, reallocating when necessary: if some
+ * map components are present in one, but not in the other, the destination
+ * components will be allocated or freed as necessary.
+ *
+ * Basic map consistency is assumed on both sides, so maps with random
+ * uninitialised data (e.g. names->radio_grous == NULL, names->num_rg == 19)
+ * _will_ cause failures.  You've been warned.
+ *
+ * Returns TRUE on success, or FALSE on failure.  If this function fails,
+ * dst may be in an inconsistent state: all its pointers are guaranteed
+ * to remain valid, but part of the map may be from src and part from dst.
+ *
+ */
+
+Bool
+XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
+{
+    DeviceIntPtr pDev = NULL, tmpDev = NULL;
+    xkbMapNotify mn;
+    xkbNewKeyboardNotify nkn;
+
+    if (!src || !dst || src == dst)
+        return FALSE;
+
+    if (!_XkbCopyClientMap(src, dst))
+        return FALSE;
+    if (!_XkbCopyServerMap(src, dst))
+        return FALSE;
+    if (!_XkbCopyIndicators(src, dst))
+        return FALSE;
+    if (!_XkbCopyControls(src, dst))
+        return FALSE;
+    if (!_XkbCopyNames(src, dst))
+        return FALSE;
+    if (!_XkbCopyCompat(src, dst))
+        return FALSE;
+    if (!_XkbCopyGeom(src, dst))
+        return FALSE;
+
+    if (inputInfo.keyboard->key->xkbInfo &&
+        inputInfo.keyboard->key->xkbInfo->desc == dst) {
+        pDev = inputInfo.keyboard;
+    }
+    else {
+        for (tmpDev = inputInfo.devices; tmpDev && !pDev;
+             tmpDev = tmpDev->next) {
+            if (tmpDev->key && tmpDev->key->xkbInfo &&
                 tmpDev->key->xkbInfo->desc == dst) {
-            pDev = tmpDev;
-            break;
+                pDev = tmpDev;
+                break;
+            }
+        }
+        for (tmpDev = inputInfo.off_devices; tmpDev && !pDev;
+                tmpDev = tmpDev->next) {
+            if (tmpDev->key && tmpDev->key->xkbInfo &&
+                    tmpDev->key->xkbInfo->desc == dst) {
+                pDev = tmpDev;
+                break;
+            }
         }
     }
 
commit 3c6a9c531f673b7a0cb9ca01860b4dbe79686363
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 15:52:07 2008 +0930

    config: protect against potential out-of-bounds indexing.

diff --git a/config/hal.c b/config/hal.c
index a954af9..3e0ff08 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -260,7 +260,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                      * Since we can't predict the order in which the keys
                      * arrive, we need to store them.
                      */
-                    if ((tmp = strcasestr(psi_key, "xkb")))
+                    if ((tmp = strcasestr(psi_key, "xkb")) && strlen(tmp) >= 4)
                     {
                         if (!strcasecmp(&tmp[3], "layout"))
                         {
@@ -298,6 +298,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                 {
                     /* server 1.4 had xkb_options as strlist. */
                     if ((tmp = strcasestr(psi_key, "xkb")) &&
+                        (strlen(tmp) >= 4) &&
                         (!strcasecmp(&tmp[3], "options")) &&
                         (tmp_val = get_prop_string_array(hal_ctx, udi, psi_key)))
                     {
@@ -312,7 +313,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                 /* only support strings for all values */
                 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
 
-                if (tmp_val){
+                if (tmp_val && strlen(psi_key) >= sizeof(LIBHAL_XKB_PROP_KEY)) {
 
                     tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
 
@@ -342,7 +343,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                 {
                     /* server 1.4 had xkb options as strlist */
                     tmp_val = get_prop_string_array(hal_ctx, udi, psi_key);
-                    if (tmp_val)
+                    if (tmp_val && strlen(psi_key) >= sizeof(LIBHAL_XKB_PROP_KEY))
                     {
                         tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
                         if (!strcasecmp(tmp, ".options") && (!xkb_opts.options))
commit 92c51b183c2ff06361dad7f918daed6577ba4935
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 1 14:24:54 2008 +0930

    config: support type strlist for XkbOptions property.
    
    For backwards compatibility with server 1.4.

diff --git a/config/hal.c b/config/hal.c
index a9451b7..a954af9 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -132,9 +132,6 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name)
     return ret;
 }
 
-/* this function is no longer used... keep it here in case its needed in
- * the future. */
-#if 0
 static char *
 get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
 {
@@ -168,7 +165,6 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
 
     return ret;
 }
-#endif
 
 static void
 device_added(LibHalContext *hal_ctx, const char *udi)
@@ -250,12 +246,12 @@ device_added(LibHalContext *hal_ctx, const char *udi)
 
             /* normal options first (input.x11_options.<propname>) */
             if (!strncasecmp(psi_key, LIBHAL_PROP_KEY, sizeof(LIBHAL_PROP_KEY)-1)){
+                char* tmp;
 
                 /* only support strings for all values */
                 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
 
                 if (tmp_val){
-                    char* tmp;
 
                     /* xkb needs special handling. HAL specs include
                      * input.xkb.xyz options, but the x11-input.fdi specifies
@@ -298,14 +294,25 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                         add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
                         xfree(tmp_val);
                     }
+                } else
+                {
+                    /* server 1.4 had xkb_options as strlist. */
+                    if ((tmp = strcasestr(psi_key, "xkb")) &&
+                        (!strcasecmp(&tmp[3], "options")) &&
+                        (tmp_val = get_prop_string_array(hal_ctx, udi, psi_key)))
+                    {
+                        if (xkb_opts.options)
+                            xfree(xkb_opts.options);
+                        xkb_opts.options = strdup(tmp_val);
+                    }
                 }
             } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
+                char* tmp;
 
                 /* only support strings for all values */
                 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
 
                 if (tmp_val){
-                    char* tmp;
 
                     tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
 
@@ -331,6 +338,16 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                             xkb_opts.options = strdup(tmp_val);
                     }
                     xfree(tmp_val);
+                } else
+                {
+                    /* server 1.4 had xkb options as strlist */
+                    tmp_val = get_prop_string_array(hal_ctx, udi, psi_key);
+                    if (tmp_val)
+                    {
+                        tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
+                        if (!strcasecmp(tmp, ".options") && (!xkb_opts.options))
+                            xkb_opts.options = strdup(tmp_val);
+                    }
                 }
             }
         }
commit 35b14519b4a3158592a089170ec039bbc219603e
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Jul 29 12:59:57 2008 +0930

    config: add parsing for input.x11_options.XkbOptions. #16874
    
    X.Org Bug 16874 <http://bugs.freedesktop.org/show_bug.cgi?id=16784>

diff --git a/config/hal.c b/config/hal.c
index b6d7402..a9451b7 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2007 Daniel Stone
+ * Copyright © 2007 Red Hat, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -54,6 +55,7 @@ struct xkb_options {
     char* model;
     char* rules;
     char* variant;
+    char* options;
 };
 
 
@@ -284,6 +286,11 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                             if (xkb_opts.variant)
                                 xfree(xkb_opts.variant);
                             xkb_opts.variant = strdup(tmp_val);
+                        } else if (!strcasecmp(&tmp[3], "options"))
+                        {
+                            if (xkb_opts.options)
+                                xfree(xkb_opts.options);
+                            xkb_opts.options = strdup(tmp_val);
                         }
                     } else
                     {
@@ -318,6 +325,10 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                     {
                         if (!xkb_opts.model)
                             xkb_opts.model = strdup(tmp_val);
+                    } else if (!strcasecmp(tmp, "options"))
+                    {
+                        if (!xkb_opts.options)
+                            xkb_opts.options = strdup(tmp_val);
                     }
                     xfree(tmp_val);
                 }
@@ -338,6 +349,8 @@ device_added(LibHalContext *hal_ctx, const char *udi)
         add_option(&options, "xkb_variant", xkb_opts.variant);
     if (xkb_opts.model)
         add_option(&options, "xkb_model", xkb_opts.model);
+    if (xkb_opts.options)
+        add_option(&options, "xkb_options", xkb_opts.options);
 
     /* this isn't an error, but how else do you output something that the user can see? */
     LogMessage(X_INFO, "config/hal: Adding input device %s\n", name);
@@ -379,6 +392,8 @@ unwind:
         xfree(xkb_opts.model);
     if (xkb_opts.variant)
         xfree(xkb_opts.variant);
+    if (xkb_opts.options)
+        xfree(xkb_opts.options);
 
     dbus_error_free(&error);
 
commit d762c08aebe3b7e8c88e2e7a6fcf66057a21b403
Author: Simon Thum <simon.thum at gmx.de>
Date:   Mon Jul 28 14:07:48 2008 +0200

    dix: export driver-side functions for acceleration
    
    also add additional safety for accel driver api
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 70057e9..64b1c35 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -695,7 +695,7 @@ LinearProfile(
  * would be a good place, since FreeVelocityData() also calls this with -1.
  * returns FALSE (0) if profile number is unavailable.
  */
-int
+_X_EXPORT int
 SetAccelerationProfile(
     DeviceVelocityPtr s,
     int profile_num)
@@ -744,6 +744,11 @@ SetAccelerationProfile(
     return TRUE;
 }
 
+/**********************************************
+ * driver interaction
+ **********************************************/
+
+
 /**
  * device-specific profile
  *
@@ -753,7 +758,7 @@ SetAccelerationProfile(
  * it should do init/uninit in the driver (ie. with DEVICE_INIT and friends).
  * Users may override or choose it.
  */
-extern void
+_X_EXPORT void
 SetDeviceSpecificAccelerationProfile(
         DeviceVelocityPtr s,
         PointerAccelerationProfileFunc profile)
@@ -766,11 +771,15 @@ SetDeviceSpecificAccelerationProfile(
  * Use this function to obtain a DeviceVelocityPtr for a device. Will return NULL if
  * the predictable acceleration scheme is not in effect.
  */
-DeviceVelocityPtr
+_X_EXPORT DeviceVelocityPtr
 GetDevicePredictableAccelData(
 	DeviceIntPtr pDev)
 {
     /*sanity check*/
+    if(!pDev){
+	ErrorF("[dix] accel: DeviceIntPtr was NULL");
+	return NULL;
+    }
     if( pDev->valuator &&
 	pDev->valuator->accelScheme.AccelSchemeProc ==
 	    acceleratePointerPredictable &&
commit 18e9fd69fe01298d825b46415b9c6bd86c75dfe5
Author: Simon Thum <simon.thum at gmx.de>
Date:   Tue Jul 29 10:07:43 2008 +0200

    dix: use average of pointer accel profile
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 21a2eca..70057e9 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -73,7 +73,8 @@ InitFilterChain(DeviceVelocityPtr s, float rdecay, float degression,
 void
 CleanupFilterChain(DeviceVelocityPtr s);
 static float
-SimpleSmoothProfile(DeviceVelocityPtr pVel, float threshold, float acc);
+SimpleSmoothProfile(DeviceVelocityPtr pVel, float velocity,
+                    float threshold, float acc);
 
 
 /********************************
@@ -88,6 +89,7 @@ InitVelocityData(DeviceVelocityPtr s)
 {
     s->lrm_time = 0;
     s->velocity  = 0;
+    s->last_velocity = 0;
     s->corr_mul = 10.0;      /* dots per 10 milisecond should be usable */
     s->const_acceleration = 1.0;   /* no acceleration/deceleration  */
     s->reset_time = 300;
@@ -97,6 +99,7 @@ InitVelocityData(DeviceVelocityPtr s)
     s->use_softening = 1;
     s->min_acceleration = 1.0; /* don't decelerate */
     s->coupling = 0.25;
+    s->average_accel = TRUE;
     s->profile_private = NULL;
     memset(&s->statistics, 0, sizeof(s->statistics));
     memset(&s->filters, 0, sizeof(s->filters));
@@ -163,7 +166,7 @@ InitFilterChain(DeviceVelocityPtr s, float rdecay, float progression, int stages
 	rdecay /= progression;
     }
     /* release again. Should the input loop be threaded, we also need
-     * memory release here (in princliple).
+     * memory release here (in principle).
      */
     OsReleaseSignals();
 }
@@ -330,10 +333,14 @@ ProcessVelocityData(
     float cvelocity;
 
     int diff = time - s->lrm_time;
-    int cur_ax = GetAxis(dx, dy);
-    int last_ax = GetAxis(s->last_dx, s->last_dy);
+    int cur_ax, last_ax;
     short reset = (diff >= s->reset_time);
 
+    /* remember last round's result */
+    s->last_velocity = s->velocity;
+    cur_ax = GetAxis(dx, dy);
+    last_ax = GetAxis(s->last_dx, s->last_dy);
+
     if(cur_ax != last_ax && cur_ax != -1 && last_ax != -1 && !reset){
         /* correct for the error induced when diagonal movements are
            reported as alternating axis mickeys */
@@ -368,15 +375,22 @@ ProcessVelocityData(
     if (diff == 0)
         diff = 1; /* prevent div-by-zero, though it shouldn't happen anyway*/
 
-    /* translate velocity to dots/ms (somewhat untractable in integers,
+    /* translate velocity to dots/ms (somewhat intractable in integers,
        so we multiply by some per-device adjustable factor) */
     cvelocity = cvelocity * s->corr_mul / (float)diff;
 
     /* short-circuit: when nv-reset the rest can be skipped */
     if(reset == TRUE){
+	/*
+	 * we don't really have a velocity here, since diff includes inactive
+	 * time. This is dealt with in ComputeAcceleration.
+	 */
 	StuffFilterChain(s, cvelocity);
-	s->velocity = cvelocity;
+	s->velocity = s->last_velocity = cvelocity;
 	s->last_reset = TRUE;
+#ifdef PTRACCEL_DEBUGGING
+        ErrorF("(dix ptracc) non-visible state reset\n");
+#endif
 	return TRUE;
     }
 
@@ -388,6 +402,9 @@ ProcessVelocityData(
 	 * stuff that into the filter chain.
 	 */
 	s->last_reset = FALSE;
+#ifdef PTRACCEL_DEBUGGING
+        ErrorF("(dix ptracc) after-reset vel:%.3f\n", cvelocity);
+#endif
 	StuffFilterChain(s, cvelocity);
 	s->velocity = cvelocity;
 	return FALSE;
@@ -448,6 +465,72 @@ ApplySofteningAndConstantDeceleration(
     *fdy *= s->const_acceleration;
 }
 
+/*
+ * compute the acceleration for given velocity and enforce min_acceleartion
+ */
+static float
+BasicComputeAcceleration(
+    DeviceVelocityPtr pVel,
+    float velocity,
+    float threshold,
+    float acc){
+
+    float result;
+    result = pVel->Profile(pVel, velocity, threshold, acc);
+
+    /* enforce min_acceleration */
+    if (result < pVel->min_acceleration)
+	result = pVel->min_acceleration;
+    return result;
+}
+
+/**
+ * Compute acceleration. Takes into account averaging, nv-reset, etc.
+ */
+static float
+ComputeAcceleration(
+    DeviceVelocityPtr vel,
+    float threshold,
+    float acc){
+    float res;
+
+    if(vel->last_reset){
+#ifdef PTRACCEL_DEBUGGING
+        ErrorF("(dix ptracc) profile skipped\n");
+#endif
+        /*
+         * This is intended to override the first estimate of a stroke,
+         * which is too low (see ProcessVelocityData). 1 should make sure
+         * the mickey is seen on screen.
+         */
+	return 1;
+    }
+
+    if(vel->average_accel && vel->velocity != vel->last_velocity){
+	/* use simpson's rule to average acceleration between
+	 * current and previous velocity.
+	 * Though being the more natural choice, it causes a minor delay
+	 * in comparison, so it can be disabled. */
+	res = BasicComputeAcceleration(vel, vel->velocity, threshold, acc);
+	res += BasicComputeAcceleration(vel, vel->last_velocity, threshold, acc);
+	res += 4.0f * BasicComputeAcceleration(vel,
+	                   (vel->last_velocity + vel->velocity) / 2,
+	                   threshold, acc);
+	res /= 6.0f;
+#ifdef PTRACCEL_DEBUGGING
+        ErrorF("(dix ptracc) profile average [%.2f ... %.2f] is %.3f\n",
+               vel->velocity, vel->last_velocity, res);
+#endif
+        return res;
+    }else{
+	res = BasicComputeAcceleration(vel, vel->velocity, threshold, acc);
+#ifdef PTRACCEL_DEBUGGING
+        ErrorF("(dix ptracc) profile sample [%.2f] is %.3f\n",
+               vel->velocity, res);
+#endif
+	return res;
+    }
+}
 
 
 /*****************************************
@@ -460,10 +543,11 @@ ApplySofteningAndConstantDeceleration(
 static float
 PolynomialAccelerationProfile(
     DeviceVelocityPtr pVel,
+    float velocity,
     float ignored,
     float acc)
 {
-   return pow(pVel->velocity, (acc - 1.0) * 0.5);
+   return pow(velocity, (acc - 1.0) * 0.5);
 }
 
 
@@ -474,15 +558,18 @@ PolynomialAccelerationProfile(
 static float
 ClassicProfile(
     DeviceVelocityPtr pVel,
+    float velocity,
     float threshold,
     float acc)
 {
     if (threshold) {
 	return SimpleSmoothProfile (pVel,
+	                            velocity,
                                     threshold,
                                     acc);
     } else {
 	return PolynomialAccelerationProfile (pVel,
+	                                      velocity,
                                               0,
                                               acc);
     }
@@ -500,6 +587,7 @@ ClassicProfile(
 static float
 PowerProfile(
     DeviceVelocityPtr pVel,
+    float velocity,
     float threshold,
     float acc)
 {
@@ -507,9 +595,9 @@ PowerProfile(
 
     acc = (acc-1.0) * 0.1f + 1.0; /* without this, acc of 2 is unuseable */
 
-    if (pVel->velocity <= threshold)
+    if (velocity <= threshold)
         return pVel->min_acceleration;
-    vel_dist = pVel->velocity - threshold;
+    vel_dist = velocity - threshold;
     return (pow(acc, vel_dist)) * pVel->min_acceleration;
 }
 
@@ -536,10 +624,10 @@ CalcPenumbralGradient(float x){
 static float
 SimpleSmoothProfile(
     DeviceVelocityPtr pVel,
+    float velocity,
     float threshold,
     float acc)
 {
-    float velocity = pVel->velocity;
     if(velocity < 1.0f)
         return CalcPenumbralGradient(0.5 + velocity*0.5) * 2.0f - 1.0f;
     if(threshold < 1.0f)
@@ -561,6 +649,7 @@ SimpleSmoothProfile(
 static float
 SmoothLinearProfile(
     DeviceVelocityPtr pVel,
+    float velocity,
     float threshold,
     float acc)
 {
@@ -571,7 +660,7 @@ SmoothLinearProfile(
     else
         return 1.0f;
 
-    nv = (pVel->velocity - threshold) * acc * 0.5f;
+    nv = (velocity - threshold) * acc * 0.5f;
 
     if(nv < 0){
         res = 0;
@@ -590,10 +679,11 @@ SmoothLinearProfile(
 static float
 LinearProfile(
     DeviceVelocityPtr pVel,
+    float velocity,
     float threshold,
     float acc)
 {
-    return acc * pVel->velocity;
+    return acc * velocity;
 }
 
 
@@ -730,7 +820,9 @@ acceleratePointerPredictable(
     if (dx || dy){
         /* reset nonvisible state? */
         if (ProcessVelocityData(velocitydata, dx , dy, evtime)) {
-            /* set to center of pixel */
+            /* set to center of pixel. makes sense as long as there are no
+             * means of passing on sub-pixel values.
+             */
             pDev->last.remainder[0] = pDev->last.remainder[1] = 0.5f;
             /* prevent softening (somewhat quirky solution,
             as it depends on the algorithm) */
@@ -740,22 +832,10 @@ acceleratePointerPredictable(
 
         if (pDev->ptrfeed && pDev->ptrfeed->ctrl.num) {
             /* invoke acceleration profile to determine acceleration */
-            mult = velocitydata->Profile(velocitydata,
-                                pDev->ptrfeed->ctrl.threshold,
-                                (float)pDev->ptrfeed->ctrl.num /
-                                (float)pDev->ptrfeed->ctrl.den);
-
-#ifdef PTRACCEL_DEBUGGING
-            ErrorF("(dix ptracc) resulting speed multiplier : %.3f\n", mult);
-#endif
-            /* enforce min_acceleration */
-            if (mult < velocitydata->min_acceleration) {
-#ifdef PTRACCEL_DEBUGGING
-                ErrorF("(dix ptracc) enforced min multiplier : %.3f\n",
-                        velocitydata->min_acceleration);
-#endif
-                mult = velocitydata->min_acceleration;
-	    }
+            mult = ComputeAcceleration (velocitydata,
+					pDev->ptrfeed->ctrl.threshold,
+					(float)pDev->ptrfeed->ctrl.num /
+					(float)pDev->ptrfeed->ctrl.den);
 
             if(mult != 1.0 || velocitydata->const_acceleration != 1.0) {
                 ApplySofteningAndConstantDeceleration( velocitydata,
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index ea4dbba..4ef7530 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -150,6 +150,8 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
     s->use_softening = xf86SetBoolOption(list, "Softening",
                                          s->const_acceleration == 1.0);
 
+    s->average_accel = xf86SetBoolOption(list, "AccelerationProfileAveraging", TRUE);
+
     s->reset_time = xf86SetIntOption(list, "VelocityReset", 300);
 
     tempf = xf86SetRealOption(list, "ExpectedRate", 0);
@@ -214,7 +216,7 @@ ApplyAccelerationSettings(DeviceIntPtr dev){
         /* process special configuration */
         switch(scheme){
             case PtrAccelPredictable:
-                pVel = (DeviceVelocityPtr) dev->valuator->accelScheme.accelData;
+                pVel = GetDevicePredictableAccelData(dev);
                 ProcessVelocityConfiguration (local->name, local->options,
                                               pVel);
                 break;
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index 2d42dda..384f9a6 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -53,7 +53,7 @@ struct _DeviceVelocityRec;
  */
 typedef float (*PointerAccelerationProfileFunc)
               (struct _DeviceVelocityRec* /*pVel*/,
-               float /*threshold*/, float /*acc*/);
+               float /*velocity*/, float /*threshold*/, float /*acc*/);
 
 /**
  * a filter stage contains the data for adaptive IIR filtering.
@@ -78,6 +78,7 @@ typedef struct _FilterStage {
 typedef struct _DeviceVelocityRec {
     FilterStage filters[MAX_VELOCITY_FILTERS];
     float   velocity;       /* velocity as guessed by algorithm */
+    float   last_velocity;  /* previous velocity estimate */
     int     lrm_time;       /* time the last motion event was processed  */
     int     last_dx, last_dy; /* last motion delta */
     int     last_diff;      /* last time-difference */
@@ -88,6 +89,7 @@ typedef struct _DeviceVelocityRec {
     short   reset_time;     /* config: reset non-visible state after # ms */
     short   use_softening;  /* config: use softening of mouse values */
     float   coupling;       /* config: max. divergence before coupling */
+    Bool    average_accel;  /* config: average acceleration over velocity */
     PointerAccelerationProfileFunc Profile;
     PointerAccelerationProfileFunc deviceSpecificProfile;
     void*   profile_private;/* extended data, see  SetAccelerationProfile() */
commit 25882af6d3359e5ae42c927c555f5b257ba5665c
Author: Ivaylo Boyadzhiev <iboyadzhiev at nvidia.com>
Date:   Sun Aug 3 18:55:12 2008 -0700

    Fix a longstanding XAA CopyPlane bug.
    
    TmpBitPlane is a plane mask, not a plane index.
    
    Signed-off-by: Aaron Plattner <aplattner at nvidia.com>

diff --git a/hw/xfree86/xaa/xaaCpyPlane.c b/hw/xfree86/xaa/xaaCpyPlane.c
index cd9e9d4..a0ebb75 100644
--- a/hw/xfree86/xaa/xaaCpyPlane.c
+++ b/hw/xfree86/xaa/xaaCpyPlane.c
@@ -110,12 +110,12 @@ XAACopyPlaneNtoNColorExpand(
     int Bpp = pSrc->bitsPerPixel >> 3;
     unsigned long mask = TmpBitPlane;
 
-    if(TmpBitPlane < 8) {
+    if(TmpBitPlane < (1 << 8)) {
 	offset = 0;
-    } else if(TmpBitPlane < 16) {
+    } else if(TmpBitPlane < (1 << 16)) {
 	offset = 1;
 	mask >>= 8;
-    } else if(TmpBitPlane < 24) {
+    } else if(TmpBitPlane < (1 << 24)) {
 	offset = 2;
 	mask >>= 16;
     } else {
commit d980913f3145cdc34baab27ff818c9631c4c8571
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Aug 1 16:15:04 2008 -0400

    Erk.  Actually check all the BARs, not just the first.

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index c983b9a..d358da0 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1556,7 +1556,7 @@ pciDeviceHasBars(struct pci_device *pci)
     int i;
 
     for (i = 0; i < 6; i++)
-	if (pci->regions[0].size)
+	if (pci->regions[i].size)
 	    return TRUE;
 
     if (pci->rom_size)
commit 82d51e6df2bf677bdf24376092bcaa79b534f6e5
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Aug 1 13:17:55 2008 -0400

    Silence the "No matching Device section" warning in some harmless cases.
    
    If the device doesn't have any BARs then it's just a stub for some
    lame operating systems that need one PCI device per output for
    multihead.  No point in warning about it.

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index fedd7a3..c983b9a 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1550,6 +1550,21 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
     return i;
 }
 
+static Bool
+pciDeviceHasBars(struct pci_device *pci)
+{
+    int i;
+
+    for (i = 0; i < 6; i++)
+	if (pci->regions[0].size)
+	    return TRUE;
+
+    if (pci->rom_size)
+	return TRUE;
+
+    return FALSE;
+}
+
 struct Inst {
     struct pci_device *	pci;
     GDevPtr		dev;
@@ -1804,7 +1819,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
 	}
 	if (devBus) dev = devBus;  /* busID preferred */
 	if (!dev) {
-	    if ( xf86CheckPciSlot( pPci ) ) {
+	    if (xf86CheckPciSlot(pPci) && pciDeviceHasBars(pPci)) {
 		xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
 			    "for instance (BusID PCI:%u@%u:%u:%u) found\n",
 			    driverName, pPci->domain, pPci->bus, pPci->dev,
commit 9643e8d3482a35d355a243db7aa397ad47f29be0
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Aug 1 11:35:47 2008 -0400

    Handle XGI cards in autoconfig.
    
    It's all a bit wonky since both sis(4) and xgi(4) claim to support the
    Volari Z7 and V5/8 (0x0020 and 0x0040), so let's side with xgi(4), why
    not.  Note that the V3 (not V3XT) identifies itself as a trident chip.

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 45c42e1..5f96711 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -204,6 +204,12 @@ videoPtrToDriverList(struct pci_device *dev,
 	case 0x100c:		    driverList[0] = "tseng";	break;
 	case 0x1106:		    driverList[0] = "openchrome"; break;
 	case 0x15ad:		    driverList[0] = "vmware";	break;
+	case 0x18ca:
+	    if (dev->device_id == 0x47)
+		driverList[0] = "xgixp";
+	    else
+		driverList[0] = "xgi";
+	    break;
 	default: break;
     }
     for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) {
commit 63bdd4c27d47323b3282bf0b6eaecae91c79b45c
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Jul 31 17:31:36 2008 -0400

    Unifdef XIDLE.
    
    Seriously how was this still here.

diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 33a687a..220d25c 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -403,9 +403,6 @@ _X_HIDDEN void *dixLookupTab[] = {
 
     SYMVAR(noXInputExtension)
 
-#ifdef XIDLE
-    SYMVAR(noXIdleExtension)
-#endif
 #ifdef XSELINUX
     SYMVAR(noSELinuxExtension)
 #endif
diff --git a/include/globals.h b/include/globals.h
index c1c8c67..a95096f 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -128,9 +128,6 @@ extern Bool noPanoramiXExtension;
 
 extern Bool noXInputExtension;
 
-#ifdef XIDLE
-extern Bool noXIdleExtension;
-#endif
 
 #ifdef XSELINUX
 extern Bool noSELinuxExtension;
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 393ee84..6516f43 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -148,9 +148,6 @@ extern Bool noPanoramiXExtension;
 extern Bool noPseudoramiXExtension;
 #endif
 extern Bool noXInputExtension;
-#ifdef XIDLE
-extern Bool noXIdleExtension;
-#endif
 #ifdef XSELINUX
 extern Bool noSELinuxExtension;
 #endif
@@ -212,9 +209,6 @@ extern void XInputExtensionInit(INITARGS);
 extern void XTestExtensionInit(INITARGS);
 #endif
 extern void BigReqExtensionInit(INITARGS);
-#ifdef XIDLE
-extern void XIdleExtensionInit(INITARGS);
-#endif
 #ifdef SCREENSAVER
 extern void ScreenSaverExtensionInit (INITARGS);
 #endif
@@ -422,9 +416,6 @@ InitExtensions(int argc, char *argv[])
     if (!noTestExtensions) XTestExtensionInit();
 #endif
     BigReqExtensionInit();
-#ifdef XIDLE
-    if (!noXIdleExtension) XIdleExtensionInit();
-#endif
 #if defined(SCREENSAVER)
     if (!noScreenSaverExtension) ScreenSaverExtensionInit ();
 #endif
@@ -519,9 +510,6 @@ static ExtensionModule staticExtensions[] = {
     { XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL },
 #endif
     { BigReqExtensionInit, "BIG-REQUESTS", NULL, NULL, NULL },
-#ifdef XIDLE
-    { XIdleExtensionInit, "XIDLE", &noXIdleExtension, NULL, NULL },
-#endif
     { SyncExtensionInit, "SYNC", NULL, NULL, NULL },
 #ifdef XKB
     { XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL },
diff --git a/os/utils.c b/os/utils.c
index 0682bef..88a6495 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -188,9 +188,6 @@ _X_EXPORT Bool noXFixesExtension = FALSE;
 _X_EXPORT Bool noPanoramiXExtension = TRUE;
 #endif
 _X_EXPORT Bool noXInputExtension = FALSE;
-#ifdef XIDLE
-_X_EXPORT Bool noXIdleExtension = FALSE;
-#endif
 #ifdef XSELINUX
 _X_EXPORT Bool noSELinuxExtension = FALSE;
 _X_EXPORT int selinuxEnforcingState = SELINUX_MODE_DEFAULT;
commit 8d214bc26f9b7ab6a5c54d7749cd4b6811cb0b96
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Jul 31 15:46:52 2008 -0400

    Document more of the OS and library assumptions.

diff --git a/doc/c-extensions b/doc/c-extensions
index e1b222b..eb33e27 100644
--- a/doc/c-extensions
+++ b/doc/c-extensions
@@ -1,5 +1,7 @@
-Use of extensions throughout the X server tree
-----------------------------------------------
+First of all: C89 or better.  If you don't have that, port gcc first.
+
+Use of C language extensions throughout the X server tree
+---------------------------------------------------------
 
 Optional extensions:
 The server will still build if your toolchain does not support these
@@ -31,3 +33,29 @@ The server will not build if your toolchain does not support these extensions.
     * variadic macros: macros with a variable number of arguments, e.g.:
                        #define DebugF(x, ...) /**/
     * interleaved code and declarations: { foo = TRUE; int bar; do_stuff(); }
+
+
+Use of OS and library facilities throughout the X server tree
+-------------------------------------------------------------
+
+Non-OS-dependent code can assume facilities at least as good as
+the non-OS-facility parts of POSIX-1.2001.  Ideally this would
+be C99, but even gcc+glibc doesn't implement that yet.
+
+Unix-like systems are assumed to be at least as good as UNIX03.
+
+Linux systems must be at least 2.4 or later.  As a practical matter
+though, 2.4 kernels never receive any testing.  Use 2.6 already.
+
+TODO: Solaris.
+
+TODO: *BSD.
+
+Code that needs to be portable to Windows should be careful to,
+well, be portable.  Note that there are two Windows ports, cygwin and
+mingw.  Cygwin is more or less like Linux, but mingw is a bit more
+restrictive.  TODO: document which versions of Windows we actually care
+about.
+
+OSX support is generally limited to the most recent version.  Currently
+that means 10.5.
commit 2198e237b2ed85857c671eee2cd04dfc032befee
Author: Tomas Carnecky <tom at dbservice.com>
Date:   Thu Jul 31 13:46:06 2008 -0400

    Cosmetic cleanup to Xvfb/Xdmx configure check output.

diff --git a/configure.ac b/configure.ac
index 93c3cb1..570a688 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1187,8 +1187,8 @@ fi
 
 dnl Xnest DDX
 
-AC_MSG_CHECKING([whether to build Xnest DDX])
 PKG_CHECK_MODULES(XNESTMODULES, [xfont xext x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no])
+AC_MSG_CHECKING([whether to build Xnest DDX])
 if test "x$XNEST" = xauto; then
 	XNEST="$have_xnest"
 fi
@@ -1565,8 +1565,8 @@ AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
 
 dnl DMX DDX
 
-AC_MSG_CHECKING([whether to build Xdmx DDX])
 PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no])
+AC_MSG_CHECKING([whether to build Xdmx DDX])
 if test "x$DMX" = xauto; then
 	DMX="$have_dmx"
 	case $host_os in
commit 148175fb8b365dcf00b13539b3f03ce33f3df707
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Jul 31 16:54:33 2008 +0200

    EXA: Do still return FALSE if the driver PrepareCopy hook failed...
    
    Thanks to Stuart Bennett for pointing out the problem on IRC.

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 277ab1e..48af459 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1335,6 +1335,8 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
 	    }
 
 	    (*pExaScr->info->DoneCopy) (pPixmap);
+
+	    ret = TRUE;
 	}
 
 	exaMarkSync(pDrawable->pScreen);
@@ -1343,7 +1345,7 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
 	    REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
     }
 
-    return TRUE;
+    return ret;
 }
 
 
commit 68fd6604a15b653d1fa244633eaaee9608a03ab3
Author: Tomas Carnecky <tom at dbservice.com>
Date:   Thu Jul 31 10:03:56 2008 -0400

    OutputPropertyNotifyMask is a valid thing to select for.

diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index 5525427..72c68e3 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -85,7 +85,8 @@ ProcRRSelectInput (ClientPtr client)
 
     if (stuff->enable & (RRScreenChangeNotifyMask|
 			 RRCrtcChangeNotifyMask|
-			 RROutputChangeNotifyMask)) 
+			 RROutputChangeNotifyMask|
+			 RROutputPropertyNotifyMask)) 
     {
 	ScreenPtr	pScreen = pWin->drawable.pScreen;
 	rrScrPriv	(pScreen);
commit 64ebeeb5265a4c425b9397fdc86a6d81521a856e
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Jul 31 10:58:52 2008 +0200

    EXA: Fix exponential growth logic for GXcopy tiled fills.
    
    Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16908 .

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index f7da911..277ab1e 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1311,10 +1311,10 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
 						planemask)) {
 	    for (i = 0; i < nbox; i++)
 	    {
-		int width = min(pBox[i].x2 - pBox[i].x1, tileWidth);
+		int dstX = pBox[i].x1 + tileWidth;
+		int dstY = pBox[i].y1 + tileHeight;
+		int width = min(pBox[i].x2 - dstX, tileWidth);
 		int height = min(pBox[i].y2 - pBox[i].y1, tileHeight);
-		int dstX = pBox[i].x1 + width;
-		int dstY = pBox[i].y1 + height;
 
 		while (dstX < pBox[i].x2) {
 		    (*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1,
@@ -1324,6 +1324,7 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
 		}
 
 		width = pBox[i].x2 - pBox[i].x1;
+		height = min(pBox[i].y2 - dstY, tileHeight);
 
 		while (dstY < pBox[i].y2) {
 		    (*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1,
commit 8405c25d9ddbfddb6b155a436f07ccad689e53bd
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Jul 31 10:55:44 2008 +0200

    EXA: Simplify exaFillRegionTiled() control flow.
    
    Also only call REGION_TRANSLATE() when necessary.

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index cf15709..f7da911 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1234,14 +1234,11 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
     pixmaps[1].pPix = pTile;
     pixmaps[1].pReg = NULL;
 
-    exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
-    REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
-
     pExaPixmap = ExaGetPixmapPriv (pPixmap);
 
     if (pExaPixmap->accel_blocked || pTileExaPixmap->accel_blocked)
     {
-	goto out;
+	return FALSE;
     } else {
 	exaDoMigration (pixmaps, 2, TRUE);
     }
@@ -1249,10 +1246,13 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
     pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
 
     if (!pPixmap || !exaPixmapIsOffscreen(pTile))
-	goto out;
+	return FALSE;
 
     if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask))
     {
+	if (xoff || yoff)
+	    REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
+
 	for (i = 0; i < nbox; i++)
 	{
 	    int height = pBox[i].y2 - pBox[i].y1;
@@ -1297,8 +1297,6 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
 	}
 	(*pExaScr->info->DoneCopy) (pPixmap);
 
-	exaMarkSync(pDrawable->pScreen);
-
 	/* With GXcopy, we only need to do the basic algorithm up to the tile
 	 * size; then, we can just keep doubling the destination in each
 	 * direction until it fills the box. This way, the number of copy
@@ -1336,15 +1334,15 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
 	    }
 
 	    (*pExaScr->info->DoneCopy) (pPixmap);
-
-	    ret = TRUE;
 	}
-    }
 
-out:
-    REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
+	exaMarkSync(pDrawable->pScreen);
 
-    return ret;
+	if (xoff || yoff)
+	    REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
+    }
+
+    return TRUE;
 }
 
 
commit b37b1e66996f8335dafc97b12d25aaec452b931e
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Wed Jul 30 18:48:27 2008 -0700

    Make shmint.h part of the SDK.
    
    This includes ShmRegisterFuncs, ShmSetPixmapFormat, fbShmPutImage, and
    ShmRegisterFbFuncs.  Note that fbShmPutImage was already exported.

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index 60b4c4c..fc4376e 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -15,7 +15,7 @@ INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
 AM_CFLAGS = $(DIX_CFLAGS)
 
 if XORG
-sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h
+sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h
 endif
 
 # Sources always included in libXextbuiltin.la & libXext.la
diff --git a/Xext/shm.c b/Xext/shm.c
index 52e477f..6465edb 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -283,13 +283,13 @@ ShmResetProc(ExtensionEntry *extEntry)
     }
 }
 
-void
+_X_EXPORT void
 ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs)
 {
     shmFuncs[pScreen->myNum] = funcs;
 }
 
-void
+_X_EXPORT void
 ShmSetPixmapFormat(ScreenPtr pScreen, int format)
 {
     shmPixFormat[pScreen->myNum] = format;
@@ -316,7 +316,7 @@ ShmDestroyPixmap (PixmapPtr pPixmap)
     return ret;
 }
 
-void
+_X_EXPORT void
 ShmRegisterFbFuncs(ScreenPtr pScreen)
 {
     shmFuncs[pScreen->myNum] = &fbFuncs;
commit a3afa6f2fb80489f7b6a88d12def09281d32ed94
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Wed Jul 30 18:30:37 2008 +0200

    EXA: Optimize GXcopy tiled fills.

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 8bcc2ce..cf15709 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1211,6 +1211,7 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
     int nbox = REGION_NUM_RECTS (pRegion);
     BoxPtr pBox = REGION_RECTS (pRegion);
     Bool ret = FALSE;
+    int i;
 
     tileWidth = pTile->drawable.width;
     tileHeight = pTile->drawable.height;
@@ -1252,20 +1253,26 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
 
     if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask))
     {
-	while (nbox--)
+	for (i = 0; i < nbox; i++)
 	{
-	    int height = pBox->y2 - pBox->y1;
-	    int dstY = pBox->y1;
+	    int height = pBox[i].y2 - pBox[i].y1;
+	    int dstY = pBox[i].y1;
 	    int tileY;
 
+	    if (alu == GXcopy)
+		height = min(height, tileHeight);
+
 	    modulus(dstY - yoff - pDrawable->y - pPatOrg->y, tileHeight, tileY);
 
 	    while (height > 0) {
-		int width = pBox->x2 - pBox->x1;
-		int dstX = pBox->x1;
+		int width = pBox[i].x2 - pBox[i].x1;
+		int dstX = pBox[i].x1;
 		int tileX;
 		int h = tileHeight - tileY;
 
+		if (alu == GXcopy)
+		    width = min(width, tileWidth);
+
 		if (h > height)
 		    h = height;
 		height -= h;
@@ -1287,12 +1294,51 @@ exaFillRegionTiled (DrawablePtr	pDrawable,
 		dstY += h;
 		tileY = 0;
 	    }
-	    pBox++;
 	}
 	(*pExaScr->info->DoneCopy) (pPixmap);
+
 	exaMarkSync(pDrawable->pScreen);
 
-	ret = TRUE;
+	/* With GXcopy, we only need to do the basic algorithm up to the tile
+	 * size; then, we can just keep doubling the destination in each
+	 * direction until it fills the box. This way, the number of copy
+	 * operations is O(log(rx)) + O(log(ry)) instead of O(rx * ry), where
+	 * rx/ry is the ratio between box and tile width/height. This can make
+	 * a big difference if each driver copy incurs a significant constant
+	 * overhead.
+	 */
+	if (alu != GXcopy)
+	    ret = TRUE;
+	else if ((*pExaScr->info->PrepareCopy) (pPixmap, pPixmap, 1, 1, alu,
+						planemask)) {
+	    for (i = 0; i < nbox; i++)
+	    {
+		int width = min(pBox[i].x2 - pBox[i].x1, tileWidth);
+		int height = min(pBox[i].y2 - pBox[i].y1, tileHeight);
+		int dstX = pBox[i].x1 + width;
+		int dstY = pBox[i].y1 + height;
+
+		while (dstX < pBox[i].x2) {
+		    (*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1,
+					    dstX, pBox[i].y1, width, height);
+		    dstX += width;
+		    width = min(pBox[i].x2 - dstX, width * 2);
+		}
+
+		width = pBox[i].x2 - pBox[i].x1;
+
+		while (dstY < pBox[i].y2) {
+		    (*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1,
+					    pBox[i].x1, dstY, width, height);
+		    dstY += height;
+		    height = min(pBox[i].y2 - dstY, height * 2);
+		}
+	    }
+
+	    (*pExaScr->info->DoneCopy) (pPixmap);
+
+	    ret = TRUE;
+	}
     }
 
 out:
commit 37087bc10630ee7740df1369b3e56a44fd2ad2b0
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Wed Jul 30 18:27:33 2008 +0200

    EXA: Replace open coded CopyArea logic with GC op call.

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 1dbb269..8bcc2ce 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -261,22 +261,16 @@ exaDoShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
 
     if (format == ZPixmap)
     {
-	PixmapPtr pPixmap;
-	ExaPixmapPriv(exaGetDrawablePixmap(pDrawable));
+	PixmapPtr pPixmap =
+	    GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth,
+				   BitsPerPixel(depth), PixmapBytePad(w, depth),
+				   (pointer)data);
 
-	pPixmap = GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth,
-		BitsPerPixel(depth), PixmapBytePad(w, depth), (pointer)data);
 	if (!pPixmap)
 	    return FALSE;
 
-	if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
-				  pGC->alu))
-	    exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
-	else
-	    exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST,
-				 DamagePendingRegion(pExaPixmap->pDamage));
-	fbCopyArea((DrawablePtr)pPixmap, pDrawable, pGC, sx, sy, sw, sh, dx, dy);
-	exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
+	pGC->ops->CopyArea(&pPixmap->drawable, pDrawable, pGC, sx, sy, sw, sh,
+			   dx, dy);
 
 	FreeScratchPixmapHeader(pPixmap);
 
commit bb2cacd33eb85f39b9e7fa554545611957df677d
Author: Xavier Bestel <xavier.bestel at free.fr>
Date:   Tue Jul 29 13:06:10 2008 -0400

    Cosmetic fix to EDID decoding.

diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index 5e89b40..0dd4bca 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -148,7 +148,8 @@ print_dpms_features(int scrnIndex, struct disp_features *c,
 	}
     } else {
 	int enc = c->display_type;
-	xf86DrvMsg(scrnIndex, X_INFO, "\nSupported color encodings: "
+	xf86ErrorF("\n");
+	xf86DrvMsg(scrnIndex, X_INFO, "Supported color encodings: "
 		   "RGB 4:4:4 %s%s\n",
 		   enc & DISP_YCRCB444 ? "YCrCb 4:4:4 " : "",
 		   enc & DISP_YCRCB422 ? "YCrCb 4:2:2" : "");
commit a70754a9fdb019d85fbfca1898699f3c6f609fdd
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Tue Jul 29 14:16:25 2008 +0100

    require inputproto 1.9.99.3

diff --git a/configure.ac b/configure.ac
index cdbd783..93c3cb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -660,7 +660,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la'
 XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
 
 dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="[randrproto >= 1.2] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.2] [kbproto >= 1.0.3]" 
+REQUIRED_MODULES="[randrproto >= 1.2] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.3] [kbproto >= 1.0.3]" 
 REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.9.5]"
 
 dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
commit 591ef3c047ab3597fef9d687205e99c254ff2040
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Jul 29 10:00:01 2008 +0930

    Xi: ChangeDeviceControl presence events should set the appropriate devchange.
    
    Requires inputproto 1.4.4 or higher.

diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 8c97d8f..bbec7cc 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -276,7 +276,7 @@ out:
     if (ret == Success) {
         dpn.type = DevicePresenceNotify;
         dpn.time = currentTime.milliseconds;
-        dpn.devchange = 1;
+        dpn.devchange = DeviceControlChanged;
         dpn.deviceid = dev->id;
         dpn.control = stuff->control;
         SendEventToAllWindows(dev, DevicePresenceNotifyMask,
commit 25dd5ce0770c5ff91a79c12223fd4af52759900b
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Jul 28 12:33:58 2008 -0400

    Add atKeynames.h in hw/dmx/input and drop evil cross-ddx #include.

diff --git a/hw/dmx/input/Makefile.am b/hw/dmx/input/Makefile.am
index da8de05..44b09af 100644
--- a/hw/dmx/input/Makefile.am
+++ b/hw/dmx/input/Makefile.am
@@ -62,7 +62,6 @@ endif
 
 AM_CFLAGS = $(DIX_CFLAGS) \
             -I$(top_srcdir)/hw/dmx \
-            -I$(top_srcdir)/hw/xfree86/common \
             $(GLX_INCS) \
             -DHAVE_DMX_CONFIG_H \
             $(GLX_DEFS) \
diff --git a/hw/dmx/input/atKeynames.h b/hw/dmx/input/atKeynames.h
new file mode 100644
index 0000000..85f13ac
--- /dev/null
+++ b/hw/dmx/input/atKeynames.h
@@ -0,0 +1,295 @@
+/*
+ * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Thomas Roell not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Thomas Roell makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _ATKEYNAMES_H
+#define _ATKEYNAMES_H
+
+#define XK_TECHNICAL
+#define	XK_KATAKANA
+#include <X11/keysym.h>
+#include <X11/XF86keysym.h>
+
+#define GLYPHS_PER_KEY	4
+#define NUM_KEYCODES	248
+#define MIN_KEYCODE     8
+#define MAX_KEYCODE     (NUM_KEYCODES + MIN_KEYCODE - 1)
+
+#define AltMask		Mod1Mask
+#define NumLockMask	Mod2Mask
+#define AltLangMask	Mod3Mask
+#define KanaMask	Mod4Mask
+#define ScrollLockMask	Mod5Mask
+
+#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
+#define ModifierDown(k) ((keyc->state & (k)) == (k))
+
+/*
+ * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
+ *       sets of scancodes. Set3 can only be generated by a MF keyboard.
+ *       Set2 sends a makecode for keypress, and the same code prefixed by a
+ *       F0 for keyrelease. This is a little bit ugly to handle. Thus we use
+ *       here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes.
+ *       Bit 7 ist set if the key is released. The code E0 switches to a
+ *       different meaning to add the new MF cursorkeys, while not breaking old
+ *       applications. E1 is another special prefix. Since I assume that there
+ *       will be further versions of PC/XT scancode compatible keyboards, we
+ *       may be in trouble one day.
+ *
+ * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3.
+ *       2) Use the keyboards native set and translate it to common keysyms.
+ */
+
+/*
+ * definition of the AT84/MF101/MF102 Keyboard:
+ * ============================================================
+ *       Defined             Key Cap Glyphs       Pressed value
+ *      Key Name            Main       Also       (hex)    (dec)
+ *      ----------------   ---------- -------    ------    ------
+ */
+
+#define KEY_Escape       /* Escape                0x01  */    1  
+#define KEY_1            /* 1           !         0x02  */    2 
+#define KEY_2            /* 2           @         0x03  */    3 
+#define KEY_3            /* 3           #         0x04  */    4 
+#define KEY_4            /* 4           $         0x05  */    5 
+#define KEY_5            /* 5           %         0x06  */    6 
+#define KEY_6            /* 6           ^         0x07  */    7 
+#define KEY_7            /* 7           &         0x08  */    8 
+#define KEY_8            /* 8           *         0x09  */    9 
+#define KEY_9            /* 9           (         0x0a  */   10 
+#define KEY_0            /* 0           )         0x0b  */   11 
+#define KEY_Minus        /* - (Minus)   _ (Under) 0x0c  */   12
+#define KEY_Equal        /* = (Equal)   +         0x0d  */   13 
+#define KEY_BackSpace    /* Back Space            0x0e  */   14 
+#define KEY_Tab          /* Tab                   0x0f  */   15
+#define KEY_Q            /* Q                     0x10  */   16
+#define KEY_W            /* W                     0x11  */   17
+#define KEY_E            /* E                     0x12  */   18
+#define KEY_R            /* R                     0x13  */   19
+#define KEY_T            /* T                     0x14  */   20
+#define KEY_Y            /* Y                     0x15  */   21
+#define KEY_U            /* U                     0x16  */   22
+#define KEY_I            /* I                     0x17  */   23
+#define KEY_O            /* O                     0x18  */   24
+#define KEY_P            /* P                     0x19  */   25
+#define KEY_LBrace       /* [           {         0x1a  */   26
+#define KEY_RBrace       /* ]           }         0x1b  */   27 
+#define KEY_Enter        /* Enter                 0x1c  */   28
+#define KEY_LCtrl        /* Ctrl(left)            0x1d  */   29
+#define KEY_A            /* A                     0x1e  */   30
+#define KEY_S            /* S                     0x1f  */   31
+#define KEY_D            /* D                     0x20  */   32 
+#define KEY_F            /* F                     0x21  */   33
+#define KEY_G            /* G                     0x22  */   34
+#define KEY_H            /* H                     0x23  */   35
+#define KEY_J            /* J                     0x24  */   36
+#define KEY_K            /* K                     0x25  */   37
+#define KEY_L            /* L                     0x26  */   38
+#define KEY_SemiColon    /* ;(SemiColon) :(Colon) 0x27  */   39
+#define KEY_Quote        /* ' (Apostr)  " (Quote) 0x28  */   40
+#define KEY_Tilde        /* ` (Accent)  ~ (Tilde) 0x29  */   41
+#define KEY_ShiftL       /* Shift(left)           0x2a  */   42
+#define KEY_BSlash       /* \(BckSlash) |(VertBar)0x2b  */   43
+#define KEY_Z            /* Z                     0x2c  */   44
+#define KEY_X            /* X                     0x2d  */   45
+#define KEY_C            /* C                     0x2e  */   46
+#define KEY_V            /* V                     0x2f  */   47
+#define KEY_B            /* B                     0x30  */   48
+#define KEY_N            /* N                     0x31  */   49
+#define KEY_M            /* M                     0x32  */   50
+#define KEY_Comma        /* , (Comma)   < (Less)  0x33  */   51
+#define KEY_Period       /* . (Period)  >(Greater)0x34  */   52
+#define KEY_Slash        /* / (Slash)   ?         0x35  */   53
+#define KEY_ShiftR       /* Shift(right)          0x36  */   54
+#define KEY_KP_Multiply  /* *                     0x37  */   55
+#define KEY_Alt          /* Alt(left)             0x38  */   56
+#define KEY_Space        /*   (SpaceBar)          0x39  */   57
+#define KEY_CapsLock     /* CapsLock              0x3a  */   58
+#define KEY_F1           /* F1                    0x3b  */   59
+#define KEY_F2           /* F2                    0x3c  */   60
+#define KEY_F3           /* F3                    0x3d  */   61
+#define KEY_F4           /* F4                    0x3e  */   62
+#define KEY_F5           /* F5                    0x3f  */   63
+#define KEY_F6           /* F6                    0x40  */   64
+#define KEY_F7           /* F7                    0x41  */   65
+#define KEY_F8           /* F8                    0x42  */   66
+#define KEY_F9           /* F9                    0x43  */   67
+#define KEY_F10          /* F10                   0x44  */   68
+#define KEY_NumLock      /* NumLock               0x45  */   69
+#define KEY_ScrollLock   /* ScrollLock            0x46  */   70
+#define KEY_KP_7         /* 7           Home      0x47  */   71 
+#define KEY_KP_8         /* 8           Up        0x48  */   72 
+#define KEY_KP_9         /* 9           PgUp      0x49  */   73 
+#define KEY_KP_Minus     /* - (Minus)             0x4a  */   74
+#define KEY_KP_4         /* 4           Left      0x4b  */   75
+#define KEY_KP_5         /* 5                     0x4c  */   76
+#define KEY_KP_6         /* 6           Right     0x4d  */   77
+#define KEY_KP_Plus      /* + (Plus)              0x4e  */   78
+#define KEY_KP_1         /* 1           End       0x4f  */   79
+#define KEY_KP_2         /* 2           Down      0x50  */   80
+#define KEY_KP_3         /* 3           PgDown    0x51  */   81
+#define KEY_KP_0         /* 0           Insert    0x52  */   82
+#define KEY_KP_Decimal   /* . (Decimal) Delete    0x53  */   83 
+#define KEY_SysReqest    /* SysReqest             0x54  */   84
+                         /* NOTUSED               0x55  */
+#define KEY_Less         /* < (Less)   >(Greater) 0x56  */   86
+#define KEY_F11          /* F11                   0x57  */   87
+#define KEY_F12          /* F12                   0x58  */   88
+
+#define KEY_Prefix0      /* special               0x60  */   96
+#define KEY_Prefix1      /* specail               0x61  */   97
+
+/*
+ * The 'scancodes' below are generated by the server, because the MF101/102
+ * keyboard sends them as sequence of other scancodes
+ */
+#define KEY_Home         /* Home                  0x59  */   89
+#define KEY_Up           /* Up                    0x5a  */   90
+#define KEY_PgUp         /* PgUp                  0x5b  */   91
+#define KEY_Left         /* Left                  0x5c  */   92
+#define KEY_Begin        /* Begin                 0x5d  */   93
+#define KEY_Right        /* Right                 0x5e  */   94
+#define KEY_End          /* End                   0x5f  */   95
+#define KEY_Down         /* Down                  0x60  */   96
+#define KEY_PgDown       /* PgDown                0x61  */   97
+#define KEY_Insert       /* Insert                0x62  */   98
+#define KEY_Delete       /* Delete                0x63  */   99
+#define KEY_KP_Enter     /* Enter                 0x64  */  100
+#define KEY_RCtrl        /* Ctrl(right)           0x65  */  101
+#define KEY_Pause        /* Pause                 0x66  */  102
+#define KEY_Print        /* Print                 0x67  */  103
+#define KEY_KP_Divide    /* Divide                0x68  */  104
+#define KEY_AltLang      /* AtlLang(right)        0x69  */  105
+#define KEY_Break        /* Break                 0x6a  */  106
+#define KEY_LMeta        /* Left Meta             0x6b  */  107
+#define KEY_RMeta        /* Right Meta            0x6c  */  108
+#define KEY_Menu         /* Menu                  0x6d  */  109
+#define KEY_F13          /* F13                   0x6e  */  110
+#define KEY_F14          /* F14                   0x6f  */  111
+#define KEY_F15          /* F15                   0x70  */  112
+#define KEY_HKTG         /* Hirugana/Katakana tog 0x70  */  112
+#define KEY_F16          /* F16                   0x71  */  113
+#define KEY_F17          /* F17                   0x72  */  114
+#define KEY_KP_DEC       /* KP_DEC                0x73  */  115
+#define KEY_BSlash2      /* \           _         0x73  */  115
+#define KEY_KP_Equal	 /* Equal (Keypad)        0x76  */  118
+#define KEY_XFER         /* Kanji Transfer        0x79  */  121
+#define KEY_NFER         /* No Kanji Transfer     0x7b  */  123
+#define KEY_Yen          /* Yen                   0x7d  */  125
+
+#define KEY_Power        /* Power Key             0x84  */  132
+#define KEY_Mute         /* Audio Mute            0x85  */  133
+#define KEY_AudioLower   /* Audio Lower           0x86  */  134
+#define KEY_AudioRaise   /* Audio Raise           0x87  */  135
+#define KEY_Help         /* Help                  0x88  */  136
+#define KEY_L1           /* Stop                  0x89  */  137
+#define KEY_L2           /* Again                 0x8a  */  138
+#define KEY_L3           /* Props                 0x8b  */  139
+#define KEY_L4           /* Undo                  0x8c  */  140
+#define KEY_L5           /* Front                 0x8d  */  141
+#define KEY_L6           /* Copy                  0x8e  */  142
+#define KEY_L7           /* Open                  0x8f  */  143
+#define KEY_L8           /* Paste                 0x90  */  144
+#define KEY_L9           /* Find                  0x91  */  145
+#define KEY_L10          /* Cut                   0x92  */  146
+
+/*
+ * Fake 'scancodes' in the following ranges are generated for 2-byte
+ * codes not handled elsewhere.  These correspond to most extended keys
+ * on so-called "Internet" keyboards:
+ *
+ *	0x79-0x93
+ *	0x96-0xa1
+ *	0xa3-0xac
+ *	0xb1-0xb4
+ *	0xba-0xbd
+ *	0xc2
+ *	0xcc-0xd2
+ *	0xd6-0xf7
+ */
+
+/*
+ * Remapped 'scancodes' are generated for single-byte codes in the range
+ * 0x59-0x5f,0x62-0x76.  These are used for some extra keys on some keyboards.
+ */
+
+#define KEY_0x59		0x95
+#define KEY_0x5A		0xA2
+#define KEY_0x5B		0xAD
+#define KEY_0x5C		KEY_KP_EQUAL
+#define KEY_0x5D		0xAE
+#define KEY_0x5E		0xAF
+#define KEY_0x5F		0xB0
+#define KEY_0x62		0xB5
+#define KEY_0x63		0xB6
+#define KEY_0x64		0xB7
+#define KEY_0x65		0xB8
+#define KEY_0x66		0xB9
+#define KEY_0x67		0xBE
+#define KEY_0x68		0xBF
+#define KEY_0x69		0xC0
+#define KEY_0x6A		0xC1
+#define KEY_0x6B		0xC3
+#define KEY_0x6C		0xC4
+#define KEY_0x6D		0xC5
+#define KEY_0x6E		0xC6
+#define KEY_0x6F		0xC7
+#define KEY_0x70		0xC8
+#define KEY_0x71		0xC9
+#define KEY_0x72		0xCA
+#define KEY_0x73		0xCB
+#define KEY_0x74		0xD3
+#define KEY_0x75		0xD4
+#define KEY_0x76		0xD5
+
+/* These are for "notused" and "unknown" entries in translation maps. */
+#define KEY_NOTUSED	  0
+#define KEY_UNKNOWN	255
+
+#endif /* _ATKEYNAMES_H */
commit e39a16aa58456aaecee54edc64f189c958db0902
Author: Julien Cristau <jcristau at debian.org>
Date:   Sat Jul 26 16:35:19 2008 +0200

    xfree86: don't output a spurious newline to the log when loading a module

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 6031db7..70c54a7 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -847,14 +847,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
     char *m = NULL;
     const char **cim;
 
-    xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"\n", module);
-
-    for (cim = compiled_in_modules; *cim; cim++)
-	if (!strcmp (module, *cim))
-	{
-	    xf86MsgVerb(X_INFO, 3, "Module \"%s\" already built-in\n", module);
-	    return (ModuleDescPtr) 1;
-	}
+    xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
 
     patterns = InitPatterns(patternlist);
     name = LoaderGetCanonicalName(module, patterns);
@@ -869,6 +862,14 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
 	xf86ErrorFVerb(3, "\n");
 	m = (char *)module;
     }
+
+    for (cim = compiled_in_modules; *cim; cim++)
+	if (!strcmp (m, *cim))
+	{
+	    xf86MsgVerb(X_INFO, 3, "Module \"%s\" already built-in\n", m);
+	    return (ModuleDescPtr) 1;
+	}
+
     if (!name) {
 	if (errmaj)
 	    *errmaj = LDR_BADUSAGE;
commit 2eaed4a10fe5bf727579bca4ab8d4a47c8763a7d
Author: Julien Cristau <jcristau at debian.org>
Date:   Sat Jul 26 15:35:42 2008 +0200

    xfree86: use xorg.conf input devices if there is no ServerLayout
    
    If xorg.conf has no ServerLayout section, use the first mouse and
    keyboard sections as core devices, even with AllowEmptyInput.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 4b4a9a8..4b56152 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1315,7 +1315,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     /* 3. First core pointer device. */
-    if (!foundPointer) {
+    if (!foundPointer && (!xf86Info.allowEmptyInput || implicitLayout)) {
 	XF86ConfInputPtr p;
 
 	for (p = xf86configptr->conf_input_lst; p; p = p->list.next) {
@@ -1331,7 +1331,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     /* 4. First pointer with 'mouse' as the driver. */
-    if (!foundPointer) {
+    if (!foundPointer && (!xf86Info.allowEmptyInput || implicitLayout)) {
 	confInput = xf86findInput(CONF_IMPLICIT_POINTER,
 				  xf86configptr->conf_input_lst);
 	if (!confInput) {
@@ -1346,7 +1346,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     /* 5. Built-in default. */
-    if (!foundPointer) {
+    if (!foundPointer && !xf86Info.allowEmptyInput) {
 	bzero(&defPtr, sizeof(defPtr));
 	defPtr.inp_identifier = strdup("<default pointer>");
 	defPtr.inp_driver = strdup("mouse");
@@ -1373,9 +1373,13 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     if (!foundPointer) {
-	/* This shouldn't happen. */
-	xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
-	return FALSE;
+	if (!xf86Info.allowEmptyInput) {
+	    /* This shouldn't happen. */
+	    xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
+	    return FALSE;
+	} else {
+	    xf86Msg(X_INFO, "Cannot locate a core pointer device.\n");
+	}
     }
 
     /*
@@ -1392,7 +1396,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
 	    found = 1; break;
 	}
     }
-    if (!found) {
+    if (!found && !xf86Info.allowEmptyInput) {
 	xf86Msg(X_INFO, "No default mouse found, adding one\n");
 	bzero(&defPtr, sizeof(defPtr));
 	defPtr.inp_identifier = strdup("<default pointer>");
@@ -1451,7 +1455,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     /* 3. First core keyboard device. */
-    if (!foundKeyboard) {
+    if (!foundKeyboard && (!xf86Info.allowEmptyInput || implicitLayout)) {
 	XF86ConfInputPtr p;
 
 	for (p = xf86configptr->conf_input_lst; p; p = p->list.next) {
@@ -1467,7 +1471,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     /* 4. First keyboard with 'keyboard' or 'kbd' as the driver. */
-    if (!foundKeyboard) {
+    if (!foundKeyboard && (!xf86Info.allowEmptyInput || implicitLayout)) {
 	confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD,
 				  xf86configptr->conf_input_lst);
 	if (!confInput) {
@@ -1482,7 +1486,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     /* 5. Built-in default. */
-    if (!foundKeyboard) {
+    if (!foundKeyboard && !xf86Info.allowEmptyInput) {
 	bzero(&defKbd, sizeof(defKbd));
 	defKbd.inp_identifier = strdup("<default keyboard>");
 	defKbd.inp_driver = strdup("kbd");
@@ -1509,21 +1513,39 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
     }
 
     if (!foundKeyboard) {
-	/* This shouldn't happen. */
-	xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n");
-	return FALSE;
+	if (!xf86Info.allowEmptyInput) {
+		/* This shouldn't happen. */
+		xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n");
+		return FALSE;
+	} else {
+		xf86Msg(X_INFO, "Cannot locate a core keyboard device.\n");
+	}
     }
 
     if (pointerMsg) {
-	xf86Msg(X_DEFAULT, "The core pointer device wasn't specified "
-		"explicitly in the layout.\n"
-		"\tUsing the %s.\n", pointerMsg);
+	if (implicitLayout)
+	    xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n",
+	            pointerMsg);
+	else
+	    xf86Msg(X_DEFAULT, "The core pointer device wasn't specified "
+	            "explicitly in the layout.\n"
+	            "\tUsing the %s.\n", pointerMsg);
     }
 
     if (keyboardMsg) {
-	xf86Msg(X_DEFAULT, "The core keyboard device wasn't specified "
-		"explicitly in the layout.\n"
-		"\tUsing the %s.\n", keyboardMsg);
+	if (implicitLayout)
+	    xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n",
+	            keyboardMsg);
+	else
+	    xf86Msg(X_DEFAULT, "The core keyboard device wasn't specified "
+	            "explicitly in the layout.\n"
+	            "\tUsing the %s.\n", keyboardMsg);
+    }
+
+    if (xf86Info.allowEmptyInput && !(foundPointer && foundKeyboard)) {
+	xf86Msg(X_INFO, "The server relies on HAL to provide the list of "
+	                "input devices.\n\tIf no devices become available, "
+	                "reconfigure HAL or disable AllowEmptyInput.\n");
     }
 
     return TRUE;
@@ -2470,26 +2492,8 @@ addDefaultModes(MonPtr monitorp)
 }
 
 static void
-checkInput(serverLayoutPtr layout) {
-    if (!xf86Info.allowEmptyInput)
-        checkCoreInputDevices(layout, FALSE);
-    else
-    {
-        xf86Msg(X_INFO, "AllowEmptyInput is on.\n"
-                "\tThe server relies on HAL to provide the list of input "
-                "devices.\n\tIf no devices become available, reconfigure "
-                "HAL.\n");
-        if (!layout->inputs || !*layout->inputs)
-        {
-            /* No input device specified in ServerLayout. */
-            if (xf86configptr->conf_input_lst &&
-                    xf86configptr->conf_input_lst->inp_identifier)
-                xf86Msg(X_WARNING, "Input devices specified in xorg.conf, but"
-                        " not referenced in ServerLayout.\n\tThese devices"
-                        " will NOT be available.\n");
-        }
-
-    }
+checkInput(serverLayoutPtr layout, Bool implicit_layout) {
+    checkCoreInputDevices(layout, implicit_layout);
 }
 
 /*
@@ -2503,6 +2507,7 @@ xf86HandleConfigFile(Bool autoconfig)
     MessageType from = X_DEFAULT;
     char *scanptr;
     Bool singlecard = 0;
+    Bool implicit_layout = FALSE;
 
     if (!autoconfig) {
 	if (getuid() == 0)
@@ -2555,6 +2560,7 @@ xf86HandleConfigFile(Bool autoconfig)
             xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
 	    return CONFIG_PARSE_ERROR;
 	}
+	implicit_layout = TRUE;
     } else {
 	if (xf86configptr->conf_flags != NULL) {
 	  char *dfltlayout = NULL;
@@ -2612,7 +2618,7 @@ xf86HandleConfigFile(Bool autoconfig)
     configDRI(xf86configptr->conf_dri);
 #endif
 
-    checkInput(&xf86ConfigLayout);
+    checkInput(&xf86ConfigLayout, implicit_layout);
 
     /*
      * Handle some command line options that can override some of the
commit 805f28e96ceb20bc53792ae3cf17f9c26564ae0e
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Jul 23 12:10:52 2008 +0200

    some trivial changes regarding C compat, indentation, etc.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index d6cd8c5..21a2eca 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -458,7 +458,10 @@ ApplySofteningAndConstantDeceleration(
  * Polynomial function similar previous one, but with f(1) = 1
  */
 static float
-PolynomialAccelerationProfile(DeviceVelocityPtr pVel, float ignored, float acc)
+PolynomialAccelerationProfile(
+    DeviceVelocityPtr pVel,
+    float ignored,
+    float acc)
 {
    return pow(pVel->velocity, (acc - 1.0) * 0.5);
 }
@@ -474,7 +477,6 @@ ClassicProfile(
     float threshold,
     float acc)
 {
-
     if (threshold) {
 	return SimpleSmoothProfile (pVel,
                                     threshold,
@@ -516,7 +518,8 @@ PowerProfile(
  * just a smooth function in [0..1] -> [0..1]
  *  - point symmetry at 0.5
  *  - f'(0) = f'(1) = 0
- *  - starts faster than sinoids, C1 (Cinf if you dare to ignore endpoints)
+ *  - starts faster than a sinoid
+ *  - smoothness C1 (Cinf if you dare to ignore endpoints)
  */
 static inline float
 CalcPenumbralGradient(float x){
@@ -561,13 +564,15 @@ SmoothLinearProfile(
     float threshold,
     float acc)
 {
+    float res, nv;
+
     if(acc > 1.0f)
         acc -= 1.0f; /*this is so acc = 1 is no acceleration */
     else
         return 1.0f;
 
-    float nv = (pVel->velocity - threshold) * acc * 0.5f;
-    float res;
+    nv = (pVel->velocity - threshold) * acc * 0.5f;
+
     if(nv < 0){
         res = 0;
     }else if(nv < 2){
@@ -696,8 +701,12 @@ GetDevicePredictableAccelData(
  * enable fine-grained predictable acceleration profiles.
  */
 void
-acceleratePointerPredictable(DeviceIntPtr pDev, int first_valuator,
-                             int num_valuators, int *valuators, int evtime)
+acceleratePointerPredictable(
+    DeviceIntPtr pDev,
+    int first_valuator,
+    int num_valuators,
+    int *valuators,
+    int evtime)
 {
     float mult = 0.0;
     int dx = 0, dy = 0;
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index fbd10e9..ea4dbba 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -138,7 +138,7 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
         s->min_acceleration = 1.0 / tempf;   /* set minimum acceleration */
     }
 
-    tempf = xf86SetRealOption(list, "VelocityCoupling", 0.2);
+    tempf = xf86SetRealOption(list, "VelocityCoupling", 0.25);
     xf86Msg(X_CONFIG, "%s: (accel) velocity coupling is %.1f%%\n", devname,
                 tempf*100.0);
     s->coupling = tempf;
commit 3209bd21d00b8673d321f70afb65720588ddacb3
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Jul 23 12:06:34 2008 +0200

    xfree86: perform pointer accel scheme selection by name, not number
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 9a14a4c..fbd10e9 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -174,9 +174,21 @@ ApplyAccelerationSettings(DeviceIntPtr dev){
     int scheme;
     DeviceVelocityPtr pVel;
     LocalDevicePtr local = (LocalDevicePtr)dev->public.devicePrivate;
+    char* schemeStr;
 
     if(dev->valuator){
-        scheme = xf86SetIntOption(local->options, "AccelerationScheme", 1);
+	schemeStr = xf86SetStrOption(local->options, "AccelerationScheme", "");
+
+	scheme = dev->valuator->accelScheme.number;
+
+	if(!xf86NameCmp(schemeStr, "predictable"))
+	    scheme = PtrAccelPredictable;
+
+	if(!xf86NameCmp(schemeStr, "lightweight"))
+	    scheme = PtrAccelLightweight;
+
+	if(!xf86NameCmp(schemeStr, "none"))
+	    scheme = PtrAccelNoOp;
 
         /* reinit scheme if needed */
         if(dev->valuator->accelScheme.number != scheme){
@@ -184,15 +196,24 @@ ApplyAccelerationSettings(DeviceIntPtr dev){
                 dev->valuator->accelScheme.AccelCleanupProc(dev);
             }
 
-            xf86Msg(X_CONFIG, "%s: (accel) init acceleration scheme %i\n", local->name, scheme);
-            InitPointerAccelerationScheme(dev, scheme);
+            if(InitPointerAccelerationScheme(dev, scheme)){
+		xf86Msg(X_CONFIG, "%s: (accel) selected scheme %s/%i\n",
+		        local->name, schemeStr, scheme);
+	    }else{
+        	xf86Msg(X_CONFIG, "%s: (accel) could not init scheme %s\n",
+        	        local->name, schemeStr);
+        	scheme = dev->valuator->accelScheme.number;
+            }
         }else{
-            xf86Msg(X_CONFIG, "%s: (accel) keeping acceleration scheme %i\n", local->name, scheme);
+            xf86Msg(X_CONFIG, "%s: (accel) keeping acceleration scheme %i\n",
+                    local->name, scheme);
         }
 
+        xfree(schemeStr);
+
         /* process special configuration */
         switch(scheme){
-            case 1:
+            case PtrAccelPredictable:
                 pVel = (DeviceVelocityPtr) dev->valuator->accelScheme.accelData;
                 ProcessVelocityConfiguration (local->name, local->options,
                                               pVel);
commit a17cb29f5acdfcdeac929d8c6be3600d44d038ef
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Jul 23 12:03:17 2008 +0200

    dix: preparation change: make runtime exchange of filter chain safe
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 32ba3e1..d6cd8c5 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -30,6 +30,7 @@
 #include <ptrveloc.h>
 #include <inputstr.h>
 #include <assert.h>
+#include <os.h>
 
 /*****************************************************************************
  * Predictable pointer ballistics
@@ -151,6 +152,8 @@ InitFilterChain(DeviceVelocityPtr s, float rdecay, float progression, int stages
 	ErrorF("(dix ptracc) invalid filter chain progression specified\n");
 	return;
     }
+    /* Block here to support runtime filter adjustment */
+    OsBlockSignals();
     for(fn = 0; fn < MAX_VELOCITY_FILTERS; fn++){
 	if(fn < stages){
 	    InitFilterStage(&s->filters[fn], rdecay, lutsize);
@@ -159,6 +162,10 @@ InitFilterChain(DeviceVelocityPtr s, float rdecay, float progression, int stages
 	}
 	rdecay /= progression;
     }
+    /* release again. Should the input loop be threaded, we also need
+     * memory release here (in princliple).
+     */
+    OsReleaseSignals();
 }
 
 
@@ -199,7 +206,6 @@ InitFilterStage(FilterStagePtr s, float rdecay, int lutsize)
     float *oldlut;
 
     s->fading_lut_size  = 0; /* prevent access */
-    /* mb(); concurrency issues may arise */
 
     if(lutsize > 0){
         newlut = xalloc (sizeof(float)* lutsize);
commit 1a9f9ac50f2b0db735789905cc29572a50c8ae4c
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Jul 23 11:49:36 2008 +0200

    dix: optimize precision in device velocity estimation
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index f8f2f26..32ba3e1 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -90,11 +90,12 @@ InitVelocityData(DeviceVelocityPtr s)
     s->corr_mul = 10.0;      /* dots per 10 milisecond should be usable */
     s->const_acceleration = 1.0;   /* no acceleration/deceleration  */
     s->reset_time = 300;
+    s->last_reset = FALSE;
     s->last_dx = 0;
     s->last_dy = 0;
     s->use_softening = 1;
     s->min_acceleration = 1.0; /* don't decelerate */
-    s->coupling = 0.2;
+    s->coupling = 0.25;
     s->profile_private = NULL;
     memset(&s->statistics, 0, sizeof(s->statistics));
     memset(&s->filters, 0, sizeof(s->filters));
@@ -135,6 +136,12 @@ AccelerationDefaultCleanup(DeviceIntPtr pDev){
 /**
 Initialize a filter chain.
 Expected result is a series of filters, each progressively more integrating.
+
+This allows for two strategies: Either you have one filter which is reasonable
+and is being coupled to account for fast-changing input, or you have 'one for
+every situation'. You might want to have loose coupling then, i.e. > 1.
+E.g. you could start around 1/2 of your anticipated delta t and
+scale up until several motion deltas are 'averaged'.
 */
 void
 InitFilterChain(DeviceVelocityPtr s, float rdecay, float progression, int stages, int lutsize)
@@ -164,9 +171,21 @@ CleanupFilterChain(DeviceVelocityPtr s)
 	InitFilterStage(&s->filters[fn], 0, 0);
 }
 
+static inline void
+StuffFilterChain(DeviceVelocityPtr s, float value)
+{
+    int fn;
+
+    for(fn = 0; fn < MAX_VELOCITY_FILTERS; fn++){
+	if(s->filters[fn].rdecay != 0)
+	    s->filters[fn].current = value;
+	else break;
+    }
+}
+
 
 /**
- * Adjust weighting decay and lut in sync
+ * Adjust weighting decay and lut for a stage
  * The weight fn is designed so its integral 0->inf is unity, so we end
  * up with a stable (basically IIR) filter. It always draws
  * towards its more current input values, which have more weight the older
@@ -227,13 +246,12 @@ FeedFilterStage(FilterStagePtr s, float value, int tdiff){
 
 /**
  * Select the most filtered matching result. Also, the first
- * mismatching filter will be set to value (coupling).
+ * mismatching filter may be set to value (coupling).
  */
 static inline float
 QueryFilterChain(
     DeviceVelocityPtr s,
-    float value,
-    float maxdiv)
+    float value)
 {
     int fn, rfn = 0, cfn = -1;
     float cur, result = value;
@@ -246,20 +264,21 @@ QueryFilterChain(
 	cur = s->filters[fn].current;
 
 	if (fabs(value - cur) <= 1.0f ||
-	    fabs(value - cur) / (value + cur) <= maxdiv){
+	    fabs(value - cur) / (value + cur) <= s->coupling){
 	    result = cur;
-	    rfn = fn; /*remember result determining filter */
+	    rfn = fn + 1; /*remember result determining filter */
 	} else if(cfn == -1){
 	    cfn = fn; /* rememeber first mismatching filter */
 	}
     }
 
     s->statistics.filter_usecount[rfn]++;
-#ifdef SERIOUS_DEBUGGING
-    ErrorF("(dix ptraccel) result from filter stage %i,  input %.2f, output %.2f\n", rfn, value, result);
+#ifdef PTRACCEL_DEBUGGING
+    ErrorF("(dix ptraccel) result from stage %i,  input %.2f, output %.2f\n",
+           rfn, value, result);
 #endif
 
-    /* override one current (coupling) so the filter
+    /* override first mismatching current (coupling) so the filter
      * catches up quickly. */
     if(cfn != -1)
         s->filters[cfn].current = result;
@@ -296,7 +315,11 @@ GetAxis(int dx, int dy){
  * return true if non-visible state reset is suggested
  */
 static short
-ProcessVelocityData(DeviceVelocityPtr s, int dx, int dy, int time)
+ProcessVelocityData(
+    DeviceVelocityPtr s,
+    int dx,
+    int dy,
+    int time)
 {
     float cvelocity;
 
@@ -312,7 +335,7 @@ ProcessVelocityData(DeviceVelocityPtr s, int dx, int dy, int time)
         dy += s->last_dy;
         diff += s->last_diff;
         s->last_diff = time - s->lrm_time; /* prevent repeating add-up */
-#ifdef SERIOUS_DEBUGGING
+#ifdef PTRACCEL_DEBUGGING
         ErrorF("(dix ptracc) axial correction\n");
 #endif
     }else{
@@ -320,9 +343,9 @@ ProcessVelocityData(DeviceVelocityPtr s, int dx, int dy, int time)
     }
 
     /*
-     * cvelocity is not a real velocity yet, more a motion delta. contant
+     * cvelocity is not a real velocity yet, more a motion delta. constant
      * acceleration is multiplied here to make the velocity an on-screen
-     * velocity (px/t as opposed to [insert unit]/t). This is intended to
+     * velocity (pix/t as opposed to [insert unit]/t). This is intended to
      * make multiple devices with widely varying ConstantDecelerations respond
      * similar to acceleration controls.
      */
@@ -330,10 +353,10 @@ ProcessVelocityData(DeviceVelocityPtr s, int dx, int dy, int time)
 
     s->lrm_time = time;
 
-    if (s->reset_time < 0 || diff < 0) {     /* disabled or timer overrun? */
+    if (s->reset_time < 0 || diff < 0) { /* reset disabled or timer overrun? */
         /* simply set velocity from current movement, no reset. */
         s->velocity = cvelocity;
-        return 0;
+        return FALSE;
     }
 
     if (diff == 0)
@@ -345,23 +368,38 @@ ProcessVelocityData(DeviceVelocityPtr s, int dx, int dy, int time)
 
     /* short-circuit: when nv-reset the rest can be skipped */
     if(reset == TRUE){
-        s->velocity = cvelocity;
-        return TRUE;
+	StuffFilterChain(s, cvelocity);
+	s->velocity = cvelocity;
+	s->last_reset = TRUE;
+	return TRUE;
+    }
+
+    if(s->last_reset == TRUE){
+	/*
+	 * when here, we're probably processing the second mickey of a starting
+	 * stroke. This happens to be the first time we can reasonably pretend
+	 * that cvelocity is an actual velocity. Thus, to opt precision, we
+	 * stuff that into the filter chain.
+	 */
+	s->last_reset = FALSE;
+	StuffFilterChain(s, cvelocity);
+	s->velocity = cvelocity;
+	return FALSE;
     }
 
     /* feed into filter chain */
     FeedFilterChain(s, cvelocity, diff);
 
     /* perform coupling and decide final value */
-    s->velocity = QueryFilterChain(s, cvelocity, s->coupling);
+    s->velocity = QueryFilterChain(s, cvelocity);
 
-#ifdef SERIOUS_DEBUGGING
+#ifdef PTRACCEL_DEBUGGING
     ErrorF("(dix ptracc) guess: vel=%.3f diff=%d   |%i|%i|%i|%i|\n",
            s->velocity, diff,
            s->statistics.filter_usecount[0], s->statistics.filter_usecount[1],
            s->statistics.filter_usecount[2], s->statistics.filter_usecount[3]);
 #endif
-    return reset;
+    return FALSE;
 }
 
 
@@ -689,15 +727,15 @@ acceleratePointerPredictable(DeviceIntPtr pDev, int first_valuator,
             /* invoke acceleration profile to determine acceleration */
             mult = velocitydata->Profile(velocitydata,
                                 pDev->ptrfeed->ctrl.threshold,
-                                (float)(pDev->ptrfeed->ctrl.num) /
-                                (float)(pDev->ptrfeed->ctrl.den));
+                                (float)pDev->ptrfeed->ctrl.num /
+                                (float)pDev->ptrfeed->ctrl.den);
 
-#ifdef SERIOUS_DEBUGGING
+#ifdef PTRACCEL_DEBUGGING
             ErrorF("(dix ptracc) resulting speed multiplier : %.3f\n", mult);
 #endif
             /* enforce min_acceleration */
             if (mult < velocitydata->min_acceleration) {
-#ifdef SERIOUS_DEBUGGING
+#ifdef PTRACCEL_DEBUGGING
                 ErrorF("(dix ptracc) enforced min multiplier : %.3f\n",
                         velocitydata->min_acceleration);
 #endif
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index 8e56e4d..2d42dda 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -27,6 +27,9 @@
 
 #include <input.h> /* DeviceIntPtr */
 
+/* maximum number of filters to approximate velocity.
+ * ABI-breaker!
+ */
 #define MAX_VELOCITY_FILTERS 8
 
 /* constants for acceleration profiles;
@@ -53,7 +56,7 @@ typedef float (*PointerAccelerationProfileFunc)
                float /*threshold*/, float /*acc*/);
 
 /**
- * a filter stage contains the data for the adaptive IIR filtering.
+ * a filter stage contains the data for adaptive IIR filtering.
  * To improve results, one may run several parallel filters
  * which have different decays. Since more integration means more
  * delay, a given filter only does good matches in a specific phase of
@@ -77,7 +80,8 @@ typedef struct _DeviceVelocityRec {
     float   velocity;       /* velocity as guessed by algorithm */
     int     lrm_time;       /* time the last motion event was processed  */
     int     last_dx, last_dy; /* last motion delta */
-    int     last_diff;      /* last time-diff */
+    int     last_diff;      /* last time-difference */
+    Bool    last_reset;     /* whether a nv-reset occurred just before */
     float   corr_mul;       /* config: multiply this into velocity */
     float   const_acceleration;  /* config: (recipr.) const deceleration */
     float   min_acceleration;    /* config: minimum acceleration */
@@ -89,7 +93,7 @@ typedef struct _DeviceVelocityRec {
     void*   profile_private;/* extended data, see  SetAccelerationProfile() */
     struct {   /* to be able to query this information */
         int     profile_number;
-        int     filter_usecount[MAX_VELOCITY_FILTERS];
+        int     filter_usecount[MAX_VELOCITY_FILTERS +1];
     } statistics;
 } DeviceVelocityRec, *DeviceVelocityPtr;
 
commit c184b91d9aa72031c2bac9f379f56633957ded30
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Jul 23 11:33:25 2008 +0200

    dix: improve the driver interface to predictable pointer acceleration
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 8a0959b..f8f2f26 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -616,22 +616,32 @@ SetAccelerationProfile(
  */
 extern void
 SetDeviceSpecificAccelerationProfile(
-	DeviceIntPtr pDev,
+        DeviceVelocityPtr s,
         PointerAccelerationProfileFunc profile)
 {
+    if(s)
+	s->deviceSpecificProfile = profile;
+}
+
+/**
+ * Use this function to obtain a DeviceVelocityPtr for a device. Will return NULL if
+ * the predictable acceleration scheme is not in effect.
+ */
+DeviceVelocityPtr
+GetDevicePredictableAccelData(
+	DeviceIntPtr pDev)
+{
     /*sanity check*/
     if( pDev->valuator &&
 	pDev->valuator->accelScheme.AccelSchemeProc ==
 	    acceleratePointerPredictable &&
 	pDev->valuator->accelScheme.accelData != NULL){
-	((DeviceVelocityPtr)
-	(pDev->valuator->accelScheme.accelData))->deviceSpecificProfile
-		= profile;
+
+	return (DeviceVelocityPtr)pDev->valuator->accelScheme.accelData;
     }
+    return NULL;
 }
 
-
-
 /********************************
  *  acceleration schemes
  *******************************/
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index 1b92a07..8e56e4d 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -104,8 +104,11 @@ InitFilterChain(DeviceVelocityPtr s, float rdecay, float degression,
 extern int
 SetAccelerationProfile(DeviceVelocityPtr s, int profile_num);
 
+extern DeviceVelocityPtr
+GetDevicePredictableAccelData(DeviceIntPtr pDev);
+
 extern void
-SetDeviceSpecificAccelerationProfile(DeviceIntPtr s,
+SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr s,
                                      PointerAccelerationProfileFunc profile);
 
 extern void
commit 87aa5298576ed335ac31347e14fb30430288157a
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Jul 23 11:28:09 2008 +0200

    dix: introduce defines for accel profile numbers
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 92e737d..8a0959b 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -98,7 +98,7 @@ InitVelocityData(DeviceVelocityPtr s)
     s->profile_private = NULL;
     memset(&s->statistics, 0, sizeof(s->statistics));
     memset(&s->filters, 0, sizeof(s->filters));
-    SetAccelerationProfile(s, 0);
+    SetAccelerationProfile(s, AccelProfileClassic);
     InitFilterChain(s, (float)1.0/20.0, 1, 1, 40);
 }
 
@@ -551,10 +551,10 @@ LinearProfile(
 /**
  * Set the profile by number.
  * Intended to make profiles exchangeable at runtime.
- * If you created a profile, give it a number here to make it selectable.
- * In case some profile-specific init is needed, here would be a good place,
- * since FreeVelocityData() also calls this with -1.
- * returns FALSE (0) if profile number is unknown.
+ * If you created a profile, give it a number here and in the header to
+ * make it selectable. In case some profile-specific init is needed, here
+ * would be a good place, since FreeVelocityData() also calls this with -1.
+ * returns FALSE (0) if profile number is unavailable.
  */
 int
 SetAccelerationProfile(
@@ -566,29 +566,31 @@ SetAccelerationProfile(
         case -1:
             profile = NULL;  /* Special case to uninit properly */
             break;
-        case 0:
+        case AccelProfileClassic:
             profile = ClassicProfile;
             break;
-        case 1:
+        case AccelProfileDeviceSpecific:
             if(NULL == s->deviceSpecificProfile)
         	return FALSE;
             profile = s->deviceSpecificProfile;
             break;
-        case 2:
+        case AccelProfilePolynomial:
             profile = PolynomialAccelerationProfile;
             break;
-        case 3:
+        case AccelProfileSmoothLinear:
             profile = SmoothLinearProfile;
             break;
-        case 4:
+        case AccelProfileSimple:
             profile = SimpleSmoothProfile;
             break;
-        case 5:
+        case AccelProfilePower:
             profile = PowerProfile;
             break;
-        case 6:
+        case AccelProfileLinear:
             profile = LinearProfile;
             break;
+        case AccelProfileReserved:
+            /* reserved for future use, e.g. a user-defined profile */
         default:
             return FALSE;
     }
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index 30a22bc..1b92a07 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -29,6 +29,19 @@
 
 #define MAX_VELOCITY_FILTERS 8
 
+/* constants for acceleration profiles;
+ * see  */
+
+#define AccelProfileClassic  0
+#define AccelProfileDeviceSpecific 1
+#define AccelProfilePolynomial 2
+#define AccelProfileSmoothLinear 3
+#define AccelProfileSimple 4
+#define AccelProfilePower 5
+#define AccelProfileLinear 6
+#define AccelProfileReserved 7
+
+/* fwd */
 struct _DeviceVelocityRec;
 
 /**
commit 4e32e6fb38d19c9993de86188e4f7e7916a028e2
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Jul 23 11:10:22 2008 +0200

    dix: rename classic accel _scheme_ to lightweight to avoid confusion with
    classic accel _profile_
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/devices.c b/dix/devices.c
index 383c1c7..d8e37d7 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1269,10 +1269,14 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
 ValuatorAccelerationRec pointerAccelerationScheme[] = {
     {PtrAccelNoOp,        NULL, NULL, NULL},
     {PtrAccelPredictable, acceleratePointerPredictable, NULL, AccelerationDefaultCleanup},
-    {PtrAccelClassic,     acceleratePointerClassic, NULL, NULL},
+    {PtrAccelLightweight, acceleratePointerLightweight, NULL, NULL},
     {-1, NULL, NULL, NULL} /* terminator */
 };
 
+/**
+ * install an acceleration scheme. retrns TRUE on success, and should not
+ * change anything if unsuccessful.
+ */
 _X_EXPORT Bool
 InitPointerAccelerationScheme(DeviceIntPtr dev,
                               int scheme)
@@ -1281,7 +1285,9 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
     void* data = NULL;
     ValuatorClassPtr val;
 
-    if(dev->isMaster) /* bail out if called for master devs */
+    val = dev->valuator;
+
+    if(!val || dev->isMaster) /* bail out if called for master devs */
 	return FALSE;
 
     for(x = 0; pointerAccelerationScheme[x].number >= 0; x++) {
@@ -1301,6 +1307,8 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
         {
             DeviceVelocityPtr s;
             s = (DeviceVelocityPtr)xalloc(sizeof(DeviceVelocityRec));
+            if(!s)
+        	return FALSE;
             InitVelocityData(s);
             data = s;
             break;
@@ -1309,7 +1317,6 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
             break;
     }
 
-    val = dev->valuator;
     val->accelScheme = pointerAccelerationScheme[i];
     val->accelScheme.accelData = data;
 
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index ce0af22..92e737d 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -722,8 +722,12 @@ acceleratePointerPredictable(DeviceIntPtr pDev, int first_valuator,
  * in-place. Retained mostly for embedded scenarios.
  */
 void
-acceleratePointerClassic(DeviceIntPtr pDev, int first_valuator,
-                         int num_valuators, int *valuators, int ignored)
+acceleratePointerLightweight(
+    DeviceIntPtr pDev,
+    int first_valuator,
+    int num_valuators,
+    int *valuators,
+    int ignored)
 {
     float mult = 0.0;
     int dx = 0, dy = 0;
diff --git a/include/input.h b/include/input.h
index ba44928..2e40272 100644
--- a/include/input.h
+++ b/include/input.h
@@ -66,7 +66,7 @@ SOFTWARE.
 /*int constants for pointer acceleration schemes*/
 #define PtrAccelNoOp            0
 #define PtrAccelPredictable     1
-#define PtrAccelClassic         2
+#define PtrAccelLightweight     2
 #define PtrAccelDefault         PtrAccelPredictable
 
 #define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index e496913..30a22bc 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -103,7 +103,7 @@ acceleratePointerPredictable(DeviceIntPtr pDev, int first_valuator,
                              int num_valuators, int *valuators, int evtime);
 
 extern void
-acceleratePointerClassic(DeviceIntPtr pDev, int first_valuator,
+acceleratePointerLightweight(DeviceIntPtr pDev, int first_valuator,
                          int num_valuators, int *valuators, int ignore);
 
 #endif  /* POINTERVELOCITY_H */
commit d40183c665d458ac0a6e7952fbe986776a17fda7
Author: Simon Thum <simon.thum at gmx.de>
Date:   Wed Jul 23 09:28:06 2008 +0200

    dix: add legal statements to ptrvelo.{c|h}
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/COPYING b/COPYING
index ddfb201..6faa4b1 100644
--- a/COPYING
+++ b/COPYING
@@ -12,6 +12,7 @@ Copyright © 2006 Nokia Corporation
 Copyright © 2006-2008 Peter Hutterer
 Copyright © 1999 Keith Packard
 Copyright © 2005-2007 Daniel Stone
+Copyright © 2006-2008 Simon Thum
 Copyright © 2006 Luc Verhaegen
 
 Permission is hereby granted, free of charge, to any person obtaining a
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 31747a2..ce0af22 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -1,3 +1,26 @@
+/*
+ *
+ * Copyright © 2006-2008 Simon Thum             simon dot thum at gmx dot de
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
 
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index dd5ee50..e496913 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -1,6 +1,26 @@
 /*
-*  2006-2008 by Simon Thum
-*/
+ *
+ * Copyright © 2006-2008 Simon Thum             simon dot thum at gmx dot de
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
 
 #ifndef POINTERVELOCITY_H
 #define POINTERVELOCITY_H
commit ec10eccd56be8b947cd63cae0687b8319857fe60
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Jul 28 09:33:04 2008 +0200

    GLX: Unreference drawables bound to the old context, not the new one.
    
    Apart from the obvious reference counting issue, this fixes
    http://bugs.freedesktop.org/show_bug.cgi?id=16867 .

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index f4fc031..19d8674 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -620,9 +620,9 @@ DoMakeCurrent(__GLXclientState *cl,
 	    return __glXError(GLXBadContext);
 	}
 	__glXFlushContextCache();
-	if (!glxc->isDirect) {
-	    __glXUnrefDrawable(glxc->drawPriv);
-	    __glXUnrefDrawable(glxc->readPriv);
+	if (!prevglxc->isDirect) {
+	    __glXUnrefDrawable(prevglxc->drawPriv);
+	    __glXUnrefDrawable(prevglxc->readPriv);
 	}
     }
 	
commit 6ab8d6010adfd5ad6f1e1094a26c84f0aff934b1
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Jul 28 09:32:59 2008 +0200

    AIGLX/DRI1: Pay more attention to return value from DRIGetDrawableInfo().
    
    Could have crashed otherwise if the num(Back)ClipRects variables referenced by
    the caller weren't pre-initialized to 0.

diff --git a/glx/glxdri.c b/glx/glxdri.c
index 41c47a8..8ae56ed 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -740,7 +740,7 @@ getDrawableInfo(__DRIdrawable *driDrawable,
 				numBackClipRects, &pBackClipRects);
     __glXleaveServer(GL_FALSE);
 
-    if (*numClipRects > 0) {
+    if (retval && *numClipRects > 0) {
 	size = sizeof (drm_clip_rect_t) * *numClipRects;
 	*ppClipRects = xalloc (size);
 
@@ -771,16 +771,20 @@ getDrawableInfo(__DRIdrawable *driDrawable,
     }
     else {
       *ppClipRects = NULL;
+      *numClipRects = 0;
     }
       
-    if (*numBackClipRects > 0) {
+    if (retval && *numBackClipRects > 0) {
 	size = sizeof (drm_clip_rect_t) * *numBackClipRects;
 	*ppBackClipRects = xalloc (size);
 	if (*ppBackClipRects != NULL)
 	    memcpy (*ppBackClipRects, pBackClipRects, size);
+	else
+	    *numBackClipRects = 0;
     }
     else {
       *ppBackClipRects = NULL;
+      *numBackClipRects = 0;
     }
 
     return retval;
commit b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Jul 28 09:32:54 2008 +0200

    Fix Makefile.am crack.
    
    Looks like an artifact from early modularization.

diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index f736095..02a4e0c 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -40,7 +40,7 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c \
 
 AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
 
-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack
+INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
 
 # FIXME: These need to be added to the build
 LNX_EXTRA_SRCS = \
commit 3575d9584edf35ec1720bc3755b6576a56613685
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Jul 25 16:46:44 2008 +0930

    config: note that HAL options must be strings.
    
    Only strings are parsed by the server, all others are ignored. Doesn't matter,
    specifying int options as strings works fine anyway.

diff --git a/config/x11-input.fdi b/config/x11-input.fdi
index f2e2d50..9c3f9fb 100644
--- a/config/x11-input.fdi
+++ b/config/x11-input.fdi
@@ -26,6 +26,9 @@
 	    Do not specify "input.x11_options.Device" since "input.device"
 	    will be used automatically.
 
+            You MUST specify all options as strings, otherwise the server will
+            ignore them.
+
         Legacy Keys
 	     "input.xkb.rules"
              "input.xkb.model"
commit 54651ff5ec54f4c621e060b19f31d77d519ef158
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 24 17:41:48 2008 +0930

    xkb: remove superfluous inputInfo.keyboard treatment.
    
    Really not necessary, we can just walk the list and spare us the special
    treatment of the VCK.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 0ed7e68..8409ece 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -2014,26 +2014,20 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
         }
     }
 
-    if (inputInfo.keyboard->key->xkbInfo &&
-        inputInfo.keyboard->key->xkbInfo->desc == dst) {
-        pDev = inputInfo.keyboard;
-    }
-    else {
-        for (tmpDev = inputInfo.devices; tmpDev && !pDev;
-             tmpDev = tmpDev->next) {
-            if (tmpDev->key && tmpDev->key->xkbInfo &&
+    for (tmpDev = inputInfo.devices; tmpDev && !pDev;
+            tmpDev = tmpDev->next) {
+        if (tmpDev->key && tmpDev->key->xkbInfo &&
                 tmpDev->key->xkbInfo->desc == dst) {
-                pDev = tmpDev;
-                break;
-            }
+            pDev = tmpDev;
+            break;
         }
-        for (tmpDev = inputInfo.off_devices; tmpDev && !pDev;
-             tmpDev = tmpDev->next) {
-            if (tmpDev->key && tmpDev->key->xkbInfo &&
+    }
+    for (tmpDev = inputInfo.off_devices; tmpDev && !pDev;
+            tmpDev = tmpDev->next) {
+        if (tmpDev->key && tmpDev->key->xkbInfo &&
                 tmpDev->key->xkbInfo->desc == dst) {
-                pDev = tmpDev;
-                break;
-            }
+            pDev = tmpDev;
+            break;
         }
     }
 
commit 70bd8261223366dae9dfdbb999691328d85f093c
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 24 17:38:16 2008 +0930

    xkb: use PickPointer/PickKeyboard in _XkbLookupAnyDevice.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 0727ad8..0ed7e68 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -56,16 +56,10 @@ _XkbLookupAnyDevice(DeviceIntPtr *pDev, int id, ClientPtr client,
     int rc = XkbKeyboardErrorCode;
 
     if (id == XkbUseCoreKbd) {
-	if (inputInfo.keyboard)
-	    id = inputInfo.keyboard->id;
-	else
-	    goto out;
+        id = PickKeyboard(client)->id;
     }
     if (id == XkbUseCorePtr) {
-	if (inputInfo.pointer)
-	    id = inputInfo.pointer->id;
-	else
-	    goto out;
+        id = PickPointer(client)->id;
     }
     rc = dixLookupDevice(pDev, id, client, access_mode);
 out:
commit 47160edec7f0d9129576d83f1593a5549879a893
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 24 12:12:45 2008 +0930

    xfree86: warn some more about potential missing input devices.
    
    Put out a warning if xorg.conf has InputDevice sections, but these aren't
    referenced in the used ServerLayout. This is only performed if AllowEmptyInput
    is enabled.
    The reason behind this is that the server used to auto-add the first
    mouse/keyboard sections if none where referenced. Now, with HAL and AEI
    enabled by default, setups that relied on this auto-adding break and are left
    without input devices. The least we can do is warn them.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index f1ac5ec..4b4a9a8 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2479,6 +2479,16 @@ checkInput(serverLayoutPtr layout) {
                 "\tThe server relies on HAL to provide the list of input "
                 "devices.\n\tIf no devices become available, reconfigure "
                 "HAL.\n");
+        if (!layout->inputs || !*layout->inputs)
+        {
+            /* No input device specified in ServerLayout. */
+            if (xf86configptr->conf_input_lst &&
+                    xf86configptr->conf_input_lst->inp_identifier)
+                xf86Msg(X_WARNING, "Input devices specified in xorg.conf, but"
+                        " not referenced in ServerLayout.\n\tThese devices"
+                        " will NOT be available.\n");
+        }
+
     }
 }
 
commit f30b0823dbfc5902e54b337b5b6b570ebf216584
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 24 09:56:00 2008 +0930

    xfree86: if AllowEmptyInput is on, warn the user that we rely on HAL now.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 663d81a..f1ac5ec 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2473,6 +2473,13 @@ static void
 checkInput(serverLayoutPtr layout) {
     if (!xf86Info.allowEmptyInput)
         checkCoreInputDevices(layout, FALSE);
+    else
+    {
+        xf86Msg(X_INFO, "AllowEmptyInput is on.\n"
+                "\tThe server relies on HAL to provide the list of input "
+                "devices.\n\tIf no devices become available, reconfigure "
+                "HAL.\n");
+    }
 }
 
 /*
commit ad4cd2e241691427689591f7769a1184c8c1c7f5
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Jul 23 17:40:28 2008 +0930

    xkb: don't send core events on SlowKeys.
    
    Core events don't happen until later in the DIX, so pump device events down
    instead. This makes modifiers work again when SlowKeys is enabled.

diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 658e41f..2baa70d 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -347,7 +347,7 @@ XkbControlsPtr	ctrls;
 	XkbSendAccessXNotify(keybd,&ev);
 	if (XkbAX_NeedFeedback(ctrls,XkbAX_SKAcceptFBMask))
 	    XkbDDXAccessXBeep(keybd,_BEEP_SLOW_ACCEPT,XkbSlowKeysMask);
-	AccessXKeyboardEvent(keybd,KeyPress,xkbi->slowKey,False);
+	AccessXKeyboardEvent(keybd,DeviceKeyPress,xkbi->slowKey,False);
 	/* check for magic sequences */
 	if ((ctrls->enabled_ctrls&XkbAccessXKeysMask) &&
 	    ((sym[0]==XK_Shift_R)||(sym[0]==XK_Shift_L)))
commit 7d9dece74fc2bf130ceb8818ced5d9e3ac526900
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Jul 21 22:12:45 2008 +0930

    dix: fix up enter/leave system once again.
    
    Two corrections
    1. the "detail" field has NotifyVirtual, etc., not the "mode" field. This was
    a clear bug.
    2. don't set/unset the flags for NotifyGrab or NotifyUngrab. Clients are
    expected to deal with multiple enter/leave events per window if the mode is
    not NotifyNormal.
    
    Testable with TCL menu boxes (such as used in gitk):
    tk_optionMenu .menu globVar Val1 Val2 Val3 ValJunk
    pack .menu
    
    Thanks to Michel Dänzer for pointing this out.

diff --git a/dix/events.c b/dix/events.c
index c5578b0..d6b3ecb 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4441,14 +4441,16 @@ EnterLeaveEvent(
 
     /* Clear bit for device, but don't worry about SDs. */
     if (mouse->isMaster && type == LeaveNotify &&
-            (mode != NotifyVirtual && mode != NotifyNonlinearVirtual))
-        ENTER_LEAVE_SEMAPHORE_UNSET(pWin, mouse);
+            (detail != NotifyVirtual && detail != NotifyNonlinearVirtual))
+        if (mode != NotifyUngrab)
+            ENTER_LEAVE_SEMAPHORE_UNSET(pWin, mouse);
 
     inWindow = EnterLeaveSemaphoresIsset(pWin);
 
-    if (!inWindow)
+    if(!inWindow || mode == NotifyGrab || mode == NotifyUngrab)
         sendevent = TRUE;
 
+
     if ((mask & filters[mouse->id][type]) && sendevent)
     {
         if (grab)
@@ -4460,8 +4462,9 @@ EnterLeaveEvent(
     }
 
     if (mouse->isMaster && type == EnterNotify &&
-            (mode != NotifyVirtual && mode != NotifyNonlinearVirtual))
-        ENTER_LEAVE_SEMAPHORE_SET(pWin, mouse);
+            (detail != NotifyVirtual && detail != NotifyNonlinearVirtual))
+        if (mode != NotifyGrab)
+            ENTER_LEAVE_SEMAPHORE_SET(pWin, mouse);
 
     /* we don't have enough bytes, so we squash flags and mode into
        one byte, and use the last byte for the deviceid. */


More information about the xorg-commit mailing list