xserver: Branch 'mpx' - 276 commits

Peter Hutterer whot at kemper.freedesktop.org
Mon Apr 7 23:08:20 PDT 2008


 .gitignore                                                |    4 
 GL/apple/Makefile.am                                      |    8 
 GL/glx/.gitignore                                         |   12 
 GL/glx/Makefile.am                                        |   22 
 GL/glx/glxcmds.c                                          |   72 
 GL/glx/glxcontext.h                                       |    6 
 GL/glx/glxdrawable.h                                      |    2 
 GL/glx/glxdri.c                                           |  363 
 GL/glx/glxdri2.c                                          |  762 +
 GL/glx/glxglcore.c                                        |   53 
 GL/glx/glxscreens.c                                       |   79 
 GL/glx/glxscreens.h                                       |   88 
 GL/glx/glxutil.c                                          |    5 
 GL/glx/glxutil.h                                          |    2 
 GL/glx/indirect_dispatch.c                                | 5889 -------------
 GL/glx/indirect_dispatch.h                                | 1047 --
 GL/glx/indirect_dispatch_swap.c                           | 6051 --------------
 GL/glx/indirect_reqsize.c                                 |  832 -
 GL/glx/indirect_reqsize.h                                 |  121 
 GL/glx/indirect_size_get.c                                | 1206 --
 GL/glx/indirect_size_get.h                                |  102 
 GL/glx/indirect_table.c                                   | 1596 ---
 GL/mesa/Makefile.am                                       |    9 
 GL/mesa/X/Makefile.am                                     |   38 
 GL/symlink-mesa.sh                                        |   10 
 Makefile.am                                               |    6 
 Xext/dpms.c                                               |    7 
 Xext/panoramiX.c                                          |  272 
 Xext/panoramiXprocs.c                                     |   15 
 Xext/panoramiXsrv.h                                       |    2 
 Xext/saver.c                                              |    3 
 Xext/security.c                                           |   56 
 Xext/shm.c                                                |    6 
 Xext/xace.c                                               |   43 
 Xext/xace.h                                               |   19 
 Xext/xacestr.h                                            |   13 
 Xext/xevie.c                                              |  122 
 Xext/xf86bigfont.c                                        |    8 
 Xext/xprint.c                                             |    2 
 Xext/xselinux.c                                           | 1357 ++-
 Xext/xselinux.h                                           |  100 
 Xi/chgdctl.c                                              |   37 
 Xi/chgfctl.c                                              |    2 
 Xi/chgkmap.c                                              |    2 
 Xi/closedev.c                                             |    2 
 Xi/exevents.c                                             |   98 
 Xi/opendev.c                                              |    3 
 Xi/querydp.c                                              |    1 
 Xi/setbmap.c                                              |    2 
 Xi/setmmap.c                                              |    2 
 composite/compext.c                                       |    8 
 composite/compwindow.c                                    |   27 
 config/dbus.c                                             |    2 
 config/hal.c                                              |  194 
 config/x11-input.fdi                                      |   62 
 configure.ac                                              |  165 
 dix/Makefile.am                                           |    1 
 dix/colormap.c                                            |    1 
 dix/devices.c                                             |   13 
 dix/dispatch.c                                            |  295 
 dix/dixfonts.c                                            |    8 
 dix/dixutils.c                                            |   21 
 dix/events.c                                              |   38 
 dix/getevents.c                                           |   38 
 dix/globals.c                                             |    2 
 dix/main.c                                                |   25 
 dix/property.c                                            |  229 
 dix/resource.c                                            |    5 
 dix/selection.c                                           |  311 
 dix/window.c                                              |   13 
 exa/exa.h                                                 |    2 
 exa/exa_offscreen.c                                       |  132 
 exa/exa_priv.h                                            |    1 
 exa/exa_render.c                                          |   18 
 fb/fb.h                                                   |    5 
 fb/fbwindow.c                                             |   65 
 fb/wfbrename.h                                            |    1 
 hw/dmx/examples/ev.c                                      |    2 
 hw/dmx/glxProxy/glxcmds.c                                 |   35 
 hw/kdrive/ephyr/Makefile.am                               |    1 
 hw/kdrive/ephyr/XF86dri.c                                 |   39 
 hw/kdrive/ephyr/ephyr.c                                   |   89 
 hw/kdrive/ephyr/ephyr.h                                   |    1 
 hw/kdrive/ephyr/ephyrdriext.c                             |   24 
 hw/kdrive/ephyr/ephyrdriext.h                             |   10 
 hw/kdrive/ephyr/ephyrglxext.c                             |   14 
 hw/kdrive/ephyr/ephyrhostglx.c                            |    9 
 hw/kdrive/ephyr/ephyrinit.c                               |   19 
 hw/kdrive/ephyr/hostx.c                                   |   85 
 hw/kdrive/ephyr/hostx.h                                   |   11 
 hw/kdrive/linux/linux.c                                   |    2 
 hw/kdrive/src/kaa.c                                       |   12 
 hw/kdrive/src/kmap.c                                      |    8 
 hw/kdrive/vesa/vm86.c                                     |    2 
 hw/vfb/InitOutput.c                                       |   18 
 hw/vfb/Xvfb.man.pre                                       |    6 
 hw/xfree86/Makefile.am                                    |    8 
 hw/xfree86/common/Makefile.am                             |    4 
 hw/xfree86/common/modeline2c.awk                          |   17 
 hw/xfree86/common/xf86.h                                  |    4 
 hw/xfree86/common/xf86AutoConfig.c                        |   15 
 hw/xfree86/common/xf86Config.c                            |   46 
 hw/xfree86/common/xf86DoScanPci.c                         |  147 
 hw/xfree86/common/xf86Globals.c                           |    3 
 hw/xfree86/common/xf86Helper.c                            |   30 
 hw/xfree86/common/xf86Init.c                              |   87 
 hw/xfree86/common/xf86Mode.c                              |  140 
 hw/xfree86/common/xf86PciInfo.h                           |    5 
 hw/xfree86/common/xf86Priv.h                              |   10 
 hw/xfree86/common/xf86Privstr.h                           |    1 
 hw/xfree86/common/xf86Xinput.c                            |   59 
 hw/xfree86/common/xf86cvt.c                               |  292 
 hw/xfree86/common/xf86pciBus.c                            |  241 
 hw/xfree86/common/xf86str.h                               |    2 
 hw/xfree86/ddc/DDC.HOWTO                                  |   16 
 hw/xfree86/ddc/edid.h                                     |   46 
 hw/xfree86/ddc/interpret_edid.c                           |   15 
 hw/xfree86/ddc/print_edid.c                               |   69 
 hw/xfree86/ddc/xf86DDC.c                                  |  250 
 hw/xfree86/ddc/xf86DDC.h                                  |    2 
 hw/xfree86/dixmods/Makefile.am                            |    6 
 hw/xfree86/dixmods/extmod/modinit.c                       |   23 
 hw/xfree86/dixmods/extmod/xf86misc.c                      |   52 
 hw/xfree86/dixmods/glxmodule.c                            |    3 
 hw/xfree86/doc/devel/Registry                             |    1 
 hw/xfree86/doc/man/Xorg.man.pre                           |    7 
 hw/xfree86/doc/man/xorg.conf.man.pre                      |   17 
 hw/xfree86/dri/Makefile.am                                |    2 
 hw/xfree86/dri2/Makefile.am                               |   16 
 hw/xfree86/dri2/dri2.c                                    |  493 +
 hw/xfree86/dri2/dri2.h                                    |   81 
 hw/xfree86/dri2/dri2ext.c                                 |  361 
 hw/xfree86/dummylib/Makefile.am                           |    2 
 hw/xfree86/exa/examodule.c                                |   39 
 hw/xfree86/fbdevhw/fbdevhw.c                              |    7 
 hw/xfree86/int10/helper_exec.c                            |   59 
 hw/xfree86/loader/dixsym.c                                |   12 
 hw/xfree86/loader/dlloader.c                              |   43 
 hw/xfree86/loader/extsym.c                                |    2 
 hw/xfree86/loader/loaderProcs.h                           |    6 
 hw/xfree86/loader/loadmod.c                               |   22 
 hw/xfree86/loader/xf86sym.c                               |    8 
 hw/xfree86/modes/Makefile.am                              |    3 
 hw/xfree86/modes/xf86Crtc.c                               |  510 -
 hw/xfree86/modes/xf86Crtc.h                               |   41 
 hw/xfree86/modes/xf86Cursors.c                            |   19 
 hw/xfree86/modes/xf86EdidModes.c                          |  140 
 hw/xfree86/modes/xf86Modes.c                              |   36 
 hw/xfree86/modes/xf86Modes.h                              |    1 
 hw/xfree86/modes/xf86RandR12.c                            |   76 
 hw/xfree86/modes/xf86Rotate.c                             |    4 
 hw/xfree86/modes/xf86cvt.c                                |    9 
 hw/xfree86/modes/xf86gtf.c                                |  388 
 hw/xfree86/os-support/bsd/bsd_apm.c                       |    2 
 hw/xfree86/os-support/bsd/bsd_kqueue_apm.c                |    2 
 hw/xfree86/os-support/bsd/i386_video.c                    |    5 
 hw/xfree86/os-support/bus/Makefile.am                     |   12 
 hw/xfree86/os-support/bus/Pci.c                           |  115 
 hw/xfree86/os-support/bus/Pci.h                           |    3 
 hw/xfree86/os-support/bus/bsd_pci.c                       |    2 
 hw/xfree86/os-support/linux/Makefile.am                   |    2 
 hw/xfree86/os-support/linux/lnx_pci.c                     |   10 
 hw/xfree86/os-support/shared/ia64Pci.c                    |   55 
 hw/xfree86/os-support/solaris/sun_apm.c                   |    6 
 hw/xfree86/parser/Configint.h                             |    5 
 hw/xfree86/parser/DRI.c                                   |    2 
 hw/xfree86/parser/Screen.c                                |    1 
 hw/xfree86/parser/scan.c                                  |   11 
 hw/xfree86/parser/xf86tokens.h                            |    1 
 hw/xfree86/utils/cvt/Makefile.am                          |    6 
 hw/xfree86/utils/ioport/Makefile.am                       |    2 
 hw/xfree86/vbe/vbe.c                                      |    4 
 hw/xfree86/vbe/vbeModes.c                                 |    3 
 hw/xfree86/x86emu/Makefile.am                             |    1 
 hw/xfree86/x86emu/ops2.c                                  |   16 
 hw/xfree86/x86emu/prim_ops.c                              |   66 
 hw/xfree86/x86emu/x86emu/prim_ops.h                       |    1 
 hw/xfree86/x86emu/x86emu/prim_x86_gcc.h                   |   79 
 hw/xfree86/xaa/xaaInitAccel.c                             |   83 
 hw/xfree86/xf4bpp/ppcSpMcro.h                             |    6 
 hw/xgl/glx/xglxorg.c                                      |    2 
 hw/xnest/Events.c                                         |    4 
 hw/xnest/Font.c                                           |    2 
 hw/xprint/pcl/PclMisc.c                                   |   17 
 hw/xprint/pcl/PclWindow.c                                 |    6 
 hw/xprint/ps/PsMisc.c                                     |   17 
 hw/xprint/ps/PsWindow.c                                   |    6 
 hw/xprint/ps/psout_ftpstype1.c                            |    2 
 hw/xquartz/Makefile.am                                    |    2 
 hw/xquartz/X11Application.h                               |    3 
 hw/xquartz/X11Application.m                               |  509 -
 hw/xquartz/X11Controller.h                                |   60 
 hw/xquartz/X11Controller.m                                |   96 
 hw/xquartz/applewm.c                                      |   14 
 hw/xquartz/bundle/English.lproj/main.nib/classes.nib      |  318 
 hw/xquartz/bundle/English.lproj/main.nib/designable.nib   | 3734 ++++++++
 hw/xquartz/bundle/English.lproj/main.nib/info.nib         |   18 
 hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Makefile.am                             |   57 
 hw/xquartz/bundle/bundle-main.c                           |   10 
 hw/xquartz/darwin.c                                       |   26 
 hw/xquartz/darwin.h                                       |   43 
 hw/xquartz/darwinEvents.c                                 |  422 
 hw/xquartz/darwinEvents.h                                 |   12 
 hw/xquartz/darwinKeyboard.c                               |   32 
 hw/xquartz/darwinKeyboard.h                               |    2 
 hw/xquartz/darwinXinput.c                                 |  200 
 hw/xquartz/pseudoramiX.c                                  |    6 
 hw/xquartz/quartz.c                                       |  153 
 hw/xquartz/quartz.h                                       |    2 
 hw/xquartz/quartzCocoa.m                                  |    3 
 hw/xquartz/quartzCommon.h                                 |   14 
 hw/xquartz/quartzCursor.c                                 |  646 -
 hw/xquartz/quartzCursor.h                                 |   42 
 hw/xquartz/quartzForeground.c                             |    2 
 hw/xquartz/quartzKeyboard.h                               |    3 
 hw/xquartz/quartzPasteboard.c                             |   58 
 hw/xquartz/quartzPasteboard.h                             |    4 
 hw/xquartz/xpr/Makefile.am                                |    4 
 hw/xquartz/xpr/xprCursor.c                                |    4 
 hw/xquartz/xpr/xprFrame.c                                 |    4 
 hw/xquartz/xpr/xprScreen.c                                |   28 
 hw/xwin/winwin32rootless.c                                |    4 
 include/Makefile.am                                       |    4 
 include/dix-config.h.in                                   |    3 
 include/dix.h                                             |   44 
 include/dixstruct.h                                       |    1 
 include/globals.h                                         |   10 
 include/misc.h                                            |    4 
 include/os.h                                              |    4 
 include/property.h                                        |    7 
 include/regionstr.h                                       |    2 
 include/selection.h                                       |   47 
 include/site.h                                            |    2 
 include/windowstr.h                                       |    5 
 include/xkbfile.h                                         |  436 +
 include/xkbsrv.h                                          |   63 
 include/xkbstr.h                                          |  613 +
 include/xorg-config.h.in                                  |    6 
 include/xorg-server.h.in                                  |    3 
 mi/midash.c                                               |   32 
 mi/mieq.c                                                 |    3 
 mi/miexpose.c                                             |    2 
 mi/miinitext.c                                            |   18 
 mi/mioverlay.c                                            |    1 
 mi/mipointer.c                                            |    3 
 mi/miregion.c                                             |   11 
 mi/miwindow.c                                             |    1 
 miext/rootless/Makefile.am                                |    2 
 miext/rootless/rootlessWindow.c                           |    4 
 miext/rootless/safeAlpha/Makefile.am                      |    7 
 miext/rootless/safeAlpha/safeAlpha.h                      |   42 
 miext/rootless/safeAlpha/safeAlphaPicture.c               |  211 
 os/WaitFor.c                                              |    8 
 os/access.c                                               |   18 
 os/connection.c                                           |    1 
 os/io.c                                                   |  139 
 os/osdep.h                                                |    2 
 os/utils.c                                                |   33 
 randr/mirandr.c                                           |   11 
 randr/randrstr.h                                          |   13 
 randr/rrproperty.c                                        |   19 
 randr/rrscreen.c                                          |    1 
 randr/rrxinerama.c                                        |    6 
 render/miindex.c                                          |    2 
 xfixes/cursor.c                                           |    5 
 xfixes/saveset.c                                          |    2 
 xfixes/select.c                                           |    2 
 xkb/Makefile.am                                           |    3 
 xkb/XKBAlloc.c                                            |    2 
 xkb/XKBGAlloc.c                                           |   42 
 xkb/XKBMAlloc.c                                           |    4 
 xkb/XKBMisc.c                                             |    5 
 xkb/ddxBeep.c                                             |    4 
 xkb/ddxCtrls.c                                            |   23 
 xkb/ddxKeyClick.c                                         |    4 
 xkb/ddxList.c                                             |   13 
 xkb/ddxLoad.c                                             |  171 
 xkb/maprules.c                                            |   92 
 xkb/xkb.c                                                 |  140 
 xkb/xkb.h                                                 |    5 
 xkb/xkbAccessX.c                                          |    8 
 xkb/xkbActions.c                                          |   13 
 xkb/xkbEvents.c                                           |   34 
 xkb/xkbInit.c                                             |  247 
 xkb/xkbPrKeyEv.c                                          |    4 
 xkb/xkbPrOtherEv.c                                        |    2 
 xkb/xkbSwap.c                                             |    2 
 xkb/xkbUtils.c                                            |   36 
 xkb/xkberrs.c                                             |   37 
 xkb/xkbfmisc.c                                            |  133 
 xkb/xkbgeom.h                                             |  635 +
 xkb/xkbout.c                                              |  146 
 xkb/xkbtext.c                                             |   60 
 xkb/xkmread.c                                             |  235 
 295 files changed, 13647 insertions(+), 24024 deletions(-)

New commits:
commit 5ffbcfec3d37d3b627a78acfa00dbafc5948df82
Author: Magnus Vigerlöf <Magnus.Vigerlof at ipbo.se>
Date:   Tue Apr 8 14:42:00 2008 +0930

    dix: Ensure Proximity events don't kill the server.
    
    Add Prox events to the if-clauses with the other events
    that are usually sent from the input devices.
    Ensure that the event deliverers won't try to deliver
    events of type '0' (some extended events doesn't have
    an equivalent core-type)
    
    Small modification by Peter Hutterer.
    
    Signed-off-by: Peter Hutterer <peter at cs.unisa.edu.au>

diff --git a/dix/events.c b/dix/events.c
index 6ecd90c..42ae3f1 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2513,7 +2513,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab,
             core = *xE;
             core.u.u.type = XItoCoreType(xE->u.u.type);
 
-            if (filter & pWin->deliverableEvents)
+            if (core.u.u.type && filter & pWin->deliverableEvents)
             {
                 if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter)
                 {
@@ -3562,6 +3562,8 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE,
     {
         core = *xE;
         core.u.u.type = XItoCoreType(xE->u.u.type);
+        if(!core.u.u.type) /* probably a Proximity event, can't grab for those */
+            return FALSE;
     }
 
     i = checkFirst;
@@ -3651,7 +3653,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count)
     if (deliveries > 0)
         return;
 
-    if (sendCore)
+    if (sendCore && core.u.u.type)
     {
         FixUpEventFromWindow(keybd, &core, focus, None, FALSE);
         deliveries = DeliverEventsToWindow(keybd, focus, &core, 1,
@@ -3734,20 +3736,22 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
                 {
                     core = *xE;
                     core.u.u.type = XItoCoreType(xE->u.u.type);
-                    FixUpEventFromWindow(thisDev, &core, grab->window,
-                                         None, TRUE);
-                    if (XaceHook(XACE_SEND_ACCESS, 0, thisDev,
-                                 grab->window, &core, 1) ||
-                            XaceHook(XACE_RECEIVE_ACCESS, rClient(grab),
-                                     grab->window, &count, 1))
-                        deliveries = 1; /* don't send, but pretend we did */
-                    else if (!IsInterferingGrab(rClient(grab), thisDev,
-                                &core))
-                    {
-                        deliveries = TryClientEvents(rClient(grab), thisDev,
-                                                     &core, 1, mask,
-                                                     filters[thisDev->id][core.u.u.type],
-                                                     grab);
+                    if(core.u.u.type) {
+                        FixUpEventFromWindow(thisDev, &core, grab->window,
+                                             None, TRUE);
+                        if (XaceHook(XACE_SEND_ACCESS, 0, thisDev,
+                                     grab->window, &core, 1) ||
+                                XaceHook(XACE_RECEIVE_ACCESS, rClient(grab),
+                                         grab->window, &count, 1))
+                            deliveries = 1; /* don't send, but pretend we did */
+                        else if (!IsInterferingGrab(rClient(grab), thisDev,
+                                    &core))
+                        {
+                            deliveries = TryClientEvents(rClient(grab), thisDev,
+                                                         &core, 1, mask,
+                                                         filters[thisDev->id][core.u.u.type],
+                                                         grab);
+                        }
                     }
                 }
 
diff --git a/dix/getevents.c b/dix/getevents.c
index b735318..037d68c 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -816,7 +816,8 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type,
                    int first_valuator, int num_valuators, int *valuators)
 {
     int num_events = 1;
-    deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) events->event;
+    deviceKeyButtonPointer *kbp;
+    DeviceIntPtr master;
 
     /* Sanity checks. */
     if (type != ProximityIn && type != ProximityOut)
@@ -840,6 +841,20 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type,
         (num_valuators + first_valuator) > pDev->valuator->numAxes)
         return 0;
 
+    master = pDev->u.master;
+    if (master && master->u.lastSlave != pDev)
+    {
+        CreateClassesChangedEvent(events, master, pDev);
+
+        pDev->lastx = master->lastx;
+        pDev->lasty = master->lasty;
+        master->u.lastSlave = pDev;
+
+        num_events++;
+        events++;
+    }
+
+    kbp = (deviceKeyButtonPointer *) events->event;
     kbp->type = type;
     kbp->deviceid = pDev->id;
     kbp->detail = 0;
diff --git a/mi/mieq.c b/mi/mieq.c
index a15b24f..2759d16 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -239,7 +239,8 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event)
 
     if (type == DeviceKeyPress || type == DeviceKeyRelease ||
             type == DeviceButtonPress || type == DeviceButtonRelease ||
-            type == DeviceMotionNotify)
+            type == DeviceMotionNotify || type == ProximityIn ||
+            type == ProximityOut)
         ((deviceKeyButtonPointer*)event)->deviceid = dev->id;
     else if (type == DeviceValuator)
         ((deviceValuator*)event)->deviceid = dev->id;
commit 32e4a88ae613c7200d84d5621344b418b656346b
Author: Peter Hutterer <whot at potoroo.wearablelab.ml.unisa.edu.au>
Date:   Tue Apr 8 08:42:58 2008 +0930

    xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit.
    
    XkbFinishDeviceInit is called once when the device is initialised, but also
    when a class copy causes the key class of a device to change. In this case,
    overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc
    sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the
    cows come home.

diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index ce5de07..0d5d15e 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -726,7 +726,10 @@ XkbSrvLedInfoPtr	sli;
     if (pXDev && pXDev->key && pXDev->key->xkbInfo && pXDev->kbdfeed) {
 	xkbi= pXDev->key->xkbInfo;
 	xkb= xkbi->desc;
-	if (pXDev->kbdfeed) {
+        /* If we come from DeepCopyDeviceClasses, the CtrlProc was already set
+         * to XkbDDXKeybdCtrlProc, overwriting it leads to happy recursion.
+         */
+	if (pXDev->kbdfeed && pXDev->kbdfeed->CtrlProc != XkbDDXKeybdCtrlProc) {
 	    xkbi->kbdProc= pXDev->kbdfeed->CtrlProc;
 	    pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc;
 	}
commit fd06e8f8c1d82a9d91931e8532bee0fd9c9ca9ab
Merge: b46a009... 6c0cfe3...
Author: Peter Hutterer <whot at potoroo.wearablelab.ml.unisa.edu.au>
Date:   Mon Apr 7 07:56:41 2008 +0930

    Merge branch 'master' into dcdc_rework
    
    Conflicts:
    
    	Xext/xevie.c
    	dix/dispatch.c

diff --cc Xext/dpms.c
index 0723c46,e3204fe..54871c5
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@@ -186,9 -186,9 +186,9 @@@ ProcDPMSSetTimeouts(client
  
  static int
  ProcDPMSEnable(client)
 -    register ClientPtr client;
 +    ClientPtr client;
  {
-     /* REQUEST(xDPMSEnableReq); */
+     Bool was_enabled = DPMSEnabled;
  
      REQUEST_SIZE_MATCH(xDPMSEnableReq);
  
diff --cc Xext/panoramiX.c
index 086de46,f924147..5fcaeb3
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@@ -916,10 -916,10 +916,10 @@@ ProcPanoramiXGetState(ClientPtr client
  	REQUEST(xPanoramiXGetStateReq);
      	WindowPtr			pWin;
  	xPanoramiXGetStateReply		rep;
 -	register int			n, rc;
 +	int			n, rc;
  	
  	REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
- 	rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ 	rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
  	if (rc != Success)
  	    return rc;
  
@@@ -943,10 -943,10 +943,10 @@@ ProcPanoramiXGetScreenCount(ClientPtr c
  	REQUEST(xPanoramiXGetScreenCountReq);
      	WindowPtr			pWin;
  	xPanoramiXGetScreenCountReply	rep;
 -	register int			n, rc;
 +	int			n, rc;
  
  	REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
- 	rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ 	rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
  	if (rc != Success)
  	    return rc;
  
@@@ -969,10 -969,10 +969,10 @@@ ProcPanoramiXGetScreenSize(ClientPtr cl
  	REQUEST(xPanoramiXGetScreenSizeReq);
      	WindowPtr			pWin;
  	xPanoramiXGetScreenSizeReply	rep;
 -	register int			n, rc;
 +	int			n, rc;
  	
  	REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
- 	rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ 	rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
  	if (rc != Success)
  	    return rc;
  
diff --cc Xext/xevie.c
index ff3a628,5e20bd9..277b93b
--- a/Xext/xevie.c
+++ b/Xext/xevie.c
@@@ -158,7 -153,7 +153,7 @@@ void XevieResetProc (ExtensionEntry *ex
  }
  
  static 
- int ProcQueryVersion (ClientPtr client)
 -int ProcXevieQueryVersion (register ClientPtr client)
++int ProcXevieQueryVersion (ClientPtr client)
  {
      xXevieQueryVersionReply rep;
  
@@@ -173,7 -168,7 +168,7 @@@
  }
  
  static
- int ProcStart (ClientPtr client)
 -int ProcXevieStart (register ClientPtr client)
++int ProcXevieStart (ClientPtr client)
  {
      xXevieStartReply rep;
  
@@@ -214,7 -209,7 +209,7 @@@
  }
  
  static
- int ProcEnd (ClientPtr client)
 -int ProcXevieEnd (register ClientPtr client)
++int ProcXevieEnd (ClientPtr client)
  {
      xXevieEndReply rep;
  
@@@ -233,7 -230,7 +230,7 @@@
  }
  
  static
- int ProcSend (ClientPtr client)
 -int ProcXevieSend (register ClientPtr client)
++int ProcXevieSend (ClientPtr client)
  {
      REQUEST (xXevieSendReq);
      xXevieSendReply rep;
@@@ -279,7 -278,7 +278,7 @@@
  }
  
  static
- int ProcSelectInput (ClientPtr client)
 -int ProcXevieSelectInput (register ClientPtr client)
++int ProcXevieSelectInput (ClientPtr client)
  {
      REQUEST (xXevieSelectInputReq);
      xXevieSelectInputReply rep;
@@@ -295,7 -296,7 +296,7 @@@
  }
  
  static 
- int ProcDispatch (ClientPtr client)
 -int ProcXevieDispatch (register ClientPtr client)
++int ProcXevieDispatch (ClientPtr client)
  {
      REQUEST (xReq);
      switch (stuff->data)
@@@ -316,19 -317,22 +317,22 @@@
  }
  
  static 
- int SProcQueryVersion (ClientPtr client)
 -int SProcXevieQueryVersion (register ClientPtr client)
++int SProcXevieQueryVersion (ClientPtr client)
  {
 -    register int n;
 +    int n;
  
      REQUEST(xXevieQueryVersionReq);
-     swaps(&stuff->length, n);
-     return ProcQueryVersion(client);
+     swaps (&stuff->length, n);
+     REQUEST_SIZE_MATCH (xXevieQueryVersionReq);
+     swaps (&stuff->client_major_version, n);
+     swaps (&stuff->client_minor_version, n);
+     return ProcXevieQueryVersion(client);
  }
  
  static 
- int SProcStart (ClientPtr client)
+ int SProcXevieStart (ClientPtr client)
  {
 -    register int n;
 +    int n;
  
      REQUEST (xXevieStartReq);
      swaps (&stuff->length, n);
@@@ -338,9 -342,9 +342,9 @@@
  }
  
  static 
- int SProcEnd (ClientPtr client)
+ int SProcXevieEnd (ClientPtr client)
  {
 -    register int n;
 +    int n;
  
      REQUEST (xXevieEndReq);
      swaps (&stuff->length, n);
@@@ -350,9 -354,11 +354,11 @@@
  }
  
  static
- int SProcSend (ClientPtr client)
+ int SProcXevieSend (ClientPtr client)
  {
 -    register int n;
 +    int n;
+     xEvent eventT;
+     EventSwapPtr proc;
  
      REQUEST (xXevieSendReq);
      swaps (&stuff->length, n);
@@@ -362,9 -376,9 +376,9 @@@
  }
  
  static
- int SProcSelectInput (ClientPtr client)
+ int SProcXevieSelectInput (ClientPtr client)
  {
 -    register int n;
 +    int n;
  
      REQUEST (xXevieSelectInputReq);
      swaps (&stuff->length, n);
@@@ -375,7 -389,7 +389,7 @@@
  
  
  static 
- int SProcDispatch (ClientPtr client)
 -int SProcXevieDispatch (register ClientPtr client)
++int SProcXevieDispatch (ClientPtr client)
  {
      REQUEST(xReq);
      switch (stuff->data)
diff --cc dix/getevents.c
index b2be9bd,bf9331e..b735318
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@@ -390,17 -340,16 +390,17 @@@ clipValuators(DeviceIntPtr pDev, int fi
   *        last posted, not just x and y; otherwise relative non-x/y
   *        valuators, though a very narrow use case, will be broken.
   */
 -static xEvent *
 -getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator,
 +static EventList *
 +getValuatorEvents(EventList *events, DeviceIntPtr pDev, int first_valuator,
                    int num_valuators, int *valuators) {
 -    deviceValuator *xv = (deviceValuator *) events;
 +    deviceValuator *xv;
      int i = 0, final_valuator = first_valuator + num_valuators;
  
 -    for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) {
 +    for (i = first_valuator; i < final_valuator; i += 6, events++) {
 +        xv = (deviceValuator*)events->event;
          xv->type = DeviceValuator;
          xv->first_valuator = i;
-         xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i);
+         xv->num_valuators = ((final_valuator - i) > 6) ? 6 : (final_valuator - i);
          xv->deviceid = pDev->id;
          switch (final_valuator - i) {
          case 6:
diff --cc dix/selection.c
index 0000000,6a9198e..c5427e0
mode 000000,100644..100644
--- a/dix/selection.c
+++ b/dix/selection.c
@@@ -1,0 -1,311 +1,311 @@@
+ /************************************************************
+ 
+ Copyright 1987, 1989, 1998  The Open Group
+ 
+ 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.
+ 
+ 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
+ OPEN GROUP 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 Open Group 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 Open Group.
+ 
+ 
+ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
+ 
+                         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 Digital not be
+ used in advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission.  
+ 
+ DIGITAL 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.
+ 
+ ********************************************************/
+ 
+ #ifdef HAVE_DIX_CONFIG_H
+ #include <dix-config.h>
+ #endif
+ 
+ #include "windowstr.h"
+ #include "dixstruct.h"
+ #include "dispatch.h"
+ #include "selection.h"
+ #include "xace.h"
+ 
+ /*****************************************************************
+  * Selection Stuff
+  *
+  *    dixLookupSelection
+  *
+  *   Selections are global to the server.  The list of selections should
+  *   not be traversed directly.  Instead, use the functions listed above.
+  *
+  *****************************************************************/
+ 
+ _X_EXPORT Selection *CurrentSelections;
+ CallbackListPtr SelectionCallback;
+ 
+ _X_EXPORT int
+ dixLookupSelection(Selection **result, Atom selectionName,
+ 		   ClientPtr client, Mask access_mode)
+ {
+     Selection *pSel;
+     int rc = BadMatch;
+     client->errorValue = selectionName;
+ 
+     for (pSel = CurrentSelections; pSel; pSel = pSel->next)
+ 	if (pSel->selection == selectionName)
+ 	    break;
+ 
+     if (pSel)
+ 	rc = XaceHookSelectionAccess(client, &pSel, access_mode);
+     *result = pSel;
+     return rc;
+ }
+ 
+ void
+ InitSelections(void)
+ {
+     Selection *pSel, *pNextSel;
+ 
+     pSel = CurrentSelections;
+     while (pSel) {
+ 	pNextSel = pSel->next;
+ 	dixFreePrivates(pSel->devPrivates);
+ 	xfree(pSel);
+ 	pSel = pNextSel;
+     }
+ 
+     CurrentSelections = NULL;
+ }
+ 
+ static _X_INLINE void
+ CallSelectionCallback(Selection *pSel, ClientPtr client,
+ 		      SelectionCallbackKind kind)
+ {
+     SelectionInfoRec info = { pSel, client, kind };
+     CallCallbacks(&SelectionCallback, &info);
+ }
+ 
+ void
+ DeleteWindowFromAnySelections(WindowPtr pWin)
+ {
+     Selection *pSel;
+ 
+     for (pSel = CurrentSelections; pSel; pSel = pSel->next)
+         if (pSel->pWin == pWin) {
+ 	    CallSelectionCallback(pSel, NULL, SelectionWindowDestroy);
+ 
+             pSel->pWin = (WindowPtr)NULL;
+             pSel->window = None;
+ 	    pSel->client = NullClient;
+ 	}
+ }
+ 
+ void
+ DeleteClientFromAnySelections(ClientPtr client)
+ {
+     Selection *pSel;
+ 
+     for (pSel = CurrentSelections; pSel; pSel = pSel->next)
+         if (pSel->client == client) {
+ 	    CallSelectionCallback(pSel, NULL, SelectionClientClose);
+ 
+             pSel->pWin = (WindowPtr)NULL;
+             pSel->window = None;
+ 	    pSel->client = NullClient;
+ 	}
+ }
+ 
+ int
+ ProcSetSelectionOwner(ClientPtr client)
+ {
+     WindowPtr pWin = NULL;
+     TimeStamp time;
+     Selection *pSel;
+     int rc;
+ 
+     REQUEST(xSetSelectionOwnerReq);
+     REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
+ 
+     UpdateCurrentTime();
+     time = ClientTimeToServerTime(stuff->time);
+ 
+     /* If the client's time stamp is in the future relative to the server's
+ 	time stamp, do not set the selection, just return success. */
+     if (CompareTimeStamps(time, currentTime) == LATER)
+     	return Success;
+ 
+     if (stuff->window != None) {
+ 	rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess);
+         if (rc != Success)
+             return rc;
+     }
+     if (!ValidAtom(stuff->selection)) {
+ 	client->errorValue = stuff->selection;
+         return BadAtom;
+     }
+ 
+     /*
+      * First, see if the selection is already set...
+      */
+     rc = dixLookupSelection(&pSel, stuff->selection, client, DixSetAttrAccess);
+ 
+     if (rc == Success) {
+ 	xEvent event;
+ 
+ 	/* If the timestamp in client's request is in the past relative
+ 	   to the time stamp indicating the last time the owner of the
+ 	   selection was set, do not set the selection, just return 
+ 	   success. */
+ 	if (CompareTimeStamps(time, pSel->lastTimeChanged) == EARLIER)
+ 	    return Success;
+ 	if (pSel->client && (!pWin || (pSel->client != client)))
+ 	{
+ 	    event.u.u.type = SelectionClear;
+ 	    event.u.selectionClear.time = time.milliseconds;
+ 	    event.u.selectionClear.window = pSel->window;
+ 	    event.u.selectionClear.atom = pSel->selection;
 -	    TryClientEvents(pSel->client, &event, 1, NoEventMask,
++	    TryClientEvents(pSel->client, NULL, &event, 1, NoEventMask,
+ 			    NoEventMask /* CantBeFiltered */, NullGrab);
+ 	}
+     }
+     else if (rc == BadMatch)
+     {
+ 	/*
+ 	 * It doesn't exist, so add it...
+ 	 */
+ 	pSel = xalloc(sizeof(Selection));
+ 	if (!pSel)
+ 	    return BadAlloc;
+ 
+ 	pSel->selection = stuff->selection;
+ 	pSel->devPrivates = NULL;
+ 
+ 	/* security creation/labeling check */
+ 	rc = XaceHookSelectionAccess(client, &pSel,
+ 				     DixCreateAccess|DixSetAttrAccess);
+ 	if (rc != Success) {
+ 	    xfree(pSel);
+ 	    return rc;
+ 	}
+ 
+ 	pSel->next = CurrentSelections;
+ 	CurrentSelections = pSel;
+     }
+     else
+ 	return rc;
+ 
+     pSel->lastTimeChanged = time;
+     pSel->window = stuff->window;
+     pSel->pWin = pWin;
+     pSel->client = (pWin ? client : NullClient);
+ 
+     CallSelectionCallback(pSel, client, SelectionSetOwner);
+     return client->noClientException;
+ }
+ 
+ int
+ ProcGetSelectionOwner(ClientPtr client)
+ {
+     int rc;
+     Selection *pSel;
+     xGetSelectionOwnerReply reply;
+ 
+     REQUEST(xResourceReq);
+     REQUEST_SIZE_MATCH(xResourceReq);
+ 
+     if (!ValidAtom(stuff->id)) {
+ 	client->errorValue = stuff->id;
+         return BadAtom;
+     }
+ 
+     reply.type = X_Reply;
+     reply.length = 0;
+     reply.sequenceNumber = client->sequence;
+ 
+     rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess);
+     if (rc == Success)
+ 	reply.owner = pSel->window;
+     else if (rc == BadMatch)
+ 	reply.owner = None;
+     else
+ 	return rc;
+ 
+     WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply);
+     return client->noClientException;
+ }
+ 
+ int
+ ProcConvertSelection(ClientPtr client)
+ {
+     Bool paramsOkay;
+     xEvent event;
+     WindowPtr pWin;
+     Selection *pSel;
+     int rc;
+ 
+     REQUEST(xConvertSelectionReq);
+     REQUEST_SIZE_MATCH(xConvertSelectionReq);
+ 
+     rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess);
+     if (rc != Success)
+         return rc;
+ 
+     paramsOkay = ValidAtom(stuff->selection) && ValidAtom(stuff->target);
+     paramsOkay &= (stuff->property == None) || ValidAtom(stuff->property);
+     if (!paramsOkay) {
+ 	client->errorValue = stuff->property;
+         return BadAtom;
+     }
+ 
+     rc = dixLookupSelection(&pSel, stuff->selection, client, DixReadAccess);
+ 
+     if (rc != Success && rc != BadMatch)
+ 	return rc;
+     else if (rc == Success && pSel->window != None) {
+ 	event.u.u.type = SelectionRequest;
+ 	event.u.selectionRequest.owner = pSel->window;
+ 	event.u.selectionRequest.time = stuff->time;
+ 	event.u.selectionRequest.requestor = stuff->requestor;
+ 	event.u.selectionRequest.selection = stuff->selection;
+ 	event.u.selectionRequest.target = stuff->target;
+ 	event.u.selectionRequest.property = stuff->property;
 -	if (TryClientEvents(pSel->client, &event, 1, NoEventMask,
++	if (TryClientEvents(pSel->client, NULL, &event, 1, NoEventMask,
+ 			    NoEventMask /* CantBeFiltered */, NullGrab))
+ 	    return client->noClientException;
+     }
+ 
+     event.u.u.type = SelectionNotify;
+     event.u.selectionNotify.time = stuff->time;
+     event.u.selectionNotify.requestor = stuff->requestor;
+     event.u.selectionNotify.selection = stuff->selection;
+     event.u.selectionNotify.target = stuff->target;
+     event.u.selectionNotify.property = None;
 -    TryClientEvents(client, &event, 1, NoEventMask,
++    TryClientEvents(client, NULL, &event, 1, NoEventMask,
+ 		    NoEventMask /* CantBeFiltered */, NullGrab);
+     return client->noClientException;
+ }
diff --cc os/utils.c
index 3f4355f,d785d46..d2b5674
--- a/os/utils.c
+++ b/os/utils.c
@@@ -235,9 -239,10 +239,12 @@@ _X_EXPORT int selinuxEnforcingState = S
  #ifdef XV
  _X_EXPORT Bool noXvExtension = FALSE;
  #endif
+ #ifdef DRI2
+ _X_EXPORT Bool noDRI2Extension = FALSE;
+ #endif
  
 +_X_EXPORT Bool noGEExtension = FALSE;
 +
  #define X_INCLUDE_NETDB_H
  #include <X11/Xos_r.h>
  
diff --cc xkb/xkbInit.c
index 09317e9,3b47396..ce5de07
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@@ -219,11 -219,11 +219,11 @@@ char *			pval
      }
      pval[out++]= '\0';
      if (out!=len) {
 -	ErrorF("Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
 +	ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
  								out,len);
      }
-     ChangeWindowProperty(WindowTable[0],name,XA_STRING,8,PropModeReplace,
- 							len,pval,True);
+     dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8,
+ 			    PropModeReplace, len, pval, True);
      xfree(pval);
      return True;
  }
commit b46a00918691cbd5ca80b6d3acae7614f93e073b
Author: Peter Hutterer <whot at potoroo.wearablelab.ml.unisa.edu.au>
Date:   Sun Apr 6 09:02:57 2008 +0930

    dix: sprite may be NULL, don't dereference it then.
    
    In some rare cases (e.g. when the init fails) a device's sprite is NULL,
    dereferencing it to xfree the spriteTrace is a bad idea then.

diff --git a/dix/devices.c b/dix/devices.c
index 61b3b66..c4cde26 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -873,7 +873,7 @@ CloseDevice(DeviceIntPtr dev)
 	XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource);
 #endif
 
-    if (DevHasCursor(dev)) {
+    if (DevHasCursor(dev) && dev->spriteInfo->sprite) {
         xfree(dev->spriteInfo->sprite->spriteTrace);
         xfree(dev->spriteInfo->sprite);
     }
commit 638a50552e3e2190eac9721deb72e7365bdd52e4
Author: Peter Hutterer <whot at potoroo.wearablelab.ml.unisa.edu.au>
Date:   Sun Apr 6 08:36:21 2008 +0930

    dix: remove debug error message about XI->core type conversion.

diff --git a/dix/events.c b/dix/events.c
index 0b9b768..6ecd90c 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -305,8 +305,6 @@ XItoCoreType(int xitype)
     else if (xitype == DeviceKeyRelease)
         coretype = KeyRelease;
 
-    if (coretype == 0)
-        ErrorF("[dix] Cannot convert type %d to core.\n", xitype);
     return coretype;
 }
 
commit 8f38feb3e464986dc523dabd3447ba13263a3a4a
Author: Peter Hutterer <whot at potoroo.wearablelab.ml.unisa.edu.au>
Date:   Sat Apr 5 20:37:09 2008 +1030

    Xi: add comments for DeepCopyDeviceClasses, ChangeMasterDeviceClasses.

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 5e72bae..252256a 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -357,6 +357,11 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
     }
 }
 
+/**
+ * Copies the CONTENT of the classes of device from into the classes in device
+ * to. From and to are identical after finishing.
+ */
+
 _X_EXPORT void
 DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
 {
@@ -430,6 +435,12 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
     DeepCopyFeedbackClasses(from, to);
 }
 
+/**
+ * Change MD to look like SD by copying all classes over. An event is sent to
+ * all interested clients.
+ * @param device The slave device
+ * @param dcce Pointer to the event struct.
+ */
 static void
 ChangeMasterDeviceClasses(DeviceIntPtr device,
                           deviceClassesChangedEvent *dcce)
commit 6c0cfe3d43b177c4cfaf7e228f32c655f9a98459
Author: Julien Cristau <jcristau at debian.org>
Date:   Fri Apr 4 19:01:40 2008 +0200

    Fix the clock_gettime check for glibc-based non-Linux systems
    
    We need to define _POSIX_C_SOURCE on glibc, not just Linux, so add a new
    test for the __GLIBC__ macro.

diff --git a/configure.ac b/configure.ac
index 1431f4b..025b912 100644
--- a/configure.ac
+++ b/configure.ac
@@ -705,6 +705,15 @@ if test "x$NEED_DBUS" = xyes; then
 fi
 CONFIG_LIB='$(top_builddir)/config/libconfig.a'
 
+AC_MSG_CHECKING([for glibc...])
+AC_PREPROC_IFELSE([
+#include <features.h>
+#ifndef __GLIBC__
+#error
+#endif
+], glibc=yes, glibc=no)
+AC_MSG_RESULT([$glibc])
+
 AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
                [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt],
                              [have_clock_gettime=no])])
@@ -720,11 +729,13 @@ if ! test "x$have_clock_gettime" = xno; then
 
     LIBS_SAVE="$LIBS"
     LIBS="$CLOCK_LIBS"
+    CPPFLAGS_SAVE="$CPPFLAGS"
+
+    if test x"$glibc" = xyes; then
+        CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=199309L"
+    fi
 
     AC_RUN_IFELSE([
-#ifdef __linux__
-#define _POSIX_C_SOURCE 199309L
-#endif
 #include <time.h>
 
 int main(int argc, char *argv[[]]) {
@@ -739,6 +750,7 @@ int main(int argc, char *argv[[]]) {
        [MONOTONIC_CLOCK="cross compiling"])
 
     LIBS="$LIBS_SAVE"
+    CPPFLAGS="$CPPFLAGS_SAVE"
 else
     MONOTONIC_CLOCK=no
 fi
commit cc7c045bae01d90d8f1b750080ba48a96e983c68
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Apr 4 12:58:12 2008 -0400

    Fix PCI config space cycles from int10 emulator.
    
    The top bit of 0xCF8 is an enable bit, not part of the domain.  Sending
    cycles to domain 128 instead of domain 0 is rarely the right thing to do.

diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 9daff22..c3af5bc 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -461,7 +461,7 @@ Mem_wl(CARD32 addr, CARD32 val)
 static CARD32 PciCfg1Addr = 0;
 
 #define PCI_OFFSET(x) ((x) & 0x000000ff)
-#define PCI_TAG(x)    ((x) & 0xffffff00)
+#define PCI_TAG(x)    ((x) & 0x7fffff00)
 
 static struct pci_device*
 pci_device_for_cfg_address (CARD32 addr)
commit d1de3dda8efe501d4192c8a99c34ab4265316c32
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Mar 17 14:22:39 2008 -0700

    Fix clock_gettime presence detect on FreeBSD.
    
    For non-Linux, _POSIX_C_SOURCE and friends restrict symbols defined rather
    than enabling defines of symbols.  Additionally, CLOCK_MONOTONIC was
    apparently added to the standard around 2000 anyway, not 1993.

diff --git a/configure.ac b/configure.ac
index 985c8e2..1431f4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -722,7 +722,9 @@ if ! test "x$have_clock_gettime" = xno; then
     LIBS="$CLOCK_LIBS"
 
     AC_RUN_IFELSE([
+#ifdef __linux__
 #define _POSIX_C_SOURCE 199309L
+#endif
 #include <time.h>
 
 int main(int argc, char *argv[[]]) {
commit ec17900f52bbd25d07566834756e5c7e832e0463
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Fri Apr 4 10:46:45 2008 -0400

    Convert __DRIconfigs after we've made sure createNewScreen succeeded.

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index ffa9a0b..9cd0738 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -1117,13 +1117,13 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
 					   &driConfigs,
 					   screen);
 
-    screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
-
     if (screen->driScreen == NULL) {
 	LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed");
 	goto handle_error;
     }
 
+    screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
+
     initializeExtensions(screen);
 
     DRIGetTexOffsetFuncs(pScreen, &screen->texOffsetStart,
commit 16a8ce75585ea360c39e0ffce4f7bb26a359b754
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Thu Apr 3 16:44:32 2008 -0400

    Only autoload RECORD if it was enabled.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 8de7426..208e23d 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -119,7 +119,9 @@ static ModuleDefault ModuleDefaults[] = {
     {.name = "dbe",      .toLoad = TRUE,    .load_opt=NULL},
     {.name = "glx",      .toLoad = TRUE,    .load_opt=NULL},
     {.name = "freetype", .toLoad = TRUE,    .load_opt=NULL},
+#ifdef XRECORD
     {.name = "record",   .toLoad = TRUE,    .load_opt=NULL},
+#endif
     {.name = "dri",      .toLoad = TRUE,    .load_opt=NULL},
     {.name = "dri2",     .toLoad = TRUE,    .load_opt=NULL},
     {.name = NULL,       .toLoad = FALSE,   .load_opt=NULL}
commit d0395a753079f291a78d9ab86810b5f84f237491
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Fri Apr 4 15:05:26 2008 +1030

    Xi: realloc to->valuator instead of allocing it blindly.

diff --git a/Xi/exevents.c b/Xi/exevents.c
index c16b0c8..5e72bae 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -385,7 +385,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
     if (from->valuator)
     {
         ValuatorClassPtr v;
-        to->valuator = xalloc(sizeof(ValuatorClassRec) +
+        to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) +
                 from->valuator->numAxes * sizeof(AxisInfo) +
                 from->valuator->numAxes * sizeof(unsigned int));
         v = to->valuator;
commit 502689847b86be5619da7134646d55a1ac322a2c
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Fri Apr 4 15:01:53 2008 +1030

    Xi: ALLOC_COPY_CLASS_IF should only alloc if to->field doesn't exist.

diff --git a/Xi/exevents.c b/Xi/exevents.c
index b2403bc..c16b0c8 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -363,9 +363,12 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
 #define ALLOC_COPY_CLASS_IF(field, type) \
     if (from->field)\
     { \
-        to->field = xcalloc(1, sizeof(type)); \
         if (!to->field) \
+        { \
+            to->field = xcalloc(1, sizeof(type)); \
+            if (!to->field) \
             FatalError("[Xi] no memory for class shift.\n"); \
+        } \
         memcpy(to->field, from->field, sizeof(type)); \
     }
 
commit 035b1b6995e670ce5593e8aceb08f9ec812c70ea
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Fri Apr 4 15:00:06 2008 +1030

    Xi: remove duplicate copying of kbdfeed and ptrfeed.

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 9c771a4..b2403bc 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -424,22 +424,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
     ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec);
     ALLOC_COPY_CLASS_IF(absolute, AbsoluteClassRec);
 
-    ALLOC_COPY_CLASS_IF(kbdfeed, KbdFeedbackClassRec);
-#ifdef XKB
-    if (to->kbdfeed)
-    {
-        to->kbdfeed->xkb_sli = NULL;
-        /* XXX: XkbSrvLedInfo needs to be copied*/
-        to->kbdfeed->next = NULL;
-    }
-#endif
-    ALLOC_COPY_CLASS_IF(ptrfeed, PtrFeedbackClassRec);
-    if (to->ptrfeed)
-    {
-        to->ptrfeed->next = NULL;
-    }
-
-
     DeepCopyFeedbackClasses(from, to);
 }
 
commit 52fc7aed18930fc9e6bcfdd5dbc28ae559978288
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Fri Apr 4 14:47:23 2008 +1030

    Xi: only alloc memory for feedback classes if it doesn't already exist.

diff --git a/Xi/exevents.c b/Xi/exevents.c
index b21c73d..9c771a4 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -225,7 +225,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
         k = &to->kbdfeed;
         for(it = from->kbdfeed; it; it = it->next)
         {
-            *k = xcalloc(1, sizeof(KbdFeedbackClassRec));
+            if (!(*k))
+            {
+                *k = xcalloc(1, sizeof(KbdFeedbackClassRec));
+                if (!*k)
+                {
+                    ErrorF("[Xi] Cannot alloc memory for class copy.");
+                    return;
+                }
+            }
             (*k)->BellProc = it->BellProc;
             (*k)->CtrlProc = it->CtrlProc;
             (*k)->ctrl     = it->ctrl;
@@ -241,7 +249,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
         p = &to->ptrfeed;
         for (it = from->ptrfeed; it; it = it->next)
         {
-            *p = xcalloc(1, sizeof(PtrFeedbackClassRec));
+            if (!(*p))
+            {
+                *p = xcalloc(1, sizeof(PtrFeedbackClassRec));
+                if (!*p)
+                {
+                    ErrorF("[Xi] Cannot alloc memory for class copy.");
+                    return;
+                }
+            }
             (*p)->CtrlProc = it->CtrlProc;
             (*p)->ctrl     = it->ctrl;
             /* XXX: xkb_sli needs to be copied */
@@ -256,7 +272,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
         i = &to->intfeed;
         for (it = from->intfeed; it; it = it->next)
         {
-            *i = xcalloc(1, sizeof(IntegerFeedbackClassRec));
+            if (!(*i))
+            {
+                *i = xcalloc(1, sizeof(IntegerFeedbackClassRec));
+                if (!(*i))
+                {
+                    ErrorF("[Xi] Cannot alloc memory for class copy.");
+                    return;
+                }
+            }
             (*i)->CtrlProc = it->CtrlProc;
             (*i)->ctrl     = it->ctrl;
 
@@ -270,7 +294,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
         s = &to->stringfeed;
         for (it = from->stringfeed; it; it = it->next)
         {
-            *s = xcalloc(1, sizeof(StringFeedbackClassRec));
+            if (!(*s))
+            {
+                *s = xcalloc(1, sizeof(StringFeedbackClassRec));
+                if (!(*s))
+                {
+                    ErrorF("[Xi] Cannot alloc memory for class copy.");
+                    return;
+                }
+            }
             (*s)->CtrlProc = it->CtrlProc;
             (*s)->ctrl     = it->ctrl;
 
@@ -284,7 +316,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
         b = &to->bell;
         for (it = from->bell; it; it = it->next)
         {
-            *b = xcalloc(1, sizeof(BellFeedbackClassRec));
+            if (!(*b))
+            {
+                *b = xcalloc(1, sizeof(BellFeedbackClassRec));
+                if (!(*b))
+                {
+                    ErrorF("[Xi] Cannot alloc memory for class copy.");
+                    return;
+                }
+            }
             (*b)->BellProc = it->BellProc;
             (*b)->CtrlProc = it->CtrlProc;
             (*b)->ctrl     = it->ctrl;
@@ -299,7 +339,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
         l = &to->leds;
         for (it = from->leds; it; it = it->next)
         {
-            *l = xcalloc(1, sizeof(LedFeedbackClassRec));
+            if (!(*l))
+            {
+                *l = xcalloc(1, sizeof(LedFeedbackClassRec));
+                if (!(*l))
+                {
+                    ErrorF("[Xi] Cannot alloc memory for class copy.");
+                    return;
+                }
+            }
             (*l)->CtrlProc = it->CtrlProc;
             (*l)->ctrl     = it->ctrl;
             /* XXX: xkb_sli needs to be copied */
commit 4eb87c8693b57d9354832c76417797394656333e
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Fri Apr 4 14:20:18 2008 +1030

    Xi: don't free device classes before copying them.
    
    First commit in a series to come.

diff --git a/Xi/exevents.c b/Xi/exevents.c
index fe7f8dc..b21c73d 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -413,7 +413,6 @@ ChangeMasterDeviceClasses(DeviceIntPtr device,
 
     master->public.devicePrivate = device->public.devicePrivate;
 
-    FreeAllDeviceClasses((ClassesPtr)&master->key);
     DeepCopyDeviceClasses(device, master);
 
     /* event is already correct size, see comment in GetPointerEvents */
commit f0915fb3c4a9712200882440a64d11dc595a02bb
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Apr 4 09:29:51 2008 +1000

    quirk: add quirk for ACER EDID

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index f15c396..8f7d45d 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -158,6 +158,11 @@ static Bool quirk_first_detailed_preferred (int scrnIndex, xf86MonPtr DDC)
 	DDC->vendor.prod_id == 765)
 	return TRUE;
 
+    /* ACR of some sort RH #284231 */
+    if (memcmp (DDC->vendor.name, "ACR", 4) == 0 &&
+	DDC->vendor.prod_id == 2423)
+	return TRUE;
+
     return FALSE;
 }
 
commit 2e42b67b82db0f9128dd00e339b9dfdd9fe6d667
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Apr 2 18:05:34 2008 -0700

    XQuartz: Change reporting of space change to debug log rather than stderr
    (cherry picked from commit ed15556a9fc4ebdb88f42961052fc8456082165f)

diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 91bf25a..d685fca 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -108,7 +108,7 @@ static void eventHandler(unsigned int type, const void *arg,
             }
             break;
         case  XP_EVENT_SPACE_CHANGED:
-            ErrorF("XP_EVENT_SPACE_CHANGED\n");
+            DEBUG_LOG("XP_EVENT_SPACE_CHANGED\n");
             if(arg_size == sizeof(uint32_t)) {
                 uint32_t space_id = *(uint32_t *)arg;
                 DarwinSendDDXEvent(kXquartzSpaceChanged, 1, space_id);
commit c737d04c758e03e32f692a31ed2a665ccbafa931
Author: Ben Byer <bbyer at apple.com>
Date:   Tue Apr 1 00:40:46 2008 -0700

    The AppKit thread should not be calling directly into the X server
    functions to change state when the keyboard is reloaded; instead,
    pass it as an event.
    (cherry picked from commit 7e653f806ff5508aace059312156f319a9ed4479)

diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 01e6f41..df92d8b 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -91,13 +91,8 @@ extern int              darwinMainScreenY;
  * Special ddx events understood by the X server
  */
 enum {
-    kXquartzUpdateModifiers   // update all modifier keys
+    kXquartzReloadKeymap      // Reload system keymap
             = LASTEvent+1,    // (from X.h list of event names)
-    kXquartzUpdateButtons,    // update state of mouse buttons 2 and up
-    kXquartzScrollWheel,      // scroll wheel event
-    /*
-     * Quartz-specific events -- not used in IOKit mode
-     */
     kXquartzActivate,         // restore X drawing and cursor
     kXquartzDeactivate,       // clip X drawing and switch to Aqua cursor
     kXquartzSetRootClip,      // enable or disable drawing to the X screen
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index b6cd3f2..3afbaf8 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -289,6 +289,7 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
         FatalError("Couldn't allocate event buffer\n");
 
     mieqInit();
+    mieqSetHandler(kXquartzReloadKeymap, DarwinKeyboardReloadHandler);
     mieqSetHandler(kXquartzActivate, DarwinEventHandler);
     mieqSetHandler(kXquartzDeactivate, DarwinEventHandler);
     mieqSetHandler(kXquartzSetRootClip, DarwinEventHandler);
@@ -322,7 +323,7 @@ void ProcessInputEvents(void) {
     // Empty the signaling pipe
     int x = sizeof(xe);
     while (x == sizeof(xe)) {
-      DEBUG_LOG("draining pipe\n");
+//      DEBUG_LOG("draining pipe\n");
       x = read(darwinEventReadFD, &xe, sizeof(xe));
     }
 }
@@ -412,8 +413,8 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
 
     this_seed = QuartzSystemKeymapSeed();
     if (this_seed != last_seed) {
-      last_seed = this_seed;
-      DarwinKeyboardReload(darwinKeyboard);
+		last_seed = this_seed;
+		DarwinSendDDXEvent(kXquartzReloadKeymap, 0);
     }
   }
 
diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c
index 355d9f0..6f2758e 100644
--- a/hw/xquartz/darwinKeyboard.c
+++ b/hw/xquartz/darwinKeyboard.c
@@ -850,16 +850,18 @@ static Bool InitModMap(register KeyClassPtr keyc) {
 }
 
 
-void DarwinKeyboardReload(DeviceIntPtr pDev) {
+void DarwinKeyboardReloadHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
     KeySymsRec keySyms;
-
+	if (dev == NULL) dev = darwinKeyboard;
+	
+	DEBUG_LOG("DarwinKeyboardReloadHandler(%p)\n", dev);
     DarwinLoadKeyboardMapping(&keySyms);
 
-    if (SetKeySymsMap(&pDev->key->curKeySyms, &keySyms)) {
+    if (SetKeySymsMap(&dev->key->curKeySyms, &keySyms)) {
         /* now try to update modifiers. */
 
-        memmove(pDev->key->modifierMap, keyInfo.modMap, MAP_LENGTH);
-        InitModMap(pDev->key);
+        memmove(dev->key->modifierMap, keyInfo.modMap, MAP_LENGTH);
+        InitModMap(dev->key);
     } else DEBUG_LOG("SetKeySymsMap=0\n");
 
     SendMappingNotify(MappingKeyboard, MIN_KEYCODE, NUM_KEYCODES, 0);
diff --git a/hw/xquartz/darwinKeyboard.h b/hw/xquartz/darwinKeyboard.h
index 5cf64c7..762f659 100644
--- a/hw/xquartz/darwinKeyboard.h
+++ b/hw/xquartz/darwinKeyboard.h
@@ -31,7 +31,7 @@
 
 /* Provided for darwinEvents.c */
 extern darwinKeyboardInfo keyInfo;
-void DarwinKeyboardReload(DeviceIntPtr pDev);
+void DarwinKeyboardReloadHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents);
 void DarwinKeyboardInit(DeviceIntPtr pDev);
 int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide);
 int DarwinModifierNXKeyToNXKeycode(int key, int side);
diff --git a/hw/xquartz/quartzKeyboard.h b/hw/xquartz/quartzKeyboard.h
index 8131b56..4f495bb 100644
--- a/hw/xquartz/quartzKeyboard.h
+++ b/hw/xquartz/quartzKeyboard.h
@@ -46,7 +46,6 @@ typedef struct darwinKeyboardInfo_struct {
 } darwinKeyboardInfo;
 
 /* These functions need to be implemented by Xquartz, XDarwin, etc. */
-void DarwinKeyboardReload(DeviceIntPtr pDev);
 Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info);
 unsigned int QuartzSystemKeymapSeed(void);
 
commit 15b0084f1ab23042190d8beeb3f088b92dee5a10
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 23:31:25 2008 -0700

    formatting cleanup for X11Application.m (no code changes)
    (cherry picked from commit eb083d3f68f459d90417558da1ed00729b749950)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 28bb529..2844fca 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -166,171 +166,170 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
     static TSMDocumentID x11_document;
 	DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active)
     if (state) {
-      DarwinSendDDXEvent(kXquartzActivate, 0);
-      
-      if (!_x_active) {
-	if (x11_document == 0 && darwinKeymapFile == NULL) {
-	  OSType types[1];
-	  types[0] = kUnicodeDocument;
-	  NewTSMDocument (1, types, &x11_document, 0);
-	}
-	
-	if (x11_document != 0)	ActivateTSMDocument (x11_document);
-      }
+		DarwinSendDDXEvent(kXquartzActivate, 0);
+
+		if (!_x_active) {
+			if (x11_document == 0 && darwinKeymapFile == NULL) {
+				OSType types[1];
+				types[0] = kUnicodeDocument;
+				NewTSMDocument (1, types, &x11_document, 0);
+			}
+
+			if (x11_document != 0)	ActivateTSMDocument (x11_document);
+		}
     } else {
-      DarwinSendDDXEvent(kXquartzDeactivate, 0);
-      
-      if (_x_active && x11_document != 0)
-		DeactivateTSMDocument (x11_document);
-    }
-    
-    _x_active = state;
+		DarwinSendDDXEvent(kXquartzDeactivate, 0);
+
+		if (_x_active && x11_document != 0)
+			DeactivateTSMDocument (x11_document);
+	}
+
+	_x_active = state;
 }
 
 - (void) became_key:(NSWindow *)win {
-    [self activateX:NO];
+	[self activateX:NO];
 }
 
 - (void) sendEvent:(NSEvent *)e {
-  NSEventType type;
-  BOOL for_appkit, for_x;
-  
-  type = [e type];
-  
-  /* By default pass down the responder chain and to X. */
-  for_appkit = YES;
-  for_x = YES;
-  
-  switch (type) {
-  case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
-  case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
-    if ([e window] != nil) {
-      /* Pointer event has an (AppKit) window. Probably something for the kit. */
-      for_x = NO;
-      if (_x_active) [self activateX:NO];
-    } else if ([self modalWindow] == nil) {
-      /* Must be an X window. Tell appkit it doesn't have focus. */
-      WindowPtr pWin = xprGetXWindowFromAppKit([e windowNumber]);
-      if (pWin) RootlessReorderWindow(pWin);
-      for_appkit = NO;
-      
-      if ([self isActive]) {
-	[self deactivate];
-	
-	if (!_x_active && quartzProcs->IsX11Window([e window],
-						   [e windowNumber]))
-	  [self activateX:YES];
-      }
-    }
-    break;
-      
-  case NSKeyDown: case NSKeyUp:
-    if (_x_active) {
-      static int swallow_up;
-      
-      /* No kit window is focused, so send it to X. */
-      for_appkit = NO;
-      if (type == NSKeyDown) {
-	/* Before that though, see if there are any global
-	   shortcuts bound to it. */
-	
-	if (X11EnableKeyEquivalents
-	    && [[self mainMenu] performKeyEquivalent:e]) {
-	  swallow_up = [e keyCode];
-	  for_x = NO;
-	} else if (!quartzEnableRootless
-		   && ([e modifierFlags] & ALL_KEY_MASKS)
-		   == (NSCommandKeyMask | NSAlternateKeyMask)
-		   && ([e keyCode] == 0 /*a*/
-		    || [e keyCode] == 53 /*Esc*/)) {
-	  swallow_up = 0;
-	  for_x = NO;
+ 	NSEventType type;
+	BOOL for_appkit, for_x;
+
+	type = [e type];
+
+	/* By default pass down the responder chain and to X. */
+	for_appkit = YES;
+	for_x = YES;
+  
+	switch (type) {
+		case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
+		case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
+		if ([e window] != nil) {
+			/* Pointer event has an (AppKit) window. Probably something for the kit. */
+			for_x = NO;
+			if (_x_active) [self activateX:NO];
+		} else if ([self modalWindow] == nil) {
+			/* Must be an X window. Tell appkit it doesn't have focus. */
+			WindowPtr pWin = xprGetXWindowFromAppKit([e windowNumber]);
+			if (pWin) RootlessReorderWindow(pWin);
+			for_appkit = NO;
+
+			if ([self isActive]) {
+				[self deactivate];
+				if (!_x_active && quartzProcs->IsX11Window([e window],
+					[e windowNumber]))
+					[self activateX:YES];
+			}
+		}
+		break;
+
+		case NSKeyDown: case NSKeyUp:
+		if (_x_active) {
+			static int swallow_up;
+
+			/* No kit window is focused, so send it to X. */
+			for_appkit = NO;
+			if (type == NSKeyDown) {
+				/* Before that though, see if there are any global
+				shortcuts bound to it. */
+
+					if (X11EnableKeyEquivalents
+						&& [[self mainMenu] performKeyEquivalent:e]) {
+							swallow_up = [e keyCode];
+							for_x = NO;
+					} else if (!quartzEnableRootless
+						&& ([e modifierFlags] & ALL_KEY_MASKS)
+						== (NSCommandKeyMask | NSAlternateKeyMask)
+						&& ([e keyCode] == 0 /*a*/
+							|| [e keyCode] == 53 /*Esc*/)) {
+						swallow_up = 0;
+						for_x = NO;
 #ifdef DARWIN_DDX_MISSING
-	  DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
+						DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
 #endif
+					}
+			} else {
+			/* If we saw a key equivalent on the down, don't pass
+	   			the up through to X. */
+
+				if (swallow_up != 0 && [e keyCode] == swallow_up) {
+					swallow_up = 0;
+					for_x = NO;
+				}
+			}
+    		} else for_x = NO;
+    	break;
+
+		case NSFlagsChanged:
+			/* For the l33t X users who remap modifier keys to normal keysyms. */
+			if (!_x_active) for_x = NO;
+		break;
+
+		case NSAppKitDefined:
+		switch ([e subtype]) {
+			case NSApplicationActivatedEventType:
+      		for_x = NO;
+			if ([self modalWindow] == nil) {
+				for_appkit = NO;
+
+				/* FIXME: hack to avoid having to pass the event to appkit,
+	   			which would cause it to raise one of its windows. */
+				_appFlags._active = YES;
+
+				[self activateX:YES];
+				if ([e data2] & 0x10) X11ApplicationSetFrontProcess();
+			}
+			break;
+
+			case 18: /* ApplicationDidReactivate */
+				if (quartzHasRoot) for_appkit = NO;
+			break;
+
+			case NSApplicationDeactivatedEventType:
+				for_x = NO;
+				[self activateX:NO];
+			break;
+		}
+	break;
+ 
+	default: break; /* for gcc */
 	}
-      } else {
-	/* If we saw a key equivalent on the down, don't pass
-	   the up through to X. */
-	
-	if (swallow_up != 0 && [e keyCode] == swallow_up) {
-	  swallow_up = 0;
-	  for_x = NO;
-	}
-      }
-    } else for_x = NO;
-    break;
-    
-  case NSFlagsChanged:
-    /* For the l33t X users who remap modifier keys to normal keysyms. */
-    if (!_x_active) for_x = NO;
-    break;
-    
-  case NSAppKitDefined:
-    switch ([e subtype]) {
-    case NSApplicationActivatedEventType:
-      for_x = NO;
-      if ([self modalWindow] == nil) {
-		for_appkit = NO;
-	
-	/* FIXME: hack to avoid having to pass the event to appkit,
-	   which would cause it to raise one of its windows. */
-	_appFlags._active = YES;
-	
-	[self activateX:YES];
-	if ([e data2] & 0x10) X11ApplicationSetFrontProcess();
-      }
-      break;
-      
-    case 18: /* ApplicationDidReactivate */
-      if (quartzHasRoot) for_appkit = NO;
-      break;
-      
-    case NSApplicationDeactivatedEventType:
-      for_x = NO;
-      [self activateX:NO];
-      break;
-    }
-    break;
-    
-  default: break; /* for gcc */
-  }
-  
-  if (for_appkit) [super sendEvent:e];
-  
-  if (for_x) send_nsevent (type, e);
+
+	if (for_appkit) [super sendEvent:e];
+
+	if (for_x) send_nsevent (type, e);
 }
 
 - (void) set_window_menu:(NSArray *)list {
-    [_controller set_window_menu:list];
+	[_controller set_window_menu:list];
 }
 
 - (void) set_window_menu_check:(NSNumber *)n {
-    [_controller set_window_menu_check:n];
+	[_controller set_window_menu_check:n];
 }
 
 - (void) set_apps_menu:(NSArray *)list {
-    [_controller set_apps_menu:list];
+	[_controller set_apps_menu:list];
 }
 
 - (void) set_front_process:unused {
-    [NSApp activateIgnoringOtherApps:YES];
+	[NSApp activateIgnoringOtherApps:YES];
 
-    if ([self modalWindow] == nil)
-        [self activateX:YES];
+	if ([self modalWindow] == nil)
+		[self activateX:YES];
 }
 
 - (void) set_can_quit:(NSNumber *)state {
-    [_controller set_can_quit:[state boolValue]];
+	[_controller set_can_quit:[state boolValue]];
 }
 
 - (void) server_ready:unused {
-    [_controller server_ready];
+	[_controller server_ready];
 }
 
 - (void) show_hide_menubar:(NSNumber *)state {
-    if ([state boolValue]) ShowMenuBar ();
-    else HideMenuBar ();
+	if ([state boolValue]) ShowMenuBar ();
+	else HideMenuBar ();
 }
 
 
@@ -348,57 +347,57 @@ static void cfrelease (CFAllocatorRef a, const void *b) {
 }
 
 static CFMutableArrayRef nsarray_to_cfarray (NSArray *in) {
-    CFMutableArrayRef out;
-    CFArrayCallBacks cb;
-    NSObject *ns;
-    const CFTypeRef *cf;
-    int i, count;
-	
-    memset (&cb, 0, sizeof (cb));
-    cb.version = 0;
-    cb.retain = cfretain;
-    cb.release = cfrelease;
-	
-    count = [in count];
-    out = CFArrayCreateMutable (NULL, count, &cb);
-	
-    for (i = 0; i < count; i++) {
-      ns = [in objectAtIndex:i];
-      
-      if ([ns isKindOfClass:[NSArray class]])
-	cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns);
-      else
-	cf = CFRetain ((CFTypeRef) ns);
-      
-      CFArrayAppendValue (out, cf);
-      CFRelease (cf);
-    }
-    
-    return out;
+	CFMutableArrayRef out;
+	CFArrayCallBacks cb;
+	NSObject *ns;
+	const CFTypeRef *cf;
+	int i, count;
+
+	memset (&cb, 0, sizeof (cb));
+	cb.version = 0;
+	cb.retain = cfretain;
+	cb.release = cfrelease;
+
+	count = [in count];
+	out = CFArrayCreateMutable (NULL, count, &cb);
+
+	for (i = 0; i < count; i++) {
+		ns = [in objectAtIndex:i];
+
+		if ([ns isKindOfClass:[NSArray class]])
+			cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns);
+		else
+			cf = CFRetain ((CFTypeRef) ns);
+
+		CFArrayAppendValue (out, cf);
+		CFRelease (cf);
+	}
+
+	return out;
 }
 
 static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
-    NSMutableArray *out;
-    const CFTypeRef *cf;
-    NSObject *ns;
-    int i, count;
-	
-    count = CFArrayGetCount (in);
-    out = [[NSMutableArray alloc] initWithCapacity:count];
-	
-    for (i = 0; i < count; i++) {
-      cf = CFArrayGetValueAtIndex (in, i);
-		
-      if (CFGetTypeID (cf) == CFArrayGetTypeID ())
-	ns = cfarray_to_nsarray ((CFArrayRef) cf);
-      else
-	ns = [(id)cf retain];
-      
-      [out addObject:ns];
-      [ns release];
-    }
-    
-    return out;
+	NSMutableArray *out;
+	const CFTypeRef *cf;
+	NSObject *ns;
+	int i, count;
+
+	count = CFArrayGetCount (in);
+	out = [[NSMutableArray alloc] initWithCapacity:count];
+
+	for (i = 0; i < count; i++) {
+		cf = CFArrayGetValueAtIndex (in, i);
+
+		if (CFGetTypeID (cf) == CFArrayGetTypeID ())
+			ns = cfarray_to_nsarray ((CFArrayRef) cf);
+		else
+			ns = [(id)cf retain];
+
+		[out addObject:ns];
+		[ns release];
+	}
+
+	return out;
 }
 
 - (CFPropertyListRef) prefs_get:(NSString *)key {
@@ -855,86 +854,68 @@ convert_flags (unsigned int nsflags) {
     return xflags;
 }
 
-
-// This code should probably be merged with that in XDarwin's XServer.m - BB
 static void send_nsevent (NSEventType type, NSEvent *e) {
-  //    static unsigned int button_state = 0;
-    NSRect screen;
-    NSPoint location;
-    NSWindow *window;
-    int pointer_x, pointer_y, ev_button, ev_type;
-    float pressure, tilt_x, tilt_y;
-
-    //    int num_events=0, i=0, state;
-    // xEvent xe;
-	
-    /* convert location to global top-left coordinates */
-    location = [e locationInWindow];
-    window = [e window];
-    screen = [[[NSScreen screens] objectAtIndex:0] frame];
-		
+	NSRect screen;
+	NSPoint location;
+	NSWindow *window;
+	int pointer_x, pointer_y, ev_button, ev_type;
+	float pressure, tilt_x, tilt_y;
+
+	/* convert location to global top-left coordinates */
+	location = [e locationInWindow];
+	window = [e window];
+	screen = [[[NSScreen screens] objectAtIndex:0] frame];
+
     if (window != nil)	{
-      NSRect frame = [window frame];
-      pointer_x = location.x + frame.origin.x;
-      pointer_y = (((screen.origin.y + screen.size.height)
-		    - location.y) - frame.origin.y);
-    } else {
-      pointer_x = location.x;
-      pointer_y = (screen.origin.y + screen.size.height) - location.y;
-    }
-    
-    pointer_y -= aquaMenuBarHeight;
-    //    state = convert_flags ([e modifierFlags]);
-    
-    pressure = 0;  // for tablets
-    tilt_x = 0;
-    tilt_y = 0;
-
-    switch (type) {
-    case NSLeftMouseDown:    ev_button=1; ev_type=ButtonPress; goto handle_mouse;
-    case NSOtherMouseDown:   ev_button=2; ev_type=ButtonPress; goto handle_mouse;
-    case NSRightMouseDown:   ev_button=3; ev_type=ButtonPress; goto handle_mouse;
-    case NSLeftMouseUp:      ev_button=1; ev_type=ButtonRelease; goto handle_mouse;
-    case NSOtherMouseUp:     ev_button=2; ev_type=ButtonRelease; goto handle_mouse;
-    case NSRightMouseUp:     ev_button=3; ev_type=ButtonRelease; goto handle_mouse;
-    case NSLeftMouseDragged:  ev_button=1; ev_type=MotionNotify; goto handle_mouse;
-    case NSOtherMouseDragged: ev_button=2; ev_type=MotionNotify; goto handle_mouse;
-    case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto handle_mouse;
-    case NSTabletPoint:
-      pressure = [e pressure];
-      tilt_x = [e tilt].x;
-      tilt_y = [e tilt].y; // fall through
-    case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
-    handle_mouse:
-      
-      /* I'm not sure the below code is necessary or useful (-bb)
-	if(ev_type==ButtonPress) {
-	if (!quartzProcs->IsX11Window([e window], [e windowNumber])) {
-	  fprintf(stderr, "Dropping event because it's not a window\n");
-	  break;
+		NSRect frame = [window frame];
+		pointer_x = location.x + frame.origin.x;
+		pointer_y = (((screen.origin.y + screen.size.height)
+			- location.y) - frame.origin.y);
+	} else {
+		pointer_x = location.x;
+		pointer_y = (screen.origin.y + screen.size.height) - location.y;
 	}
-	button_state |= (1 << ev_button);
-	DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y);
-      } else if (ev_type==ButtonRelease && (button_state & (1 << ev_button)) == 0) break;
-      */
-
-      //      if ([e subtype] == NSTabletPointEventSubtype) pressure = [e pressure];
-      DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y,
-			      pressure, tilt_x, tilt_y);
-      break;
-    case NSScrollWheel:
-      DarwinSendScrollEvents([e deltaY], pointer_x, pointer_y,
-			     pressure, tilt_x, tilt_y);
-      break;
-      
-    case NSKeyDown:  // do we need to translate these keyCodes?
-    case NSKeyUp:
-      DarwinSendKeyboardEvents((type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]);
-      break;
-
-    case NSFlagsChanged:
-      DarwinUpdateModKeys([e modifierFlags]);
-      break;
-    default: break; /* for gcc */
-    }	
+
+	pointer_y -= aquaMenuBarHeight;
+
+	pressure = 0;  // for tablets
+	tilt_x = 0;
+	tilt_y = 0;
+
+	switch (type) {
+		case NSLeftMouseDown:    ev_button=1; ev_type=ButtonPress; goto handle_mouse;
+		case NSOtherMouseDown:   ev_button=2; ev_type=ButtonPress; goto handle_mouse;
+		case NSRightMouseDown:   ev_button=3; ev_type=ButtonPress; goto handle_mouse;
+		case NSLeftMouseUp:      ev_button=1; ev_type=ButtonRelease; goto handle_mouse;
+		case NSOtherMouseUp:     ev_button=2; ev_type=ButtonRelease; goto handle_mouse;
+		case NSRightMouseUp:     ev_button=3; ev_type=ButtonRelease; goto handle_mouse;
+		case NSLeftMouseDragged:  ev_button=1; ev_type=MotionNotify; goto handle_mouse;
+		case NSOtherMouseDragged: ev_button=2; ev_type=MotionNotify; goto handle_mouse;
+		case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto handle_mouse;
+		case NSTabletPoint:
+			pressure = [e pressure];
+			tilt_x = [e tilt].x;
+			tilt_y = [e tilt].y; // fall through
+		case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
+		handle_mouse:
+
+//      if ([e subtype] == NSTabletPointEventSubtype) pressure = [e pressure];
+		DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y,
+			pressure, tilt_x, tilt_y);
+		break;
+
+		case NSScrollWheel:
+			DarwinSendScrollEvents([e deltaY], pointer_x, pointer_y,
+				pressure, tilt_x, tilt_y);
+		break;
+
+		case NSKeyDown: case NSKeyUp:
+			DarwinSendKeyboardEvents((type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]);
+		break;
+
+		case NSFlagsChanged:
+			DarwinUpdateModKeys([e modifierFlags]);
+		break;
+		default: break; /* for gcc */
+	}	
 }
commit e9e2d88436597875f102085d216dc0a8fce1450a
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 22:55:24 2008 -0700

    moved and renamed QuartzMessageServerThread to
    DarwinSendDDXEvent to make more clear what it actually does.
    (cherry picked from commit bee2b377efc930e25017636e5112093a3a6549c7)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 147b4b4..28bb529 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1,6 +1,6 @@
 /* X11Application.m -- subclass of NSApplication to multiplex events
  
- Copyright (c) 2002-2007 Apple Inc.
+ Copyright (c) 2002-2008 Apple Inc.
  
  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
@@ -166,7 +166,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
     static TSMDocumentID x11_document;
 	DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active)
     if (state) {
-      QuartzMessageServerThread (kXquartzActivate, 0);
+      DarwinSendDDXEvent(kXquartzActivate, 0);
       
       if (!_x_active) {
 	if (x11_document == 0 && darwinKeymapFile == NULL) {
@@ -178,10 +178,10 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 	if (x11_document != 0)	ActivateTSMDocument (x11_document);
       }
     } else {
-      QuartzMessageServerThread (kXquartzDeactivate, 0);
+      DarwinSendDDXEvent(kXquartzDeactivate, 0);
       
       if (_x_active && x11_document != 0)
-	DeactivateTSMDocument (x11_document);
+		DeactivateTSMDocument (x11_document);
     }
     
     _x_active = state;
@@ -246,7 +246,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 	  swallow_up = 0;
 	  for_x = NO;
 #ifdef DARWIN_DDX_MISSING
-	  QuartzMessageServerThread (kXquartzToggleFullscreen, 0);
+	  DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
 #endif
 	}
       } else {
@@ -271,7 +271,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
     case NSApplicationActivatedEventType:
       for_x = NO;
       if ([self modalWindow] == nil) {
-	for_appkit = NO;
+		for_appkit = NO;
 	
 	/* FIXME: hack to avoid having to pass the event to appkit,
 	   which would cause it to raise one of its windows. */
@@ -654,7 +654,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
 
 /* This will end up at the end of the responder chain. */
 - (void) copy:sender {
-  QuartzMessageServerThread (kXquartzPasteboardNotify, 1,
+  DarwinSendDDXEvent(kXquartzPasteboardNotify, 1,
 			     AppleWMCopyToPasteboard);
 }
 
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index aa9fa94..5bf4f4d 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -1,6 +1,6 @@
 /* X11Controller.m -- connect the IB ui, also the NSApp delegate
  
-   Copyright (c) 2002-2007 Apple Inc. All rights reserved.
+   Copyright (c) 2002-2008 Apple Inc. All rights reserved.
  
    Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation files
@@ -103,7 +103,7 @@
 {
   [NSApp activateIgnoringOtherApps:YES];
 	
-  QuartzMessageServerThread (kXquartzControllerNotify, 2,
+  DarwinSendDDXEvent(kXquartzControllerNotify, 2,
 			     AppleWMWindowMenuItem, [sender tag]);
 }
 
@@ -254,7 +254,7 @@
   [self remove_window_menu];
   [self install_window_menu:list];
 	
-  QuartzMessageServerThread (kXquartzControllerNotify, 1,
+  DarwinSendDDXEvent(kXquartzControllerNotify, 1,
 			     AppleWMWindowMenuNotify);
 }
 
@@ -539,20 +539,20 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 - (void) hide_window:sender
 {
   if ([X11App x_active])
-    QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMHideWindow);
+    DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMHideWindow);
   else
     NSBeep ();			/* FIXME: something here */
 }
 
 - (IBAction)bring_to_front:sender
 {
-  QuartzMessageServerThread(kXquartzControllerNotify, 1, AppleWMBringAllToFront);
+  DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMBringAllToFront);
 }
 
 - (IBAction)close_window:sender
 {
   if ([X11App x_active])
-    QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMCloseWindow);
+    DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMCloseWindow);
   else
     [[NSApp keyWindow] performClose:sender];
 }
@@ -560,7 +560,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 - (IBAction)minimize_window:sender
 {
   if ([X11App x_active])
-    QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMMinimizeWindow);
+    DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMMinimizeWindow);
   else
     [[NSApp keyWindow] performMiniaturize:sender];
 }
@@ -568,19 +568,19 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 - (IBAction)zoom_window:sender
 {
   if ([X11App x_active])
-    QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMZoomWindow);
+    DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMZoomWindow);
   else
     [[NSApp keyWindow] performZoom:sender];
 }
 
 - (IBAction) next_window:sender
 {
-  QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMNextWindow);
+  DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMNextWindow);
 }
 
 - (IBAction) previous_window:sender
 {
-  QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMPreviousWindow);
+  DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMPreviousWindow);
 }
 
 - (IBAction) enable_fullscreen_changed:sender
@@ -588,7 +588,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
   int value = ![enable_fullscreen intValue];
 	
 #ifdef DARWIN_DDX_MISSING
-  QuartzMessageServerThread (kXquartzSetRootless, 1, value);
+  DarwinSendDDXEvent(kXquartzSetRootless, 1, value);
 #endif
 	
   [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:value];
@@ -598,7 +598,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 - (IBAction) toggle_fullscreen:sender
 {
 #ifdef DARWIN_DDX_MISSING
-  QuartzMessageServerThread (kXquartzToggleFullscreen, 0);
+  DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
 #endif
 }
 
@@ -661,7 +661,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 
 - (IBAction) quit:sender
 {
-  QuartzMessageServerThread (kXquartzQuit, 0);
+  DarwinSendDDXEvent(kXquartzQuit, 0);
 }
 
 - (IBAction) x11_help:sender
@@ -684,12 +684,12 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 
 - (void) applicationDidHide:(NSNotification *)notify
 {
-  QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMHideAll);
+  DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMHideAll);
 }
 
 - (void) applicationDidUnhide:(NSNotification *)notify
 {
-  QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMShowAll);
+  DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMShowAll);
 }
 
 - (NSApplicationTerminateReply) applicationShouldTerminate:sender
@@ -717,7 +717,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
   [X11App prefs_synchronize];
 	
   /* shutdown the X server, it will exit () for us. */
-  QuartzMessageServerThread (kXquartzQuit, 0);
+  DarwinSendDDXEvent(kXquartzQuit, 0);
 	
   /* In case it doesn't, exit anyway after a while. */
   while (sleep (10) != 0) ;
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 8c3cabb..01e6f41 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -1,4 +1,5 @@
 /*
+ * Copyright (C) 2008 Apple, Inc.
  * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -120,6 +121,8 @@ enum {
     kXquartzWindowMoved,      // window has moved on screen
 };
 
+void DarwinSendDDXEvent(int type, int argc, ...);
+
 #define ENABLE_DEBUG_LOG 1
 
 #ifdef ENABLE_DEBUG_LOG
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 28a712d..b6cd3f2 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -476,3 +476,31 @@ void DarwinUpdateModKeys(int flags) {
   DarwinUpdateModifiers(KeyPress, ~old_flags & flags);
   old_flags = flags;
 }
+
+
+/*
+ * DarwinSendDDXEvent
+ *  Send the X server thread a message by placing it on the event queue.
+ */
+void DarwinSendDDXEvent(int type, int argc, ...) {
+    xEvent xe;
+    INT32 *argv;
+    int i, max_args;
+    va_list args;
+
+    memset(&xe, 0, sizeof(xe));
+    xe.u.u.type = type;
+    xe.u.clientMessage.u.l.type = type;
+
+    argv = &xe.u.clientMessage.u.l.longs0;
+    max_args = 4;
+
+    if (argc > 0 && argc <= max_args) {
+        va_start (args, argc);
+        for (i = 0; i < argc; i++)
+            argv[i] = (int) va_arg (args, int);
+        va_end (args);
+    }
+
+    mieqEnqueue(NULL, &xe);
+}
diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h
index 1d8e92a..7c56be9 100644
--- a/hw/xquartz/darwinEvents.h
+++ b/hw/xquartz/darwinEvents.h
@@ -1,4 +1,5 @@
 /*
+ * Copyright (c) 2008 Apple, Inc.
  * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -43,4 +44,5 @@ void DarwinUpdateModKeys(int flags);
 
 void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, 
 			int nevents);
+
 #endif  /* _DARWIN_EVENTS_H */
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index a65bd37..96dc021 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -373,34 +373,3 @@ void QuartzSpaceChanged(uint32_t space_id) {
     /* Do something special here, so we don't depend on quartz-wm for spaces to work... */
     DEBUG_LOG("Space Changed (%u) ... do something interesting...\n", space_id);
 }
-
-/*
- * QuartzMessageServerThread
- *  Send the X server thread a message by placing it on the event queue.
- */
-void
-QuartzMessageServerThread(
-    int type,
-    int argc, ...)
-{
-    xEvent xe;
-    INT32 *argv;
-    int i, max_args;
-    va_list args;
-
-    memset(&xe, 0, sizeof(xe));
-    xe.u.u.type = type;
-    xe.u.clientMessage.u.l.type = type;
-
-    argv = &xe.u.clientMessage.u.l.longs0;
-    max_args = 4;
-
-    if (argc > 0 && argc <= max_args) {
-        va_start (args, argc);
-        for (i = 0; i < argc; i++)
-            argv[i] = (int) va_arg (args, int);
-        va_end (args);
-    }
-
-    mieqEnqueue(NULL, &xe);
-}
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 5e14473..91bf25a 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -68,7 +68,7 @@ static void eventHandler(unsigned int type, const void *arg,
     switch (type) {
         case XP_EVENT_DISPLAY_CHANGED:
             DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
-            QuartzMessageServerThread(kXquartzDisplayChanged, 0);
+            DarwinSendDDXEvent(kXquartzDisplayChanged, 0);
             break;
             
         case XP_EVENT_WINDOW_STATE_CHANGED:
@@ -76,7 +76,7 @@ static void eventHandler(unsigned int type, const void *arg,
                 const xp_window_state_event *ws_arg = arg;
                 
                 DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: id=%d, state=%d\n", ws_arg->id, ws_arg->state);
-                QuartzMessageServerThread(kXquartzWindowState, 2,
+                DarwinSendDDXEvent(kXquartzWindowState, 2,
                                           ws_arg->id, ws_arg->state);
             } else {
                 DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: ignored\n");
@@ -88,7 +88,7 @@ static void eventHandler(unsigned int type, const void *arg,
             if (arg_size == sizeof(xp_window_id))  {
                 xp_window_id id = * (xp_window_id *) arg;
                 WindowPtr pWin = xprGetXWindow(id);
-                QuartzMessageServerThread(kXquartzWindowMoved, 1, pWin);
+                DarwinSendDDXEvent(kXquartzWindowMoved, 1, pWin);
             }
             break;
             
@@ -111,7 +111,7 @@ static void eventHandler(unsigned int type, const void *arg,
             ErrorF("XP_EVENT_SPACE_CHANGED\n");
             if(arg_size == sizeof(uint32_t)) {
                 uint32_t space_id = *(uint32_t *)arg;
-                QuartzMessageServerThread(kXquartzSpaceChanged, 1, space_id);
+                DarwinSendDDXEvent(kXquartzSpaceChanged, 1, space_id);
             }
             break;
         default:
commit c1be4e3379d8780dff20390939b657ca0973995a
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 21:04:37 2008 -0700

    shovelling code around ...
    (cherry picked from commit 2143182ba49195bbb2e9163ea6872fd68e7a4a85)

diff --git a/dix/main.c b/dix/main.c
index db43473..8f6507f 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -113,6 +113,9 @@ Equipment Corporation.
 #include "dispatch.h"		/* InitProcVectors() */
 #endif
 
+#include <pthread.h>
+pthread_key_t threadname_key=0;
+
 #ifdef DPMSExtension
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
@@ -248,6 +251,17 @@ main(int argc, char *argv[], char *envp[])
     char	*xauthfile;
     HWEventQueueType	alwaysCheckForInput[2];
 
+    if(threadname_key == 0) ErrorF("pthread_key_create returned %d\n", pthread_key_create(&threadname_key, NULL));
+    ErrorF("threadname_key = %d\n", threadname_key);
+    if(pthread_getspecific(threadname_key) == NULL) {
+      char *nameptr = malloc(32);
+      sprintf(nameptr, "main thread %d", random());
+      //      strcpy(nameptr, "main thread");
+      ErrorF("calling: pthread_setspecific(%d, %s)=%d\n", threadname_key, nameptr, pthread_setspecific(threadname_key, nameptr));
+      if (pthread_getspecific(threadname_key) != NULL) ErrorF("current thread: %s\n", (char *)pthread_getspecific(threadname_key));
+    } else {
+      if (pthread_getspecific(threadname_key) != NULL) ErrorF("thread was already: %s\n", (char *)pthread_getspecific(threadname_key));
+    }
     display = "0";
 
     InitGlobals();
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 230050f..28a712d 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -52,6 +52,11 @@ in this Software without prior written authorization from The Open Group.
 #include <unistd.h>
 #include <IOKit/hidsystem/IOLLEvent.h>
 
+#define _APPLEWM_SERVER_
+#include "applewmExt.h"
+#include <X11/extensions/applewm.h>
+
+
 /* Fake button press/release for scroll wheel move. */
 #define SCROLLWHEELUPFAKE   4
 #define SCROLLWHEELDOWNFAKE 5
@@ -177,14 +182,103 @@ static void DarwinSimulateMouseClick(
     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. */
+
 void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
   int i;
 
   DEBUG_LOG("DarwinEventHandler(%d, %p, %p, %d)\n", screenNum, xe, dev, nevents);
   for (i=0; i<nevents; i++) {
-    if (xe[i].u.u.type == kXquartzDeactivate)
-      DarwinReleaseModifiers();
-    QuartzProcessEvent(&xe[i]);
+	switch(xe[i].u.u.type) {
+		case kXquartzControllerNotify:
+            DEBUG_LOG("kXquartzControllerNotify\n");
+            AppleWMSendEvent(AppleWMControllerNotify,
+                             AppleWMControllerNotifyMask,
+                             xe[i].u.clientMessage.u.l.longs0,
+                             xe[i].u.clientMessage.u.l.longs1);
+            break;
+
+        case kXquartzPasteboardNotify:
+            DEBUG_LOG("kXquartzPasteboardNotify\n");
+            AppleWMSendEvent(AppleWMPasteboardNotify,
+                             AppleWMPasteboardNotifyMask,
+                             xe[i].u.clientMessage.u.l.longs0,
+                             xe[i].u.clientMessage.u.l.longs1);
+            break;
+
+        case kXquartzActivate:
+            DEBUG_LOG("kXquartzActivate\n");
+            QuartzShow(xe[i].u.keyButtonPointer.rootX,
+                       xe[i].u.keyButtonPointer.rootY);
+            AppleWMSendEvent(AppleWMActivationNotify,
+                             AppleWMActivationNotifyMask,
+                             AppleWMIsActive, 0);
+            break;
+
+        case kXquartzDeactivate:
+            DEBUG_LOG("kXquartzDeactivate\n");
+      		DarwinReleaseModifiers();
+            AppleWMSendEvent(AppleWMActivationNotify,
+                             AppleWMActivationNotifyMask,
+                             AppleWMIsInactive, 0);
+            QuartzHide();
+            break;
+
+        case kXquartzWindowState:
+            DEBUG_LOG("kXquartzWindowState\n");
+            RootlessNativeWindowStateChanged(xe[i].u.clientMessage.u.l.longs0,
+                                             xe[i].u.clientMessage.u.l.longs1);
+            break;
+
+        case kXquartzWindowMoved:
+            DEBUG_LOG("kXquartzWindowMoved\n");
+            RootlessNativeWindowMoved ((WindowPtr)xe[i].u.clientMessage.u.l.longs0);
+            break;
+
+        case kXquartzToggleFullscreen:
+            DEBUG_LOG("kXquartzToggleFullscreen\n");
+#ifdef DARWIN_DDX_MISSING
+            if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot);
+            else if (quartzHasRoot) QuartzHide();
+            else QuartzShow();
+#else
+    //      ErrorF("kXquartzToggleFullscreen not implemented\n");               
+#endif
+            break;
+
+        case kXquartzSetRootless:
+            DEBUG_LOG("kXquartzSetRootless\n");
+#ifdef DARWIN_DDX_MISSING
+            QuartzSetRootless(xe[i].u.clientMessage.u.l.longs0);
+            if (!quartzEnableRootless && !quartzHasRoot) QuartzHide();
+#else
+    //      ErrorF("kXquartzSetRootless not implemented\n");                    
+#endif
+            break;
+
+        case kXquartzSetRootClip:
+            QuartzSetRootClip((BOOL)xe[i].u.clientMessage.u.l.longs0);
+		     break;
+
+        case kXquartzQuit:
+            GiveUp(0);
+            break;
+
+        case kXquartzBringAllToFront:
+     	    DEBUG_LOG("kXquartzBringAllToFront\n");
+            RootlessOrderAllWindows();
+            break;
+
+		case kXquartzSpaceChanged:
+            DEBUG_LOG("kXquartzSpaceChanged\n");
+            QuartzSpaceChanged(xe[i].u.clientMessage.u.l.longs0);
+
+            break;
+        default:
+            ErrorF("Unknown application defined event type %d.\n", xe[i].u.u.type);
+		}	
   }
 }
 
@@ -199,14 +293,14 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
     mieqSetHandler(kXquartzDeactivate, DarwinEventHandler);
     mieqSetHandler(kXquartzSetRootClip, DarwinEventHandler);
     mieqSetHandler(kXquartzQuit, DarwinEventHandler);
-    mieqSetHandler(kXquartzReadPasteboard, DarwinEventHandler);
-    mieqSetHandler(kXquartzWritePasteboard, DarwinEventHandler);
+    mieqSetHandler(kXquartzReadPasteboard, QuartzReadPasteboard);
+	mieqSetHandler(kXquartzWritePasteboard, QuartzWritePasteboard);
     mieqSetHandler(kXquartzToggleFullscreen, DarwinEventHandler);
     mieqSetHandler(kXquartzSetRootless, DarwinEventHandler);
     mieqSetHandler(kXquartzSpaceChanged, DarwinEventHandler);
     mieqSetHandler(kXquartzControllerNotify, DarwinEventHandler);
     mieqSetHandler(kXquartzPasteboardNotify, DarwinEventHandler);
-    mieqSetHandler(kXquartzDisplayChanged, DarwinEventHandler);
+    mieqSetHandler(kXquartzDisplayChanged, QuartzDisplayChangedHandler);
     mieqSetHandler(kXquartzWindowState, DarwinEventHandler);
     mieqSetHandler(kXquartzWindowMoved, DarwinEventHandler);
 
diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c
index 8d1ee8e..355d9f0 100644
--- a/hw/xquartz/darwinKeyboard.c
+++ b/hw/xquartz/darwinKeyboard.c
@@ -730,6 +730,14 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
  *  it to an equivalent X keyboard map and modifier map.
  */
 static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) {
+  void* callstack[128];
+  int i, frames = backtrace(callstack, 128);
+  char** strs = backtrace_symbols(callstack, frames);
+  for (i = 0; i < frames; ++i) {
+    ErrorF("%s\n", strs[i]);
+  }
+  free(strs);
+
     memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap));
 
     /* TODO: Clean this up
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index ec211cf..a65bd37 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -232,17 +232,17 @@ RREditConnectionInfo (ScreenPtr pScreen)
 #endif
 
 /*
- * QuartzUpdateScreens
+ * QuartzDisplayChangeHandler
  *  Adjust for screen arrangement changes.
  */
-static void QuartzUpdateScreens(void)
+void QuartzDisplayChangedHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents)
 {
     ScreenPtr pScreen;
     WindowPtr pRoot;
     int x, y, width, height, sx, sy;
     xEvent e;
 
-    DEBUG_LOG("QuartzUpdateScreens()\n");
+    DEBUG_LOG("QuartzDisplayChangedHandler()\n");
     if (noPseudoramiXExtension || screenInfo.numScreens != 1)
     {
         /* FIXME: if not using Xinerama, we have multiple screens, and
@@ -308,7 +308,7 @@ static void QuartzUpdateScreens(void)
  *  Calls mode specific screen resume to restore the X clip regions
  *  (if needed) and the X server cursor state.
  */
-static void QuartzShow(
+void QuartzShow(
     int x,      // cursor location
     int y )
 {
@@ -331,7 +331,7 @@ static void QuartzShow(
  *  hidden. Calls mode specific screen suspend to set X clip regions to
  *  prevent drawing (if needed) and restore the Aqua cursor.
  */
-static void QuartzHide(void)
+void QuartzHide(void)
 {
     int i;
 
@@ -350,7 +350,7 @@ static void QuartzHide(void)
  * QuartzSetRootClip
  *  Enable or disable rendering to the X screen.
  */
-static void QuartzSetRootClip(
+void QuartzSetRootClip(
     BOOL enable)
 {
     int i;
@@ -369,7 +369,7 @@ static void QuartzSetRootClip(
  * QuartzSpaceChanged
  *  Unmap offscreen windows, map onscreen windows
  */
-static void QuartzSpaceChanged(uint32_t space_id) {
+void QuartzSpaceChanged(uint32_t space_id) {
     /* Do something special here, so we don't depend on quartz-wm for spaces to work... */
     DEBUG_LOG("Space Changed (%u) ... do something interesting...\n", space_id);
 }
@@ -404,112 +404,3 @@ QuartzMessageServerThread(
 
     mieqEnqueue(NULL, &xe);
 }
-
-
-/*
- * QuartzProcessEvent
- *  Process Quartz specific events.
- */
-void QuartzProcessEvent(xEvent *xe) {
-    switch (xe->u.u.type) {
-        case kXquartzControllerNotify:
-            DEBUG_LOG("kXquartzControllerNotify\n");
-            AppleWMSendEvent(AppleWMControllerNotify,
-                             AppleWMControllerNotifyMask,
-                             xe->u.clientMessage.u.l.longs0,
-                             xe->u.clientMessage.u.l.longs1);
-            break;
-
-        case kXquartzPasteboardNotify:
-            DEBUG_LOG("kXquartzPasteboardNotify\n");
-            AppleWMSendEvent(AppleWMPasteboardNotify,
-                             AppleWMPasteboardNotifyMask,
-                             xe->u.clientMessage.u.l.longs0,
-                             xe->u.clientMessage.u.l.longs1);
-            break;
-
-        case kXquartzActivate:
-            DEBUG_LOG("kXquartzActivate\n");
-            QuartzShow(xe->u.keyButtonPointer.rootX,
-                       xe->u.keyButtonPointer.rootY);
-            AppleWMSendEvent(AppleWMActivationNotify,
-                             AppleWMActivationNotifyMask,
-                             AppleWMIsActive, 0);
-            break;
-
-        case kXquartzDeactivate:
-            DEBUG_LOG("kXquartzDeactivate\n");
-            AppleWMSendEvent(AppleWMActivationNotify,
-                             AppleWMActivationNotifyMask,
-                             AppleWMIsInactive, 0);
-            QuartzHide();
-            break;
-
-        case kXquartzDisplayChanged:
-            DEBUG_LOG("kXquartzDisplayChanged\n");
-            QuartzUpdateScreens();
-            break;
-
-        case kXquartzWindowState:
-            DEBUG_LOG("kXquartzWindowState\n");
-            RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0,
-		  			     xe->u.clientMessage.u.l.longs1);
-	    break;
-	  
-        case kXquartzWindowMoved:
-            DEBUG_LOG("kXquartzWindowMoved\n");
-            RootlessNativeWindowMoved ((WindowPtr)xe->u.clientMessage.u.l.longs0);
-	    break;
-
-        case kXquartzToggleFullscreen:
-            DEBUG_LOG("kXquartzToggleFullscreen\n");
-#ifdef DARWIN_DDX_MISSING
-            if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot);
-            else if (quartzHasRoot) QuartzHide();
-            else QuartzShow();
-#else
-    //	    ErrorF("kXquartzToggleFullscreen not implemented\n");
-#endif
-            break;
-
-        case kXquartzSetRootless:
-            DEBUG_LOG("kXquartzSetRootless\n");
-#ifdef DARWIN_DDX_MISSING
-            QuartzSetRootless(xe->u.clientMessage.u.l.longs0);
-            if (!quartzEnableRootless && !quartzHasRoot) QuartzHide();
-#else
-    //	    ErrorF("kXquartzSetRootless not implemented\n");
-#endif
-            break;
-
-        case kXquartzSetRootClip:
-            QuartzSetRootClip((BOOL)xe->u.clientMessage.u.l.longs0);
-            break;
-
-        case kXquartzQuit:
-            GiveUp(0);
-            break;
-
-#if 0
-        case kXquartzReadPasteboard:
-            QuartzReadPasteboard();
-            break;
-
-        case kXquartzWritePasteboard:
-            QuartzWritePasteboard();
-            break;
-#endif
-
-        case kXquartzBringAllToFront:
-            DEBUG_LOG("kXquartzBringAllToFront\n");
-            RootlessOrderAllWindows();
-            break;
-
-        case kXquartzSpaceChanged:
-            DEBUG_LOG("kXquartzSpaceChanged\n");
-            QuartzSpaceChanged(xe->u.clientMessage.u.l.longs0);
-            break;
-        default:
-            ErrorF("Unknown application defined event type %d.\n", xe->u.u.type);
-    }
-}
diff --git a/hw/xquartz/quartz.h b/hw/xquartz/quartz.h
index fbe308a..ffe06f9 100644
--- a/hw/xquartz/quartz.h
+++ b/hw/xquartz/quartz.h
@@ -130,5 +130,5 @@ void QuartzInitOutput(int argc,char **argv);
 void QuartzInitInput(int argc, char **argv);
 void QuartzGiveUp(void);
 void QuartzProcessEvent(xEvent *xe);
-
+void QuartzDisplayChangedHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents);
 #endif
commit 985c631b2e1f113039e6e620f030505435fd9815
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 20:18:58 2008 -0700

    just a bit of juggling headers around -- we're preparing
    to call our Xquartz-specific event handlers directly
    as mieqHandlers
    (cherry picked from commit 4aedba5aa727e22316e8ca456f7218bea9ee0313)

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 8f2511d..002ea41 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -880,7 +880,7 @@ void AbortDDX( void )
  */
 
 void
-xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
+xf86SetRootClip (ScreenPtr pScreen, int enable)
 {
     WindowPtr	pWin = WindowTable[pScreen->myNum];
     WindowPtr	pChild;
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 9384b9d..8c3cabb 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -54,7 +54,7 @@ typedef struct {
 void DarwinPrintBanner(void);
 int DarwinParseModifierList(const char *constmodifiers);
 void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
-void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
+void xf86SetRootClip (ScreenPtr pScreen, int enable);
 
 #define SCREEN_PRIV(pScreen) ((DarwinFramebufferPtr) \
     dixLookupPrivate(&pScreen->devPrivates, darwinScreenKey))
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 5dfdeeb..ec211cf 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -33,6 +33,7 @@
 #endif
 
 #include "quartzCommon.h"
+#include "inputstr.h"
 #include "quartz.h"
 #include "darwin.h"
 #include "darwinEvents.h"
@@ -489,6 +490,7 @@ void QuartzProcessEvent(xEvent *xe) {
             GiveUp(0);
             break;
 
+#if 0
         case kXquartzReadPasteboard:
             QuartzReadPasteboard();
             break;
@@ -496,6 +498,7 @@ void QuartzProcessEvent(xEvent *xe) {
         case kXquartzWritePasteboard:
             QuartzWritePasteboard();
             break;
+#endif
 
         case kXquartzBringAllToFront:
             DEBUG_LOG("kXquartzBringAllToFront\n");
diff --git a/hw/xquartz/quartzCocoa.m b/hw/xquartz/quartzCocoa.m
index 53e3f08..d8f9c69 100644
--- a/hw/xquartz/quartzCocoa.m
+++ b/hw/xquartz/quartzCocoa.m
@@ -37,13 +37,14 @@
 #endif
 
 #include "quartzCommon.h"
+#include "inputstr.h"
 #include "quartzPasteboard.h"
 
 #define BOOL xBOOL
 #include "darwin.h"
-#undef BOOL
 
 #include <Cocoa/Cocoa.h>
+#undef BOOL
 
 #include "pseudoramiX.h"
 
diff --git a/hw/xquartz/quartzPasteboard.c b/hw/xquartz/quartzPasteboard.c
index 0bf84f5..d47047c 100644
--- a/hw/xquartz/quartzPasteboard.c
+++ b/hw/xquartz/quartzPasteboard.c
@@ -34,6 +34,8 @@
 #include <dix-config.h>
 #endif
 
+#include "misc.h"
+#include "inputstr.h"
 #include "quartzPasteboard.h"
 
 #include <X11/Xatom.h>
@@ -76,8 +78,8 @@ static char * QuartzReadCutBuffer(void)
 }
 
 // Write X cut buffer to Mac OS X pasteboard
-// Called by ProcessInputEvents() in response to request from X server thread.
-void QuartzWritePasteboard(void)
+// Called by mieqProcessInputEvents() in response to request from X server thread.
+void QuartzWritePasteboard(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents)
 {
     char *text;
     text = QuartzReadCutBuffer();
@@ -90,8 +92,8 @@ void QuartzWritePasteboard(void)
 #define strequal(a, b) (0 == strcmp((a), (b)))
 
 // Read Mac OS X pasteboard into X cut buffer
-// Called by ProcessInputEvents() in response to request from X server thread.
-void QuartzReadPasteboard(void)
+// Called by mieqProcessInputEvents() in response to request from X server thread.
+void QuartzReadPasteboard(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents)
 {
     char *oldText = QuartzReadCutBuffer();
     char *text = QuartzReadCocoaPasteboard();
diff --git a/hw/xquartz/quartzPasteboard.h b/hw/xquartz/quartzPasteboard.h
index d6a8ee8..b51cd88 100644
--- a/hw/xquartz/quartzPasteboard.h
+++ b/hw/xquartz/quartzPasteboard.h
@@ -34,11 +34,11 @@
 #define _QUARTZPASTEBOARD_H
 
 // Aqua->X 
-void QuartzReadPasteboard(void);
+void QuartzReadPasteboard(int, xEventPtr, DeviceIntPtr, int);
 char * QuartzReadCocoaPasteboard(void);	// caller must free string
 
 // X->Aqua
-void QuartzWritePasteboard(void);
+void QuartzWritePasteboard(int, xEventPtr, DeviceIntPtr, int);
 void QuartzWriteCocoaPasteboard(char *text);
 
 #endif	/* _QUARTZPASTEBOARD_H */
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index b653a6e..5e14473 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -32,6 +32,7 @@
 #endif
 
 #include "quartzCommon.h"
+#include "inputstr.h"
 #include "quartz.h"
 #include "xpr.h"
 #include "pseudoramiX.h"
commit 89f1d880e83e32b72d35c4dbd6795defa6efa847
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 19:47:28 2008 -0700

    nuke DarwinEventQueue
    (cherry picked from commit 1e0ec02202eeaffae480048b91bf02140ee29f8a)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 5b037d2..230050f 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -56,28 +56,10 @@ in this Software without prior written authorization from The Open Group.
 #define SCROLLWHEELUPFAKE   4
 #define SCROLLWHEELDOWNFAKE 5
 
-#define QUEUE_SIZE 256
-
-typedef struct _Event {
-    xEvent      event;
-    ScreenPtr   pScreen;
-} EventRec, *EventPtr;
-
 int input_check_zero, input_check_flag;
 
 static int old_flags = 0;  // last known modifier state
 
-typedef struct _EventQueue {
-    HWEventQueueType    head, tail; /* long for SetInputCheck */
-    CARD32      lastEventTime;      /* to avoid time running backwards */
-    Bool        lastMotion;
-    EventRec    events[QUEUE_SIZE]; /* static allocation for signals */
-    DevicePtr   pKbd, pPtr;         /* device pointer, to get funcs */
-    ScreenPtr   pEnqueueScreen;     /* screen events are being delivered to */
-    ScreenPtr   pDequeueScreen;     /* screen events are being dispatched to */
-} EventQueueRec, *EventQueuePtr;
-
-static EventQueueRec darwinEventQueue;
 xEvent *darwinEvents = NULL;
 
 /*
@@ -231,21 +213,6 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
     return TRUE;
 }
 
-
-/*
- * DarwinEQEnqueue
- *  Must be thread safe with ProcessInputEvents.
- *    DarwinEQEnqueue    - called from event gathering thread
- *    ProcessInputEvents - called from X server thread
- *  DarwinEQEnqueue should never be called from more than one thread.
- * 
- * This should be deprecated in favor of miEQEnqueue -- BB
- */
-void DarwinEQEnqueue(const xEventPtr e) {
-  mieqEnqueue(NULL, e);
-  DarwinPokeEQ();
-}
-
 /*
  * ProcessInputEvents
  *  Read and process events from the event queue until it is empty.
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 971c9b2..5dfdeeb 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -401,7 +401,7 @@ QuartzMessageServerThread(
         va_end (args);
     }
 
-    DarwinEQEnqueue(&xe);
+    mieqEnqueue(NULL, &xe);
 }
 
 
commit 8944b77ec0c18476a25ba3179bcc45b338be22b8
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Apr 2 17:47:42 2008 -0700

    continue with gutting darwinEvents.c
    (cherry picked from commit c34fce7051b996633291dddc061b696ff737f3fb)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 46f5675..5b037d2 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -78,7 +78,7 @@ typedef struct _EventQueue {
 } EventQueueRec, *EventQueuePtr;
 
 static EventQueueRec darwinEventQueue;
-xEvent *darwinEvents;
+xEvent *darwinEvents = NULL;
 
 /*
  * DarwinPressModifierMask
@@ -207,8 +207,11 @@ void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int neven
 }
 
 Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) { 
+    if (!darwinEvents)
+        darwinEvents = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
+    if (!darwinEvents)
+        FatalError("Couldn't allocate event buffer\n");
 
-    darwinEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum());
     mieqInit();
     mieqSetHandler(kXquartzActivate, DarwinEventHandler);
     mieqSetHandler(kXquartzDeactivate, DarwinEventHandler);
@@ -225,13 +228,6 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
     mieqSetHandler(kXquartzWindowState, DarwinEventHandler);
     mieqSetHandler(kXquartzWindowMoved, DarwinEventHandler);
 
-    darwinEventQueue.head = darwinEventQueue.tail = 0;
-    darwinEventQueue.lastEventTime = GetTimeInMillis ();
-    darwinEventQueue.pKbd = pKbd;
-    darwinEventQueue.pPtr = pPtr;
-    darwinEventQueue.pEnqueueScreen = screenInfo.screens[0];
-    darwinEventQueue.pDequeueScreen = darwinEventQueue.pEnqueueScreen;
-    SetInputCheck(&input_check_zero, &input_check_flag);
     return TRUE;
 }
 
@@ -255,8 +251,6 @@ void DarwinEQEnqueue(const xEventPtr e) {
  *  Read and process events from the event queue until it is empty.
  */
 void ProcessInputEvents(void) {
-    EventRec *e;
-    int     x, y;
     xEvent  xe;
     // button number and modifier mask of currently pressed fake button
     input_check_flag=0;
@@ -265,92 +259,11 @@ void ProcessInputEvents(void) {
     mieqProcessInputEvents();
 
     // Empty the signaling pipe
-    x = sizeof(xe);
-    while (x == sizeof(xe)) 
-        x = read(darwinEventReadFD, &xe, sizeof(xe));
-
-    while (darwinEventQueue.head != darwinEventQueue.tail)
-    {
-        if (screenIsSaved == SCREEN_SAVER_ON)
-            dixSaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
-
-        e = &darwinEventQueue.events[darwinEventQueue.head];
-        xe = e->event;
-
-        // Shift from global screen coordinates to coordinates relative to
-        // the origin of the current screen.
-        xe.u.keyButtonPointer.rootX -= darwinMainScreenX +
-                dixScreenOrigins[miPointerCurrentScreen()->myNum].x;
-        xe.u.keyButtonPointer.rootY -= darwinMainScreenY +
-                dixScreenOrigins[miPointerCurrentScreen()->myNum].y;
-	
-	/*	ErrorF("old rootX = (%d,%d) darwinMainScreen = (%d,%d) dixScreenOrigins[%d]=(%d,%d)\n",
-	       xe.u.keyButtonPointer.rootX, xe.u.keyButtonPointer.rootY,
-	       darwinMainScreenX, darwinMainScreenY,
-	       miPointerCurrentScreen()->myNum,
-	       dixScreenOrigins[miPointerCurrentScreen()->myNum].x,
-	       dixScreenOrigins[miPointerCurrentScreen()->myNum].y); */
-
-	//Assumption - screen switching can only occur on motion events
-
-        if (e->pScreen != darwinEventQueue.pDequeueScreen)
-        {
-            darwinEventQueue.pDequeueScreen = e->pScreen;
-            x = xe.u.keyButtonPointer.rootX;
-            y = xe.u.keyButtonPointer.rootY;
-            if (darwinEventQueue.head == QUEUE_SIZE - 1)
-                darwinEventQueue.head = 0;
-            else
-                ++darwinEventQueue.head;
-            NewCurrentScreen (darwinEventQueue.pDequeueScreen, x, y);
-        }
-        else
-        {
-            if (darwinEventQueue.head == QUEUE_SIZE - 1)
-                darwinEventQueue.head = 0;
-            else
-                ++darwinEventQueue.head;
-            switch (xe.u.u.type) {
-            case KeyPress:
-            case KeyRelease:
-	      ErrorF("Unexpected Keyboard event in DarwinProcessInputEvents\n");
-	      break;
-
-            case ButtonPress:
-	      ErrorF("Unexpected ButtonPress event in DarwinProcessInputEvents\n");
-                break;
-
-            case ButtonRelease:
-	      ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
-                break;
-
-            case MotionNotify:
-	      ErrorF("Unexpected MotionNotify event in DarwinProcessInputEvents\n");
-                break;
-
-            case kXquartzUpdateModifiers:
-	      ErrorF("Unexpected kXquartzUpdateModifiers event in DarwinProcessInputEvents\n");
-	      break;
-
-            case kXquartzUpdateButtons:
-	      ErrorF("Unexpected kXquartzUpdateButtons event in DarwinProcessInputEvents\n");
-	      break;
-
-            case kXquartzScrollWheel: 
-	      ErrorF("Unexpected kXquartzScrollWheel event in DarwinProcessInputEvents\n");
-	      break;
-
-			case kXquartzDeactivate:
-				DarwinReleaseModifiers();
-				// fall through
-            default:
-                // Check for mode specific event
-                QuartzProcessEvent(&xe);
-            }
-        }
+    int x = sizeof(xe);
+    while (x == sizeof(xe)) {
+      DEBUG_LOG("draining pipe\n");
+      x = read(darwinEventReadFD, &xe, sizeof(xe));
     }
-
-    //    miPointerUpdate();
 }
 
 /* Sends a null byte down darwinEventWriteFD, which will cause the
@@ -368,6 +281,10 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
   static int darwinFakeMouseButtonMask = 0;
   int i, num_events;
 
+	if(!darwinEvents) {
+		ErrorF("DarwinSendPointerEvents called before darwinEvents was initialized\n");
+		return;
+	}
   /* I can't find a spec for this, but at least GTK expects that tablets are
      just like mice, except they have either one or three extra valuators, in this
      order:
@@ -421,6 +338,11 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 
 void DarwinSendKeyboardEvents(int ev_type, int keycode) {
   int i, num_events;
+	if(!darwinEvents) {
+		ErrorF("DarwinSendKeyboardEvents called before darwinEvents was initialized\n");
+		return;
+	}
+
   if (old_flags == 0 && darwinSyncKeymap && darwinKeymapFile == NULL) {
     /* See if keymap has changed. */
 
@@ -447,6 +369,11 @@ void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y,
 		      tilt_x * INT32_MAX * 1.0f, 
 		      tilt_y * INT32_MAX * 1.0f};
 
+  if(!darwinEvents) {
+		ErrorF("DarwinSendProximityvents called before darwinEvents was initialized\n");
+		return;
+}
+
   num_events = GetProximityEvents(darwinEvents, darwinPointer, ev_type,
 				0, 5, valuators);
       
@@ -465,6 +392,11 @@ void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y,
 		      tilt_x * INT32_MAX * 1.0f, 
 		      tilt_y * INT32_MAX * 1.0f};
 
+	if(!darwinEvents) {
+		ErrorF("DarwinSendScrollEvents called before darwinEvents was initialized\n");
+		return;
+	}
+
   for (count = fabs(count); count > 0.0; count = count - 1.0f) {
     int num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonPress, ev_button, 
 				      POINTER_ABSOLUTE, 0, 5, valuators);
commit aa6d12e93e8661da841192ef7c3aa7c6a7731c7f
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Apr 2 17:46:59 2008 -0700

    turns out we weren't actually using these files. oops
    (cherry picked from commit bfec44d7b4baf0ad0aae55c8209bc60ac93c5b58)

diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 99d23eb..0753824 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -50,8 +50,6 @@ EXTRA_DIST = \
 	quartz.h \
 	quartzAudio.h \
 	quartzCommon.h \
-	quartzCursor.c \
-	quartzCursor.h \
 	quartzForeground.h \
 	quartzKeyboard.h \
 	quartzPasteboard.h
diff --git a/hw/xquartz/quartzCursor.c b/hw/xquartz/quartzCursor.c
deleted file mode 100644
index 10e671a..0000000
--- a/hw/xquartz/quartzCursor.c
+++ /dev/null
@@ -1,646 +0,0 @@
-/**************************************************************
- *
- * Support for using the Quartz Window Manager cursor
- *
- * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker.
- *                 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 ABOVE LISTED COPYRIGHT HOLDER(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(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "quartzCommon.h"
-#include "quartzCursor.h"
-#include "darwin.h"
-
-#include <pthread.h>
-
-#include "mi.h"
-#include "scrnintstr.h"
-#include "cursorstr.h"
-#include "mipointrst.h"
-#include "globals.h"
-
-// Size of the QuickDraw cursor
-#define CURSORWIDTH 16
-#define CURSORHEIGHT 16
-
-typedef struct {
-    int                     qdCursorMode;
-    int                     qdCursorVisible;
-    int                     useQDCursor;
-    QueryBestSizeProcPtr    QueryBestSize;
-    miPointerSpriteFuncPtr  spriteFuncs;
-} QuartzCursorScreenRec, *QuartzCursorScreenPtr;
-
-static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey;
-static CursorPtr quartzLatentCursor = NULL;
-static QD_Cursor gQDArrow; // QuickDraw arrow cursor
-
-// Cursor for the main thread to set (NULL = arrow cursor).
-static CCrsrHandle currentCursor = NULL;
-static pthread_mutex_t cursorMutex;
-static pthread_cond_t cursorCondition;
-
-#define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \
-    dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey))
-
-#define HIDE_QD_CURSOR(pScreen, visible)                                \
-    if (visible) {                                                      \
-        int ix;                                                         \
-        for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) {   \
-            CGDisplayHideCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]);  \
-        }                                                               \
-        visible = FALSE;                                                \
-    } ((void)0)
-
-#define SHOW_QD_CURSOR(pScreen, visible)                                \
-    {                                                                   \
-        int ix;                                                         \
-        for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) {   \
-            CGDisplayShowCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]);  \
-        }                                                               \
-        visible = TRUE;                                                 \
-    } ((void)0)
-
-#define CHANGE_QD_CURSOR(cursorH)                                       \
-    if (!quartzServerQuitting) {                                        \
-        /* Acquire lock and tell the main thread to change cursor */    \
-        pthread_mutex_lock(&cursorMutex);                               \
-        currentCursor = (CCrsrHandle) (cursorH);                        \
-        QuartzMessageMainThread(kQuartzCursorUpdate, NULL, 0);          \
-                                                                        \
-        /* Wait for the main thread to change the cursor */             \
-        pthread_cond_wait(&cursorCondition, &cursorMutex);              \
-        pthread_mutex_unlock(&cursorMutex);                             \
-    } ((void)0)
-
-
-/*
- * MakeQDCursor helpers: CTAB_ENTER, interleave
- */
-
-// Add a color entry to a ctab
-#define CTAB_ENTER(ctab, index, r, g, b)                                \
-    ctab->ctTable[index].value = index;                                 \
-    ctab->ctTable[index].rgb.red = r;                                   \
-    ctab->ctTable[index].rgb.green = g;                                 \
-    ctab->ctTable[index].rgb.blue = b
-
-// Make an unsigned short by interleaving the bits of bytes c1 and c2.
-// High bit of c1 is first; low bit of c2 is last.
-// Interleave is a built-in INTERCAL operator.
-static unsigned short
-interleave(
-    unsigned char c1,
-    unsigned char c2 )
-{
-    return
-        ((c1 & 0x80) << 8) | ((c2 & 0x80) << 7) |
-        ((c1 & 0x40) << 7) | ((c2 & 0x40) << 6) |
-        ((c1 & 0x20) << 6) | ((c2 & 0x20) << 5) |
-        ((c1 & 0x10) << 5) | ((c2 & 0x10) << 4) |
-        ((c1 & 0x08) << 4) | ((c2 & 0x08) << 3) |
-        ((c1 & 0x04) << 3) | ((c2 & 0x04) << 2) |
-        ((c1 & 0x02) << 2) | ((c2 & 0x02) << 1) |
-        ((c1 & 0x01) << 1) | ((c2 & 0x01) << 0) ;
-}
-
-/*
- * MakeQDCursor
- * Make a QuickDraw color cursor from the given X11 cursor.
- * Warning: This code is nasty. Color cursors were meant to be read
- * from resources; constructing the structures programmatically is messy.
- */
-/*
-    QuickDraw cursor representation:
-    Our color cursor is a 2 bit per pixel pixmap.
-    Each pixel's bits are (source<<1 | mask) from the original X cursor pixel.
-    The cursor's color table maps the colors like this:
-    (2-bit value | X result    | colortable | Mac result)
-             00  | transparent | white      | transparent (white outside mask)
-             01  | back color  | back color | back color
-             10  | undefined   | black      | invert background (just for fun)
-             11  | fore color  | fore color | fore color
-*/
-static CCrsrHandle
-MakeQDCursor(
-    CursorPtr pCursor )
-{
-    CCrsrHandle result;
-    CCrsrPtr curs;
-    int i, w, h;
-    unsigned short rowMask;
-    PixMap *pix;
-    ColorTable *ctab;
-    unsigned short *image;
-
-    result = (CCrsrHandle) NewHandleClear(sizeof(CCrsr));
-    if (!result) return NULL;
-    HLock((Handle)result);
-    curs = *result;
-
-    // Initialize CCrsr
-    curs->crsrType = 0x8001;     // 0x8000 = b&w, 0x8001 = color
-    curs->crsrMap = (PixMapHandle) NewHandleClear(sizeof(PixMap));
-    if (!curs->crsrMap) goto pixAllocFailed;
-    HLock((Handle)curs->crsrMap);
-    pix = *curs->crsrMap;
-    curs->crsrData = NULL;       // raw cursor image data (set below)
-    curs->crsrXData = NULL;      // QD's processed data
-    curs->crsrXValid = 0;        // zero means QD must re-process cursor data
-    curs->crsrXHandle = NULL;    // reserved
-    memset(curs->crsr1Data, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w data
-    memset(curs->crsrMask,  0, CURSORWIDTH*CURSORHEIGHT/8); // b&w & color mask
-    curs->crsrHotSpot.h = min(CURSORWIDTH,  pCursor->bits->xhot); // hot spot
-    curs->crsrHotSpot.v = min(CURSORHEIGHT, pCursor->bits->yhot); // hot spot
-    curs->crsrXTable = 0;        // reserved
-    curs->crsrID = GetCTSeed();  // unique ID from Color Manager
-
-    // Set the b&w data and mask
-    w = min(pCursor->bits->width,  CURSORWIDTH);
-    h = min(pCursor->bits->height, CURSORHEIGHT);
-    rowMask = ~((1 << (CURSORWIDTH - w)) - 1);
-    for (i = 0; i < h; i++) {
-        curs->crsr1Data[i] = rowMask &
-        ((pCursor->bits->source[i*4]<<8) | pCursor->bits->source[i*4+1]);
-        curs->crsrMask[i] = rowMask &
-        ((pCursor->bits->mask[i*4]<<8)   | pCursor->bits->mask[i*4+1]);
-    }
-
-    // Set the color data and mask
-    // crsrMap: defines bit depth and size and colortable only
-    pix->rowBytes = (CURSORWIDTH * 2 / 8) | 0x8000; // last bit on means PixMap
-    SetRect(&pix->bounds, 0, 0, CURSORWIDTH, CURSORHEIGHT); // see TN 1020
-    pix->pixelSize = 2;
-    pix->cmpCount = 1;
-    pix->cmpSize = 2;
-    // pix->pmTable set below
-
-    // crsrData is the pixel data. crsrMap's baseAddr is not used.
-    curs->crsrData = NewHandleClear(CURSORWIDTH*CURSORHEIGHT * 2 / 8);
-    if (!curs->crsrData) goto imageAllocFailed;
-    HLock((Handle)curs->crsrData);
-    image = (unsigned short *) *curs->crsrData;
-    // Pixel data is just 1-bit data and mask interleaved (see above)
-    for (i = 0; i < h; i++) {
-        unsigned char s, m;
-        s = pCursor->bits->source[i*4] & (rowMask >> 8);
-        m = pCursor->bits->mask[i*4] & (rowMask >> 8);
-        image[2*i] = interleave(s, m);
-        s = pCursor->bits->source[i*4+1] & (rowMask & 0x00ff);
-        m = pCursor->bits->mask[i*4+1] & (rowMask & 0x00ff);
-        image[2*i+1] = interleave(s, m);
-    }
-
-    // Build the color table (entries described above)
-    // NewPixMap allocates a color table handle.
-    pix->pmTable = (CTabHandle) NewHandleClear(sizeof(ColorTable) + 3
-                    * sizeof(ColorSpec));
-    if (!pix->pmTable) goto ctabAllocFailed;
-    HLock((Handle)pix->pmTable);
-    ctab = *pix->pmTable;
-    ctab->ctSeed = GetCTSeed();
-    ctab->ctFlags = 0;
-    ctab->ctSize = 3; // color count - 1
-    CTAB_ENTER(ctab, 0, 0xffff, 0xffff, 0xffff);
-    CTAB_ENTER(ctab, 1, pCursor->backRed, pCursor->backGreen,
-               pCursor->backBlue);
-    CTAB_ENTER(ctab, 2, 0x0000, 0x0000, 0x0000);
-    CTAB_ENTER(ctab, 3, pCursor->foreRed, pCursor->foreGreen,
-               pCursor->foreBlue);
-
-    HUnlock((Handle)pix->pmTable); // ctab
-    HUnlock((Handle)curs->crsrData); // image data
-    HUnlock((Handle)curs->crsrMap); // pix
-    HUnlock((Handle)result); // cursor
-
-    return result;
-
-    // "What we have here is a failure to allocate"
-ctabAllocFailed:
-    HUnlock((Handle)curs->crsrData);
-    DisposeHandle((Handle)curs->crsrData);
-imageAllocFailed:
-    HUnlock((Handle)curs->crsrMap);
-    DisposeHandle((Handle)curs->crsrMap);
-pixAllocFailed:
-    HUnlock((Handle)result);
-    DisposeHandle((Handle)result);
-    return NULL;
-}
-
-
-/*
- * FreeQDCursor
- * Destroy a QuickDraw color cursor created with MakeQDCursor().
- * The cursor must not currently be on screen.
- */
-static void FreeQDCursor(CCrsrHandle cursHandle)
-{
-    CCrsrPtr curs;
-    PixMap *pix;
-
-    HLock((Handle)cursHandle);
-    curs = *cursHandle;
-    HLock((Handle)curs->crsrMap);
-    pix = *curs->crsrMap;
-    DisposeHandle((Handle)pix->pmTable);
-    HUnlock((Handle)curs->crsrMap);
-    DisposeHandle((Handle)curs->crsrMap);
-    DisposeHandle((Handle)curs->crsrData);
-    HUnlock((Handle)cursHandle);
-    DisposeHandle((Handle)cursHandle);
-}
-
-
-/*
-===========================================================================
-
- Pointer sprite functions
-
-===========================================================================
-*/
-
-/*
- * QuartzRealizeCursor
- * Convert the X cursor representation to QuickDraw format if possible.
- */
-Bool
-QuartzRealizeCursor(
-    ScreenPtr pScreen,
-    CursorPtr pCursor )
-{
-    CCrsrHandle qdCursor;
-    QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
-    if(!pCursor || !pCursor->bits)
-        return FALSE;
-
-    // if the cursor is too big we use a software cursor
-    if ((pCursor->bits->height > CURSORHEIGHT) ||
-        (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor)
-    {
-        if (quartzRootless) {
-            // rootless can't use a software cursor
-            return TRUE;
-        } else {
-            return (*ScreenPriv->spriteFuncs->RealizeCursor)
-                        (pScreen, pCursor);
-        }
-    }
-
-    // make new cursor image
-    qdCursor = MakeQDCursor(pCursor);
-    if (!qdCursor) return FALSE;
-
-    // save the result
-    dixSetPrivate(&pCursor->devPrivates, pScreen, qdCursor);
-
-    return TRUE;
-}
-
-
-/*
- * QuartzUnrealizeCursor
- * Free the storage space associated with a realized cursor.
- */
-Bool
-QuartzUnrealizeCursor(
-    ScreenPtr pScreen,
-    CursorPtr pCursor )
-{
-    QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
-    if ((pCursor->bits->height > CURSORHEIGHT) ||
-        (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor)
-    {
-        if (quartzRootless) {
-            return TRUE;
-        } else {
-            return (*ScreenPriv->spriteFuncs->UnrealizeCursor)
-                        (pScreen, pCursor);
-        }
-    } else {
-        CCrsrHandle oldCursor = dixLookupPrivate(&pCursor->devPrivates,
-						 pScreen);
-        if (currentCursor != oldCursor) {
-            // This should only fail when quitting, in which case we just leak.
-            FreeQDCursor(oldCursor);
-        }
-	dixSetPrivate(&pCursor->devPrivates, pScreen, NULL);
-        return TRUE;
-    }
-}
-
-
-/*
- * QuartzSetCursor
- * Set the cursor sprite and position.
- * Use QuickDraw cursor if possible.
- */
-static void
-QuartzSetCursor(
-    ScreenPtr       pScreen,
-    CursorPtr       pCursor,
-    int             x,
-    int             y)
-{
-    QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
-    quartzLatentCursor = pCursor;
-
-    // Don't touch Mac OS cursor if X is hidden!
-    if (!quartzServerVisible)
-        return;
-
-    if (!pCursor) {
-        // Remove the cursor completely.
-        HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
-        if (! ScreenPriv->qdCursorMode)
-            (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
-    }
-    else if ((pCursor->bits->height <= CURSORHEIGHT) &&
-             (pCursor->bits->width <= CURSORWIDTH) && ScreenPriv->useQDCursor)
-    {
-        // Cursor is small enough to use QuickDraw directly.
-        if (! ScreenPriv->qdCursorMode)    // remove the X cursor
-            (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
-        ScreenPriv->qdCursorMode = TRUE;
-
-        CHANGE_QD_CURSOR(dixLookupPrivate(&pCursor->devPrivates, pScreen));
-        SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
-    }
-    else if (quartzRootless) {
-        // Rootless can't use a software cursor, so we just use Mac OS arrow.
-        CHANGE_QD_CURSOR(NULL);
-        SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
-    }
-    else {
-        // Cursor is too big for QuickDraw. Use X software cursor.
-        HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
-        ScreenPriv->qdCursorMode = FALSE;
-        (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y);
-    }
-}
-
-
-/*
- * QuartzReallySetCursor
- * Set the QuickDraw cursor. Called from the main thread since changing the
- * cursor with QuickDraw is not thread safe on dual processor machines.
- */
-void
-QuartzReallySetCursor()
-{
-    pthread_mutex_lock(&cursorMutex);
-
-    if (currentCursor) {
-        SetCCursor(currentCursor);
-    } else {
-        SetCursor(&gQDArrow);
-    }
-
-    pthread_cond_signal(&cursorCondition);
-    pthread_mutex_unlock(&cursorMutex);
-}
-
-
-/*
- * QuartzMoveCursor
- * Move the cursor. This is a noop for QuickDraw.
- */
-static void
-QuartzMoveCursor(
-    ScreenPtr   pScreen,
-    int         x,
-    int         y)
-{
-    QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
-    // only the X cursor needs to be explicitly moved
-    if (!ScreenPriv->qdCursorMode)
-        (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y);
-}
-
-
-static miPointerSpriteFuncRec quartzSpriteFuncsRec = {
-    QuartzRealizeCursor,
-    QuartzUnrealizeCursor,
-    QuartzSetCursor,
-    QuartzMoveCursor
-};
-
-
-/*
-===========================================================================
-
- Pointer screen functions
-
-===========================================================================
-*/
-
-/*
- * QuartzCursorOffScreen
- */
-static Bool QuartzCursorOffScreen(ScreenPtr *pScreen, int *x, int *y)
-{
-    return FALSE;
-}
-
-
-/*
- * QuartzCrossScreen
- */
-static void QuartzCrossScreen(ScreenPtr pScreen, Bool entering)
-{
-    return;
-}
-
-
-/*
- * QuartzWarpCursor
- *  Change the cursor position without generating an event or motion history.
- *  The input coordinates (x,y) are in pScreen-local X11 coordinates.
- *
- */
-static void
-QuartzWarpCursor(
-    ScreenPtr               pScreen,
-    int                     x,
-    int                     y)
-{
-    static int              neverMoved = TRUE;
-
-    if (neverMoved) {
-        // Don't move the cursor the first time. This is the jump-to-center
-        // initialization, and it's annoying because we may still be in MacOS.
-        neverMoved = FALSE;
-        return;
-    }
-
-    if (quartzServerVisible) {
-        CGDisplayErr        cgErr;
-        CGPoint             cgPoint;
-        // Only need to do this for one display. Any display will do.
-        CGDirectDisplayID   cgID = QUARTZ_PRIV(pScreen)->displayIDs[0];
-        CGRect              cgRect = CGDisplayBounds(cgID);
-
-        // Convert (x,y) to CoreGraphics screen-local CG coordinates.
-        // This is necessary because the X11 screen and CG screen may not
-        // coincide. (e.g. X11 screen may be moved to dodge the menu bar)
-
-        // Make point in X11 global coordinates
-        cgPoint = CGPointMake(x + dixScreenOrigins[pScreen->myNum].x,
-                              y + dixScreenOrigins[pScreen->myNum].y);
-        // Shift to CoreGraphics global screen coordinates
-        cgPoint.x += darwinMainScreenX;
-        cgPoint.y += darwinMainScreenY;
-        // Shift to CoreGraphics screen-local coordinates
-        cgPoint.x -= cgRect.origin.x;
-        cgPoint.y -= cgRect.origin.y;
-
-        cgErr = CGDisplayMoveCursorToPoint(cgID, cgPoint);
-        if (cgErr != CGDisplayNoErr) {
-            ErrorF("Could not set cursor position with error code 0x%x.\n",
-                    cgErr);
-        }
-    }
-
-    miPointerWarpCursor(pScreen, x, y);
-    miPointerUpdate();
-}
-
-
-static miPointerScreenFuncRec quartzScreenFuncsRec = {
-    QuartzCursorOffScreen,
-    QuartzCrossScreen,
-    QuartzWarpCursor,
-    NULL,
-    NULL 
-};
-
-
-/*
-===========================================================================
-
- Other screen functions
-
-===========================================================================
-*/
-
-/*
- * QuartzCursorQueryBestSize
- * Handle queries for best cursor size
- */
-static void
-QuartzCursorQueryBestSize(
-   int              class,
-   unsigned short   *width,
-   unsigned short   *height,
-   ScreenPtr        pScreen)
-{
-    QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
-    if (class == CursorShape) {
-        *width = CURSORWIDTH;
-        *height = CURSORHEIGHT;
-    } else {
-        (*ScreenPriv->QueryBestSize)(class, width, height, pScreen);
-    }
-}
-
-
-/*
- * QuartzInitCursor
- * Initialize cursor support
- */
-Bool
-QuartzInitCursor(
-    ScreenPtr   pScreen )
-{
-    QuartzCursorScreenPtr   ScreenPriv;
-    miPointerScreenPtr      PointPriv;
-    DarwinFramebufferPtr    dfb = SCREEN_PRIV(pScreen);
-
-    // initialize software cursor handling (always needed as backup)
-    if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) {
-        return FALSE;
-    }
-
-    ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) );
-    if (!ScreenPriv) return FALSE;
-
-    CURSOR_PRIV(pScreen) = ScreenPriv;
-
-    // override some screen procedures
-    ScreenPriv->QueryBestSize = pScreen->QueryBestSize;
-    pScreen->QueryBestSize = QuartzCursorQueryBestSize;
-
-    // initialize QuickDraw cursor handling
-    GetQDGlobalsArrow(&gQDArrow);
-    PointPriv = (miPointerScreenPtr)
-	dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
-
-    ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
-    PointPriv->spriteFuncs = &quartzSpriteFuncsRec;
-
-    if (!quartzRootless)
-        ScreenPriv->useQDCursor = QuartzFSUseQDCursor(dfb->colorBitsPerPixel);
-    else
-        ScreenPriv->useQDCursor = TRUE;
-    ScreenPriv->qdCursorMode = TRUE;
-    ScreenPriv->qdCursorVisible = TRUE;
-
-    // initialize cursor mutex lock
-    pthread_mutex_init(&cursorMutex, NULL);
-
-    // initialize condition for waiting
-    pthread_cond_init(&cursorCondition, NULL);
-
-    return TRUE;
-}
-
-
-// X server is hiding. Restore the Aqua cursor.
-void QuartzSuspendXCursor(
-    ScreenPtr pScreen )
-{
-    QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
-    CHANGE_QD_CURSOR(NULL);
-    SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
-}
-
-
-// X server is showing. Restore the X cursor.
-void QuartzResumeXCursor(
-    ScreenPtr pScreen,
-    int x,
-    int y )
-{
-    QuartzSetCursor(pScreen, quartzLatentCursor, x, y);
-}
diff --git a/hw/xquartz/quartzCursor.h b/hw/xquartz/quartzCursor.h
deleted file mode 100644
index 56a0209..0000000
--- a/hw/xquartz/quartzCursor.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * quartzCursor.h
- *
- * External interface for Quartz hardware cursor
- *
- * Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
- *                 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 ABOVE LISTED COPYRIGHT HOLDER(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(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifndef QUARTZCURSOR_H
-#define QUARTZCURSOR_H
-
-#include "screenint.h"
-
-Bool QuartzInitCursor(ScreenPtr pScreen);
-void QuartzReallySetCursor(void);
-void QuartzSuspendXCursor(ScreenPtr pScreen);
-void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y);
-
-#endif
commit 6c5962e44730395f81cdb333322c9ad5242c32d4
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 18:15:18 2008 -0700

    remove vestigal DarwinEQPointerPost etc
    (cherry picked from commit a25704c423598d596fd7f2ed4290d4b860bd5d5f)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index f7b1419..46f5675 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -251,23 +251,6 @@ void DarwinEQEnqueue(const xEventPtr e) {
 }
 
 /*
- * DarwinEQPointerPost
- *  Post a pointer event. Used by the mipointer.c routines.
- */
-void DarwinEQPointerPost(DeviceIntPtr pdev, xEventPtr e) {
-    (*darwinEventQueue.pPtr->processInputProc)
-            (e, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
-}
-
-
-void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX) {
-    darwinEventQueue.pEnqueueScreen = pScreen;
-    if (fromDIX)
-        darwinEventQueue.pDequeueScreen = pScreen;
-}
-
-
-/*
  * ProcessInputEvents
  *  Read and process events from the event queue until it is empty.
  */
diff --git a/hw/xquartz/quartzCursor.c b/hw/xquartz/quartzCursor.c
index f82ccd3..10e671a 100644
--- a/hw/xquartz/quartzCursor.c
+++ b/hw/xquartz/quartzCursor.c
@@ -539,8 +539,8 @@ static miPointerScreenFuncRec quartzScreenFuncsRec = {
     QuartzCursorOffScreen,
     QuartzCrossScreen,
     QuartzWarpCursor,
-    DarwinEQPointerPost,
-    DarwinEQSwitchScreen
+    NULL,
+    NULL 
 };
 
 
diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c
index e084ef9..2ad8d6f 100644
--- a/hw/xquartz/xpr/xprCursor.c
+++ b/hw/xquartz/xpr/xprCursor.c
@@ -320,8 +320,8 @@ static miPointerScreenFuncRec quartzScreenFuncsRec = {
     QuartzCursorOffScreen,
     QuartzCrossScreen,
     QuartzWarpCursor,
-    DarwinEQPointerPost,
-    DarwinEQSwitchScreen
+    NULL,
+    NULL
 };
 
 
commit c6f0d5d1e51326e5110d27918d834eb0096df7db
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 17:48:09 2008 -0700

    gut darwinEQEnqueue, and make it just call mieqEnqueue (for the moment)
    (cherry picked from commit a9e081a60ca227c0d96d4613075d97d6b762366a)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index ce21ff5..f7b1419 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -199,7 +199,11 @@ void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int neven
   int i;
 
   DEBUG_LOG("DarwinEventHandler(%d, %p, %p, %d)\n", screenNum, xe, dev, nevents);
-  for (i=0; i<nevents; i++) QuartzProcessEvent(&xe[i]);
+  for (i=0; i<nevents; i++) {
+    if (xe[i].u.u.type == kXquartzDeactivate)
+      DarwinReleaseModifiers();
+    QuartzProcessEvent(&xe[i]);
+  }
 }
 
 Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) { 
@@ -242,40 +246,10 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
  * This should be deprecated in favor of miEQEnqueue -- BB
  */
 void DarwinEQEnqueue(const xEventPtr e) {
-    HWEventQueueType oldtail, newtail;
-
-    oldtail = darwinEventQueue.tail;
-
-    // mieqEnqueue() collapses successive motion events into one event.
-    // This is difficult to do in a thread-safe way and rarely useful.
-
-    newtail = oldtail + 1;
-    if (newtail == QUEUE_SIZE) newtail = 0;
-    /* Toss events which come in late */
-    if (newtail == darwinEventQueue.head) return;
-
-    darwinEventQueue.events[oldtail].event = *e;
-
-    /*
-     * Make sure that event times don't go backwards - this
-     * is "unnecessary", but very useful
-     */
-    if (e->u.keyButtonPointer.time < darwinEventQueue.lastEventTime &&
-        darwinEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000)
-    {
-        darwinEventQueue.events[oldtail].event.u.keyButtonPointer.time =
-        darwinEventQueue.lastEventTime;
-    }
-    darwinEventQueue.events[oldtail].pScreen = darwinEventQueue.pEnqueueScreen;
-
-    // Update the tail after the event is prepared
-    darwinEventQueue.tail = newtail;
-
-    // Signal there is an event ready to handle
-    DarwinPokeEQ();
+  mieqEnqueue(NULL, e);
+  DarwinPokeEQ();
 }
 
-
 /*
  * DarwinEQPointerPost
  *  Post a pointer event. Used by the mipointer.c routines.
commit 5b6c273eaa53d7b554d69c2b4865988068e73a26
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 17:08:45 2008 -0700

    add prototype for DarwinEventHandler
    (cherry picked from commit 9a03ae33c4f9de830f15eabf3b994882ead7c000)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index b4ff9fd..ce21ff5 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -204,8 +204,6 @@ void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int neven
 
 Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) { 
 
-  void mieqSetHandler(int event, mieqHandler handler);
-
     darwinEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum());
     mieqInit();
     mieqSetHandler(kXquartzActivate, DarwinEventHandler);
diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h
index 4960614..1d8e92a 100644
--- a/hw/xquartz/darwinEvents.h
+++ b/hw/xquartz/darwinEvents.h
@@ -41,4 +41,6 @@ void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y,
 			    float pressure, float tilt_x, float tilt_y);
 void DarwinUpdateModKeys(int flags);
 
+void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, 
+			int nevents);
 #endif  /* _DARWIN_EVENTS_H */
commit 3713be8b470b1ac0fcb4f1e4c6b79c526b2196db
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 16:30:16 2008 -0700

    add logging of current thread ID to DEBUG_LOG macro
    (cherry picked from commit 5848510cc5a8091b30230ab920d904ca6b159480)

diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index bd1b9a4..9384b9d 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -125,7 +125,7 @@ enum {
 #ifdef ENABLE_DEBUG_LOG
 extern FILE *debug_log_fp;
 #define DEBUG_LOG_NAME "x11-debug.txt"
-#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%s:%s:%d " msg, __FILE__, __FUNCTION__, __LINE__, ##args ); fflush(debug_log_fp);
+#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%x:%s:%s:%d " msg, pthread_self(), __FILE__, __FUNCTION__, __LINE__, ##args ); fflush(debug_log_fp);
 #else
 #define DEBUG_LOG(msg, args...) 
 #endif
commit 1400a51ae70d8e498d9ae3975f58ba7c1768ca6f
Author: Ben Byer <bbyer at apple.com>
Date:   Mon Mar 31 16:24:01 2008 -0700

    Begin to move all of our Xquartz DDX-specific event handlers
    to miEQ, in preparation to remove the DDX-specific code entirely.
    (cherry picked from commit 3f4447b95f73a82b3aa0f7b0d1640aba5fb0d1bc)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 2a28b1a..b4ff9fd 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -195,10 +195,34 @@ static void DarwinSimulateMouseClick(
     DarwinUpdateModifiers(KeyPress, modifierMask);
 }
 
+void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
+  int i;
+
+  DEBUG_LOG("DarwinEventHandler(%d, %p, %p, %d)\n", screenNum, xe, dev, nevents);
+  for (i=0; i<nevents; i++) QuartzProcessEvent(&xe[i]);
+}
 
 Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) { 
+
+  void mieqSetHandler(int event, mieqHandler handler);
+
     darwinEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum());
     mieqInit();
+    mieqSetHandler(kXquartzActivate, DarwinEventHandler);
+    mieqSetHandler(kXquartzDeactivate, DarwinEventHandler);
+    mieqSetHandler(kXquartzSetRootClip, DarwinEventHandler);
+    mieqSetHandler(kXquartzQuit, DarwinEventHandler);
+    mieqSetHandler(kXquartzReadPasteboard, DarwinEventHandler);
+    mieqSetHandler(kXquartzWritePasteboard, DarwinEventHandler);
+    mieqSetHandler(kXquartzToggleFullscreen, DarwinEventHandler);
+    mieqSetHandler(kXquartzSetRootless, DarwinEventHandler);
+    mieqSetHandler(kXquartzSpaceChanged, DarwinEventHandler);
+    mieqSetHandler(kXquartzControllerNotify, DarwinEventHandler);
+    mieqSetHandler(kXquartzPasteboardNotify, DarwinEventHandler);
+    mieqSetHandler(kXquartzDisplayChanged, DarwinEventHandler);
+    mieqSetHandler(kXquartzWindowState, DarwinEventHandler);
+    mieqSetHandler(kXquartzWindowMoved, DarwinEventHandler);
+
     darwinEventQueue.head = darwinEventQueue.tail = 0;
     darwinEventQueue.lastEventTime = GetTimeInMillis ();
     darwinEventQueue.pKbd = pKbd;
commit 8746daa6732d9837f66d925f2fd74818ecbf8ba2
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Apr 2 15:01:33 2008 -0700

    XQuartz: Fixed missing close-paren in preference pane text.
    (cherry picked from commit ea37e151dc6032d2a1a33cef809f2a7d507aae35)

diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
index 672ba90..c159d6e 100644
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
@@ -2,7 +2,7 @@
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
 	<data>
 		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">9C31</string>
+		<string key="IBDocument.SystemVersion">9C7010</string>
 		<string key="IBDocument.InterfaceBuilderVersion">639</string>
 		<string key="IBDocument.AppKitVersion">949.26</string>
 		<string key="IBDocument.HIToolboxVersion">352.00</string>
@@ -948,7 +948,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 												<object class="NSTextFieldCell" key="NSCell" id="989804990">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">When enabled, creation of a new X11 window will cause X11.app to move to the foreground (instead of Finder.app, Terminal.app, etc.</string>
+													<string key="NSContents">When enabled, creation of a new X11 window will cause X11.app to move to the foreground (instead of Finder.app, Terminal.app, etc.)</string>
 													<reference key="NSSupport" ref="26"/>
 													<reference key="NSControlView" ref="57161931"/>
 													<reference key="NSBackgroundColor" ref="57160303"/>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index 91a7c5a..95420e4 100644
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib differ
commit b5a0a865c3045cc08c33388320d4ec3ab7065efb
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Apr 2 19:21:41 2008 -0400

    Pick up dri2proto from the standard proto header include path.

diff --git a/configure.ac b/configure.ac
index e72e3b9..985c8e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -860,7 +860,7 @@ 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.0.0])
+	PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= 1.1])
 	PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.1])
 fi
 
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index d1d52a4..4ae0fda 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -37,12 +37,12 @@
 #define NEED_REPLIES
 #include <X11/X.h>
 #include <X11/Xproto.h>
+#include <X11/extensions/dri2proto.h>
 #include "dixstruct.h"
 #include "scrnintstr.h"
 #include "pixmapstr.h"
 #include "extnsionst.h"
 #include "xf86drm.h"
-#include "dri2proto.h"
 #include "dri2.h"
 
 /* The only xf86 include */
commit 8cde0af3c57f0375ba8ba77af9fdf74b79d9496d
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Apr 2 19:06:40 2008 -0400

    Send the GLX_EXT_texture_from_pixmap attributes to the client.

diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c
index 36aae61..dcd8352 100644
--- a/GL/glx/glxcmds.c
+++ b/GL/glx/glxcmds.c
@@ -959,7 +959,7 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
     return Success;
 }
 
-#define __GLX_TOTAL_FBCONFIG_ATTRIBS (28)
+#define __GLX_TOTAL_FBCONFIG_ATTRIBS (33)
 #define __GLX_FBCONFIG_ATTRIBS_LENGTH (__GLX_TOTAL_FBCONFIG_ATTRIBS * 2)
 /**
  * Send the set of GLXFBConfigs to the client.  There is not currently
@@ -1037,6 +1037,11 @@ DoGetFBConfigs(__GLXclientState *cl, unsigned screen)
 	WRITE_PAIR( GLX_TRANSPARENT_ALPHA_VALUE, modes->transparentAlpha );
 	WRITE_PAIR( GLX_TRANSPARENT_INDEX_VALUE, modes->transparentIndex );
 	WRITE_PAIR( GLX_SWAP_METHOD_OML, modes->swapMethod );
+	WRITE_PAIR( GLX_DRAWABLE_TYPE, modes->drawableType );
+	WRITE_PAIR( GLX_BIND_TO_TEXTURE_RGB_EXT, modes->bindToTextureRgb );
+	WRITE_PAIR( GLX_BIND_TO_TEXTURE_RGBA_EXT, modes->bindToTextureRgba );
+	WRITE_PAIR( GLX_BIND_TO_MIPMAP_TEXTURE_EXT, modes->bindToMipmapTexture );
+	WRITE_PAIR( GLX_BIND_TO_TEXTURE_TARGETS_EXT, modes->bindToTextureTargets );
 
 	if (client->swapped) {
 	    __GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH);
commit 7c20f65fea3dd3170cde89d7113d85f377671bfb
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Apr 2 18:00:06 2008 -0400

    Add @XORG_CFLAGS@ to satisfy xf86* includes.
    
    Pointed out by Hasso Tepper.

diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am
index 68f1eae..bee3152 100644
--- a/hw/xfree86/dri/Makefile.am
+++ b/hw/xfree86/dri/Makefile.am
@@ -7,7 +7,7 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
                    -I$(top_builddir)/GL/include \
 		   -I at MESA_SOURCE@/include \
                    -DHAVE_XORG_CONFIG_H \
-                   @DIX_CFLAGS@ @DRIPROTO_CFLAGS@ \
+                   @DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \
                    @LIBDRM_CFLAGS@ \
                    @GL_CFLAGS@
 libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@
diff --git a/hw/xfree86/dri2/Makefile.am b/hw/xfree86/dri2/Makefile.am
index 844c912..fd8962e 100644
--- a/hw/xfree86/dri2/Makefile.am
+++ b/hw/xfree86/dri2/Makefile.am
@@ -2,7 +2,7 @@ libdri2_la_LTLIBRARIES = libdri2.la
 libdri2_la_CFLAGS = \
 	-DHAVE_XORG_CONFIG_H \
 	-I at MESA_SOURCE@/include \
-	@DIX_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \
+	@DIX_CFLAGS@ @XORG_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \
 	-I$(top_srcdir)/hw/xfree86/common \
 	-I$(top_srcdir)/hw/xfree86/os-support/bus
 
commit b13ab156894074fb38cc812738bc7aeeebd9614d
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Apr 2 12:38:36 2008 -0400

    dri2: Unbreak glcore visual setup.

diff --git a/GL/glx/glxglcore.c b/GL/glx/glxglcore.c
index bbfa02b..972ab88 100644
--- a/GL/glx/glxglcore.c
+++ b/GL/glx/glxglcore.c
@@ -308,10 +308,9 @@ static const int glx_visual_types[] = {
 
 static __GLXconfig *
 createFBConfigsForVisual(__GLXscreen *screen, ScreenPtr pScreen,
-			 VisualPtr visual, __GLXconfig *tail)
+			 VisualPtr visual, __GLXconfig *config)
 {
     int back, depth, stencil;
-    __GLXconfig *config;
 
     /* FIXME: Ok, I'm making all this up... anybody has a better idea? */
 
@@ -347,7 +346,7 @@ createFBConfigsForVisual(__GLXscreen *screen, ScreenPtr pScreen,
 		config->indexBits = config->colorIndexMode ? visual->nplanes : 0;
 	    }
 
-    return tail;
+    return config;
 }
 
 static void
commit b31de6a59044f91f8230aa581c9ca8540289c168
Author: Xiang, Haihao <haihao.xiang at intel.com>
Date:   Wed Apr 2 16:29:30 2008 +1000

    dri2: fix crasher if DRI2Connect fails

diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index ca2e029..d1d52a4 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -114,7 +114,7 @@ ProcDRI2Connect(ClientPtr client)
     ScreenPtr pScreen;
     int fd;
     const char *driverName;
-    char *busId;
+    char *busId = NULL;
     unsigned int sareaHandle;
 
     REQUEST_SIZE_MATCH(xDRI2ConnectReq);
commit ebc56aca8bdfec1918cac3c8380895dfddea48ce
Author: Hong Liu <hong.liu at intel.com>
Date:   Wed Apr 2 10:43:19 2008 +0800

    Bug #15160: quirk Proview AY765C
    
    prefer first detailed timing

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 777bb70..f15c396 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -153,6 +153,11 @@ static Bool quirk_first_detailed_preferred (int scrnIndex, xf86MonPtr DDC)
 	DDC->vendor.prod_id == 57364)
 	return TRUE;
 
+    /* Proview AY765C 17" LCD. See bug #15160*/
+    if (memcmp (DDC->vendor.name, "PTS", 4) == 0 &&
+	DDC->vendor.prod_id == 765)
+	return TRUE;
+
     return FALSE;
 }
 
commit 9500033b9ecdfaf5a56a4355ffc94d74cb17ca17
Author: Goneri Le Bouder <goneri at rulezlan.org>
Date:   Tue Apr 1 20:19:40 2008 +0200

    xfree86: don't crash in AutoConfig if the primary device is not pci
    
    Only call matchDriverFromFiles() if we found a pci device.
    Debian bug#472823 (http://bugs.debian.org/472823).

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 268b50c..3210e44 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -436,9 +436,10 @@ chooseVideoDriver(void)
     if (!info) {
 	ErrorF("Primary device is not PCI\n");
     }
-
 #ifdef __linux__
-    matchDriverFromFiles(matches, info->vendor_id, info->device_id);
+    else {
+	matchDriverFromFiles(matches, info->vendor_id, info->device_id);
+    }
 #endif /* __linux__ */
 
     /* TODO Handle multiple drivers claiming to support the same PCI ID */
commit 37b1258f0a288a79ce6a3eef3559e17a67c4dd96
Author: Thomas Jaeger <thjaeger at gmail.com>
Date:   Tue Apr 1 15:27:06 2008 +0300

    XKB: Fix processInputProc wrapping
    
    If input processing is frozen, only wrap realInputProc: don't smash
    processInputProc as well.  When input processing is thawed, pIP will be
    rewrapped correctly.
    
    This supersedes the previous workaround in 50e80c9.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>

diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index ef99e94..040bb93 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -237,6 +237,14 @@ typedef struct	_XkbSrvLedInfo {
 typedef struct
 {
     ProcessInputProc processInputProc;
+    /* If processInputProc is set to something different than realInputProc,
+     * UNWRAP and COND_WRAP will not touch processInputProc and update only
+     * realInputProc.  This ensures that
+     *   processInputProc == (frozen ? EnqueueEvent : realInputProc)
+     *
+     * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
+     * since it may destroy this invariant.
+     */
     ProcessInputProc realInputProc;
     DeviceUnwrapProc unwrapProc;
 } xkbDeviceInfoRec, *xkbDeviceInfoPtr;
@@ -254,14 +262,14 @@ typedef struct
 	    device->public.processInputProc = proc; \
 	oldprocs->processInputProc = \
 	oldprocs->realInputProc = device->public.realInputProc; \
-	if (proc != device->public.enqueueInputProc) \
-		device->public.realInputProc = proc; \
+	device->public.realInputProc = proc; \
 	oldprocs->unwrapProc = device->unwrapProc; \
 	device->unwrapProc = unwrapproc;
 
 #define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
-        backupproc = device->public.processInputProc; \
-	device->public.processInputProc = oldprocs->processInputProc; \
+        backupproc = device->public.realInputProc; \
+	if (device->public.processInputProc == device->public.realInputProc)\
+	    device->public.processInputProc = oldprocs->realInputProc; \
 	device->public.realInputProc = oldprocs->realInputProc; \
 	device->unwrapProc = oldprocs->unwrapProc;
 
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 890cf42..8c72874 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -49,15 +49,14 @@ xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc,
                    pointer data)
 {
     xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(device);
-    ProcessInputProc tmp = device->public.processInputProc;
-    ProcessInputProc dummy; /* unused, but neede for macro */
+    ProcessInputProc backupproc;
     if(xkbPrivPtr->unwrapProc)
 	xkbPrivPtr->unwrapProc = NULL;
 
-    UNWRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, dummy);
+    UNWRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, backupproc);
     proc(device,data);
-    WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr,
-			    tmp,xkbUnwrapProc);
+    COND_WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr,
+				 backupproc,xkbUnwrapProc);
 }
 
 
commit a4d034941100c6ca3b7cc4e59952c2745b9306cc
Author: Ben Byer <bbyer at bushing.apple.com>
Date:   Fri Mar 28 20:47:44 2008 -0700

    Add code to track 5 valuators for pointing device, in preparation
    for supporting tablet input in Xquartz.
    (cherry picked from commit 22c8849ea819eb70a14b2e06330b11b22aa63ebc)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 31c80df..147b4b4 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -61,7 +61,7 @@ int X11EnableKeyEquivalents = TRUE;
 int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
 
 extern int darwinFakeButtons, input_check_flag;
-extern Bool enable_stereo; 
+extern Bool enable_stereo;
 
 extern xEvent *darwinEvents;
 
@@ -153,7 +153,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 	
     tem = [infoDict objectForKey:@"CFBundleShortVersionString"];
 	
-    [dict setObject:[NSString stringWithFormat:@"Xquartz %@ - (xorg-server %s)", tem, XSERVER_VERSION] 
+    [dict setObject:[NSString stringWithFormat:@"XQuartz %@ - (xorg-server %s)", tem, XSERVER_VERSION]
 	  forKey:@"ApplicationVersion"];
 	
     [self orderFrontStandardAboutPanelWithOptions: dict];
@@ -501,7 +501,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
   
   if (value != NULL
       && CFGetTypeID (value) == CFNumberGetTypeID ()
-      && CFNumberIsFloatType (value)) 
+      && CFNumberIsFloatType (value))
     CFNumberGetValue (value, kCFNumberFloatType, &ret);
   else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
     ret = CFStringGetDoubleValue (value);
@@ -862,7 +862,9 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
     NSRect screen;
     NSPoint location;
     NSWindow *window;
-    int pointer_x, pointer_y, ev_button, ev_type; 
+    int pointer_x, pointer_y, ev_button, ev_type;
+    float pressure, tilt_x, tilt_y;
+
     //    int num_events=0, i=0, state;
     // xEvent xe;
 	
@@ -884,6 +886,10 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
     pointer_y -= aquaMenuBarHeight;
     //    state = convert_flags ([e modifierFlags]);
     
+    pressure = 0;  // for tablets
+    tilt_x = 0;
+    tilt_y = 0;
+
     switch (type) {
     case NSLeftMouseDown:    ev_button=1; ev_type=ButtonPress; goto handle_mouse;
     case NSOtherMouseDown:   ev_button=2; ev_type=ButtonPress; goto handle_mouse;
@@ -894,6 +900,10 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
     case NSLeftMouseDragged:  ev_button=1; ev_type=MotionNotify; goto handle_mouse;
     case NSOtherMouseDragged: ev_button=2; ev_type=MotionNotify; goto handle_mouse;
     case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto handle_mouse;
+    case NSTabletPoint:
+      pressure = [e pressure];
+      tilt_x = [e tilt].x;
+      tilt_y = [e tilt].y; // fall through
     case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
     handle_mouse:
       
@@ -907,10 +917,14 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
 	DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y);
       } else if (ev_type==ButtonRelease && (button_state & (1 << ev_button)) == 0) break;
       */
-      DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y);
+
+      //      if ([e subtype] == NSTabletPointEventSubtype) pressure = [e pressure];
+      DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y,
+			      pressure, tilt_x, tilt_y);
       break;
-    case NSScrollWheel: 
-      DarwinSendScrollEvents([e deltaY], pointer_x, pointer_y);
+    case NSScrollWheel:
+      DarwinSendScrollEvents([e deltaY], pointer_x, pointer_y,
+			     pressure, tilt_x, tilt_y);
       break;
       
     case NSKeyDown:  // do we need to translate these keyCodes?
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 113cfc1..2a28b1a 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -173,6 +173,9 @@ static void DarwinReleaseModifiers(void) {
 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
 {
@@ -183,8 +186,10 @@ static void DarwinSimulateMouseClick(
     DarwinUpdateModifiers(KeyRelease, modifierMask);
 
     // push the mouse button
-    DarwinSendPointerEvents(ButtonPress, whichButton, pointer_x, pointer_y);
-    DarwinSendPointerEvents(ButtonRelease, whichButton, pointer_x, pointer_y);
+    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);
@@ -378,22 +383,39 @@ void DarwinPokeEQ(void) {
   write(darwinEventWriteFD, &nullbyte, 1);
 }
 
-void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y) {
+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;
-  int valuators[2] = {pointer_x, pointer_y};
+
+  /* I can't find a spec for this, but at least GTK expects that tablets are
+     just like mice, except they have either one or three extra valuators, in this
+     order:
+     
+     X coord, Y coord, pressure, X tilt, Y tilt
+     Pressure and tilt should be represented natively as floats; unfortunately,
+     we can't do that.  Again, GTK seems to record the min/max of each valuator,
+     and then perform scaling back to float itself using that info. Soo.... */
+
+  int valuators[5] = {pointer_x, pointer_y, 
+		      pressure * INT32_MAX * 1.0f, 
+		      tilt_x * INT32_MAX * 1.0f, 
+		      tilt_y * INT32_MAX * 1.0f};
+
   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, 2, darwinFakeMouse2Mask);
+      DarwinSimulateMouseClick(pointer_x, pointer_y, pressure, 
+			       tilt_x, tilt_y, 2, darwinFakeMouse2Mask);
       darwinFakeMouseButtonDown = 2;
       darwinFakeMouseButtonMask = darwinFakeMouse2Mask;
       return;
     } else if ((old_flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) {
-      DarwinSimulateMouseClick(pointer_x, pointer_y, 3, darwinFakeMouse3Mask);
+      DarwinSimulateMouseClick(pointer_x, pointer_y, pressure, 
+			       tilt_x, tilt_y, 3, darwinFakeMouse3Mask);
       darwinFakeMouseButtonDown = 3;
       darwinFakeMouseButtonMask = darwinFakeMouse3Mask;
       return;
@@ -412,7 +434,7 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
   } 
 
   num_events = GetPointerEvents(darwinEvents, darwinPointer, ev_type, ev_button, 
-				POINTER_ABSOLUTE, 0, 2, valuators);
+				POINTER_ABSOLUTE, 0, 5, valuators);
       
   for(i=0; i<num_events; i++) mieqEnqueue (darwinPointer,&darwinEvents[i]);
   DarwinPokeEQ();
@@ -438,18 +460,38 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
   DarwinPokeEQ();
 }
 
+void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y, 
+			       float pressure, float tilt_x, float tilt_y) {
+  int i, num_events;
+  int valuators[5] = {pointer_x, pointer_y, 
+		      pressure * INT32_MAX * 1.0f, 
+		      tilt_x * INT32_MAX * 1.0f, 
+		      tilt_y * INT32_MAX * 1.0f};
+
+  num_events = GetProximityEvents(darwinEvents, darwinPointer, ev_type,
+				0, 5, valuators);
+      
+  for(i=0; i<num_events; i++) mieqEnqueue (darwinPointer,&darwinEvents[i]);
+  DarwinPokeEQ();
+}
+
+
 /* Send the appropriate number of button 4 / 5 clicks to emulate scroll wheel */
-void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y) {
+void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y, 
+			    float pressure, float tilt_x, float tilt_y) {
   int i;
   int ev_button = count > 0.0f ? 4 : 5;
-  int valuators[2] = {pointer_x, pointer_y};
+  int valuators[5] = {pointer_x, pointer_y, 
+		      pressure * INT32_MAX * 1.0f, 
+		      tilt_x * INT32_MAX * 1.0f, 
+		      tilt_y * INT32_MAX * 1.0f};
 
   for (count = fabs(count); count > 0.0; count = count - 1.0f) {
     int num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonPress, ev_button, 
-				      POINTER_ABSOLUTE, 0, 2, valuators);
+				      POINTER_ABSOLUTE, 0, 5, valuators);
     for(i=0; i<num_events; i++) mieqEnqueue(darwinPointer,&darwinEvents[i]);
     num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonRelease, ev_button, 
-				      POINTER_ABSOLUTE, 0, 2, valuators);
+				      POINTER_ABSOLUTE, 0, 5, valuators);
     for(i=0; i<num_events; i++) mieqEnqueue(darwinPointer,&darwinEvents[i]);
   }
   DarwinPokeEQ();
diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h
index 82cc26b..4960614 100644
--- a/hw/xquartz/darwinEvents.h
+++ b/hw/xquartz/darwinEvents.h
@@ -32,9 +32,13 @@ void DarwinEQEnqueue(const xEventPtr e);
 void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr e);
 void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
 void DarwinPokeEQ(void);
-void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y);
+void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y,
+			     float pressure, float tilt_x, float tilt_y);
+void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y, 
+			       float pressure, float tilt_x, float tilt_y);
 void DarwinSendKeyboardEvents(int ev_type, int keycode);
-void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y);
+void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y,
+			    float pressure, float tilt_x, float tilt_y);
 void DarwinUpdateModKeys(int flags);
 
 #endif  /* _DARWIN_EVENTS_H */
commit 6648867d8bd1e86458d2ade77a3ee4567c3d6a97
Author: Ben Byer <bbyer at bushing.apple.com>
Date:   Fri Mar 28 18:27:02 2008 -0700

    add debug statements so we can see if/when our Xinput stubs are getting called.
    (cherry picked from commit 6e160bbe15dd2c2b8685847c06831cb6aebc6f74)

diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c
index 50ba656..59bae6f 100644
--- a/hw/xquartz/darwinXinput.c
+++ b/hw/xquartz/darwinXinput.c
@@ -62,6 +62,7 @@ SOFTWARE.
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "XIstubs.h"
+#include "darwin.h"
 
 /***********************************************************************
  *
@@ -79,6 +80,7 @@ SOFTWARE.
 void
 CloseInputDevice(DeviceIntPtr d, ClientPtr client)
 {
+  DEBUG_LOG("CloseInputDevice(%p, %p)\n", d, client);
 }
 
 /***********************************************************************
@@ -122,7 +124,7 @@ AddOtherInputDevices(void)
     RegisterOtherDevice(dev);
     dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success);
     ************************************************************************/
-
+  DEBUG_LOG("AddOtherInputDevices\n");
 }
 
 /***********************************************************************
@@ -150,6 +152,7 @@ AddOtherInputDevices(void)
 void
 OpenInputDevice(DeviceIntPtr dev, ClientPtr client, int *status)
 {
+  DEBUG_LOG("OpenInputDevice(%p, %p, %p)\n", dev, client, status);
 }
 
 /****************************************************************************
@@ -167,6 +170,7 @@ OpenInputDevice(DeviceIntPtr dev, ClientPtr client, int *status)
 int
 SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode)
 {
+  DEBUG_LOG("SetDeviceMode(%p, %p, %d)\n", client, dev, mode);
     return BadMatch;
 }
 
@@ -186,7 +190,9 @@ int
 SetDeviceValuators(ClientPtr client, DeviceIntPtr dev,
 		   int *valuators, int first_valuator, int num_valuators)
 {
-    return BadMatch;
+  DEBUG_LOG("SetDeviceValuators(%p, %p, %p, %d, %d)\n", client,
+	    dev, valuators, first_valuator, num_valuators);
+  return BadMatch;
 }
 
 /****************************************************************************
@@ -201,6 +207,8 @@ int
 ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev,
 		    xDeviceCtl * control)
 {
+
+  DEBUG_LOG("ChangeDeviceControl(%p, %p, %p)\n", client, dev, control);
     switch (control->control) {
     case DEVICE_RESOLUTION:
 	return (BadMatch);
@@ -225,7 +233,8 @@ ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev,
 int
 NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
 {
-    return BadValue;
+  DEBUG_LOG("NewInputDeviceRequest(%p, %p)\n", options, pdev);
+  return BadValue;
 }
 
 /****************************************************************************
@@ -238,4 +247,5 @@ NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
 void
 DeleteInputDeviceRequest(DeviceIntPtr dev)
 {
+  DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev);
 }
commit 19ff23ab0e72a27d05ed4470f75a0934d6f6c1d1
Author: Ben Byer <bbyer at bushing.apple.com>
Date:   Fri Mar 28 18:25:03 2008 -0700

    Remove calls to InitValuatorAxisStruct -- these are now handled in dix by
    InitValuatorDeviceClass.
    Add InitProximityClassDeviceStruct call to prepare for tablet support.
    (cherry picked from commit 1bd980a5b114f5320360943214f8f9f23b29c1e3)

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 0dbfafe..8f2511d 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -353,24 +353,8 @@ static int DarwinMouseProc(
             InitPointerDeviceStruct( (DevicePtr)pPointer, map, 5,
 				     GetMotionHistory,
 				     (PtrCtrlProcPtr)NoopDDA,
-				     GetMotionHistorySize(), 2);
-
-#ifdef XINPUT
-            InitValuatorAxisStruct( pPointer,
-                                    0,     // X axis
-                                    0,     // min value
-                                    16000, // max value (fixme screen size?)
-                                    1,     // resolution (fixme ?)
-                                    1,     // min resolution
-                                    1 );   // max resolution
-            InitValuatorAxisStruct( pPointer,
-                                    1,     // X axis
-                                    0,     // min value
-                                    16000, // max value (fixme screen size?)
-                                    1,     // resolution (fixme ?)
-                                    1,     // min resolution
-                                    1 );   // max resolution
-#endif
+				     GetMotionHistorySize(), 5);
+	    InitProximityClassDeviceStruct( (DevicePtr)pPointer);
             break;
 
         case DEVICE_ON:
commit 9f56fc580646a519875b5a1452738d8c6e1fa860
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Mon Mar 31 17:34:07 2008 -0400

    XSELinux: Add a request to get a client's context from a resource ID.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 2e059a4..1e3b4d6 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -1473,6 +1473,24 @@ ProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey)
 }
 
 static int
+ProcSELinuxGetClientContext(ClientPtr client)
+{
+    ClientPtr target;
+    SELinuxSubjectRec *subj;
+    int rc;
+
+    REQUEST(SELinuxGetContextReq);
+    REQUEST_SIZE_MATCH(SELinuxGetContextReq);
+
+    rc = dixLookupClient(&target, stuff->id, client, DixGetAttrAccess);
+    if (rc != Success)
+	return rc;
+
+    subj = dixLookupPrivate(&target->devPrivates, subjectKey);
+    return SELinuxSendContextReply(client, subj->sid);
+}
+
+static int
 SELinuxPopulateItem(SELinuxListItemRec *i, PrivateRec **privPtr, CARD32 id,
 		    int *size)
 {
@@ -1686,6 +1704,8 @@ ProcSELinuxDispatch(ClientPtr client)
 	return ProcSELinuxGetSelectionContext(client, dataKey);
     case X_SELinuxListSelections:
 	return ProcSELinuxListSelections(client);
+    case X_SELinuxGetClientContext:
+	return ProcSELinuxGetClientContext(client);
     default:
 	return BadRequest;
     }
@@ -1783,6 +1803,17 @@ SProcSELinuxListProperties(ClientPtr client)
 }
 
 static int
+SProcSELinuxGetClientContext(ClientPtr client)
+{
+    REQUEST(SELinuxGetContextReq);
+    int n;
+
+    REQUEST_SIZE_MATCH(SELinuxGetContextReq);
+    swapl(&stuff->id, n);
+    return ProcSELinuxGetClientContext(client);
+}
+
+static int
 SProcSELinuxDispatch(ClientPtr client)
 {
     REQUEST(xReq);
@@ -1835,6 +1866,8 @@ SProcSELinuxDispatch(ClientPtr client)
 	return SProcSELinuxGetSelectionContext(client, dataKey);
     case X_SELinuxListSelections:
 	return ProcSELinuxListSelections(client);
+    case X_SELinuxGetClientContext:
+	return SProcSELinuxGetClientContext(client);
     default:
 	return BadRequest;
     }
diff --git a/Xext/xselinux.h b/Xext/xselinux.h
index 2d0de32..7c3ffdc 100644
--- a/Xext/xselinux.h
+++ b/Xext/xselinux.h
@@ -52,6 +52,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define X_SELinuxGetSelectionContext		19
 #define X_SELinuxGetSelectionDataContext	20
 #define X_SELinuxListSelections			21
+#define X_SELinuxGetClientContext		22
 
 typedef struct {
     CARD8   reqType;
commit c40e0b51f0d9ef5e1f30f233d7db1e6db9d6681b
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Mar 26 19:28:09 2008 -0400

    Implement DRI2 direct rendering and update AIGLX to DRI interface changes.
    
    Get rid of glcontextmodes.[ch] from build, rename __GlcontextModes to
    __GLXcontext.  Drop all #includes of glcontextmodes.h and glcore.h.
    Drop the DRI context modes extension.
    
    Add protocol code to DRI2 module and load DRI2 extension by default.

diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am
index 377d760..1d4719c 100644
--- a/GL/glx/Makefile.am
+++ b/GL/glx/Makefile.am
@@ -31,8 +31,6 @@ INCLUDES = \
 
 nodist_libglx_la_SOURCES = indirect_size.h \
 			   glapi.c \
-			   glcontextmodes.c \
-			   glcontextmode.h \
 			   glthread.c \
 			   indirect_dispatch.c \
 			   indirect_dispatch.h \
diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c
index 3b79cca..36aae61 100644
--- a/GL/glx/glxcmds.c
+++ b/GL/glx/glxcmds.c
@@ -50,7 +50,6 @@
 #include <windowstr.h>
 #include "glxutil.h"
 #include "glxext.h"
-#include "glcontextmodes.h"
 #include "glapitable.h"
 #include "glapi.h"
 #include "glthread.h"
@@ -83,9 +82,9 @@ validGlxScreen(ClientPtr client, int screen, __GLXscreen **pGlxScreen, int *err)
 
 static int
 validGlxFBConfig(ClientPtr client, __GLXscreen *pGlxScreen, XID id,
-		 __GLcontextModes **config, int *err)
+		 __GLXconfig **config, int *err)
 {
-    __GLcontextModes *m;
+    __GLXconfig *m;
 
     for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next)
 	if (m->fbconfigID == id) {
@@ -101,7 +100,7 @@ validGlxFBConfig(ClientPtr client, __GLXscreen *pGlxScreen, XID id,
 
 static int
 validGlxVisual(ClientPtr client, __GLXscreen *pGlxScreen, XID id,
-	       __GLcontextModes **config, int *err)
+	       __GLXconfig **config, int *err)
 {
     int i;
 
@@ -118,7 +117,7 @@ validGlxVisual(ClientPtr client, __GLXscreen *pGlxScreen, XID id,
 }
 
 static int
-validGlxFBConfigForWindow(ClientPtr client, __GLcontextModes *config,
+validGlxFBConfigForWindow(ClientPtr client, __GLXconfig *config,
 			  DrawablePtr pDraw, int *err)
 {
     ScreenPtr pScreen = pDraw->pScreen;
@@ -135,7 +134,7 @@ validGlxFBConfigForWindow(ClientPtr client, __GLcontextModes *config,
     }
 
     /* FIXME: What exactly should we check here... */
-    if (pVisual->class != _gl_convert_to_x_visual_type(config->visualType) ||
+    if (pVisual->class != glxConvertToXVisualType(config->visualType) ||
 	!(config->drawableType & GLX_WINDOW_BIT)) {
 	client->errorValue = pDraw->id;
 	*err = BadMatch;
@@ -161,7 +160,7 @@ static void __glXdirectContextDestroy(__GLXcontext *context)
 }
 
 static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen,
-					      __GLcontextModes *modes,
+					      __GLXconfig *modes,
 					      __GLXcontext *shareContext)
 {
     __GLXcontext *context;
@@ -186,7 +185,7 @@ static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen,
 
 static int
 DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
-		GLXContextID shareList, __GLcontextModes *config,
+		GLXContextID shareList, __GLXconfig *config,
 		__GLXscreen *pGlxScreen, GLboolean isDirect)
 {
     ClientPtr client = cl->client;
@@ -248,7 +247,7 @@ DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
     ** a GL core that needs windowing information (e.g., Mesa).
     */
     glxc->pGlxScreen = pGlxScreen;
-    glxc->modes = config;
+    glxc->config = config;
 
     /*
     ** Register this context as a resource.
@@ -276,7 +275,7 @@ DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
 int __glXDisp_CreateContext(__GLXclientState *cl, GLbyte *pc)
 {
     xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
-    __GLcontextModes *config;
+    __GLXconfig *config;
     __GLXscreen *pGlxScreen;
     int err;
 
@@ -292,7 +291,7 @@ int __glXDisp_CreateContext(__GLXclientState *cl, GLbyte *pc)
 int __glXDisp_CreateNewContext(__GLXclientState *cl, GLbyte *pc)
 {
     xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
-    __GLcontextModes *config;
+    __GLXconfig *config;
     __GLXscreen *pGlxScreen;
     int err;
 
@@ -309,7 +308,7 @@ int __glXDisp_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
 {
     xGLXCreateContextWithConfigSGIXReq *req = 
 	(xGLXCreateContextWithConfigSGIXReq *) pc;
-    __GLcontextModes *config;
+    __GLXconfig *config;
     __GLXscreen *pGlxScreen;
     int err;
 
@@ -462,7 +461,7 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
      * GLXPixmap and we just return the __GLXdrawable.  */
     pGlxDraw = (__GLXdrawable *) LookupIDByType(drawId, __glXDrawableRes);
     if (pGlxDraw != NULL) {
-	if (glxc != NULL && pGlxDraw->modes != glxc->modes) {
+	if (glxc != NULL && pGlxDraw->config != glxc->config) {
 	    client->errorValue = drawId;
 	    *error = BadMatch;
 	    return NULL;
@@ -497,12 +496,12 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
      * the context screen and that the context fbconfig is compatible
      * with the window visual. */
     if (pDraw->pScreen != glxc->pGlxScreen->pScreen ||
-	!validGlxFBConfigForWindow(client, glxc->modes, pDraw, error))
+	!validGlxFBConfigForWindow(client, glxc->config, pDraw, error))
 	return NULL;
 
     pGlxDraw = glxc->pGlxScreen->createDrawable(glxc->pGlxScreen,
 						pDraw, GLX_DRAWABLE_WINDOW,
-						drawId, glxc->modes);
+						drawId, glxc->config);
 
     /* since we are creating the drawablePrivate, drawId should be new */
     if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) {
@@ -878,7 +877,7 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
     ClientPtr client = cl->client;
     xGLXGetVisualConfigsReply reply;
     __GLXscreen *pGlxScreen;
-    __GLcontextModes *modes;
+    __GLXconfig *modes;
     CARD32 buf[__GLX_TOTAL_CONFIG];
     int p, i, err;
     __GLX_DECLARE_SWAP_VARIABLES;
@@ -907,7 +906,7 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
 
 	p = 0;
 	buf[p++] = modes->visualID;
-	buf[p++] = _gl_convert_to_x_visual_type( modes->visualType );
+	buf[p++] = glxConvertToXVisualType( modes->visualType );
 	buf[p++] = modes->rgbMode;
 
 	buf[p++] = modes->redBits;
@@ -980,7 +979,7 @@ DoGetFBConfigs(__GLXclientState *cl, unsigned screen)
     __GLXscreen *pGlxScreen;
     CARD32 buf[__GLX_FBCONFIG_ATTRIBS_LENGTH];
     int p, err;
-    __GLcontextModes *modes;
+    __GLXconfig *modes;
     __GLX_DECLARE_SWAP_VARIABLES;
     __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
 
@@ -1062,7 +1061,7 @@ int __glXDisp_GetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
 }
 
 static int 
-DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, __GLcontextModes *config,
+DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config,
 		    DrawablePtr pDraw, XID glxDrawableId, int type)
 {
     __GLXdrawable *pGlxDraw;
@@ -1086,7 +1085,7 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, __GLcontextModes
 }
 
 static int
-DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLcontextModes *config,
+DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config,
 		  XID drawableId, XID glxDrawableId)
 {
     DrawablePtr pDraw;
@@ -1144,7 +1143,7 @@ determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
 int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
 {
     xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
-    __GLcontextModes *config;
+    __GLXconfig *config;
     __GLXscreen *pGlxScreen;
     int err;
 
@@ -1160,7 +1159,7 @@ int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
 int __glXDisp_CreatePixmap(__GLXclientState *cl, GLbyte *pc)
 {
     xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
-    __GLcontextModes *config;
+    __GLXconfig *config;
     __GLXscreen *pGlxScreen;
     int err;
 
@@ -1184,7 +1183,7 @@ int __glXDisp_CreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
 {
     xGLXCreateGLXPixmapWithConfigSGIXReq *req = 
 	(xGLXCreateGLXPixmapWithConfigSGIXReq *) pc;
-    __GLcontextModes *config;
+    __GLXconfig *config;
     __GLXscreen *pGlxScreen;
     int err;
 
@@ -1246,7 +1245,7 @@ static int
 DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
 		int width, int height, XID glxDrawableId)
 {
-    __GLcontextModes	*config;
+    __GLXconfig	*config;
     __GLXscreen		*pGlxScreen;
     PixmapPtr		 pPixmap;
     int			 err;
@@ -1359,7 +1358,7 @@ int __glXDisp_ChangeDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc)
 int __glXDisp_CreateWindow(__GLXclientState *cl, GLbyte *pc)
 {
     xGLXCreateWindowReq	*req = (xGLXCreateWindowReq *) pc;
-    __GLcontextModes	*config;
+    __GLXconfig	*config;
     __GLXscreen		*pGlxScreen;
     ClientPtr		 client = cl->client;
     DrawablePtr		 pDraw;
@@ -1473,7 +1472,7 @@ DoQueryContext(__GLXclientState *cl, GLXContextID gcId)
     *pSendBuf++ = GLX_SHARE_CONTEXT_EXT;
     *pSendBuf++ = (int)(ctx->share_id);
     *pSendBuf++ = GLX_VISUAL_ID_EXT;
-    *pSendBuf++ = (int)(ctx->modes->visualID);
+    *pSendBuf++ = (int)(ctx->config->visualID);
     *pSendBuf++ = GLX_SCREEN_EXT;
     *pSendBuf++ = (int)(ctx->pGlxScreen->pScreen->myNum);
 
diff --git a/GL/glx/glxcontext.h b/GL/glx/glxcontext.h
index 4c36801..18d3c6f 100644
--- a/GL/glx/glxcontext.h
+++ b/GL/glx/glxcontext.h
@@ -40,8 +40,6 @@
 **
 */
 
-#include "GL/internal/glcore.h"
-
 typedef struct __GLXtextureFromPixmap __GLXtextureFromPixmap;
 struct __GLXtextureFromPixmap {
     int (*bindTexImage)		(__GLXcontext  *baseContext,
@@ -77,9 +75,9 @@ struct __GLXcontext {
     __GLXcontext *nextReadPriv;
 
     /*
-    ** mode struct for this context
+    ** config struct for this context
     */
-    __GLcontextModes *modes;
+    __GLXconfig *config;
 
     /*
     ** Pointer to screen info data for this context.  This is set
diff --git a/GL/glx/glxdrawable.h b/GL/glx/glxdrawable.h
index f62d1ee..98e301b 100644
--- a/GL/glx/glxdrawable.h
+++ b/GL/glx/glxdrawable.h
@@ -74,7 +74,7 @@ struct __GLXdrawable {
     /*
     ** Configuration of the visual to which this drawable was created.
     */
-    __GLcontextModes *modes;
+    __GLXconfig *config;
 
     /*
     ** Lists of contexts bound to this drawable.  There are two lists here.
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 1e17911..ffa9a0b 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -52,7 +52,6 @@
 #define DRI_NEW_INTERFACE_ONLY
 #include "glxserver.h"
 #include "glxutil.h"
-#include "glcontextmodes.h"
 
 #include "g_disptab.h"
 #include "glapitable.h"
@@ -61,26 +60,26 @@
 #include "dispatch.h"
 #include "extension_string.h"
 
-#define containerOf(ptr, type, member)			\
-    (type *)( (char *)ptr - offsetof(type,member) )
-
 typedef struct __GLXDRIscreen   __GLXDRIscreen;
 typedef struct __GLXDRIcontext  __GLXDRIcontext;
 typedef struct __GLXDRIdrawable __GLXDRIdrawable;
+typedef struct __GLXDRIconfig	__GLXDRIconfig;
 
 struct __GLXDRIscreen {
     __GLXscreen		 base;
-    __DRIscreen		 driScreen;
+    __DRIscreen		*driScreen;
     void		*driver;
 
     xf86EnterVTProc	*enterVT;
     xf86LeaveVTProc	*leaveVT;
 
-    __DRIcopySubBufferExtension *copySubBuffer;
-    __DRIswapControlExtension *swapControl;
+    const __DRIcoreExtension *core;
+    const __DRIlegacyExtension *legacy;
+    const __DRIcopySubBufferExtension *copySubBuffer;
+    const __DRIswapControlExtension *swapControl;
 
 #ifdef __DRI_TEX_OFFSET
-    __DRItexOffsetExtension *texOffset;
+    const __DRItexOffsetExtension *texOffset;
     DRITexOffsetStartProcPtr texOffsetStart;
     DRITexOffsetFinishProcPtr texOffsetFinish;
     __GLXDRIdrawable *texOffsetOverride[16];
@@ -92,13 +91,13 @@ struct __GLXDRIscreen {
 
 struct __GLXDRIcontext {
     __GLXcontext base;
-    __DRIcontext driContext;
+    __DRIcontext *driContext;
     XID hwContextID;
 };
 
 struct __GLXDRIdrawable {
     __GLXdrawable base;
-    __DRIdrawable driDrawable;
+    __DRIdrawable *driDrawable;
 
     /* Pulled in from old __GLXpixmap */
 #ifdef __DRI_TEX_OFFSET
@@ -109,7 +108,10 @@ struct __GLXDRIdrawable {
 #endif
 };
 
-static const char CREATE_NEW_SCREEN_FUNC[] = __DRI_CREATE_NEW_SCREEN_STRING;
+struct __GLXDRIconfig {
+    __GLXconfig config;
+    __DRIconfig *driConfig;
+};
 
 static void
 __glXDRIleaveServer(GLboolean rendering)
@@ -151,7 +153,7 @@ __glXDRIleaveServer(GLboolean rendering)
 		__GLXDRIdrawable *pGlxPix = texOffsetOverride[j];
 
 		if (pGlxPix && pGlxPix->texname) {
-		    screen->texOffset->setTexOffset(&pGlxPix->ctx->driContext,
+		    screen->texOffset->setTexOffset(pGlxPix->ctx->driContext,
 						    pGlxPix->texname,
 						    pGlxPix->offset,
 						    pGlxPix->base.pDraw->depth,
@@ -219,24 +221,24 @@ static void
 __glXDRIdrawableDestroy(__GLXdrawable *drawable)
 {
     __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
-
+    __GLXDRIscreen *screen;
     int i;
 
     for (i = 0; i < screenInfo.numScreens; i++) {
-	__glXDRIdoReleaseTexImage((__GLXDRIscreen *)
-				  glxGetScreen(screenInfo.screens[i]),
-				  private);
+	screen = (__GLXDRIscreen *) glxGetScreen(screenInfo.screens[i]);
+	__glXDRIdoReleaseTexImage(screen, private);
     }
 
-    (*private->driDrawable.destroyDrawable)(&private->driDrawable);
-
     /* If the X window was destroyed, the dri DestroyWindow hook will
      * aready have taken care of this, so only call if pDraw isn't NULL. */
     if (drawable->pDraw != NULL) {
-	    __glXenterServer(GL_FALSE);
-	    DRIDestroyDrawable(drawable->pDraw->pScreen,
-			       serverClient, drawable->pDraw);
-	    __glXleaveServer(GL_FALSE);
+	screen = (__GLXDRIscreen *) glxGetScreen(drawable->pDraw->pScreen);
+	(*screen->core->destroyDrawable)(private->driDrawable);
+
+	__glXenterServer(GL_FALSE);
+	DRIDestroyDrawable(drawable->pDraw->pScreen,
+			   serverClient, drawable->pDraw);
+	__glXleaveServer(GL_FALSE);
     }
 
     xfree(private);
@@ -255,8 +257,10 @@ static GLboolean
 __glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
 {
     __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
+    __GLXDRIscreen *screen =
+	(__GLXDRIscreen *) glxGetScreen(basePrivate->pDraw->pScreen);
 
-    (*private->driDrawable.swapBuffers)(&private->driDrawable);
+    (*screen->core->swapBuffers)(private->driDrawable);
 
     return TRUE;
 }
@@ -266,11 +270,11 @@ static int
 __glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval)
 {
     __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable;
-    __GLXDRIscreen *screen = (__GLXDRIscreen *)
-	glxGetScreen(baseDrawable->pDraw->pScreen);
+    __GLXDRIscreen *screen =
+	(__GLXDRIscreen *) glxGetScreen(baseDrawable->pDraw->pScreen);
 
     if (screen->swapControl)
-	screen->swapControl->setSwapInterval(&draw->driDrawable, interval);
+	screen->swapControl->setSwapInterval(draw->driDrawable, interval);
 
     return 0;
 }
@@ -285,20 +289,21 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
 	glxGetScreen(basePrivate->pDraw->pScreen);
 
     if (screen->copySubBuffer)
-	screen->copySubBuffer->copySubBuffer(&private->driDrawable,
-					     x, y, w, h);
+	screen->copySubBuffer->copySubBuffer(private->driDrawable, x, y, w, h);
 }
 
 static void
 __glXDRIcontextDestroy(__GLXcontext *baseContext)
 {
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
     Bool retval;
 
-    context->driContext.destroyContext(&context->driContext);
+    screen->core->destroyContext(context->driContext);
 
     __glXenterServer(GL_FALSE);
-    retval = DRIDestroyContext(baseContext->pGlxScreen->pScreen, context->hwContextID);
+    retval = DRIDestroyContext(baseContext->pGlxScreen->pScreen,
+			       context->hwContextID);
     __glXleaveServer(GL_FALSE);
 
     __glXContextDestroy(&context->base);
@@ -309,20 +314,22 @@ static int
 __glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
 {
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
     __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
     __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
 
-    return (*context->driContext.bindContext)(&context->driContext,
-					      &draw->driDrawable,
-					      &read->driDrawable);
+    return (*screen->core->bindContext)(context->driContext,
+					draw->driDrawable,
+					read->driDrawable);
 }					      
 
 static int
 __glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
 {
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
 
-    return (*context->driContext.unbindContext)(&context->driContext);
+    return (*screen->core->unbindContext)(context->driContext);
 }
 
 static int
@@ -331,13 +338,10 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
 {
     __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst;
     __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) dst->base.pGlxScreen;
 
-    /* FIXME: We will need to add DRIcontext::copyContext for this. */
-
-    (void) dst;
-    (void) src;
-
-    return FALSE;
+    return (*screen->core->copyContext)(dst->driContext,
+					src->driContext, mask);
 }
 
 static int
@@ -346,10 +350,11 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
     __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
     __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
 
-    return (*context->driContext.bindContext)(&context->driContext,
-					      &draw->driDrawable,
-					      &read->driDrawable);
+    return (*screen->core->bindContext)(context->driContext,
+					draw->driDrawable,
+					read->driDrawable);
 }
 
 static void
@@ -392,10 +397,8 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
     int		bpp, override = 0, texname;
     GLenum	format, type;
     ScreenPtr pScreen = glxPixmap->pDraw->pScreen;
-    __GLXDRIdrawable *driDraw =
-	    containerOf(glxPixmap, __GLXDRIdrawable, base);
-    __GLXDRIscreen * const screen =
-	    (__GLXDRIscreen *) glxGetScreen(pScreen);
+    __GLXDRIdrawable *driDraw = (__GLXDRIdrawable *) glxPixmap;
+    __GLXDRIscreen * const screen = (__GLXDRIscreen *) glxGetScreen(pScreen);
 
     CALL_GetIntegerv(GET_DISPATCH(), (glxPixmap->target == GL_TEXTURE_2D ?
 				      GL_TEXTURE_BINDING_2D :
@@ -439,7 +442,7 @@ alreadyin:
 
 	driDraw->texname = texname;
 
-	screen->texOffset->setTexOffset(&driDraw->ctx->driContext, texname, 0,
+	screen->texOffset->setTexOffset(driDraw->ctx->driContext, texname, 0,
 					pixmap->drawable.depth,
 					pixmap->devKind);
     }
@@ -568,9 +571,11 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext,
 			int buffer,
 			__GLXdrawable *pixmap)
 {
-    __glXDRIdoReleaseTexImage((__GLXDRIscreen *)
-			      glxGetScreen(pixmap->pDraw->pScreen),
-			      containerOf(pixmap, __GLXDRIdrawable, base));
+    __GLXDRIscreen *screen =
+	(__GLXDRIscreen *) glxGetScreen(pixmap->pDraw->pScreen);
+    __GLXDRIdrawable *drawable = (__GLXDRIdrawable *) pixmap;
+
+    __glXDRIdoReleaseTexImage(screen, drawable);
 
     return Success;
 }
@@ -585,7 +590,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
 {
     __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
 
-    screen->driScreen.destroyScreen(&screen->driScreen);
+    screen->core->destroyScreen(screen->driScreen);
 
     dlclose(screen->driver);
 
@@ -596,11 +601,12 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
 
 static __GLXcontext *
 __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
-			    __GLcontextModes *modes,
+			    __GLXconfig *glxConfig,
 			    __GLXcontext *baseShareContext)
 {
     __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
     __GLXDRIcontext *context, *shareContext;
+    __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
     VisualPtr visual;
     int i;
     GLboolean retval;
@@ -610,7 +616,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
 
     shareContext = (__GLXDRIcontext *) baseShareContext;
     if (shareContext)
-	driShare = &shareContext->driContext;
+	driShare = shareContext->driContext;
     else
 	driShare = NULL;
 
@@ -632,7 +638,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
     /* Find the requested X visual */
     visual = pScreen->visuals;
     for (i = 0; i < pScreen->numVisuals; i++, visual++)
-	if (visual->vid == modes->visualID)
+	if (visual->vid == glxConfig->visualID)
 	    break;
     if (i == pScreen->numVisuals)
 	return GL_FALSE;
@@ -644,15 +650,15 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
 			      context->hwContextID, &hwContext);
     __glXleaveServer(GL_FALSE);
 
-    context->driContext.private =
-	screen->driScreen.createNewContext(&screen->driScreen,
-					   modes,
-					   0, /* render type */
-					   driShare,
-					   hwContext,
-					   &context->driContext);
+    context->driContext =
+	screen->legacy->createNewContext(screen->driScreen,
+					 config->driConfig,
+					 0, /* render type */
+					 driShare,
+					 hwContext,
+					 context);
 
-    if (context->driContext.private == NULL) {
+    if (context->driContext == NULL) {
     	__glXenterServer(GL_FALSE);
 	retval = DRIDestroyContext(baseScreen->pScreen, context->hwContextID);
     	__glXleaveServer(GL_FALSE);
@@ -668,9 +674,10 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
 			     DrawablePtr pDraw,
 			     int type,
 			     XID drawId,
-			     __GLcontextModes *modes)
+			     __GLXconfig *glxConfig)
 {
     __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen;
+    __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
     __GLXDRIdrawable *private;
     GLboolean retval;
     drm_drawable_t hwDrawable;
@@ -682,7 +689,7 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
     memset(private, 0, sizeof *private);
 
     if (!__glXDrawableInit(&private->base, screen,
-			   pDraw, type, drawId, modes)) {
+			   pDraw, type, drawId, glxConfig)) {
         xfree(private);
 	return NULL;
     }
@@ -700,13 +707,12 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
     /* The last argument is 'attrs', which is used with pbuffers which
      * we currently don't support. */
 
-    private->driDrawable.private =
-	(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
-						 modes,
-						 &private->driDrawable,
-						 hwDrawable, 0, 0, NULL);
+    private->driDrawable =
+	(driScreen->legacy->createNewDrawable)(driScreen->driScreen,
+					       config->driConfig,
+					       hwDrawable, 0, NULL, private);
 
-    if (private->driDrawable.private == NULL) {
+    if (private->driDrawable == NULL) {
 	__glXenterServer(GL_FALSE);
 	DRIDestroyDrawable(screen->pScreen, serverClient, pDraw);
 	__glXleaveServer(GL_FALSE);
@@ -723,10 +729,10 @@ getDrawableInfo(__DRIdrawable *driDrawable,
 		int *x, int *y, int *width, int *height,
 		int *numClipRects, drm_clip_rect_t **ppClipRects,
 		int *backX, int *backY,
-		int *numBackClipRects, drm_clip_rect_t **ppBackClipRects)
+		int *numBackClipRects, drm_clip_rect_t **ppBackClipRects,
+		void *data)
 {
-    __GLXDRIdrawable *drawable = containerOf(driDrawable,
-					     __GLXDRIdrawable, driDrawable);
+    __GLXDRIdrawable *drawable = data;
     ScreenPtr pScreen;
     drm_clip_rect_t *pClipRects, *pBackClipRects;
     GLboolean retval;
@@ -810,10 +816,10 @@ getUST(int64_t *ust)
 static void __glXReportDamage(__DRIdrawable *driDraw,
 			      int x, int y,
 			      drm_clip_rect_t *rects, int num_rects,
-			      GLboolean front_buffer)
+			      GLboolean front_buffer,
+			      void *data)
 {
-    __GLXDRIdrawable *drawable =
-	    containerOf(driDraw, __GLXDRIdrawable, driDrawable);
+    __GLXDRIdrawable *drawable = data;
     DrawablePtr pDraw = drawable->base.pDraw;
     RegionRec region;
 
@@ -827,13 +833,6 @@ static void __glXReportDamage(__DRIdrawable *driDraw,
     __glXleaveServer(GL_FALSE);
 }
 
-/* Table of functions that we export to the driver. */
-static const __DRIcontextModesExtension contextModesExtension = {
-    { __DRI_CONTEXT_MODES, __DRI_CONTEXT_MODES_VERSION },
-    _gl_context_modes_create,
-    _gl_context_modes_destroy,
-};
-
 static const __DRIsystemTimeExtension systemTimeExtension = {
     { __DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION },
     getUST,
@@ -851,7 +850,6 @@ static const __DRIdamageExtension damageExtension = {
 };
 
 static const __DRIextension *loader_extensions[] = {
-    &contextModesExtension.base,
     &systemTimeExtension.base,
     &getDrawableInfoExtension.base,
     &damageExtension.base,
@@ -897,7 +895,8 @@ initializeExtensions(__GLXDRIscreen *screen)
     const __DRIextension **extensions;
     int i;
 
-    extensions = screen->driScreen.getExtensions(&screen->driScreen);
+    extensions = screen->core->getExtensions(screen->driScreen);
+
     for (i = 0; extensions[i]; i++) {
 #ifdef __DRI_COPY_SUB_BUFFER
 	if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
@@ -931,12 +930,12 @@ initializeExtensions(__GLXDRIscreen *screen)
     }
 }
     
-#define COPY_SUB_BUFFER_INTERNAL_VERSION 20060314
+extern __GLXconfig *
+glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs);
 
 static __GLXscreen *
 __glXDRIscreenProbe(ScreenPtr pScreen)
 {
-    PFNCREATENEWSCREENFUNC createNewScreen;
     drm_handle_t hSAREA;
     drmAddress pSAREA = NULL;
     char *BusID;
@@ -953,11 +952,13 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     drm_handle_t  hFB;
     int        junk;
     __GLXDRIscreen *screen;
-    void *dev_priv = NULL;
     char filename[128];
     Bool isCapable;
     size_t buffer_size;
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+    const __DRIconfig **driConfigs;
+    const __DRIextension **extensions;
+    int i;
 
     if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
 	!DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
@@ -985,9 +986,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     dri_version.minor = XF86DRI_MINOR_VERSION;
     dri_version.patch = XF86DRI_PATCH_VERSION;
 
-    framebuffer.base = NULL;
-    framebuffer.dev_priv = NULL;
-
     if (!DRIOpenConnection(pScreen, &hSAREA, &BusID)) {
 	LogMessage(X_ERROR, "AIGLX error: DRIOpenConnection failed\n");
 	goto handle_error;
@@ -1046,11 +1044,30 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
         goto handle_error;
     }
 
-    createNewScreen = dlsym(screen->driver, CREATE_NEW_SCREEN_FUNC);
-    if (createNewScreen == NULL) {
-	LogMessage(X_ERROR, "AIGLX error: dlsym for %s failed (%s)\n",
-		   CREATE_NEW_SCREEN_FUNC, dlerror());
-      goto handle_error;
+    extensions = dlsym(screen->driver, __DRI_DRIVER_EXTENSIONS);
+    if (extensions == NULL) {
+	LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
+		   driverName, dlerror());
+	goto handle_error;
+    }
+    
+    for (i = 0; extensions[i]; i++) {
+	if (strcmp(extensions[i]->name, __DRI_CORE) == 0 &&
+	    extensions[i]->version >= __DRI_CORE_VERSION) {
+		screen->core = (__DRIcoreExtension *) extensions[i];
+	}
+
+	if (strcmp(extensions[i]->name, __DRI_LEGACY) == 0 &&
+	    extensions[i]->version >= __DRI_LEGACY_VERSION) {
+		screen->legacy = (__DRIlegacyExtension *) extensions[i];
+	}
+    }
+
+    if (screen->core == NULL || screen->legacy == NULL) {
+	LogMessage(X_ERROR,
+		   "AIGLX error: %s does not export required DRI extension\n",
+		   driverName);
+	goto handle_error;
     }
 
     /*
@@ -1066,19 +1083,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
 	goto handle_error;
     }
 
-    /* Sigh... the DRI interface is broken; the DRI driver will free
-     * the dev private pointer using _mesa_free() on screen destroy,
-     * but we can't use _mesa_malloc() here.  In fact, the DRI driver
-     * shouldn't free data it didn't allocate itself, but what can you
-     * do... */
-    dev_priv = xalloc(framebuffer.dev_priv_size);
-    if (dev_priv == NULL) {
-	LogMessage(X_ERROR, "AIGLX error: dev_priv allocation failed");
-	goto handle_error;
-    }
-    memcpy(dev_priv, framebuffer.dev_priv, framebuffer.dev_priv_size);
-    framebuffer.dev_priv = dev_priv;
-
     framebuffer.width = pScreen->width;
     framebuffer.height = pScreen->height;
 
@@ -1101,28 +1105,30 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
 	goto handle_error;
     }
     
-    screen->driScreen.private =
-	(*createNewScreen)(pScreen->myNum,
-			   &screen->driScreen,
-			   &ddx_version,
-			   &dri_version,
-			   &drm_version,
-			   &framebuffer,
-			   pSAREA,
-			   fd,
-			   loader_extensions,
-			   &screen->base.fbconfigs);
-
-    if (screen->driScreen.private == NULL) {
+    screen->driScreen =
+	(*screen->legacy->createNewScreen)(pScreen->myNum,
+					   &ddx_version,
+					   &dri_version,
+					   &drm_version,
+					   &framebuffer,
+					   pSAREA,
+					   fd,
+					   loader_extensions,
+					   &driConfigs,
+					   screen);
+
+    screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
+
+    if (screen->driScreen == NULL) {
 	LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed");
 	goto handle_error;
     }
 
+    initializeExtensions(screen);
+
     DRIGetTexOffsetFuncs(pScreen, &screen->texOffsetStart,
 			 &screen->texOffsetFinish);
 
-    initializeExtensions(screen);
-
     __glXScreenInit(&screen->base, pScreen);
 
     buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
@@ -1155,9 +1161,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     if (framebuffer.base != NULL)
 	drmUnmap((drmAddress)framebuffer.base, framebuffer.size);
 
-    if (dev_priv != NULL)
-	xfree(dev_priv);
-
     if (fd >= 0)
 	drmCloseOnce(fd);
 
diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c
index fecfb19..40590c1 100644
--- a/GL/glx/glxdri2.c
+++ b/GL/glx/glxdri2.c
@@ -35,20 +35,18 @@
 #include <drm.h>
 #include <GL/gl.h>
 #include <GL/internal/dri_interface.h>
+#include <GL/glxtokens.h>
 
 #include <windowstr.h>
 #include <os.h>
 
 #define _XF86DRI_SERVER_
 #include <xf86drm.h>
-#include <xf86dristr.h>
-#include <xf86str.h>
 #include <xf86.h>
 #include <dri2.h>
 
 #include "glxserver.h"
 #include "glxutil.h"
-#include "glcontextmodes.h"
 
 #include "g_disptab.h"
 #include "glapitable.h"
@@ -57,53 +55,56 @@
 #include "dispatch.h"
 #include "extension_string.h"
 
-#define containerOf(ptr, type, member)			\
-    (type *)( (char *)ptr - offsetof(type,member) )
-
 typedef struct __GLXDRIscreen   __GLXDRIscreen;
 typedef struct __GLXDRIcontext  __GLXDRIcontext;
 typedef struct __GLXDRIdrawable __GLXDRIdrawable;
+typedef struct __GLXDRIconfig	__GLXDRIconfig;
 
 struct __GLXDRIscreen {
     __GLXscreen		 base;
-    __DRIscreen		 driScreen;
+    __DRIscreen		*driScreen;
     void		*driver;
     int			 fd;
 
     xf86EnterVTProc	*enterVT;
     xf86LeaveVTProc	*leaveVT;
 
-    __DRIcopySubBufferExtension *copySubBuffer;
-    __DRIswapControlExtension *swapControl;
-    __DRItexBufferExtension *texBuffer;
+    const __DRIcoreExtension *core;
+    const __DRIcopySubBufferExtension *copySubBuffer;
+    const __DRIswapControlExtension *swapControl;
+    const __DRItexBufferExtension *texBuffer;
 
     unsigned char glx_enable_bits[__GLX_EXT_BYTES];
 };
 
 struct __GLXDRIcontext {
-    __GLXcontext base;
-    __DRIcontext driContext;
-    drm_context_t hwContext;
+    __GLXcontext	 base;
+    __DRIcontext	*driContext;
 };
 
 struct __GLXDRIdrawable {
-    __GLXdrawable base;
-    __DRIdrawable driDrawable;
+    __GLXdrawable	 base;
+    __DRIdrawable	*driDrawable;
+    __GLXDRIscreen	*screen;
 };
 
-static const char CREATE_NEW_SCREEN_FUNC[] = __DRI2_CREATE_NEW_SCREEN_STRING;
+struct __GLXDRIconfig {
+    __GLXconfig config;
+    const __DRIconfig *driConfig;
+};
 
 static void
 __glXDRIdrawableDestroy(__GLXdrawable *drawable)
 {
     __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
-
-    (*private->driDrawable.destroyDrawable)(&private->driDrawable);
+    const __DRIcoreExtension *core = private->screen->core;
+    
+    (*core->destroyDrawable)(private->driDrawable);
 
     /* If the X window was destroyed, the dri DestroyWindow hook will
      * aready have taken care of this, so only call if pDraw isn't NULL. */
     if (drawable->pDraw != NULL)
-	DRI2DestroyDrawable(drawable->pDraw->pScreen, drawable->pDraw);
+	DRI2DestroyDrawable(drawable->pDraw);
 
     xfree(private);
 }
@@ -118,25 +119,25 @@ __glXDRIdrawableResize(__GLXdrawable *glxPriv)
 }
 
 static GLboolean
-__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
+__glXDRIdrawableSwapBuffers(__GLXdrawable *drawable)
 {
-    __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
+    __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
+    const __DRIcoreExtension *core = private->screen->core;
 
-    (*private->driDrawable.swapBuffers)(&private->driDrawable);
+    (*core->swapBuffers)(private->driDrawable);
 
     return TRUE;
 }
 
 
 static int
-__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval)
+__glXDRIdrawableSwapInterval(__GLXdrawable *drawable, int interval)
 {
-    __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable;
-    __GLXDRIscreen *screen = (__GLXDRIscreen *)
-	glxGetScreen(baseDrawable->pDraw->pScreen);
+    __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
+    const __DRIswapControlExtension *swapControl = private->screen->swapControl;
 
-    if (screen->swapControl)
-	screen->swapControl->setSwapInterval(&draw->driDrawable, interval);
+    if (swapControl)
+	swapControl->setSwapInterval(private->driDrawable, interval);
 
     return 0;
 }
@@ -147,22 +148,20 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
 			       int x, int y, int w, int h)
 {
     __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
-    __GLXDRIscreen *screen = (__GLXDRIscreen *)
-	glxGetScreen(basePrivate->pDraw->pScreen);
+    const __DRIcopySubBufferExtension *copySubBuffer =
+	    private->screen->copySubBuffer;
 
-    if (screen->copySubBuffer)
-	screen->copySubBuffer->copySubBuffer(&private->driDrawable,
-					     x, y, w, h);
+    if (copySubBuffer)
+	(*copySubBuffer->copySubBuffer)(private->driDrawable, x, y, w, h);
 }
 
 static void
 __glXDRIcontextDestroy(__GLXcontext *baseContext)
 {
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
-    __GLXDRIscreen *screen = (__GLXDRIscreen *) baseContext->pGlxScreen;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
 
-    context->driContext.destroyContext(&context->driContext);
-    drmDestroyContext(screen->fd, context->hwContext);
+    (*screen->core->destroyContext)(context->driContext);
     __glXContextDestroy(&context->base);
     xfree(context);
 }
@@ -173,18 +172,20 @@ __glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
     __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
     __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
 
-    return (*context->driContext.bindContext)(&context->driContext,
-					      &draw->driDrawable,
-					      &read->driDrawable);
+    return (*screen->core->bindContext)(context->driContext,
+					draw->driDrawable,
+					read->driDrawable);
 }					      
 
 static int
 __glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
 {
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
 
-    return (*context->driContext.unbindContext)(&context->driContext);
+    return (*screen->core->unbindContext)(context->driContext);
 }
 
 static int
@@ -193,13 +194,10 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
 {
     __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst;
     __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) dst->base.pGlxScreen;
 
-    /* FIXME: We will need to add DRIcontext::copyContext for this. */
-
-    (void) dst;
-    (void) src;
-
-    return FALSE;
+    return (*screen->core->copyContext)(dst->driContext,
+					src->driContext, mask);
 }
 
 static int
@@ -208,10 +206,11 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
     __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
     __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
 
-    return (*context->driContext.bindContext)(&context->driContext,
-					      &draw->driDrawable,
-					      &read->driDrawable);
+    return (*screen->core->bindContext)(context->driContext,
+					draw->driDrawable,
+					read->driDrawable);
 }
 
 #ifdef __DRI_TEX_BUFFER
@@ -221,19 +220,16 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
 		     int buffer,
 		     __GLXdrawable *glxPixmap)
 {
-    ScreenPtr pScreen = glxPixmap->pDraw->pScreen;
-    __GLXDRIscreen * const screen = (__GLXDRIscreen *) glxGetScreen(pScreen);
-    PixmapPtr pixmap;
-    __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
     __GLXDRIdrawable *drawable = (__GLXDRIdrawable *) glxPixmap;
+    const __DRItexBufferExtension *texBuffer = drawable->screen->texBuffer;
+    __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
 
-    if (screen->texBuffer == NULL)
+    if (texBuffer == NULL)
         return Success;
 
-    pixmap = (PixmapPtr) glxPixmap->pDraw;
-    screen->texBuffer->setTexBuffer(&context->driContext,
-				    glxPixmap->target,
-				    &drawable->driDrawable);
+    texBuffer->setTexBuffer(context->driContext,
+			    glxPixmap->target,
+			    drawable->driDrawable);
 
     return Success;
 }
@@ -277,7 +273,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
 {
     __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
 
-    screen->driScreen.destroyScreen(&screen->driScreen);
+    (*screen->core->destroyScreen)(screen->driScreen);
 
     dlclose(screen->driver);
 
@@ -288,16 +284,18 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
 
 static __GLXcontext *
 __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
-			    __GLcontextModes *modes,
+			    __GLXconfig *glxConfig,
 			    __GLXcontext *baseShareContext)
 {
     __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
     __GLXDRIcontext *context, *shareContext;
+    __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
+    const __DRIcoreExtension *core = screen->core;
     __DRIcontext *driShare;
 
     shareContext = (__GLXDRIcontext *) baseShareContext;
     if (shareContext)
-	driShare = &shareContext->driContext;
+	driShare = shareContext->driContext;
     else
 	driShare = NULL;
 
@@ -313,16 +311,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
     context->base.forceCurrent      = __glXDRIcontextForceCurrent;
     context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
 
-    if (drmCreateContext(screen->fd, &context->hwContext))
-	    return GL_FALSE;
-
-    context->driContext.private =
-	screen->driScreen.createNewContext(&screen->driScreen,
-					   modes,
-					   0, /* render type */
-					   driShare,
-					   context->hwContext,
-					   &context->driContext);
+    context->driContext =
+	(*core->createNewContext)(screen->driScreen,
+				  config->driConfig, driShare, context);
 
     return &context->base;
 }
@@ -332,13 +323,13 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
 			     DrawablePtr pDraw,
 			     int type,
 			     XID drawId,
-			     __GLcontextModes *modes)
+			     __GLXconfig *glxConfig)
 {
     __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen;
+    __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
     __GLXDRIdrawable *private;
     GLboolean retval;
-    drm_drawable_t hwDrawable;
-    unsigned int head;
+    unsigned int handle, head;
 
     private = xalloc(sizeof *private);
     if (private == NULL)
@@ -346,8 +337,9 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
 
     memset(private, 0, sizeof *private);
 
+    private->screen = driScreen;
     if (!__glXDrawableInit(&private->base, screen,
-			   pDraw, type, drawId, modes)) {
+			   pDraw, type, drawId, glxConfig)) {
         xfree(private);
 	return NULL;
     }
@@ -357,14 +349,12 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
     private->base.swapBuffers   = __glXDRIdrawableSwapBuffers;
     private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
 
-    retval = DRI2CreateDrawable(screen->pScreen, pDraw,
-				&hwDrawable, &head);
+    retval = DRI2CreateDrawable(pDraw, &handle, &head);
 
-    private->driDrawable.private =
-	(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
-						 modes,
-						 &private->driDrawable,
-						 hwDrawable, head, 0, NULL);
+    private->driDrawable =
+	(*driScreen->core->createNewDrawable)(driScreen->driScreen, 
+					      config->driConfig,
+					      handle, head, private);
 
     return &private->base;
 }
@@ -385,44 +375,43 @@ getUST(int64_t *ust)
     }
 }
 
-static void __glXReportDamage(__DRIdrawable *driDraw,
-			      int x, int y,
-			      drm_clip_rect_t *rects, int num_rects,
-			      GLboolean front_buffer)
+static const __DRIsystemTimeExtension systemTimeExtension = {
+    { __DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION },
+    getUST,
+    NULL,
+};
+
+static void dri2ReemitDrawableInfo(__DRIdrawable *draw, unsigned int *tail,
+				   void *loaderPrivate)
 {
-    __GLXDRIdrawable *drawable =
-	    containerOf(driDraw, __GLXDRIdrawable, driDrawable);
+    __GLXDRIdrawable *pdraw = loaderPrivate;
+
+    DRI2ReemitDrawableInfo(pdraw->base.pDraw, tail);
+}
+
+static void dri2PostDamage(__DRIdrawable *draw,
+			   struct drm_clip_rect *rects,
+			   int numRects, void *loaderPrivate)
+{ 
+    __GLXDRIdrawable *drawable = loaderPrivate;
     DrawablePtr pDraw = drawable->base.pDraw;
     RegionRec region;
 
-    REGION_INIT(pDraw->pScreen, &region, (BoxPtr) rects, num_rects);
+    REGION_INIT(pDraw->pScreen, &region, (BoxPtr) rects, numRects);
     REGION_TRANSLATE(pScreen, &region, pDraw->x, pDraw->y);
     DamageDamageRegion(pDraw, &region);
     REGION_UNINIT(pDraw->pScreen, &region);
 }
 
-/* Table of functions that we export to the driver. */
-static const __DRIcontextModesExtension contextModesExtension = {
-    { __DRI_CONTEXT_MODES, __DRI_CONTEXT_MODES_VERSION },
-    _gl_context_modes_create,
-    _gl_context_modes_destroy,
-};
-
-static const __DRIsystemTimeExtension systemTimeExtension = {
-    { __DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION },
-    getUST,
-    NULL,
-};
-
-static const __DRIdamageExtension damageExtension = {
-    { __DRI_DAMAGE, __DRI_DAMAGE_VERSION },
-    __glXReportDamage,
+static const __DRIloaderExtension loaderExtension = {
+    { __DRI_LOADER, __DRI_LOADER_VERSION },
+    dri2ReemitDrawableInfo,
+    dri2PostDamage
 };
 
 static const __DRIextension *loader_extensions[] = {
-    &contextModesExtension.base,
     &systemTimeExtension.base,
-    &damageExtension.base,
+    &loaderExtension.base,
     NULL
 };
 
@@ -463,11 +452,13 @@ initializeExtensions(__GLXDRIscreen *screen)
     const __DRIextension **extensions;
     int i;
 
-    extensions = screen->driScreen.getExtensions(&screen->driScreen);
+    extensions = screen->core->getExtensions(screen->driScreen);
+
     for (i = 0; extensions[i]; i++) {
 #ifdef __DRI_COPY_SUB_BUFFER
 	if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
-	    screen->copySubBuffer = (__DRIcopySubBufferExtension *) extensions[i];
+	    screen->copySubBuffer =
+		(const __DRIcopySubBufferExtension *) extensions[i];
 	    __glXEnableExtension(screen->glx_enable_bits,
 				 "GLX_MESA_copy_sub_buffer");
 	    
@@ -477,7 +468,8 @@ initializeExtensions(__GLXDRIscreen *screen)
 
 #ifdef __DRI_SWAP_CONTROL
 	if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) {
-	    screen->swapControl = (__DRIswapControlExtension *) extensions[i];
+	    screen->swapControl =
+		(const __DRIswapControlExtension *) extensions[i];
 	    __glXEnableExtension(screen->glx_enable_bits,
 				 "GLX_SGI_swap_control");
 	    __glXEnableExtension(screen->glx_enable_bits,
@@ -489,7 +481,8 @@ initializeExtensions(__GLXDRIscreen *screen)
 
 #ifdef __DRI_TEX_BUFFER
 	if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {
-	    screen->texBuffer = (__DRItexBufferExtension *) extensions[i];
+	    screen->texBuffer =
+		(const __DRItexBufferExtension *) extensions[i];
 	    /* GLX_EXT_texture_from_pixmap is always enabled. */
 	    LogMessage(X_INFO, "AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n");
 	}
@@ -498,27 +491,176 @@ initializeExtensions(__GLXDRIscreen *screen)
     }
 }
     
+#define __ATTRIB(attrib, field) \
+    { attrib, offsetof(__GLXconfig, field) }
+
+static const struct { unsigned int attrib, offset; } attribMap[] = {
+    __ATTRIB(__DRI_ATTRIB_BUFFER_SIZE,			rgbBits),
+    __ATTRIB(__DRI_ATTRIB_LEVEL,			level),
+    __ATTRIB(__DRI_ATTRIB_RED_SIZE,			redBits),
+    __ATTRIB(__DRI_ATTRIB_GREEN_SIZE,			greenBits),
+    __ATTRIB(__DRI_ATTRIB_BLUE_SIZE,			blueBits),
+    __ATTRIB(__DRI_ATTRIB_ALPHA_SIZE,			alphaBits),
+    __ATTRIB(__DRI_ATTRIB_DEPTH_SIZE,			depthBits),
+    __ATTRIB(__DRI_ATTRIB_STENCIL_SIZE,			stencilBits),
+    __ATTRIB(__DRI_ATTRIB_ACCUM_RED_SIZE,		accumRedBits),
+    __ATTRIB(__DRI_ATTRIB_ACCUM_GREEN_SIZE,		accumGreenBits),
+    __ATTRIB(__DRI_ATTRIB_ACCUM_BLUE_SIZE,		accumBlueBits),
+    __ATTRIB(__DRI_ATTRIB_ACCUM_ALPHA_SIZE,		accumAlphaBits),
+    __ATTRIB(__DRI_ATTRIB_SAMPLE_BUFFERS,		sampleBuffers),
+    __ATTRIB(__DRI_ATTRIB_SAMPLES,			samples),
+    __ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER,		doubleBufferMode),
+    __ATTRIB(__DRI_ATTRIB_STEREO,			stereoMode),
+    __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS,			numAuxBuffers),
+    __ATTRIB(__DRI_ATTRIB_TRANSPARENT_TYPE,		transparentPixel),
+    __ATTRIB(__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE,	transparentPixel),
+    __ATTRIB(__DRI_ATTRIB_TRANSPARENT_RED_VALUE,	transparentRed),
+    __ATTRIB(__DRI_ATTRIB_TRANSPARENT_GREEN_VALUE,	transparentGreen),
+    __ATTRIB(__DRI_ATTRIB_TRANSPARENT_BLUE_VALUE,	transparentBlue),
+    __ATTRIB(__DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE,	transparentAlpha),
+    __ATTRIB(__DRI_ATTRIB_FLOAT_MODE,			floatMode),
+    __ATTRIB(__DRI_ATTRIB_RED_MASK,			redMask),
+    __ATTRIB(__DRI_ATTRIB_GREEN_MASK,			greenMask),
+    __ATTRIB(__DRI_ATTRIB_BLUE_MASK,			blueMask),
+    __ATTRIB(__DRI_ATTRIB_ALPHA_MASK,			alphaMask),
+    __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH,		maxPbufferWidth),
+    __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT,		maxPbufferHeight),
+    __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_PIXELS,		maxPbufferPixels),
+    __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH,	optimalPbufferWidth),
+    __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT,	optimalPbufferHeight),
+    __ATTRIB(__DRI_ATTRIB_SWAP_METHOD,			swapMethod),
+    __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB,		bindToTextureRgb),
+    __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA,		bindToTextureRgba),
+    __ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE,	bindToMipmapTexture),
+    __ATTRIB(__DRI_ATTRIB_YINVERTED,			yInverted),
+};
+
+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+
+static void
+setScalar(__GLXconfig *config, unsigned int attrib, unsigned int value)
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(attribMap); i++)
+	if (attribMap[i].attrib == attrib) {
+	    *(unsigned int *) ((char *) config + attribMap[i].offset) = value;
+	    return;
+	}
+}
+
+static __GLXconfig *
+createModeFromConfig(const __DRIcoreExtension *core,
+		     const __DRIconfig *driConfig,
+		     unsigned int visualType)
+{
+    __GLXDRIconfig *config;
+    unsigned int attrib, value;
+    int i;
+
+    config = xalloc(sizeof *config);
+
+    config->driConfig = driConfig;
+
+    i = 0;
+    while (core->indexConfigAttrib(driConfig, i++, &attrib, &value)) {
+	switch (attrib) {
+	case __DRI_ATTRIB_RENDER_TYPE:
+	    if (value & __DRI_ATTRIB_RGBA_BIT) {
+		config->config.renderType |= GLX_RGBA_BIT;
+		config->config.rgbMode = GL_TRUE;
+	    } else if (value & __DRI_ATTRIB_COLOR_INDEX_BIT) {
+		config->config.renderType |= GLX_COLOR_INDEX_BIT;
+		config->config.rgbMode = GL_FALSE;
+	    } else {
+		config->config.renderType = 0;
+		config->config.rgbMode = GL_FALSE;
+	    }
+	    break;
+	case __DRI_ATTRIB_CONFIG_CAVEAT:
+	    if (value & __DRI_ATTRIB_NON_CONFORMANT_CONFIG)
+		config->config.visualRating = GLX_NON_CONFORMANT_CONFIG;
+	    else if (value & __DRI_ATTRIB_SLOW_BIT)
+		config->config.visualRating = GLX_SLOW_CONFIG;
+	    else
+		config->config.visualRating = GLX_NONE;
+	    break;
+	case __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS:
+	    config->config.bindToTextureTargets = 0;
+	    if (value & __DRI_ATTRIB_TEXTURE_1D_BIT)
+		config->config.bindToTextureTargets |= GLX_TEXTURE_1D_BIT_EXT;
+	    if (value & __DRI_ATTRIB_TEXTURE_2D_BIT)
+		config->config.bindToTextureTargets |= GLX_TEXTURE_2D_BIT_EXT;
+	    if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT)
+		config->config.bindToTextureTargets |= GLX_TEXTURE_RECTANGLE_BIT_EXT;
+	    break;	
+	default:
+	    setScalar(&config->config, attrib, value);
+	    break;
+	}
+    }
+
+    config->config.next = NULL;
+    config->config.xRenderable = GL_TRUE;
+    config->config.visualType = visualType;
+    config->config.drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT;
+
+    return &config->config;
+}
+
+__GLXconfig *
+glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs);
+
+__GLXconfig *
+glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs)
+{
+    __GLXconfig head, *tail;
+    int i;
+
+    tail = &head;
+    head.next = NULL;
+
+    for (i = 0; configs[i]; i++) {
+	tail->next = createModeFromConfig(core,
+					  configs[i], GLX_TRUE_COLOR);
+	if (tail->next == NULL)
+	    break;
+
+	tail = tail->next;
+    }
+
+    for (i = 0; configs[i]; i++) {
+	tail->next = createModeFromConfig(core,
+					  configs[i], GLX_DIRECT_COLOR);
+	if (tail->next == NULL)
+	    break;
+
+	tail = tail->next;
+    }
+
+    return head.next;
+}
+
 static __GLXscreen *
 __glXDRIscreenProbe(ScreenPtr pScreen)
 {
-    __DRI2_CREATE_NEW_SCREEN_FUNC *createNewScreen;
     const char *driverName;
     __GLXDRIscreen *screen;
     char filename[128];
     size_t buffer_size;
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     unsigned int sareaHandle;
+    const __DRIextension **extensions;
+    const __DRIconfig **driConfigs;
+    int i;
 
     screen = xalloc(sizeof *screen);
     if (screen == NULL)
-      return NULL;
+	return NULL;
     memset(screen, 0, sizeof *screen);
 
     if (!xf86LoaderCheckSymbol("DRI2Connect") ||
-	!DRI2Connect(pScreen,
-		     &screen->fd,
-		     &driverName,
-		     &sareaHandle)) {
+	!DRI2Connect(pScreen, &screen->fd, &driverName, &sareaHandle)) {
 	LogMessage(X_INFO,
 		   "AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum);
 	return NULL;
@@ -532,8 +674,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
 
     __glXInitExtensionEnableBits(screen->glx_enable_bits);
 
-    snprintf(filename, sizeof filename, "%s/%s_dri.so",
-             dri_driver_path, driverName);
+    snprintf(filename, sizeof filename,
+	     "%s/%s_dri.so", dri_driver_path, driverName);
 
     screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
     if (screen->driver == NULL) {
@@ -542,28 +684,43 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
         goto handle_error;
     }
 
-    createNewScreen = dlsym(screen->driver, CREATE_NEW_SCREEN_FUNC);
-    if (createNewScreen == NULL) {
-	LogMessage(X_ERROR, "AIGLX error: dlsym for %s failed (%s)\n",
-		   CREATE_NEW_SCREEN_FUNC, dlerror());
-      goto handle_error;
+    extensions = dlsym(screen->driver, __DRI_DRIVER_EXTENSIONS);
+    if (extensions == NULL) {
+	LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
+		   driverName, dlerror());
+	goto handle_error;
     }
     
-    screen->driScreen.private =
-	(*createNewScreen)(pScreen->myNum,
-			   &screen->driScreen,
-			   screen->fd,
-			   sareaHandle,
-			   loader_extensions,
-			   &screen->base.fbconfigs);
-
-    if (screen->driScreen.private == NULL) {
+    for (i = 0; extensions[i]; i++) {
+        if (strcmp(extensions[i]->name, __DRI_CORE) == 0 &&
+	    extensions[i]->version >= __DRI_CORE_VERSION) {
+		screen->core = (const __DRIcoreExtension *) extensions[i];
+	}
+    }
+
+    if (screen->core == NULL) {
+	LogMessage(X_ERROR, "AIGLX error: %s exports no DRI extension\n",
+		   driverName);
+	goto handle_error;
+    }
+
+    screen->driScreen =
+	(*screen->core->createNewScreen)(pScreen->myNum,
+					 screen->fd,
+					 sareaHandle,
+					 loader_extensions,
+					 &driConfigs,
+					 screen);
+
+    if (screen->driScreen == NULL) {
 	LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed");
 	goto handle_error;
     }
 
     initializeExtensions(screen);
 
+    screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
+
     __glXScreenInit(&screen->base, pScreen);
 
     buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
diff --git a/GL/glx/glxglcore.c b/GL/glx/glxglcore.c
index 0750e12..bbfa02b 100644
--- a/GL/glx/glxglcore.c
+++ b/GL/glx/glxglcore.c
@@ -46,7 +46,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <glxcontext.h>
 #include <glxutil.h>
 
-#include "glcontextmodes.h"
 #include "os.h"
 
 typedef struct __GLXMESAscreen   __GLXMESAscreen;
@@ -120,7 +119,7 @@ static __GLXdrawable *
 __glXMesaScreenCreateDrawable(__GLXscreen *screen,
 			      DrawablePtr pDraw, int type,
 			      XID drawId,
-			      __GLcontextModes *modes)
+			      __GLXconfig *modes)
 {
     __GLXMESAdrawable *glxPriv;
     XMesaVisual xm_vis;
@@ -217,7 +216,7 @@ __glXMesaContextForceCurrent(__GLXcontext *baseContext)
 
 static __GLXcontext *
 __glXMesaScreenCreateContext(__GLXscreen *screen,
-			     __GLcontextModes *modes,
+			     __GLXconfig *config,
 			     __GLXcontext *baseShareContext)
 {
     __GLXMESAcontext *context;
@@ -232,7 +231,7 @@ __glXMesaScreenCreateContext(__GLXscreen *screen,
     memset(context, 0, sizeof *context);
 
     context->base.pGlxScreen = screen;
-    context->base.modes      = modes;
+    context->base.config     = config;
 
     context->base.destroy        = __glXMesaContextDestroy;
     context->base.makeCurrent    = __glXMesaContextMakeCurrent;
@@ -240,10 +239,10 @@ __glXMesaScreenCreateContext(__GLXscreen *screen,
     context->base.copy           = __glXMesaContextCopy;
     context->base.forceCurrent   = __glXMesaContextForceCurrent;
 
-    xm_vis = find_mesa_visual(screen, modes->fbconfigID);
+    xm_vis = find_mesa_visual(screen, config->fbconfigID);
     if (!xm_vis) {
 	ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n",
-	       modes->visualID);
+	       config->visualID);
 	xfree(context);
 	return NULL;
     }
@@ -282,11 +281,11 @@ static XMesaVisual
 find_mesa_visual(__GLXscreen *screen, XID fbconfigID)
 {
     __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen;
-    const __GLcontextModes *modes;
+    const __GLXconfig *config;
     unsigned i = 0;
 
-    for (modes = screen->fbconfigs; modes != NULL; modes = modes->next) {
- 	if (modes->fbconfigID == fbconfigID)
+    for (config = screen->fbconfigs; config != NULL; config = config->next) {
+ 	if (config->fbconfigID == fbconfigID)
 	    return mesaScreen->xm_vis[i];
 	i++;
     }
@@ -298,18 +297,31 @@ const static int numBack = 2;
 const static int numDepth = 2;
 const static int numStencil = 2;
 
-static __GLcontextModes *
+static const int glx_visual_types[] = {
+    GLX_STATIC_GRAY,
+    GLX_GRAY_SCALE,
+    GLX_STATIC_COLOR,
+    GLX_PSEUDO_COLOR,
+    GLX_TRUE_COLOR,
+    GLX_DIRECT_COLOR
+};
+
+static __GLXconfig *
 createFBConfigsForVisual(__GLXscreen *screen, ScreenPtr pScreen,
-			 VisualPtr visual, __GLcontextModes *config)
+			 VisualPtr visual, __GLXconfig *tail)
 {
     int back, depth, stencil;
+    __GLXconfig *config;
 
     /* FIXME: Ok, I'm making all this up... anybody has a better idea? */
 
     for (back = numBack - 1; back >= 0; back--)
 	for (depth = 0; depth < numDepth; depth++)
 	    for (stencil = 0; stencil < numStencil; stencil++) {
-		config->visualType = _gl_convert_from_x_visual_type(visual->class);
+		config->next = xalloc(sizeof *config);
+		config = config->next;
+
+		config->visualType = glx_visual_types[visual->class];
 		config->xRenderable = GL_TRUE;
 		config->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT;
 		config->rgbMode = (visual->class >= TrueColor);
@@ -333,35 +345,35 @@ createFBConfigsForVisual(__GLXscreen *screen, ScreenPtr pScreen,
 		config->alphaMask = 0;
 		config->rgbBits = config->rgbMode ? visual->nplanes : 0;
 		config->indexBits = config->colorIndexMode ? visual->nplanes : 0;
-		config = config->next;
 	    }
 
-    return config;
+    return tail;
 }
 
 static void
 createFBConfigs(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
 {
-    __GLcontextModes *configs;
+    __GLXconfig head, *tail;
     int i;
 
     /* We assume here that each existing visual correspond to a
      * different visual class.  Note, this runs before COMPOSITE adds
      * its visual, so it's not entirely crazy. */
     pGlxScreen->numFBConfigs = pScreen->numVisuals * numBack * numDepth * numStencil;
-    pGlxScreen->fbconfigs = _gl_context_modes_create(pGlxScreen->numFBConfigs,
-						     sizeof *configs);
-
-    configs = pGlxScreen->fbconfigs;
+    
+    head.next = NULL;
+    tail = &head;
     for (i = 0; i < pScreen->numVisuals; i++)
-	configs = createFBConfigsForVisual(pGlxScreen, pScreen,
-					   &pScreen->visuals[i], configs);
+	tail = createFBConfigsForVisual(pGlxScreen, pScreen,
+					&pScreen->visuals[i], tail);
+
+    pGlxScreen->fbconfigs = head.next;
 }
 
 static void
 createMesaVisuals(__GLXMESAscreen *pMesaScreen)
 {
-    __GLcontextModes *config;
+    __GLXconfig *config;
     ScreenPtr pScreen;
     VisualPtr visual = NULL;
     int i, j;
diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c
index 6575b27..b49a775 100644
--- a/GL/glx/glxscreens.c
+++ b/GL/glx/glxscreens.c
@@ -37,6 +37,7 @@
 #include <dix-config.h>
 #endif
 
+#include <GL/glxtokens.h>
 #include <string.h>
 #include <windowstr.h>
 #include <os.h>
@@ -46,7 +47,6 @@
 #include "glxserver.h"
 #include "glxutil.h"
 #include "glxext.h"
-#include "glcontextmodes.h"
 
 static DevPrivateKey glxScreenPrivateKey = &glxScreenPrivateKey;
 
@@ -280,10 +280,23 @@ void GlxSetVisualConfigs(int nconfigs,
      * call it. */
 }
 
+GLint glxConvertToXVisualType(int visualType)
+{
+    static const int x_visual_types[] = {
+	TrueColor,   DirectColor,
+	PseudoColor, StaticColor,
+	GrayScale,   StaticGray
+    };
+
+    return ( (unsigned) (visualType - GLX_TRUE_COLOR) < 6 )
+	? x_visual_types[ visualType - GLX_TRUE_COLOR ] : -1;
+}
+
+
 static void
 filterOutNativeConfigs(__GLXscreen *pGlxScreen)
 {
-    __GLcontextModes *m, *next, *native_modes, **last;
+    __GLXconfig *m, *next, **last;
     ScreenPtr pScreen = pGlxScreen->pScreen;
     int i, depth;
 
@@ -305,12 +318,12 @@ filterOutNativeConfigs(__GLXscreen *pGlxScreen)
 }
 
 static XID
-findVisualForConfig(ScreenPtr pScreen, __GLcontextModes *m)
+findVisualForConfig(ScreenPtr pScreen, __GLXconfig *m)
 {
     int i;
 
     for (i = 0; i < pScreen->numVisuals; i++) {
-	if (_gl_convert_to_x_visual_type(m->visualType) == pScreen->visuals[i].class)
+	if (glxConvertToXVisualType(m->visualType) == pScreen->visuals[i].class)
 	    return pScreen->visuals[i].vid;
     }
 
@@ -405,10 +418,10 @@ findFirstSet(unsigned int v)
 }
 
 static void
-initGlxVisual(VisualPtr visual, __GLcontextModes *config)
+initGlxVisual(VisualPtr visual, __GLXconfig *config)
 {
     config->visualID = visual->vid;
-    visual->class = _gl_convert_to_x_visual_type(config->visualType);
+    visual->class = glxConvertToXVisualType(config->visualType);
     visual->bitsPerRGBValue = config->redBits;
     visual->ColormapEntries = 1 << config->redBits;
     visual->nplanes = config->redBits + config->greenBits + config->blueBits;
@@ -426,15 +439,15 @@ typedef struct {
     GLboolean depthBuffer;
 } FBConfigTemplateRec, *FBConfigTemplatePtr;
 
-static __GLcontextModes *
+static __GLXconfig *
 pickFBConfig(__GLXscreen *pGlxScreen, FBConfigTemplatePtr template, int class)
 {
-    __GLcontextModes *config;
+    __GLXconfig *config;
 
     for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) {
 	if (config->visualRating != GLX_NONE)
 	    continue;
-	if (_gl_convert_to_x_visual_type(config->visualType) != class)
+	if (glxConvertToXVisualType(config->visualType) != class)
 	    continue;
 	if ((config->doubleBufferMode > 0) != template->doubleBuffer)
 	    continue;
@@ -450,32 +463,36 @@ pickFBConfig(__GLXscreen *pGlxScreen, FBConfigTemplatePtr template, int class)
 static void
 addMinimalSet(__GLXscreen *pGlxScreen)
 {
-    __GLcontextModes *config;
+    __GLXconfig *config;
     VisualPtr visuals;
-    int i;
+    int i, j;
     FBConfigTemplateRec best = { GL_TRUE, GL_TRUE };
     FBConfigTemplateRec minimal = { GL_FALSE, GL_FALSE };
 
     pGlxScreen->visuals = xcalloc(pGlxScreen->pScreen->numVisuals,
-				  sizeof (__GLcontextModes *));
+				  sizeof (__GLXconfig *));
     if (pGlxScreen->visuals == NULL) {
 	ErrorF("Failed to allocate for minimal set of GLX visuals\n");
 	return;
     }
 
-    pGlxScreen->numVisuals = pGlxScreen->pScreen->numVisuals;
     visuals = pGlxScreen->pScreen->visuals;
-    for (i = 0; i < pGlxScreen->numVisuals; i++) {
+    for (i = 0, j = 0; i < pGlxScreen->pScreen->numVisuals; i++) {
 	if (visuals[i].nplanes == 32)
 	    config = pickFBConfig(pGlxScreen, &minimal, visuals[i].class);
 	else
 	    config = pickFBConfig(pGlxScreen, &best, visuals[i].class);
 	if (config == NULL)
 	    config = pGlxScreen->fbconfigs;
-	pGlxScreen->visuals[i] = config;
-	config->visualID = visuals[i].vid;
+	if (config == NULL)
+	    continue;
+
+	pGlxScreen->visuals[j] = config;
+	config->visualID = visuals[j].vid;
+	j++;
     }
 
+    pGlxScreen->numVisuals = j;
 }
 
 static void
@@ -487,12 +504,12 @@ addTypicalSet(__GLXscreen *pGlxScreen)
 static void
 addFullSet(__GLXscreen *pGlxScreen)
 {
-    __GLcontextModes *config;
+    __GLXconfig *config;
     VisualPtr visuals;
     int i, depth;
 
     pGlxScreen->visuals =
-	xcalloc(pGlxScreen->numFBConfigs, sizeof (__GLcontextModes *));
+	xcalloc(pGlxScreen->numFBConfigs, sizeof (__GLXconfig *));
     if (pGlxScreen->visuals == NULL) {
 	ErrorF("Failed to allocate for full set of GLX visuals\n");
 	return;
@@ -522,7 +539,7 @@ void GlxSetVisualConfig(int config)
 
 void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
 {
-    __GLcontextModes *m;
+    __GLXconfig *m;
     int i;
 
     pGlxScreen->pScreen       = pScreen;
diff --git a/GL/glx/glxscreens.h b/GL/glx/glxscreens.h
index f1eef91..39d162d 100644
--- a/GL/glx/glxscreens.h
+++ b/GL/glx/glxscreens.h
@@ -40,8 +40,6 @@
 **
 */
 
-#include "GL/internal/glcore.h"
-
 typedef struct {
     void * (* queryHyperpipeNetworkFunc)(int, int *, int *);
     void * (* queryHyperpipeConfigFunc)(int, int, int *, int *);
@@ -57,6 +55,84 @@ typedef struct {
 void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs);
 void __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs);
 
+typedef struct __GLXconfig __GLXconfig;
+struct __GLXconfig {
+    __GLXconfig *next;
+    GLboolean rgbMode;
+    GLboolean floatMode;
+    GLboolean colorIndexMode;
+    GLuint doubleBufferMode;
+    GLuint stereoMode;
+
+    GLboolean haveAccumBuffer;
+    GLboolean haveDepthBuffer;
+    GLboolean haveStencilBuffer;
+
+    GLint redBits, greenBits, blueBits, alphaBits;	/* bits per comp */
+    GLuint redMask, greenMask, blueMask, alphaMask;
+    GLint rgbBits;		/* total bits for rgb */
+    GLint indexBits;		/* total bits for colorindex */
+
+    GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
+    GLint depthBits;
+    GLint stencilBits;
+
+    GLint numAuxBuffers;
+
+    GLint level;
+
+    GLint pixmapMode;
+
+    /* GLX */
+    GLint visualID;
+    GLint visualType;     /**< One of the GLX X visual types. (i.e., 
+			   * \c GLX_TRUE_COLOR, etc.)
+			   */
+
+    /* EXT_visual_rating / GLX 1.2 */
+    GLint visualRating;
+
+    /* EXT_visual_info / GLX 1.2 */
+    GLint transparentPixel;
+				/*    colors are floats scaled to ints */
+    GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
+    GLint transparentIndex;
+
+    /* ARB_multisample / SGIS_multisample */
+    GLint sampleBuffers;
+    GLint samples;
+
+    /* SGIX_fbconfig / GLX 1.3 */
+    GLint drawableType;
+    GLint renderType;
+    GLint xRenderable;
+    GLint fbconfigID;
+
+    /* SGIX_pbuffer / GLX 1.3 */
+    GLint maxPbufferWidth;
+    GLint maxPbufferHeight;
+    GLint maxPbufferPixels;
+    GLint optimalPbufferWidth;   /* Only for SGIX_pbuffer. */
+    GLint optimalPbufferHeight;  /* Only for SGIX_pbuffer. */
+
+    /* SGIX_visual_select_group */
+    GLint visualSelectGroup;
+
+    /* OML_swap_method */
+    GLint swapMethod;
+
+    GLint screen;
+
+    /* EXT_texture_from_pixmap */
+    GLint bindToTextureRgb;
+    GLint bindToTextureRgba;
+    GLint bindToMipmapTexture;
+    GLint bindToTextureTargets;
+    GLint yInverted;
+};
+
+GLint glxConvertToXVisualType(int visualType);
+
 /*
 ** Screen dependent data.  These methods are the interface between the DIX
 ** and DDX layers of the GLX server extension.  The methods provide an
@@ -67,14 +143,14 @@ struct __GLXscreen {
     void          (*destroy)       (__GLXscreen *screen);
 
     __GLXcontext *(*createContext) (__GLXscreen *screen,
-				    __GLcontextModes *modes,
+				    __GLXconfig *modes,
 				    __GLXcontext *shareContext);
 
     __GLXdrawable *(*createDrawable)(__GLXscreen *context,
 				     DrawablePtr pDraw,
 				     int type,
 				     XID drawId,
-				     __GLcontextModes *modes);
+				     __GLXconfig *modes);
     int            (*swapInterval)  (__GLXdrawable *drawable,
 				     int interval);
 
@@ -84,11 +160,11 @@ struct __GLXscreen {
     ScreenPtr pScreen;
 
     /* Linked list of valid fbconfigs for this screen. */
-    __GLcontextModes *fbconfigs;
+    __GLXconfig *fbconfigs;
     int numFBConfigs;
 
     /* Subset of fbconfigs that are exposed as GLX visuals. */
-    __GLcontextModes **visuals;
+    __GLXconfig **visuals;
     GLint numVisuals;
 
     char *GLextensions;
diff --git a/GL/glx/glxutil.c b/GL/glx/glxutil.c
index f531ed9..11e9f89 100644
--- a/GL/glx/glxutil.c
+++ b/GL/glx/glxutil.c
@@ -49,7 +49,6 @@
 #include "glxutil.h"
 #include "GL/internal/glcore.h"
 #include "GL/glxint.h"
-#include "glcontextmodes.h"
 
 /************************************************************************/
 /* Context stuff */
@@ -140,13 +139,13 @@ __glXUnrefDrawable(__GLXdrawable *glxPriv)
 GLboolean
 __glXDrawableInit(__GLXdrawable *drawable,
 		  __GLXscreen *screen, DrawablePtr pDraw, int type,
-		  XID drawId, __GLcontextModes *modes)
+		  XID drawId, __GLXconfig *config)
 {
     drawable->pDraw = pDraw;
     drawable->type = type;
     drawable->drawId = drawId;
     drawable->refCount = 1;
-    drawable->modes = modes;
+    drawable->config = config;
     drawable->eventMask = 0;
 
     return GL_TRUE;
diff --git a/GL/glx/glxutil.h b/GL/glx/glxutil.h
index 6534c3f..00c7b20 100644
--- a/GL/glx/glxutil.h
+++ b/GL/glx/glxutil.h
@@ -51,7 +51,7 @@ extern void __glXUnrefDrawable(__GLXdrawable *glxPriv);
 extern GLboolean __glXDrawableInit(__GLXdrawable *drawable,
 				   __GLXscreen *screen,
 				   DrawablePtr pDraw, int type, XID drawID,
-				   __GLcontextModes *modes);
+				   __GLXconfig *config);
 
 /* context helper routines */
 extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
diff --git a/GL/symlink-mesa.sh b/GL/symlink-mesa.sh
index af9adbd..47afdcd 100755
--- a/GL/symlink-mesa.sh
+++ b/GL/symlink-mesa.sh
@@ -227,8 +227,6 @@ symlink_glx() {
     dst_dir glx
 
     action indirect_size.h
-    action glcontextmodes.c
-    action glcontextmodes.h
     action indirect_dispatch.c
     action indirect_dispatch.h
     action indirect_dispatch_swap.c
diff --git a/configure.ac b/configure.ac
index 959f0ae..e72e3b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -860,7 +860,7 @@ 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([DRIPROTO], [xf86driproto >= 2.0.3])
+	PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= 1.0.0])
 	PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.1])
 fi
 
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 4a4aabc..8de7426 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -121,6 +121,7 @@ static ModuleDefault ModuleDefaults[] = {
     {.name = "freetype", .toLoad = TRUE,    .load_opt=NULL},
     {.name = "record",   .toLoad = TRUE,    .load_opt=NULL},
     {.name = "dri",      .toLoad = TRUE,    .load_opt=NULL},
+    {.name = "dri2",     .toLoad = TRUE,    .load_opt=NULL},
     {.name = NULL,       .toLoad = FALSE,   .load_opt=NULL}
 };
 
diff --git a/hw/xfree86/dri2/Makefile.am b/hw/xfree86/dri2/Makefile.am
index be3cea4..844c912 100644
--- a/hw/xfree86/dri2/Makefile.am
+++ b/hw/xfree86/dri2/Makefile.am
@@ -2,7 +2,7 @@ libdri2_la_LTLIBRARIES = libdri2.la
 libdri2_la_CFLAGS = \
 	-DHAVE_XORG_CONFIG_H \
 	-I at MESA_SOURCE@/include \
-	@DIX_CFLAGS@ @DRIPROTO_CFLAGS@ @LIBDRM_CFLAGS@ \
+	@DIX_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \
 	-I$(top_srcdir)/hw/xfree86/common \
 	-I$(top_srcdir)/hw/xfree86/os-support/bus
 
@@ -10,6 +10,7 @@ libdri2_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@
 libdri2_ladir = $(moduledir)/extensions
 libdri2_la_SOURCES = \
 	dri2.c \
-	dri2.h
+	dri2.h \
+	dri2ext.c
 
 sdk_HEADERS = dri2.h
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index d527387..74aef71 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -38,6 +38,8 @@
 #include "xf86Module.h"
 #include "scrnintstr.h"
 #include "windowstr.h"
+#include "region.h" 
+#include "damage.h" 
 #include "dri2.h"
 #include <GL/internal/dri_sarea.h>
 
@@ -48,8 +50,9 @@ static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKey;
 static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKey;
 
 typedef struct _DRI2DrawablePriv {
-    drm_drawable_t		 drawable;
-    unsigned int		 handle;
+    unsigned int		 refCount;
+    unsigned int		 boHandle;
+    unsigned int		 dri2Handle;
 } DRI2DrawablePrivRec, *DRI2DrawablePrivPtr;
 
 typedef struct _DRI2Screen {
@@ -58,6 +61,7 @@ typedef struct _DRI2Screen {
     void			*sarea;
     unsigned int		 sareaSize;
     const char			*driverName;
+    unsigned int		 nextHandle;
 
     __DRIEventBuffer		*buffer;
     int				 locked;
@@ -147,7 +151,7 @@ DRI2PostDrawableConfig(DrawablePtr pDraw)
 
     e = DRI2ScreenAllocEvent(ds, size);
     e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_DRAWABLE_CONFIG, size);
-    e->drawable = pPriv->drawable;
+    e->drawable = pPriv->dri2Handle;
     e->x = pDraw->x - pPixmap->screen_x;
     e->y = pDraw->y - pPixmap->screen_y;
     e->width = pDraw->width;
@@ -164,7 +168,7 @@ DRI2PostDrawableConfig(DrawablePtr pDraw)
 }
 
 static void
-DRI2PostBufferAttach(DrawablePtr pDraw)
+DRI2PostBufferAttach(DrawablePtr pDraw, Bool force)
 {
     ScreenPtr			 pScreen = pDraw->pScreen;
     DRI2ScreenPtr		 ds = DRI2GetScreen(pScreen);
@@ -173,7 +177,8 @@ DRI2PostBufferAttach(DrawablePtr pDraw)
     PixmapPtr			 pPixmap;
     __DRIBufferAttachEvent	*e;
     size_t			 size;
-    unsigned int		 handle, flags;
+    unsigned int		 flags;
+    unsigned int		 boHandle;
 
     if (pDraw->type == DRAWABLE_WINDOW) {
 	pWin = (WindowPtr) pDraw;
@@ -187,22 +192,20 @@ DRI2PostBufferAttach(DrawablePtr pDraw)
     if (!pPriv)
 	return;
 
-    size = sizeof *e;
-
-    handle = ds->getPixmapHandle(pPixmap, &flags);
-    if (handle == 0 || handle == pPriv->handle)
+    boHandle = ds->getPixmapHandle(pPixmap, &flags);
+    if (boHandle == pPriv->boHandle && !force)
 	return;
 
+    pPriv->boHandle = boHandle;
+    size = sizeof *e;
     e = DRI2ScreenAllocEvent(ds, size);
     e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_BUFFER_ATTACH, size);
-    e->drawable = pPriv->drawable;
+    e->drawable = pPriv->dri2Handle;
     e->buffer.attachment = DRI_DRAWABLE_BUFFER_FRONT_LEFT;
-    e->buffer.handle = handle;
+    e->buffer.handle = pPriv->boHandle;
     e->buffer.pitch = pPixmap->devKind;
     e->buffer.cpp = pPixmap->drawable.bitsPerPixel / 8;
     e->buffer.flags = flags;
-
-    pPriv->handle = handle;
 }
 
 static void
@@ -223,7 +226,7 @@ DRI2ClipNotify(WindowPtr pWin, int dx, int dy)
     }
 
     DRI2PostDrawableConfig(&pWin->drawable);
-    DRI2PostBufferAttach(&pWin->drawable);
+    DRI2PostBufferAttach(&pWin->drawable, FALSE);
 }
 
 static void
@@ -262,10 +265,10 @@ DRI2CloseScreen(ScreenPtr pScreen)
 }
 
 Bool
-DRI2CreateDrawable(ScreenPtr pScreen, DrawablePtr pDraw,
-		   drm_drawable_t *pDrmDrawable, unsigned int *head)
+DRI2CreateDrawable(DrawablePtr pDraw,
+		   unsigned int *handle, unsigned int *head)
 {
-    DRI2ScreenPtr	ds = DRI2GetScreen(pScreen);
+    DRI2ScreenPtr	ds = DRI2GetScreen(pDraw->pScreen);
     WindowPtr		pWin;
     PixmapPtr		pPixmap;
     DRI2DrawablePrivPtr pPriv;
@@ -283,47 +286,66 @@ DRI2CreateDrawable(ScreenPtr pScreen, DrawablePtr pDraw,
     }
 
     pPriv = dixLookupPrivate(devPrivates, key);
-    if (pPriv == NULL) {
+    if (pPriv != NULL) {
+	pPriv->refCount++;
+    } else {
 	pPriv = xalloc(sizeof *pPriv);
-	if (drmCreateDrawable(ds->fd, &pPriv->drawable))
-	    return FALSE;
-
+	pPriv->refCount = 1;
+	pPriv->boHandle = 0;
+	pPriv->dri2Handle = ds->nextHandle++;
 	dixSetPrivate(devPrivates, key, pPriv);
     }
 
-    *pDrmDrawable = pPriv->drawable;
-
+    *handle = pPriv->dri2Handle;
     *head = ds->buffer->head;
+
     DRI2PostDrawableConfig(pDraw);
-    DRI2PostBufferAttach(pDraw);
+    DRI2PostBufferAttach(pDraw, TRUE);
     DRI2ScreenCommitEvents(ds);
 
     return TRUE;
 }
 
 void
-DRI2DestroyDrawable(ScreenPtr pScreen, DrawablePtr pDraw)
+DRI2DestroyDrawable(DrawablePtr pDraw)
 {
-    DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
-    PixmapPtr pPixmap;
-    WindowPtr pWin;
-    DRI2DrawablePrivPtr pPriv;
+    PixmapPtr		  pPixmap;
+    WindowPtr		  pWin;
+    DRI2DrawablePrivPtr   pPriv;
+    DevPrivateKey	  key;
+    PrivateRec		**devPrivates;
 
     if (pDraw->type == DRAWABLE_WINDOW) {
 	pWin = (WindowPtr) pDraw;
-	pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey);
-	dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, NULL);
+	devPrivates = &pWin->devPrivates;
+	key = dri2WindowPrivateKey;
     } else {
 	pPixmap = (PixmapPtr) pDraw;
-	pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey);
-	dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL);
+	devPrivates = &pPixmap->devPrivates;
+	key = dri2PixmapPrivateKey;
     }
 
+    pPriv = dixLookupPrivate(devPrivates, key);
     if (pPriv == NULL)
 	return;
     
-    drmDestroyDrawable(ds->fd, pPriv->drawable);
-    xfree(pPriv);
+    pPriv->refCount--;
+    if (pPriv->refCount == 0) {
+	dixSetPrivate(devPrivates, key, NULL);
+	xfree(pPriv);
+    }
+}
+
+void
+DRI2ReemitDrawableInfo(DrawablePtr pDraw, unsigned int *head)
+{
+    DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen);
+
+    *head = ds->buffer->head;
+
+    DRI2PostDrawableConfig(pDraw);
+    DRI2PostBufferAttach(pDraw, TRUE);
+    DRI2ScreenCommitEvents(ds);
 }
 
 Bool
@@ -409,8 +431,9 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
     if (!ds)
 	return NULL;
 
-    ds->fd = info->fd;
+    ds->fd			= info->fd;
     ds->driverName		= info->driverName;
+    ds->nextHandle		= 1;
 
     ds->getPixmapHandle		= info->getPixmapHandle;
     ds->beginClipNotify		= info->beginClipNotify;
@@ -434,9 +457,21 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
     return p;
 }
 
+extern ExtensionModule dri2ExtensionModule;
+
 static pointer
 DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin)
 {
+    static Bool setupDone = FALSE;
+
+    if (!setupDone) {
+	setupDone = TRUE;
+	LoadExtension(&dri2ExtensionModule, FALSE);
+    } else {
+	if (errmaj)
+	    *errmaj = LDR_ONCEONLY;
+    }
+
     return (pointer) 1;
 }
 
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index 126087a..85b3da4 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -66,14 +66,16 @@ unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap,
 void DRI2Lock(ScreenPtr pScreen);
 void DRI2Unlock(ScreenPtr pScreen);
 
-Bool DRI2CreateDrawable(ScreenPtr	 pScreen,
-			DrawablePtr	 pDraw,
-			drm_drawable_t	*pDrmDrawable,
-			unsigned int    *head);
+Bool DRI2CreateDrawable(DrawablePtr pDraw,
+			unsigned int *handle,
+			unsigned int *head);
 
-void DRI2DestroyDrawable(ScreenPtr	pScreen,
-			 DrawablePtr	pDraw);
+void DRI2DestroyDrawable(DrawablePtr pDraw);
 
-void DRI2ExtensionInit(void);
+void DRI2ReemitDrawableInfo(DrawablePtr pDraw,
+			    unsigned int *head);
+
+Bool DRI2PostDamage(DrawablePtr pDrawable,
+		    struct drm_clip_rect *rects, int numRects);
 
 #endif
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
new file mode 100644
index 0000000..ca2e029
--- /dev/null
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -0,0 +1,361 @@
+/*
+ * 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 "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL 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 PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ *   Kristian Høgsberg (krh at redhat.com)
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#define NEED_REPLIES
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "dixstruct.h"
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "extnsionst.h"
+#include "xf86drm.h"
+#include "dri2proto.h"
+#include "dri2.h"
+
+/* The only xf86 include */
+#include "xf86Module.h"
+
+static ExtensionEntry	*dri2Extension;
+static RESTYPE		 dri2DrawableRes;
+
+static Bool
+validScreen(ClientPtr client, int screen, ScreenPtr *pScreen)
+{
+    if (screen >= screenInfo.numScreens) {
+	client->errorValue = screen;
+	return FALSE;
+    }
+
+    *pScreen = screenInfo.screens[screen];
+
+    return TRUE;
+}
+
+static Bool
+validDrawable(ClientPtr client, XID drawable,
+	      DrawablePtr *pDrawable, int *status)
+{
+    *status = dixLookupDrawable(pDrawable, drawable, client, 0, DixReadAccess);
+    if (*status != Success) {
+	client->errorValue = drawable;
+	return FALSE;
+    }
+
+    return TRUE;
+}
+
+static int
+ProcDRI2QueryVersion(ClientPtr client)
+{
+    REQUEST(xDRI2QueryVersionReq);
+    xDRI2QueryVersionReply rep;
+    int n;
+
+    if (client->swapped)
+	swaps(&stuff->length, n);
+
+    REQUEST_SIZE_MATCH(xDRI2QueryVersionReq);
+    rep.type = X_Reply;
+    rep.length = 0;
+    rep.sequenceNumber = client->sequence;
+    rep.majorVersion = DRI2_MAJOR;
+    rep.minorVersion = DRI2_MINOR;
+
+    if (client->swapped) {
+    	swaps(&rep.sequenceNumber, n);
+    	swapl(&rep.length, n);
+	swapl(&rep.majorVersion, n);
+	swapl(&rep.minorVersion, n);
+    }
+
+    WriteToClient(client, sizeof(xDRI2QueryVersionReply), &rep);
+
+    return client->noClientException;
+}
+
+static int
+ProcDRI2Connect(ClientPtr client)
+{
+    REQUEST(xDRI2ConnectReq);
+    xDRI2ConnectReply rep;
+    ScreenPtr pScreen;
+    int fd;
+    const char *driverName;
+    char *busId;
+    unsigned int sareaHandle;
+
+    REQUEST_SIZE_MATCH(xDRI2ConnectReq);
+    if (!validScreen(client, stuff->screen, &pScreen))
+	return BadValue;
+    
+    rep.type = X_Reply;
+    rep.length = 0;
+    rep.sequenceNumber = client->sequence;
+    rep.driverNameLength = 0;
+    rep.busIdLength = 0;
+    rep.sareaHandle = 0;
+
+    if (!DRI2Connect(pScreen, &fd, &driverName, &sareaHandle))
+	goto fail;
+
+    busId = drmGetBusid(fd);
+    if (busId == NULL)
+	goto fail;
+
+    rep.driverNameLength = strlen(driverName);
+    rep.busIdLength = strlen(busId);
+    rep.sareaHandle = sareaHandle;
+    rep.length = (rep.driverNameLength + 3) / 4 + (rep.busIdLength + 3) / 4;
+
+ fail:
+    WriteToClient(client, sizeof(xDRI2ConnectReply), &rep);
+    WriteToClient(client, rep.driverNameLength, driverName);
+    WriteToClient(client, rep.busIdLength, busId);
+    drmFreeBusid(busId);
+
+    return client->noClientException;
+}
+
+static int
+ProcDRI2AuthConnection(ClientPtr client)
+{
+    REQUEST(xDRI2AuthConnectionReq);
+    xDRI2AuthConnectionReply rep;
+    ScreenPtr pScreen;
+
+    REQUEST_SIZE_MATCH(xDRI2AuthConnectionReq);
+    if (!validScreen(client, stuff->screen, &pScreen))
+	return BadValue;
+
+    rep.type = X_Reply;
+    rep.length = 0;
+    rep.sequenceNumber = client->sequence;
+    rep.authenticated = 1;
+
+    if (!DRI2AuthConnection(pScreen, stuff->magic)) {
+        ErrorF("DRI2: Failed to authenticate %lu\n",
+	       (unsigned long) stuff->magic);
+	rep.authenticated = 0;
+    }
+
+    WriteToClient(client, sizeof(xDRI2AuthConnectionReply), &rep);
+
+    return client->noClientException;
+}
+
+static int
+ProcDRI2CreateDrawable(ClientPtr client)
+{
+    REQUEST(xDRI2CreateDrawableReq);
+    xDRI2CreateDrawableReply rep;
+    DrawablePtr pDrawable;
+    unsigned int handle, head;
+    int status;
+
+    REQUEST_SIZE_MATCH(xDRI2CreateDrawableReq);
+
+    if (!validDrawable(client, stuff->drawable, &pDrawable, &status))
+	return status;
+
+    if (!DRI2CreateDrawable(pDrawable, &handle, &head))
+	return BadMatch;
+
+    if (!AddResource(stuff->drawable, dri2DrawableRes, pDrawable)) {
+	DRI2DestroyDrawable(pDrawable);
+	return BadAlloc;
+    }
+
+    rep.type = X_Reply;
+    rep.length = 0;
+    rep.sequenceNumber = client->sequence;
+    rep.handle = handle;
+    rep.head = head;
+
+    WriteToClient(client, sizeof(xDRI2CreateDrawableReply), &rep);
+
+    return client->noClientException;
+}
+
+static int
+ProcDRI2DestroyDrawable(ClientPtr client)
+{
+    REQUEST(xDRI2DestroyDrawableReq);
+    DrawablePtr pDrawable;
+    int status;
+
+    REQUEST_SIZE_MATCH(xDRI2DestroyDrawableReq);
+    if (!validDrawable(client, stuff->drawable, &pDrawable, &status))
+	return status;
+
+    FreeResourceByType(stuff->drawable, dri2DrawableRes, FALSE);
+
+    return client->noClientException;
+}
+
+static int
+ProcDRI2ReemitDrawableInfo(ClientPtr client)
+{
+    REQUEST(xDRI2ReemitDrawableInfoReq);
+    xDRI2ReemitDrawableInfoReply rep;
+    DrawablePtr pDrawable;
+    unsigned int head;
+    int status;
+
+    REQUEST_SIZE_MATCH(xDRI2ReemitDrawableInfoReq);
+    if (!validDrawable(client, stuff->drawable, &pDrawable, &status))
+	return status;
+
+    DRI2ReemitDrawableInfo(pDrawable, &head);
+
+    rep.type = X_Reply;
+    rep.length = 0;
+    rep.sequenceNumber = client->sequence;
+    rep.head = head;
+
+    WriteToClient(client, sizeof(xDRI2ReemitDrawableInfoReply), &rep);
+
+    return client->noClientException;
+}
+
+static int
+ProcDRI2Dispatch (ClientPtr client)
+{
+    REQUEST(xReq);
+    
+    switch (stuff->data) {
+    case X_DRI2QueryVersion:
+	return ProcDRI2QueryVersion(client);
+    }
+
+    if (!LocalClient(client))
+	return BadRequest;
+
+    switch (stuff->data) {
+    case X_DRI2Connect:
+	return ProcDRI2Connect(client);
+    case X_DRI2AuthConnection:
+	return ProcDRI2AuthConnection(client);
+    case X_DRI2CreateDrawable:
+	return ProcDRI2CreateDrawable(client);
+    case X_DRI2DestroyDrawable:
+	return ProcDRI2DestroyDrawable(client);
+    case X_DRI2ReemitDrawableInfo:
+	return ProcDRI2ReemitDrawableInfo(client);
+    default:
+	return BadRequest;
+    }
+}
+
+static int
+SProcDRI2Connect(ClientPtr client)
+{
+    REQUEST(xDRI2ConnectReq);
+    xDRI2ConnectReply rep;
+    int n;
+
+    /* If the client is swapped, it's not local.  Talk to the hand. */
+
+    swaps(&stuff->length, n);
+    if (sizeof(*stuff) / 4 != client->req_len)
+	return BadLength;
+
+    rep.sequenceNumber = client->sequence;
+    swaps(&rep.sequenceNumber, n);
+    rep.length = 0;
+    rep.driverNameLength = 0;
+    rep.busIdLength = 0;
+    rep.sareaHandle = 0;
+
+    return client->noClientException;
+}
+
+static int
+SProcDRI2Dispatch (ClientPtr client)
+{
+    REQUEST(xReq);
+
+    /*
+     * Only local clients are allowed DRI access, but remote clients
+     * still need these requests to find out cleanly.
+     */
+    switch (stuff->data)
+    {
+    case X_DRI2QueryVersion:
+	return ProcDRI2QueryVersion(client);
+    case X_DRI2Connect:
+	return SProcDRI2Connect(client);
+    default:
+	return BadRequest;
+    }
+}
+
+static void
+DRI2ResetProc (ExtensionEntry *extEntry)
+{
+}
+
+static int DRI2DrawableGone(pointer p, XID id)
+{
+    DrawablePtr pDrawable = p;
+
+    DRI2DestroyDrawable(pDrawable);
+
+    return Success;
+}
+
+static void
+DRI2ExtensionInit(void)
+{
+    dri2Extension = AddExtension(DRI2_NAME,
+				 DRI2NumberEvents,
+				 DRI2NumberErrors,
+				 ProcDRI2Dispatch,
+				 SProcDRI2Dispatch,
+				 DRI2ResetProc,
+				 StandardMinorOpcode);
+
+    dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone);
+}
+
+extern Bool noDRI2Extension;
+
+_X_HIDDEN ExtensionModule dri2ExtensionModule = {
+    DRI2ExtensionInit,
+    DRI2_NAME,
+    &noDRI2Extension,
+    NULL,
+    NULL
+};
diff --git a/os/utils.c b/os/utils.c
index 57293ab..d785d46 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -239,6 +239,9 @@ _X_EXPORT int selinuxEnforcingState = SELINUX_MODE_DEFAULT;
 #ifdef XV
 _X_EXPORT Bool noXvExtension = FALSE;
 #endif
+#ifdef DRI2
+_X_EXPORT Bool noDRI2Extension = FALSE;
+#endif
 
 #define X_INCLUDE_NETDB_H
 #include <X11/Xos_r.h>
commit 8074676d2df8d577b443e3fa5e22d7c71c944bd1
Author: Fredrik Höglund <fredrik at kde.org>
Date:   Mon Mar 31 21:24:59 2008 +0200

    EXA: Optimize the eviction scanning loop in exaOffscreenAlloc.
    
    Reduce the cost of the inner loop, by keeping a set of pointers to the
    first and the last areas in the series, subtracting the cost of the first
    area from the score, and adding the cost of the last area while walking
    the list.  This commit also moves the scanning loop from exaOffscreenAlloc
    into a separate function.
    
    Idea by Michel Dänzer.

diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index 2701e84..85b5388 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -73,6 +73,62 @@ ExaOffscreenKickOut (ScreenPtr pScreen, ExaOffscreenArea *area)
 
 #define AREA_SCORE(area) (area->size / (double)(pExaScr->offScreenCounter - area->last_use))
 
+static ExaOffscreenArea *
+exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align)
+{
+    ExaOffscreenArea *begin, *end, *best;
+    double score, best_score;
+    int avail, real_size, tmp;
+
+    best_score = UINT_MAX;
+    begin = end = pExaScr->info->offScreenAreas;
+    avail = 0;
+    score = 0;
+    best = 0;
+
+    while (end != NULL)
+    {
+	restart:
+	while (begin != NULL && begin->state == ExaOffscreenLocked)
+	    begin = end = begin->next;
+
+	if (begin == NULL)
+	    break;
+
+	/* adjust size needed to account for alignment loss for this area */
+	real_size = size;
+	tmp = begin->base_offset % align;
+	if (tmp)
+	    real_size += (align - tmp);
+
+	while (avail < real_size && end != NULL)
+	{
+	    if (end->state == ExaOffscreenLocked) {
+		/* Can't more room here, restart after this locked area */
+		avail = 0;
+		score = 0;
+		begin = end;
+		goto restart;
+	    }
+	    avail += end->size;
+	    score += AREA_SCORE(end);
+	    end = end->next;
+	}
+
+	/* Check the score, update best */
+	if (avail >= real_size && score < best_score) {
+	    best = begin;
+	    best_score = score;
+	}
+
+	avail -= begin->size;
+	score -= AREA_SCORE(begin);
+	begin = begin->next;
+    }
+
+    return best;
+}
+
 /**
  * exaOffscreenAlloc allocates offscreen memory
  *
@@ -98,7 +154,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
                    ExaOffscreenSaveProc save,
                    pointer privData)
 {
-    ExaOffscreenArea *area, *begin, *best;
+    ExaOffscreenArea *area;
     ExaScreenPriv (pScreen);
     int tmp, real_size = 0;
 #if DEBUG_OFFSCREEN
@@ -145,54 +201,8 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
 
     if (!area)
     {
-	double best_score;
-	/*
-	 * Kick out existing users to make space.
-	 *
-	 * First, locate a region which can hold the desired object.
-	 */
+	area = exaFindAreaToEvict(pExaScr, size, align);
 
-	/* prev points at the first object to boot */
-	best = NULL;
-	best_score = UINT_MAX;
-	for (begin = pExaScr->info->offScreenAreas; begin != NULL;
-	     begin = begin->next)
-	{
-	    int avail;
-	    double score;
-	    ExaOffscreenArea *scan;
-
-	    if (begin->state == ExaOffscreenLocked)
-		continue;
-
-	    /* adjust size needed to account for alignment loss for this area */
-	    real_size = size;
-	    tmp = begin->base_offset % align;
-	    if (tmp)
-		real_size += (align - tmp);
-
-	    avail = 0;
-	    score = 0;
-	    /* now see if we can make room here, and how "costly" it'll be. */
-	    for (scan = begin; scan != NULL; scan = scan->next)
-	    {
-		if (scan->state == ExaOffscreenLocked) {
-		    /* Can't make room here, start after this locked area. */
-		    begin = scan;
-		    break;
-		}
-		score += AREA_SCORE(scan);
-		avail += scan->size;
-		if (avail >= real_size)
-		    break;
-	    }
-	    /* Is it the best option we've found so far? */
-	    if (avail >= real_size && score < best_score) {
-		best = begin;
-		best_score = score;
-	    }
-	}
-	area = best;
 	if (!area)
 	{
 	    DBG_OFFSCREEN (("Alloc 0x%x -> NOSPACE\n", size));
commit 93d876891dbba41b920a9a29a5de77f647f43928
Author: Fredrik Höglund <fredrik at kde.org>
Date:   Mon Mar 31 21:15:50 2008 +0200

    EXA: Improve the algorithm used for tracking offscreen pixmap use.
    
    Replace the current score keeping algorithm with a rolling counter that's
    incremented in ExaOffscreenMarkUsed, with the previous value being stored
    in the area.  exaOffscreenAlloc uses the difference between the counter
    value and the value in the area when deciding which area to evict.
    It now also takes the size of the areas into account, and favors evicting
    smaller areas.
    
    The credit for these ideas goes to Michel Dänzer.

diff --git a/exa/exa.h b/exa/exa.h
index 0774a70..97ae6c0 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -56,7 +56,7 @@ struct _ExaOffscreenArea {
     int                 base_offset;	/* allocation base */
     int                 offset;         /* aligned offset */
     int                 size;           /* total allocation size */
-    int                 score;
+    unsigned            last_use;
     pointer             privData;
 
     ExaOffscreenSaveProc save;
diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index c666b00..2701e84 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -71,6 +71,8 @@ ExaOffscreenKickOut (ScreenPtr pScreen, ExaOffscreenArea *area)
     return exaOffscreenFree (pScreen, area);
 }
 
+#define AREA_SCORE(area) (area->size / (double)(pExaScr->offScreenCounter - area->last_use))
+
 /**
  * exaOffscreenAlloc allocates offscreen memory
  *
@@ -98,7 +100,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
 {
     ExaOffscreenArea *area, *begin, *best;
     ExaScreenPriv (pScreen);
-    int tmp, real_size = 0, best_score;
+    int tmp, real_size = 0;
 #if DEBUG_OFFSCREEN
     static int number = 0;
     ErrorF("================= ============ allocating a new pixmap %d\n", ++number);
@@ -143,6 +145,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
 
     if (!area)
     {
+	double best_score;
 	/*
 	 * Kick out existing users to make space.
 	 *
@@ -151,11 +154,12 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
 
 	/* prev points at the first object to boot */
 	best = NULL;
-	best_score = INT_MAX;
+	best_score = UINT_MAX;
 	for (begin = pExaScr->info->offScreenAreas; begin != NULL;
 	     begin = begin->next)
 	{
-	    int avail, score;
+	    int avail;
+	    double score;
 	    ExaOffscreenArea *scan;
 
 	    if (begin->state == ExaOffscreenLocked)
@@ -177,8 +181,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
 		    begin = scan;
 		    break;
 		}
-		/* Score should only be non-zero for ExaOffscreenRemovable */
-		score += scan->score;
+		score += AREA_SCORE(scan);
 		avail += scan->size;
 		if (avail >= real_size)
 		    break;
@@ -230,7 +233,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
 	new_area->size = area->size - real_size;
 	new_area->state = ExaOffscreenAvail;
 	new_area->save = NULL;
-	new_area->score = 0;
+	new_area->last_use = 0;
 	new_area->next = area->next;
 	area->next = new_area;
 	area->size = real_size;
@@ -244,7 +247,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
 	area->state = ExaOffscreenRemovable;
     area->privData = privData;
     area->save = save;
-    area->score = 0;
+    area->last_use = pExaScr->offScreenCounter++;
     area->offset = (area->base_offset + align - 1);
     area->offset -= area->offset % align;
 
@@ -395,7 +398,7 @@ exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area)
 
     area->state = ExaOffscreenAvail;
     area->save = NULL;
-    area->score = 0;
+    area->last_use = 0;
     /*
      * Find previous area
      */
@@ -427,23 +430,11 @@ ExaOffscreenMarkUsed (PixmapPtr pPixmap)
 {
     ExaPixmapPriv (pPixmap);
     ExaScreenPriv (pPixmap->drawable.pScreen);
-    static int iter = 0;
 
     if (!pExaPixmap || !pExaPixmap->area)
 	return;
 
-    /* The numbers here are arbitrary.  We may want to tune these. */
-    pExaPixmap->area->score += 100;
-    if (++iter == 10) {
-	ExaOffscreenArea *area;
-	for (area = pExaScr->info->offScreenAreas; area != NULL;
-	     area = area->next)
-	{
-	    if (area->state == ExaOffscreenRemovable)
-		area->score = (area->score * 7) / 8;
-	}
-	iter = 0;
-    }
+    pExaPixmap->area->last_use = pExaScr->offScreenCounter++;
 }
 
 /**
@@ -472,10 +463,11 @@ exaOffscreenInit (ScreenPtr pScreen)
     area->size = pExaScr->info->memorySize - area->base_offset;
     area->save = NULL;
     area->next = NULL;
-    area->score = 0;
+    area->last_use = 0;
 
     /* Add it to the free areas */
     pExaScr->info->offScreenAreas = area;
+    pExaScr->offScreenCounter = 1;
 
     ExaOffscreenValidate (pScreen);
 
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 89f4718..e41f46a 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -120,6 +120,7 @@ typedef struct {
     Bool			 checkDirtyCorrectness;
     unsigned			 disableFbCount;
     Bool			 optimize_migration;
+    unsigned			 offScreenCounter;
 } ExaScreenPrivRec, *ExaScreenPrivPtr;
 
 /*
commit 7034484f0887ea0f8ab956515f2d9301ea5842ce
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Mar 28 10:23:36 2008 +0200

    gitignore: Add two more bits
    
    Get slightly better at ignoring vim swap files, and let people keep
    local changes if they want to.

diff --git a/.gitignore b/.gitignore
index fb2f7e5..837b038 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,11 +8,12 @@ Makefile.in
 *.a
 *.o
 *~
-.*.swp
+.*sw?
 *.pbxuser
 *.mode1v3
 obj*
 build*
+local
 aclocal.m4
 autom4te.cache
 compile
commit b8ea9f2a25aad88aee77a68f8e20ac07276f0dab
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Mar 28 17:00:08 2008 -0700

    XQuartz: Fixed names of enums to be more consistent
    (cherry picked from commit c309a08806daf5d716a860c709e51eacad2c745a)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index e1581af..31c80df 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -153,7 +153,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 	
     tem = [infoDict objectForKey:@"CFBundleShortVersionString"];
 	
-    [dict setObject:[NSString stringWithFormat:@"XQuartz %@ - (xorg-server %s)", tem, XSERVER_VERSION] 
+    [dict setObject:[NSString stringWithFormat:@"Xquartz %@ - (xorg-server %s)", tem, XSERVER_VERSION] 
 	  forKey:@"ApplicationVersion"];
 	
     [self orderFrontStandardAboutPanelWithOptions: dict];
@@ -166,7 +166,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
     static TSMDocumentID x11_document;
 	DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active)
     if (state) {
-      QuartzMessageServerThread (kXDarwinActivate, 0);
+      QuartzMessageServerThread (kXquartzActivate, 0);
       
       if (!_x_active) {
 	if (x11_document == 0 && darwinKeymapFile == NULL) {
@@ -178,7 +178,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 	if (x11_document != 0)	ActivateTSMDocument (x11_document);
       }
     } else {
-      QuartzMessageServerThread (kXDarwinDeactivate, 0);
+      QuartzMessageServerThread (kXquartzDeactivate, 0);
       
       if (_x_active && x11_document != 0)
 	DeactivateTSMDocument (x11_document);
@@ -246,7 +246,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 	  swallow_up = 0;
 	  for_x = NO;
 #ifdef DARWIN_DDX_MISSING
-	  QuartzMessageServerThread (kXDarwinToggleFullscreen, 0);
+	  QuartzMessageServerThread (kXquartzToggleFullscreen, 0);
 #endif
 	}
       } else {
@@ -654,7 +654,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
 
 /* This will end up at the end of the responder chain. */
 - (void) copy:sender {
-  QuartzMessageServerThread (kXDarwinPasteboardNotify, 1,
+  QuartzMessageServerThread (kXquartzPasteboardNotify, 1,
 			     AppleWMCopyToPasteboard);
 }
 
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index dfa2074..aa9fa94 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -103,7 +103,7 @@
 {
   [NSApp activateIgnoringOtherApps:YES];
 	
-  QuartzMessageServerThread (kXDarwinControllerNotify, 2,
+  QuartzMessageServerThread (kXquartzControllerNotify, 2,
 			     AppleWMWindowMenuItem, [sender tag]);
 }
 
@@ -254,7 +254,7 @@
   [self remove_window_menu];
   [self install_window_menu:list];
 	
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1,
+  QuartzMessageServerThread (kXquartzControllerNotify, 1,
 			     AppleWMWindowMenuNotify);
 }
 
@@ -539,20 +539,20 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 - (void) hide_window:sender
 {
   if ([X11App x_active])
-    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMHideWindow);
+    QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMHideWindow);
   else
     NSBeep ();			/* FIXME: something here */
 }
 
 - (IBAction)bring_to_front:sender
 {
-  QuartzMessageServerThread(kXDarwinControllerNotify, 1, AppleWMBringAllToFront);
+  QuartzMessageServerThread(kXquartzControllerNotify, 1, AppleWMBringAllToFront);
 }
 
 - (IBAction)close_window:sender
 {
   if ([X11App x_active])
-    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMCloseWindow);
+    QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMCloseWindow);
   else
     [[NSApp keyWindow] performClose:sender];
 }
@@ -560,7 +560,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 - (IBAction)minimize_window:sender
 {
   if ([X11App x_active])
-    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMMinimizeWindow);
+    QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMMinimizeWindow);
   else
     [[NSApp keyWindow] performMiniaturize:sender];
 }
@@ -568,19 +568,19 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 - (IBAction)zoom_window:sender
 {
   if ([X11App x_active])
-    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMZoomWindow);
+    QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMZoomWindow);
   else
     [[NSApp keyWindow] performZoom:sender];
 }
 
 - (IBAction) next_window:sender
 {
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMNextWindow);
+  QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMNextWindow);
 }
 
 - (IBAction) previous_window:sender
 {
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMPreviousWindow);
+  QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMPreviousWindow);
 }
 
 - (IBAction) enable_fullscreen_changed:sender
@@ -588,7 +588,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
   int value = ![enable_fullscreen intValue];
 	
 #ifdef DARWIN_DDX_MISSING
-  QuartzMessageServerThread (kXDarwinSetRootless, 1, value);
+  QuartzMessageServerThread (kXquartzSetRootless, 1, value);
 #endif
 	
   [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:value];
@@ -598,7 +598,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 - (IBAction) toggle_fullscreen:sender
 {
 #ifdef DARWIN_DDX_MISSING
-  QuartzMessageServerThread (kXDarwinToggleFullscreen, 0);
+  QuartzMessageServerThread (kXquartzToggleFullscreen, 0);
 #endif
 }
 
@@ -661,7 +661,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 
 - (IBAction) quit:sender
 {
-  QuartzMessageServerThread (kXDarwinQuit, 0);
+  QuartzMessageServerThread (kXquartzQuit, 0);
 }
 
 - (IBAction) x11_help:sender
@@ -684,12 +684,12 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 
 - (void) applicationDidHide:(NSNotification *)notify
 {
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMHideAll);
+  QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMHideAll);
 }
 
 - (void) applicationDidUnhide:(NSNotification *)notify
 {
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMShowAll);
+  QuartzMessageServerThread (kXquartzControllerNotify, 1, AppleWMShowAll);
 }
 
 - (NSApplicationTerminateReply) applicationShouldTerminate:sender
@@ -717,7 +717,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
   [X11App prefs_synchronize];
 	
   /* shutdown the X server, it will exit () for us. */
-  QuartzMessageServerThread (kXDarwinQuit, 0);
+  QuartzMessageServerThread (kXquartzQuit, 0);
 	
   /* In case it doesn't, exit anyway after a while. */
   while (sleep (10) != 0) ;
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 20bcee5..0dbfafe 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -150,7 +150,7 @@ void
 DarwinPrintBanner(void)
 { 
   // this should change depending on which specific server we are building
-  ErrorF("XQuartz starting:\n");
+  ErrorF("Xquartz starting:\n");
   ErrorF("X.org Release 7.2\n"); // This is here to help fink until they fix their packages.
   ErrorF("X.Org X Server %s\nBuild Date: %s\n", XSERVER_VERSION, BUILD_DATE );
 }
@@ -856,7 +856,7 @@ void ddxUseMsg( void )
  */
 void ddxGiveUp( void )
 {
-    ErrorF( "Quitting XQuartz...\n" );
+    ErrorF( "Quitting Xquartz...\n" );
 
     //if (!quartzRootless)
     //    quartzProcs->ReleaseScreens();
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 325122d..bd1b9a4 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -90,34 +90,34 @@ extern int              darwinMainScreenY;
  * Special ddx events understood by the X server
  */
 enum {
-    kXDarwinUpdateModifiers   // update all modifier keys
+    kXquartzUpdateModifiers   // update all modifier keys
             = LASTEvent+1,    // (from X.h list of event names)
-    kXDarwinUpdateButtons,    // update state of mouse buttons 2 and up
-    kXDarwinScrollWheel,      // scroll wheel event
+    kXquartzUpdateButtons,    // update state of mouse buttons 2 and up
+    kXquartzScrollWheel,      // scroll wheel event
     /*
      * Quartz-specific events -- not used in IOKit mode
      */
-    kXDarwinActivate,         // restore X drawing and cursor
-    kXDarwinDeactivate,       // clip X drawing and switch to Aqua cursor
-    kXDarwinSetRootClip,      // enable or disable drawing to the X screen
-    kXDarwinQuit,             // kill the X server and release the display
-    kXDarwinReadPasteboard,   // copy Mac OS X pasteboard into X cut buffer
-    kXDarwinWritePasteboard,  // copy X cut buffer onto Mac OS X pasteboard
-    kXDarwinBringAllToFront,  // bring all X windows to front
-    kXDarwinToggleFullscreen, // Enable/Disable fullscreen mode
-    kXDarwinSetRootless,      // Set rootless mode
-    kXDarwinSpaceChanged,     // Spaces changed
+    kXquartzActivate,         // restore X drawing and cursor
+    kXquartzDeactivate,       // clip X drawing and switch to Aqua cursor
+    kXquartzSetRootClip,      // enable or disable drawing to the X screen
+    kXquartzQuit,             // kill the X server and release the display
+    kXquartzReadPasteboard,   // copy Mac OS X pasteboard into X cut buffer
+    kXquartzWritePasteboard,  // copy X cut buffer onto Mac OS X pasteboard
+    kXquartzBringAllToFront,  // bring all X windows to front
+    kXquartzToggleFullscreen, // Enable/Disable fullscreen mode
+    kXquartzSetRootless,      // Set rootless mode
+    kXquartzSpaceChanged,     // Spaces changed
     /*
      * AppleWM events
      */
-    kXDarwinControllerNotify, // send an AppleWMControllerNotify event
-    kXDarwinPasteboardNotify, // notify the WM to copy or paste
+    kXquartzControllerNotify, // send an AppleWMControllerNotify event
+    kXquartzPasteboardNotify, // notify the WM to copy or paste
     /*
      * Xplugin notification events
      */
-    kXDarwinDisplayChanged,   // display configuration has changed
-    kXDarwinWindowState,      // window visibility state has changed
-    kXDarwinWindowMoved,      // window has moved on screen
+    kXquartzDisplayChanged,   // display configuration has changed
+    kXquartzWindowState,      // window visibility state has changed
+    kXquartzWindowMoved,      // window has moved on screen
 };
 
 #define ENABLE_DEBUG_LOG 1
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 22d8957..113cfc1 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -152,7 +152,7 @@ static void DarwinUpdateModifiers(
 /*
  * DarwinReleaseModifiers
  * This hacky function releases all modifier keys.  It should be called when X11.app
- * is deactivated (kXDarwinDeactivate) to prevent modifiers from getting stuck if they
+ * is deactivated (kXquartzDeactivate) to prevent modifiers from getting stuck if they
  * are held down during a "context" switch -- otherwise, we would miss the KeyUp.
  */
 static void DarwinReleaseModifiers(void) {
@@ -341,22 +341,22 @@ void ProcessInputEvents(void) {
                 break;
 
             case MotionNotify:
-	      ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
+	      ErrorF("Unexpected MotionNotify event in DarwinProcessInputEvents\n");
                 break;
 
-            case kXDarwinUpdateModifiers:
-	      ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
+            case kXquartzUpdateModifiers:
+	      ErrorF("Unexpected kXquartzUpdateModifiers event in DarwinProcessInputEvents\n");
 	      break;
 
-            case kXDarwinUpdateButtons:
-	      ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n");
+            case kXquartzUpdateButtons:
+	      ErrorF("Unexpected kXquartzUpdateButtons event in DarwinProcessInputEvents\n");
 	      break;
 
-            case kXDarwinScrollWheel: 
-	      ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n");
+            case kXquartzScrollWheel: 
+	      ErrorF("Unexpected kXquartzScrollWheel event in DarwinProcessInputEvents\n");
 	      break;
 
-			case kXDarwinDeactivate:
+			case kXquartzDeactivate:
 				DarwinReleaseModifiers();
 				// fall through
             default:
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index a034c9f..971c9b2 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -411,24 +411,24 @@ QuartzMessageServerThread(
  */
 void QuartzProcessEvent(xEvent *xe) {
     switch (xe->u.u.type) {
-        case kXDarwinControllerNotify:
-            DEBUG_LOG("kXDarwinControllerNotify\n");
+        case kXquartzControllerNotify:
+            DEBUG_LOG("kXquartzControllerNotify\n");
             AppleWMSendEvent(AppleWMControllerNotify,
                              AppleWMControllerNotifyMask,
                              xe->u.clientMessage.u.l.longs0,
                              xe->u.clientMessage.u.l.longs1);
             break;
 
-        case kXDarwinPasteboardNotify:
-            DEBUG_LOG("kXDarwinPasteboardNotify\n");
+        case kXquartzPasteboardNotify:
+            DEBUG_LOG("kXquartzPasteboardNotify\n");
             AppleWMSendEvent(AppleWMPasteboardNotify,
                              AppleWMPasteboardNotifyMask,
                              xe->u.clientMessage.u.l.longs0,
                              xe->u.clientMessage.u.l.longs1);
             break;
 
-        case kXDarwinActivate:
-            DEBUG_LOG("kXDarwinActivate\n");
+        case kXquartzActivate:
+            DEBUG_LOG("kXquartzActivate\n");
             QuartzShow(xe->u.keyButtonPointer.rootX,
                        xe->u.keyButtonPointer.rootY);
             AppleWMSendEvent(AppleWMActivationNotify,
@@ -436,74 +436,74 @@ void QuartzProcessEvent(xEvent *xe) {
                              AppleWMIsActive, 0);
             break;
 
-        case kXDarwinDeactivate:
-            DEBUG_LOG("kXDarwinDeactivate\n");
+        case kXquartzDeactivate:
+            DEBUG_LOG("kXquartzDeactivate\n");
             AppleWMSendEvent(AppleWMActivationNotify,
                              AppleWMActivationNotifyMask,
                              AppleWMIsInactive, 0);
             QuartzHide();
             break;
 
-        case kXDarwinDisplayChanged:
-            DEBUG_LOG("kXDarwinDisplayChanged\n");
+        case kXquartzDisplayChanged:
+            DEBUG_LOG("kXquartzDisplayChanged\n");
             QuartzUpdateScreens();
             break;
 
-        case kXDarwinWindowState:
-            DEBUG_LOG("kXDarwinWindowState\n");
+        case kXquartzWindowState:
+            DEBUG_LOG("kXquartzWindowState\n");
             RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0,
 		  			     xe->u.clientMessage.u.l.longs1);
 	    break;
 	  
-        case kXDarwinWindowMoved:
-            DEBUG_LOG("kXDarwinWindowMoved\n");
+        case kXquartzWindowMoved:
+            DEBUG_LOG("kXquartzWindowMoved\n");
             RootlessNativeWindowMoved ((WindowPtr)xe->u.clientMessage.u.l.longs0);
 	    break;
 
-        case kXDarwinToggleFullscreen:
-            DEBUG_LOG("kXDarwinToggleFullscreen\n");
+        case kXquartzToggleFullscreen:
+            DEBUG_LOG("kXquartzToggleFullscreen\n");
 #ifdef DARWIN_DDX_MISSING
             if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot);
             else if (quartzHasRoot) QuartzHide();
             else QuartzShow();
 #else
-    //	    ErrorF("kXDarwinToggleFullscreen not implemented\n");
+    //	    ErrorF("kXquartzToggleFullscreen not implemented\n");
 #endif
             break;
 
-        case kXDarwinSetRootless:
-            DEBUG_LOG("kXDarwinSetRootless\n");
+        case kXquartzSetRootless:
+            DEBUG_LOG("kXquartzSetRootless\n");
 #ifdef DARWIN_DDX_MISSING
             QuartzSetRootless(xe->u.clientMessage.u.l.longs0);
             if (!quartzEnableRootless && !quartzHasRoot) QuartzHide();
 #else
-    //	    ErrorF("kXDarwinSetRootless not implemented\n");
+    //	    ErrorF("kXquartzSetRootless not implemented\n");
 #endif
             break;
 
-        case kXDarwinSetRootClip:
+        case kXquartzSetRootClip:
             QuartzSetRootClip((BOOL)xe->u.clientMessage.u.l.longs0);
             break;
 
-        case kXDarwinQuit:
+        case kXquartzQuit:
             GiveUp(0);
             break;
 
-        case kXDarwinReadPasteboard:
+        case kXquartzReadPasteboard:
             QuartzReadPasteboard();
             break;
 
-        case kXDarwinWritePasteboard:
+        case kXquartzWritePasteboard:
             QuartzWritePasteboard();
             break;
 
-        case kXDarwinBringAllToFront:
-            DEBUG_LOG("kXDarwinBringAllToFront\n");
+        case kXquartzBringAllToFront:
+            DEBUG_LOG("kXquartzBringAllToFront\n");
             RootlessOrderAllWindows();
             break;
 
-        case kXDarwinSpaceChanged:
-            DEBUG_LOG("kXDarwinSpaceChanged\n");
+        case kXquartzSpaceChanged:
+            DEBUG_LOG("kXquartzSpaceChanged\n");
             QuartzSpaceChanged(xe->u.clientMessage.u.l.longs0);
             break;
         default:
diff --git a/hw/xquartz/quartzKeyboard.h b/hw/xquartz/quartzKeyboard.h
index 0c7e70e..8131b56 100644
--- a/hw/xquartz/quartzKeyboard.h
+++ b/hw/xquartz/quartzKeyboard.h
@@ -45,7 +45,7 @@ typedef struct darwinKeyboardInfo_struct {
     unsigned char modifierKeycodes[32][2];
 } darwinKeyboardInfo;
 
-/* These functions need to be implemented by XQuartz, XDarwin, etc. */
+/* These functions need to be implemented by Xquartz, XDarwin, etc. */
 void DarwinKeyboardReload(DeviceIntPtr pDev);
 Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info);
 unsigned int QuartzSystemKeymapSeed(void);
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 4dc5846..b653a6e 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -67,7 +67,7 @@ static void eventHandler(unsigned int type, const void *arg,
     switch (type) {
         case XP_EVENT_DISPLAY_CHANGED:
             DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
-            QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
+            QuartzMessageServerThread(kXquartzDisplayChanged, 0);
             break;
             
         case XP_EVENT_WINDOW_STATE_CHANGED:
@@ -75,7 +75,7 @@ static void eventHandler(unsigned int type, const void *arg,
                 const xp_window_state_event *ws_arg = arg;
                 
                 DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: id=%d, state=%d\n", ws_arg->id, ws_arg->state);
-                QuartzMessageServerThread(kXDarwinWindowState, 2,
+                QuartzMessageServerThread(kXquartzWindowState, 2,
                                           ws_arg->id, ws_arg->state);
             } else {
                 DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: ignored\n");
@@ -87,7 +87,7 @@ static void eventHandler(unsigned int type, const void *arg,
             if (arg_size == sizeof(xp_window_id))  {
                 xp_window_id id = * (xp_window_id *) arg;
                 WindowPtr pWin = xprGetXWindow(id);
-                QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin);
+                QuartzMessageServerThread(kXquartzWindowMoved, 1, pWin);
             }
             break;
             
@@ -110,7 +110,7 @@ static void eventHandler(unsigned int type, const void *arg,
             ErrorF("XP_EVENT_SPACE_CHANGED\n");
             if(arg_size == sizeof(uint32_t)) {
                 uint32_t space_id = *(uint32_t *)arg;
-                QuartzMessageServerThread(kXDarwinSpaceChanged, 1, space_id);
+                QuartzMessageServerThread(kXquartzSpaceChanged, 1, space_id);
             }
             break;
         default:
commit bd28839eb866a9e6dc3ff80f13a67611da7eaf64
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Mar 28 17:02:02 2008 -0700

    =?utf-8?q?XQuartz:=20Another=20Expos=C3=A9=20fix:=20F9=20doesn't=20raise=20all=20windows
    
    =20(cherry=20picked=20from=20commit=20b9cffa20debae73737c674bf75ab65db1bd74556)?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index b7c8763..e1581af 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -314,14 +314,10 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 }
 
 - (void) set_front_process:unused {
-    /* Hackery needed due to argv[0] hackery */
-    //    [self activateX:YES];
-    ProcessSerialNumber psn = { 0, kCurrentProcess };
-    SetFrontProcess(&psn);
-
-    QuartzMessageServerThread(kXDarwinBringAllToFront, 0);
-    ProcessSerialNumber psn = { 0, kCurrentProcess };
-    SetFrontProcess(&psn);
+    [NSApp activateIgnoringOtherApps:YES];
+
+    if ([self modalWindow] == nil)
+        [self activateX:YES];
 }
 
 - (void) set_can_quit:(NSNumber *)state {
commit 933ffcdf7d2eaaf7caabfe6f861f04bcb149918f
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Mar 28 17:53:55 2008 -0400

    Compile fix.

diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 7e26722..8dda35a 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -119,7 +119,7 @@ DDC2MakeDevice(I2CBusPtr pBus, int address, char *name)
 
 	dev->pI2CBus = pBus;
 	if (!xf86I2CDevInit(dev)) {
-	    xf86DrvMsg(scrnIndex, X_PROBED, "No DDC2 device\n");
+	    xf86DrvMsg(pBus->scrnIndex, X_PROBED, "No DDC2 device\n");
 	    return NULL;
 	}
     }
commit 9e8451d869a4032ddb7de6a62920a3a7b0b1acc1
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Dec 3 17:38:53 2007 -0500

    Add E-EDID segment selection.

diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 3e51c4e..7e26722 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -104,19 +104,14 @@ xf86DoEDID_DDC1(
 }
 
 static I2CDevPtr
-DDC2Init(int scrnIndex, I2CBusPtr pBus)
+DDC2MakeDevice(I2CBusPtr pBus, int address, char *name)
 {
     I2CDevPtr dev = NULL;
-    /*
-     * Slow down the bus so that older monitors don't 
-     * miss things.
-     */
-    pBus->RiseFallTime = 20;
-    
-    if (!(dev = xf86I2CFindDev(pBus, 0x00A0))) {
+
+    if (!(dev = xf86I2CFindDev(pBus, address))) {
 	dev = xf86CreateI2CDevRec();
-	dev->DevName = "ddc2";
-	dev->SlaveAddr = 0xA0;
+	dev->DevName = name;
+	dev->SlaveAddr = address;
 	dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */
 	dev->StartTimeout = 550;
 	dev->BitTimeout = 40;
@@ -132,33 +127,70 @@ DDC2Init(int scrnIndex, I2CBusPtr pBus)
     return dev;
 }
 
-static unsigned char *
-DDC2Read(I2CDevPtr dev, int start, int len)
+static I2CDevPtr
+DDC2Init(int scrnIndex, I2CBusPtr pBus)
 {
-    unsigned char W_Buffer[2];
-    int w_bytes;
-    unsigned char *R_Buffer;
-    int i;
-    
-    if (start < 0x100) {
-	w_bytes = 1;
-	W_Buffer[0] = start;
-    } else {
-	w_bytes = 2;
-	W_Buffer[0] = start & 0xFF;
-	W_Buffer[1] = (start & 0xFF00) >> 8;
-    }
+    I2CDevPtr dev = NULL;
+
+    /*
+     * Slow down the bus so that older monitors don't 
+     * miss things.
+     */
+    pBus->RiseFallTime = 20;
+ 
+    DDC2MakeDevice(pBus, 0x0060, "E-EDID segment register");
+    dev = DDC2MakeDevice(pBus, 0x00A0, "ddc2");
+
+    return dev;
+}
+
+/* Mmmm, smell the hacks */
+static void
+EEDIDStop(I2CDevPtr d)
+{
+}
+
+/* block is the EDID block number.  a segment is two blocks. */
+static Bool
+DDC2Read(I2CDevPtr dev, int block, unsigned char *R_Buffer)
+{
+    unsigned char W_Buffer[1];
+    int i, segment;
+    I2CDevPtr seg;
+    void (*stop)(I2CDevPtr);
 
-    R_Buffer = xcalloc(sizeof(unsigned char), len);
     for (i = 0; i < RETRIES; i++) {
-	if (xf86I2CWriteRead(dev, W_Buffer, w_bytes, R_Buffer, len)) {
-	    if (!DDC_checksum(R_Buffer, len))
-		return R_Buffer;
+	/* Stop bits reset the segment pointer to 0, so be careful here. */
+	segment = block >> 1;
+	if (segment) {
+	    Bool b;
+	    
+	    if (!(seg = xf86I2CFindDev(dev->pI2CBus, 0x0060)))
+		return FALSE;
+
+	    W_Buffer[0] = segment;
+
+	    stop = dev->pI2CBus->I2CStop;
+	    dev->pI2CBus->I2CStop = EEDIDStop;
+
+	    b = xf86I2CWriteRead(seg, W_Buffer, 1, NULL, 0);
+
+	    dev->pI2CBus->I2CStop = stop;
+	    if (!b) {
+		dev->pI2CBus->I2CStop(dev);
+		continue;
+	    }
+	}
+
+	W_Buffer[0] = (block & 0x01) * EDID1_LEN;
+
+	if (xf86I2CWriteRead(dev, W_Buffer, 1, R_Buffer, EDID1_LEN)) {
+	    if (!DDC_checksum(R_Buffer, EDID1_LEN))
+		return TRUE;
 	}
     }
  
-    xfree(R_Buffer);
-    return NULL;
+    return FALSE;
 }
 
 /**
@@ -189,7 +221,9 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks)
     Bool noddc = FALSE, noddc2 = FALSE;
     OptionInfoPtr options;
 
-    options = xnfalloc(sizeof(DDCOptions));
+    options = xalloc(sizeof(DDCOptions));
+    if (!options)
+	return NULL;
     memcpy(options, DDCOptions, sizeof(DDCOptions));
     xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options);
 
@@ -203,10 +237,13 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks)
     if (!(dev = DDC2Init(scrnIndex, pBus)))
 	return NULL;
 
-    EDID_block = DDC2Read(dev, 0, EDID1_LEN);
+    EDID_block = xcalloc(1, EDID1_LEN);
+    if (!EDID_block)
+	return NULL;
 
-    if (EDID_block)
+    if (DDC2Read(dev, 0, EDID_block)) {
 	tmp = xf86InterpretEDID(scrnIndex, EDID_block);
+    }
 
     if (nblocks) {
 	if (tmp)
commit 0b4aef4d6df7a5525d381de035fbbf78c5fffeef
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Dec 3 16:00:00 2007 -0500

    Refactor DDC2 code to allow for proper segmented addressing.

diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 98f6006..3e51c4e 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -39,13 +39,6 @@ static unsigned int *FetchEDID_DDC1(
     register unsigned int (*)(ScrnInfoPtr)
 );
 
-static unsigned char * DDCRead_DDC2(
-    int scrnIndex,
-    I2CBusPtr pBus, 
-    int start, 
-    int len
-);
-
 typedef enum {
     DDCOPT_NODDC1,
     DDCOPT_NODDC2,
@@ -110,6 +103,64 @@ xf86DoEDID_DDC1(
 	return tmp;
 }
 
+static I2CDevPtr
+DDC2Init(int scrnIndex, I2CBusPtr pBus)
+{
+    I2CDevPtr dev = NULL;
+    /*
+     * Slow down the bus so that older monitors don't 
+     * miss things.
+     */
+    pBus->RiseFallTime = 20;
+    
+    if (!(dev = xf86I2CFindDev(pBus, 0x00A0))) {
+	dev = xf86CreateI2CDevRec();
+	dev->DevName = "ddc2";
+	dev->SlaveAddr = 0xA0;
+	dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */
+	dev->StartTimeout = 550;
+	dev->BitTimeout = 40;
+	dev->AcknTimeout = 40;
+
+	dev->pI2CBus = pBus;
+	if (!xf86I2CDevInit(dev)) {
+	    xf86DrvMsg(scrnIndex, X_PROBED, "No DDC2 device\n");
+	    return NULL;
+	}
+    }
+
+    return dev;
+}
+
+static unsigned char *
+DDC2Read(I2CDevPtr dev, int start, int len)
+{
+    unsigned char W_Buffer[2];
+    int w_bytes;
+    unsigned char *R_Buffer;
+    int i;
+    
+    if (start < 0x100) {
+	w_bytes = 1;
+	W_Buffer[0] = start;
+    } else {
+	w_bytes = 2;
+	W_Buffer[0] = start & 0xFF;
+	W_Buffer[1] = (start & 0xFF00) >> 8;
+    }
+
+    R_Buffer = xcalloc(sizeof(unsigned char), len);
+    for (i = 0; i < RETRIES; i++) {
+	if (xf86I2CWriteRead(dev, W_Buffer, w_bytes, R_Buffer, len)) {
+	    if (!DDC_checksum(R_Buffer, len))
+		return R_Buffer;
+	}
+    }
+ 
+    xfree(R_Buffer);
+    return NULL;
+}
+
 /**
  * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are
  * unset.  EDID information blocks are interpreted and the results returned in
@@ -133,6 +184,7 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks)
     ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
     unsigned char *EDID_block = NULL;
     xf86MonPtr tmp = NULL;
+    I2CDevPtr dev = NULL;
     /* Default DDC and DDC2 to enabled. */
     Bool noddc = FALSE, noddc2 = FALSE;
     OptionInfoPtr options;
@@ -144,11 +196,14 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks)
     xf86GetOptValBool(options, DDCOPT_NODDC, &noddc);
     xf86GetOptValBool(options, DDCOPT_NODDC2, &noddc2);
     xfree(options);
-    
+
     if (noddc || noddc2)
 	return NULL;
 
-    EDID_block = DDCRead_DDC2(scrnIndex, pBus, 0, EDID1_LEN);
+    if (!(dev = DDC2Init(scrnIndex, pBus)))
+	return NULL;
+
+    EDID_block = DDC2Read(dev, 0, EDID1_LEN);
 
     if (EDID_block)
 	tmp = xf86InterpretEDID(scrnIndex, EDID_block);
@@ -247,62 +302,3 @@ FetchEDID_DDC1(register ScrnInfoPtr pScrn,
     } while(--count);
     return (ptr);
 }
-
-static unsigned char *
-DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len)
-{
-    I2CDevPtr dev;
-    unsigned char W_Buffer[2];
-    int w_bytes;
-    unsigned char *R_Buffer;
-    int i;
-    
-    /*
-     * Slow down the bus so that older monitors don't 
-     * miss things.
-     */
-    pBus->RiseFallTime = 20;
-    
-    if (!(dev = xf86I2CFindDev(pBus, 0x00A0))) {
-	dev = xf86CreateI2CDevRec();
-	dev->DevName = "ddc2";
-	dev->SlaveAddr = 0xA0;
-	dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */
-	dev->StartTimeout = 550;
-	dev->BitTimeout = 40;
-	dev->AcknTimeout = 40;
-
-	dev->pI2CBus = pBus;
-	if (!xf86I2CDevInit(dev)) {
-	    xf86DrvMsg(scrnIndex, X_PROBED, "No DDC2 device\n");
-	    return NULL;
-	}
-    }
-    if (start < 0x100) {
-	w_bytes = 1;
-	W_Buffer[0] = start;
-    } else {
-	w_bytes = 2;
-	W_Buffer[0] = start & 0xFF;
-	W_Buffer[1] = (start & 0xFF00) >> 8;
-    }
-    R_Buffer = xcalloc(1,sizeof(unsigned char) 
-					* (len));
-    for (i=0; i<RETRIES; i++) {
-	if (xf86I2CWriteRead(dev, W_Buffer,w_bytes, R_Buffer,len)) {
-	    if (!DDC_checksum(R_Buffer,len))
-		return R_Buffer;
-
-#ifdef DEBUG
-	    else ErrorF("Checksum error in EDID block\n");
-#endif
-	}
-#ifdef DEBUG
-	else ErrorF("Error reading EDID block\n");
-#endif
-    }
-    
-    xf86DestroyI2CDevRec(dev,TRUE);
-    xfree(R_Buffer);
-    return NULL;
-}
commit 88ece11d6c45c6f4b94f7fb2da64a46e879d7c27
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Dec 3 15:47:39 2007 -0500

    Start E-EDID support in the DDC module.
    
    Since there's no way to safely know how many blocks xf86DoEDID_DDC2 would
    return, add a new xf86DoEEDID entrypoint to do that, and implement the
    one in terms of the other.

diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 28e2ead..98f6006 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -2,6 +2,14 @@
  * 
  * Copyright 1998,1999 by Egbert Eich <Egbert.Eich at Physik.TU-Darmstadt.DE>
  */
+
+/*
+ * Note that DDC1 does not define any method for returning blocks beyond
+ * the first.  DDC2 does, but the original implementation would only ever
+ * read the first block.  If you want to read and parse all blocks, use
+ * xf86DoEEDID().
+ */
+
 #ifdef HAVE_XORG_CONFIG_H
 #include <xorg-config.h>
 #endif
@@ -31,11 +39,6 @@ static unsigned int *FetchEDID_DDC1(
     register unsigned int (*)(ScrnInfoPtr)
 );
 
-static unsigned char* EDID1Read_DDC2(
-    int scrnIndex, 
-    I2CBusPtr pBus
-);
-
 static unsigned char * DDCRead_DDC2(
     int scrnIndex,
     I2CBusPtr pBus, 
@@ -110,16 +113,22 @@ xf86DoEDID_DDC1(
 /**
  * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are
  * unset.  EDID information blocks are interpreted and the results returned in
- * an xf86MonPtr.
+ * an xf86MonPtr.  Unlike xf86DoEDID_DDC[12](), this function will return
+ * the complete EDID data, including all extension blocks.
  *
  * This function does not affect the list of modes used by drivers -- it is up
  * to the driver to decide policy on what to do with EDID information.
  *
  * @return pointer to a new xf86MonPtr containing the EDID information.
  * @return NULL if no monitor attached or failure to interpret the EDID.
+ *
+ * nblocks is an in/out parameter.  If non-zero, it defines the number of
+ * blocks to read from the monitor; zero (or NULL pointer) means read all.
+ * If non-NULL, on return it will be filled in with the number of blocks
+ * read.
  */
 xf86MonPtr
-xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
+xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks)
 {
     ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
     unsigned char *EDID_block = NULL;
@@ -129,7 +138,7 @@ xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
     OptionInfoPtr options;
 
     options = xnfalloc(sizeof(DDCOptions));
-    (void)memcpy(options, DDCOptions, sizeof(DDCOptions));
+    memcpy(options, DDCOptions, sizeof(DDCOptions));
     xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options);
 
     xf86GetOptValBool(options, DDCOPT_NODDC, &noddc);
@@ -139,26 +148,39 @@ xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
     if (noddc || noddc2)
 	return NULL;
 
-    EDID_block = EDID1Read_DDC2(scrnIndex,pBus);
+    EDID_block = DDCRead_DDC2(scrnIndex, pBus, 0, EDID1_LEN);
 
-    if (EDID_block){
-	tmp = xf86InterpretEDID(scrnIndex,EDID_block);
-    } else {
-#ifdef DEBUG
-	ErrorF("No EDID block returned\n");
-#endif
-	return NULL;
+    if (EDID_block)
+	tmp = xf86InterpretEDID(scrnIndex, EDID_block);
+
+    if (nblocks) {
+	if (tmp)
+	    *nblocks = tmp->no_sections;
+	else
+	    *nblocks = 0;
     }
-#ifdef DEBUG
-    if (!tmp)
-	ErrorF("Cannot interpret EDID block\n");
-    else
-        ErrorF("Sections to follow: %i\n",tmp->no_sections);
-#endif
-    
+
     return tmp;
 }
 
+/**
+ * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are
+ * unset.  EDID information blocks are interpreted and the results returned in
+ * an xf86MonPtr.
+ *
+ * This function does not affect the list of modes used by drivers -- it is up
+ * to the driver to decide policy on what to do with EDID information.
+ *
+ * @return pointer to a new xf86MonPtr containing the EDID information.
+ * @return NULL if no monitor attached or failure to interpret the EDID.
+ */
+xf86MonPtr
+xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
+{
+    int nblocks = 1;
+    return xf86DoEEDID(scrnIndex, pBus, &nblocks);
+}
+
 /* 
  * read EDID record , pass it to callback function to interpret.
  * callback function will store it for further use by calling
@@ -226,12 +248,6 @@ FetchEDID_DDC1(register ScrnInfoPtr pScrn,
     return (ptr);
 }
 
-static unsigned char*
-EDID1Read_DDC2(int scrnIndex, I2CBusPtr pBus)
-{
-    return  DDCRead_DDC2(scrnIndex, pBus, 0, EDID1_LEN);
-}
-
 static unsigned char *
 DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len)
 {
diff --git a/hw/xfree86/ddc/xf86DDC.h b/hw/xfree86/ddc/xf86DDC.h
index 3b072dd..6e5bf6f 100644
--- a/hw/xfree86/ddc/xf86DDC.h
+++ b/hw/xfree86/ddc/xf86DDC.h
@@ -35,6 +35,8 @@ extern xf86MonPtr xf86DoEDID_DDC2(
    I2CBusPtr pBus
 );
 
+extern xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks);
+
 extern xf86MonPtr xf86PrintEDID(
     xf86MonPtr monPtr
 );
commit b5f98fcea2024c67e598947782913982072cf4fb
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Fri Mar 28 14:01:34 2008 -0400

    XSELinux: Add xorg.conf option for permissive/enforcing/disabled.
    Patch by Joe Nall.
    
    The option goes in the "extmod" subsection.
    TODO: Make it easier for extension modules to handle their own options.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 17ce7af..2e059a4 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -37,6 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <libaudit.h>
 
 #include <X11/Xatom.h>
+#include "globals.h"
 #include "resource.h"
 #include "privates.h"
 #include "registry.h"
@@ -1891,16 +1892,36 @@ void
 SELinuxExtensionInit(INITARGS)
 {
     ExtensionEntry *extEntry;
-    struct selinux_opt options[] = { { SELABEL_OPT_VALIDATE, (char *)1 } };
+    struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *)1 };
+    struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *)0 };
     security_context_t con;
     int ret = TRUE;
 
-    /* Setup SELinux stuff */
+    /* Check SELinux mode on system */
     if (!is_selinux_enabled()) {
-	ErrorF("SELinux: SELinux not enabled, disabling SELinux support.\n");
+	ErrorF("SELinux: Disabled on system, not enabling in X server\n");
 	return;
     }
 
+    /* Check SELinux mode in configuration file */
+    switch(selinuxEnforcingState) {
+    case SELINUX_MODE_DISABLED:
+	LogMessage(X_INFO, "SELinux: Disabled in configuration file\n");
+	return;
+    case SELINUX_MODE_ENFORCING:
+	LogMessage(X_INFO, "SELinux: Configured in enforcing mode\n");
+	avc_option.value = (char *)1;
+	break;
+    case SELINUX_MODE_PERMISSIVE:
+	LogMessage(X_INFO, "SELinux: Configured in permissive mode\n");
+	avc_option.value = (char *)0;
+	break;
+    default:
+	avc_option.type = AVC_OPT_UNUSED;
+	break;
+    }
+
+    /* Set up SELinux stuff */
     selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback)SELinuxLog);
     selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback)SELinuxAudit);
 
@@ -1912,11 +1933,11 @@ SELinuxExtensionInit(INITARGS)
 	FatalError("SELinux: Failed to set up security class mapping\n");
     }
 
-    if (avc_open(NULL, 0) < 0)
+    if (avc_open(&avc_option, 1) < 0)
 	FatalError("SELinux: Couldn't initialize SELinux userspace AVC\n");
     avc_active = 1;
 
-    label_hnd = selabel_open(SELABEL_CTX_X, options, 1);
+    label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1);
     if (!label_hnd)
 	FatalError("SELinux: Failed to open x_contexts mapping in policy\n");
 
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index d0d892a..8c8a4ce 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -42,7 +42,7 @@ static ExtensionModule extensionModules[] = {
     {
 	SELinuxExtensionInit,
 	SELINUX_EXTENSION_NAME,
-	NULL,
+	&noSELinuxExtension,
 	NULL,
 	NULL
     },
@@ -258,6 +258,27 @@ extmodSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 		}
 	    }
 	}
+
+#ifdef XSELINUX
+	if (! strcmp(SELINUX_EXTENSION_NAME, extensionModules[i].name)) {
+	    pointer o;
+	    selinuxEnforcingState = SELINUX_MODE_DEFAULT;
+
+	    if ((o = xf86FindOption(opts, "SELinux mode disabled"))) {
+		xf86MarkOptionUsed(o);
+		selinuxEnforcingState = SELINUX_MODE_DISABLED;
+	    }
+	    if ((o = xf86FindOption(opts, "SELinux mode permissive"))) {
+		xf86MarkOptionUsed(o);
+		selinuxEnforcingState = SELINUX_MODE_PERMISSIVE;
+	    }
+	    if ((o = xf86FindOption(opts, "SELinux mode enforcing"))) {
+		xf86MarkOptionUsed(o);
+		selinuxEnforcingState = SELINUX_MODE_ENFORCING;
+	    }
+	}
+#endif
+
 	LoadExtension(&extensionModules[i], FALSE);
     }
     /* Need a non-NULL return */
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index d035c76..d6d22c4 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -440,6 +440,9 @@ _X_HIDDEN void *dixLookupTab[] = {
 #ifdef XIDLE
     SYMVAR(noXIdleExtension)
 #endif
+#ifdef XSELINUX
+    SYMVAR(noSELinuxExtension)
+#endif
 #ifdef XV
     SYMVAR(noXvExtension)
 #endif
diff --git a/include/globals.h b/include/globals.h
index b230dfc..2ca9531 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -175,6 +175,16 @@ extern Bool noXInputExtension;
 extern Bool noXIdleExtension;
 #endif
 
+#ifdef XSELINUX
+extern Bool noSELinuxExtension;
+
+#define SELINUX_MODE_DEFAULT    0
+#define SELINUX_MODE_DISABLED   1
+#define SELINUX_MODE_PERMISSIVE 2
+#define SELINUX_MODE_ENFORCING  3
+extern int selinuxEnforcingState;
+#endif
+
 #ifdef XV
 extern Bool noXvExtension;
 #endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 3c55eeb..cc4c15c 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -215,6 +215,9 @@ extern Bool noXInputExtension;
 #ifdef XIDLE
 extern Bool noXIdleExtension;
 #endif
+#ifdef XSELINUX
+extern Bool noSELinuxExtension;
+#endif
 #ifdef XV
 extern Bool noXvExtension;
 #endif
@@ -488,6 +491,9 @@ static ExtensionToggle ExtensionToggleList[] =
 #ifdef XKB
     { "XKEYBOARD", &noXkbExtension },
 #endif
+#ifdef XSELINUX
+    { "SELinux", &noSELinuxExtension },
+#endif
     { "XTEST", &noTestExtensions },
 #ifdef XV
     { "XVideo", &noXvExtension },
@@ -597,7 +603,7 @@ InitExtensions(argc, argv)
     if (!noSecurityExtension) SecurityExtensionInit();
 #endif
 #ifdef XSELINUX
-    SELinuxExtensionInit();
+    if (!noSELinuxExtension) SELinuxExtensionInit();
 #endif
 #ifdef XPRINT
     XpExtensionInit(); /* server-specific extension, cannot be disabled */
diff --git a/os/utils.c b/os/utils.c
index 4041028..57293ab 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -232,6 +232,10 @@ _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;
+#endif
 #ifdef XV
 _X_EXPORT Bool noXvExtension = FALSE;
 #endif
commit 415e49b940bba2d08870db410ebb47d2add5d836
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Mar 25 23:01:02 2008 -0700

    XQuartz: Sanity-check the removal of the 256-color option
    Fixes the 'one-time-preferences' bug in 2.2.0_rc1
    (cherry picked from commit 38cbd13490fc21724e8eef0ec7e1a20a9cc2e39d)

diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index a9d2add..dfa2074 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -649,7 +649,8 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 
     [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
     // TODO: Add 256 color support
-    [depth removeItemAtIndex:[depth indexOfItemWithTag:8]];
+    if([depth indexOfItemWithTag:8] != -1)
+        [depth removeItemAtIndex:[depth indexOfItemWithTag:8]];
 	
     [enable_fullscreen setIntValue:!quartzEnableRootless];
     // TODO: Add fullscreen support
commit c1d37efe9aae5f2895b3437418f7e4bb2eb3400f
Author: Ben Byer <bbyer at bushing.apple.com>
Date:   Tue Mar 25 19:25:00 2008 -0700

    xquartz: copy in new stubs from Xi/stubs.c to replace our old
    Xinput stubs.  Hey, it's a start.
    (cherry picked from commit 566412b4aece24ae6af8c7c835986b685aa456a2)

diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c
index e62ec0a..50ba656 100644
--- a/hw/xquartz/darwinXinput.c
+++ b/hw/xquartz/darwinXinput.c
@@ -1,8 +1,7 @@
-
 /*
- * X server support of the XINPUT extension for Darwin
+ * X server support of the XINPUT extension for xquartz
  *
- * This is currently a copy of mi/stubs.c, but eventually this
+ * This is currently a copy of Xi/stubs.c, but eventually this
  * should include more complete XINPUT support.
  */
 
@@ -52,100 +51,17 @@ SOFTWARE.
 
 ********************************************************/
 
+#define	 NEED_EVENTS
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
 
-#define	 NEED_EVENTS
 #include <X11/X.h>
 #include <X11/Xproto.h>
 #include "inputstr.h"
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "XIstubs.h"
-#include "chgkbd.h"
-
-/***********************************************************************
- *
- * Caller:	ProcXChangeKeyboardDevice
- *
- * This procedure does the implementation-dependent portion of the work
- * needed to change the keyboard device.
- *
- * The X keyboard device has a FocusRec.  If the device that has been 
- * made into the new X keyboard did not have a FocusRec, 
- * ProcXChangeKeyboardDevice will allocate one for it.
- *
- * If you do not want clients to be able to focus the old X keyboard
- * device, call DeleteFocusClassDeviceStruct to free the FocusRec.
- *
- * If you support input devices with keys that you do not want to be 
- * used as the X keyboard, you need to check for them here and return 
- * a BadDevice error.
- *
- * The default implementation is to do nothing (assume you do want
- * clients to be able to focus the old X keyboard).  The commented-out
- * sample code shows what you might do if you don't want the default.
- *
- */
-
-int ChangeKeyboardDevice (DeviceIntPtr old_dev, DeviceIntPtr new_dev) {
-    /***********************************************************************
-     DeleteFocusClassDeviceStruct(old_dev);	 * defined in xchgptr.c *
-    **********************************************************************/
-    return BadMatch;
-}
-
-
-/***********************************************************************
- *
- * Caller:	ProcXChangePointerDevice
- *
- * This procedure does the implementation-dependent portion of the work
- * needed to change the pointer device.
- *
- * The X pointer device does not have a FocusRec.  If the device that
- * has been made into the new X pointer had a FocusRec, 
- * ProcXChangePointerDevice will free it.
- *
- * If you want clients to be able to focus the old pointer device that
- * has now become accessible through the input extension, you need to 
- * add a FocusRec to it here.
- *
- * The XChangePointerDevice protocol request also allows the client
- * to choose which axes of the new pointer device are used to move 
- * the X cursor in the X- and Y- directions.  If the axes are different
- * than the default ones, you need to keep track of that here.
- *
- * If you support input devices with valuators that you do not want to be 
- * used as the X pointer, you need to check for them here and return a 
- * BadDevice error.
- *
- * The default implementation is to do nothing (assume you don't want
- * clients to be able to focus the old X pointer).  The commented-out
- * sample code shows what you might do if you don't want the default.
- *
- */
-
-int
-ChangePointerDevice (
-    DeviceIntPtr	old_dev,
-    DeviceIntPtr	new_dev,
-    unsigned char	x,
-    unsigned char	y)
-    {
-    /***********************************************************************
-    InitFocusClassDeviceStruct(old_dev);	* allow focusing old ptr*
-
-    x_axis = x;					* keep track of new x-axis*
-    y_axis = y;					* keep track of new y-axis*
-    if (x_axis != 0 || y_axis != 1)
-	axes_changed = TRUE;			* remember axes have changed*
-    else
-	axes_changed = FALSE;
-    *************************************************************************/
-    return BadMatch;
-    }
 
 /***********************************************************************
  *
@@ -161,11 +77,9 @@ ChangePointerDevice (
  */
 
 void
-CloseInputDevice (d, client)
-    DeviceIntPtr d;
-    ClientPtr client;
-    {
-    }
+CloseInputDevice(DeviceIntPtr d, ClientPtr client)
+{
+}
 
 /***********************************************************************
  *
@@ -194,8 +108,8 @@ CloseInputDevice (d, client)
  */
 
 void
-AddOtherInputDevices ()
-    {
+AddOtherInputDevices(void)
+{
     /**********************************************************************
      for each uninitialized device, do something like: 
 
@@ -209,7 +123,7 @@ AddOtherInputDevices ()
     dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success);
     ************************************************************************/
 
-    }
+}
 
 /***********************************************************************
  *
@@ -234,12 +148,9 @@ AddOtherInputDevices ()
  */
 
 void
-OpenInputDevice (dev, client, status)
-    DeviceIntPtr dev;
-    ClientPtr client;
-    int *status;
-    {
-    }
+OpenInputDevice(DeviceIntPtr dev, ClientPtr client, int *status)
+{
+}
 
 /****************************************************************************
  *
@@ -254,13 +165,10 @@ OpenInputDevice (dev, client, status)
  */
 
 int
-SetDeviceMode (client, dev, mode)
-    register	ClientPtr	client;
-    DeviceIntPtr dev;
-    int		mode;
-    {
+SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode)
+{
     return BadMatch;
-    }
+}
 
 /****************************************************************************
  *
@@ -275,15 +183,11 @@ SetDeviceMode (client, dev, mode)
  */
 
 int
-SetDeviceValuators (client, dev, valuators, first_valuator, num_valuators)
-    register	ClientPtr	client;
-    DeviceIntPtr dev;
-    int		*valuators;
-    int		first_valuator;
-    int		num_valuators;
-    {
+SetDeviceValuators(ClientPtr client, DeviceIntPtr dev,
+		   int *valuators, int first_valuator, int num_valuators)
+{
     return BadMatch;
-    }
+}
 
 /****************************************************************************
  *
@@ -294,16 +198,44 @@ SetDeviceValuators (client, dev, valuators, first_valuator, num_valuators)
  */
 
 int
-ChangeDeviceControl (client, dev, control)
-    register	ClientPtr	client;
-    DeviceIntPtr dev;
-    xDeviceCtl	*control;
-    {
-    switch (control->control)
-	{
-	case DEVICE_RESOLUTION:
-	    return (BadMatch);
-	default:
-	    return (BadMatch);
-	}
+ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev,
+		    xDeviceCtl * control)
+{
+    switch (control->control) {
+    case DEVICE_RESOLUTION:
+	return (BadMatch);
+    case DEVICE_ABS_CALIB:
+    case DEVICE_ABS_AREA:
+        return (BadMatch);
+    case DEVICE_CORE:
+        return (BadMatch);
+    default:
+	return (BadMatch);
     }
+}
+
+
+/****************************************************************************
+ *
+ * Caller: configAddDevice (and others)
+ *
+ * Add a new device with the specified options.
+ *
+ */
+int
+NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
+{
+    return BadValue;
+}
+
+/****************************************************************************
+ *
+ * Caller: configRemoveDevice (and others)
+ *
+ * Remove the specified device previously added.
+ *
+ */
+void
+DeleteInputDeviceRequest(DeviceIntPtr dev)
+{
+}
commit c4a616a741e15865ce0ff98781c6f1dca4d62887
Author: Ben Byer <bbyer at bushing.apple.com>
Date:   Mon Mar 24 22:43:10 2008 -0700

    prevent "fake mouse clicks" from generating spurious extra events
    (cherry picked from commit bd85a24969427e41389688663ead2d4dd41c9999)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 827fd81..22d8957 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -391,10 +391,12 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
       DarwinSimulateMouseClick(pointer_x, pointer_y, 2, darwinFakeMouse2Mask);
       darwinFakeMouseButtonDown = 2;
       darwinFakeMouseButtonMask = darwinFakeMouse2Mask;
+      return;
     } else if ((old_flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) {
       DarwinSimulateMouseClick(pointer_x, pointer_y, 3, darwinFakeMouse3Mask);
       darwinFakeMouseButtonDown = 3;
       darwinFakeMouseButtonMask = darwinFakeMouse3Mask;
+      return;
     }
   }
   if (ev_type == ButtonRelease && darwinFakeButtons && darwinFakeMouseButtonDown) {
@@ -406,6 +408,7 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
     // Bring modifiers back up to date
     DarwinUpdateModifiers(KeyPress, darwinFakeMouseButtonMask & old_flags);
     darwinFakeMouseButtonMask = 0;
+    return;
   } 
 
   num_events = GetPointerEvents(darwinEvents, darwinPointer, ev_type, ev_button, 
commit c747030a49dd289e873e2b686cd129d840e55468
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Mar 27 15:18:39 2008 +1000

    quirk: fix LPL monitors properly.
    
    no point having a h cm fix when we really want to copy the sizes from the
    other place.
    
    RH BZ 435216

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 2d1a6ab..777bb70 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -108,13 +108,6 @@ static Bool quirk_prefer_large_75 (int scrnIndex, xf86MonPtr DDC)
 
 static Bool quirk_detailed_h_in_cm (int scrnIndex, xf86MonPtr DDC)
 {
-    /* Bug #10304: "LGPhilipsLCD LP154W01-A5" */
-    /* Bug #12784: "LGPhilipsLCD LP154W01-TLA2" */
-    /* Red Hat #435216 "LGPhilipsLCD LP154W01-TLAE" */
-    if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
-	(DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00))
-	return TRUE;
-
     /* Bug #11603: Funai Electronics PM36B */
     if (memcmp (DDC->vendor.name, "FCM", 4) == 0 &&
 	DDC->vendor.prod_id == 13600)
@@ -137,7 +130,7 @@ static Bool quirk_detailed_use_maximum_size (int scrnIndex, xf86MonPtr DDC)
 {
     /* Bug #10304: LGPhilipsLCD LP154W01-A5 */
     if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
-	DDC->vendor.prod_id == 0)
+	(DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00))
 	return TRUE;
 
     return FALSE;
commit 9df915b84d45d39aed7557c98883b20a66da2e96
Merge: 47eb658... 333e712...
Author: Sascha Hlusiak <saschahlusiak at arcor.de>
Date:   Tue Mar 25 17:50:50 2008 +0100

    Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver

commit 333e7123dc484888d79c0f5aa3977bd72f1eb341
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Mar 25 12:48:22 2008 -0400

    Fix that last commit.
    
    I can apply patches, really.

diff --git a/dix/getevents.c b/dix/getevents.c
index 6a2f7ba..bf9331e 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -349,7 +349,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator,
     for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) {
         xv->type = DeviceValuator;
         xv->first_valuator = i;
-        xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (final_valuator - i);
+        xv->num_valuators = ((final_valuator - i) > 6) ? 6 : (final_valuator - i);
         xv->deviceid = pDev->id;
         switch (final_valuator - i) {
         case 6:
commit 47eb658e802775021e3efec109f95431cca188ca
Author: Sascha Hlusiak <saschahlusiak at arcor.de>
Date:   Tue Mar 25 17:37:25 2008 +0100

    Support to pass arbitrary options via HAL hotplugging
    
    Parse "input.x11_options" and pass every key/name pair to the driver.
    Remove check for input.capabilities, because that's part of the fdi files.
    
    Thanks to Dustin Spicuzza <dustin at virtualroadside.com> for the patch.

diff --git a/config/hal.c b/config/hal.c
index 1575422..f150646 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -38,9 +38,10 @@
 #include "config-backends.h"
 #include "os.h"
 
-#define TYPE_NONE 0
-#define TYPE_KEYS 1
-#define TYPE_POINTER 2
+
+#define LIBHAL_PROP_KEY "input.x11_options."
+#define LIBHAL_XKB_PROP_KEY "input.xkb."
+
 
 struct config_hal_info {
     DBusConnection *system_bus;
@@ -50,7 +51,8 @@ struct config_hal_info {
 static void
 remove_device(DeviceIntPtr dev)
 {
-    DebugF("[config/hal] removing device %s\n", dev->name);
+    /* this only gets called for devices that have already been added */
+    LogMessage(X_INFO, "config/hal: removing device %s\n", dev->name);
 
     /* Call PIE here so we don't try to dereference a device that's
      * already been removed. */
@@ -105,7 +107,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name)
     char *prop, *ret;
 
     prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL);
-    DebugF("[config/hal] getting %s on %s returned %s\n", name, udi, prop);
+    LogMessageVerb(X_INFO, 10, "config/hal: getting %s on %s returned %s\n", name, udi, prop);
     if (prop) {
         ret = xstrdup(prop);
         libhal_free_string(prop);
@@ -117,6 +119,9 @@ 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)
 {
@@ -150,117 +155,146 @@ 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)
 {
-    char **props;
-    char *path = NULL, *driver = NULL, *name = NULL, *xkb_rules = NULL;
-    char *xkb_model = NULL, *xkb_layout = NULL, *xkb_variant = NULL;
-    char *xkb_options = NULL, *config_info = NULL;
+    char *path = NULL, *driver = NULL, *name = NULL, *config_info = NULL;
     InputOption *options = NULL, *tmpo = NULL;
     DeviceIntPtr dev;
     DBusError error;
-    int type = TYPE_NONE;
-    int i;
-
+	
+    LibHalPropertySet *set = NULL;
+	LibHalPropertySetIterator set_iter;
+    char *psi_key = NULL, *tmp_val, *tmp_key;
+    
+    
     dbus_error_init(&error);
 
-    props = libhal_device_get_property_strlist(hal_ctx, udi,
-                                               "info.capabilities", &error);
-    if (!props) {
-        DebugF("[config/hal] couldn't get capabilities for %s: %s (%s)\n",
-               udi, error.name, error.message);
-        goto out_error;
-    }
-    for (i = 0; props[i]; i++) {
-        /* input.keys is the new, of which input.keyboard is a subset, but
-         * input.keyboard is the old 'we have keys', so we have to keep it
-         * around. */
-        if (strcmp(props[i], "input.keys") == 0 ||
-            strcmp(props[i], "input.keyboard") == 0)
-            type |= TYPE_KEYS;
-        if (strcmp(props[i], "input.mouse") == 0 ||
-            strcmp(props[i], "input.touchpad") == 0)
-            type |= TYPE_POINTER;
-    }
-    libhal_free_string_array(props);
-
-    if (type == TYPE_NONE)
-        goto out_error;
-
     driver = get_prop_string(hal_ctx, udi, "input.x11_driver");
+    if (!driver){
+        /* verbose, don't tell the user unless they _want_ to see it */
+        LogMessageVerb(X_INFO,7,"config/hal: no driver specified for device %s\n", udi);
+        goto unwind;
+    }
+    
     path = get_prop_string(hal_ctx, udi, "input.device");
-    if (!driver || !path) {
-        DebugF("[config/hal] no driver or path specified for %s\n", udi);
+    if (!path) {
+        LogMessage(X_WARNING,"config/hal: no driver or path specified for %s\n", udi);
         goto unwind;
     }
+    
     name = get_prop_string(hal_ctx, udi, "info.product");
     if (!name)
         name = xstrdup("(unnamed)");
 
-    if (type & TYPE_KEYS) {
-        xkb_rules = get_prop_string(hal_ctx, udi, "input.xkb.rules");
-        xkb_model = get_prop_string(hal_ctx, udi, "input.xkb.model");
-        xkb_layout = get_prop_string(hal_ctx, udi, "input.xkb.layout");
-        xkb_variant = get_prop_string(hal_ctx, udi, "input.xkb.variant");
-        xkb_options = get_prop_string_array(hal_ctx, udi, "input.xkb.options");
-    }
-
     options = xcalloc(sizeof(*options), 1);
+    if (!options){
+        LogMessage(X_ERROR, "config/hal: couldn't allocate space for input options!\n");
+        goto unwind;
+    }
+    
     options->key = xstrdup("_source");
     options->value = xstrdup("server/hal");
     if (!options->key || !options->value) {
-        ErrorF("[config] couldn't allocate first key/value pair\n");
+        LogMessage(X_ERROR, "config/hal: couldn't allocate first key/value pair\n");
         goto unwind;
     }
 
+    /* most drivers use device.. not path. evdev uses both however, but the 
+     * path version isn't documented apparently. support both for now. */
     add_option(&options, "path", path);
+    add_option(&options, "device", path);
+    
     add_option(&options, "driver", driver);
     add_option(&options, "name", name);
+    
     config_info = xalloc(strlen(udi) + 5); /* "hal:" and NULL */
-    if (!config_info)
+    if (!config_info) {
+        LogMessage(X_ERROR, "config/hal: couldn't allocate name\n");
         goto unwind;
+    }
     sprintf(config_info, "hal:%s", udi);
 
-    if (xkb_rules)
-        add_option(&options, "xkb_rules", xkb_rules);
-    if (xkb_model)
-        add_option(&options, "xkb_model", xkb_model);
-    if (xkb_layout)
-        add_option(&options, "xkb_layout", xkb_layout);
-    if (xkb_variant)
-        add_option(&options, "xkb_variant", xkb_variant);
-    if (xkb_options)
-        add_option(&options, "xkb_options", xkb_options);
-
-    DebugF("[config/hal] Adding device %s\n", name);
+    /* ok, grab options from hal.. iterate through all properties
+    * and lets see if any of them are options that we can add */
+    set = libhal_device_get_all_properties(hal_ctx, udi, &error);
+    
+    if (!set) {
+        LogMessage(X_ERROR, "config/hal: couldn't get property list for %s: %s (%s)\n",
+               udi, error.name, error.message);
+        goto unwind;
+    }
+	
+    libhal_psi_init(&set_iter,set);
+    while (libhal_psi_has_more(&set_iter)) {
+        /* we are looking for supported keys.. extract and add to options */
+        psi_key = libhal_psi_get_key(&set_iter);    
+        
+        if (psi_key){
+
+            /* normal options first (input.x11_options.<propname>) */
+            if (!strncasecmp(psi_key, LIBHAL_PROP_KEY, sizeof(LIBHAL_PROP_KEY)-1)){
+                
+                /* only support strings for all values */
+                tmp_val = get_prop_string(hal_ctx, udi, psi_key);
+                
+                if (tmp_val){
+                    add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
+                    xfree(tmp_val);
+                }
+            
+            /* evdev's XKB options... we should probably depreciate this usage */
+            } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
+                
+                /* only support strings for all values */
+                tmp_val = get_prop_string(hal_ctx, udi, psi_key);
+                
+                if (tmp_val){
+                    /* add "xkb_" + NULL */
+		    tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5);
+                    
+                    if (!tmp_key){
+                        LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key);
+                    } else {
+                        sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1);
+                        add_option(&options, tmp_key, tmp_val);
+                        
+                        xfree(tmp_key);
+                    }
+                    xfree(tmp_val);
+                }   
+            }
+        }
+        
+        /* psi_key doesn't need to be freed */
+        libhal_psi_next(&set_iter);
+    }
+	
+    /* 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);
     if (NewInputDeviceRequest(options, &dev) != Success) {
-        ErrorF("[config/hal] NewInputDeviceRequest failed\n");
+        LogMessage(X_ERROR, "config/hal: NewInputDeviceRequest failed\n");
         dev = NULL;
         goto unwind;
     }
 
-    for (; dev; dev = dev->next)
+    for (; dev; dev = dev->next){
+        if (dev->config_info)
+            xfree(dev->config_info);
         dev->config_info = xstrdup(config_info);
+    }
 
 unwind:
+    if (set)
+        libhal_free_property_set(set);
     if (path)
         xfree(path);
     if (driver)
         xfree(driver);
     if (name)
         xfree(name);
-    if (xkb_rules)
-        xfree(xkb_rules);
-    if (xkb_model)
-        xfree(xkb_model);
-    if (xkb_layout)
-        xfree(xkb_layout);
-    if (xkb_variant)
-        xfree(xkb_variant);
-    if (xkb_options)
-        xfree(xkb_options);
     if (config_info)
         xfree(config_info);
     while (!dev && (tmpo = options)) {
@@ -270,7 +304,6 @@ unwind:
         xfree(tmpo);
     }
 
-out_error:
     dbus_error_free(&error);
 
     return;
@@ -286,7 +319,7 @@ disconnect_hook(void *data)
         if (dbus_connection_get_is_connected(info->system_bus)) {
             dbus_error_init(&error);
             if (!libhal_ctx_shutdown(info->hal_ctx, &error))
-                DebugF("[config/hal] couldn't shut down context: %s (%s)\n",
+                LogMessage(X_WARNING, "config/hal: disconnect_hook couldn't shut down context: %s (%s)\n",
                         error.name, error.message);
             dbus_error_free(&error);
         }
@@ -312,21 +345,21 @@ connect_hook(DBusConnection *connection, void *data)
     if (!info->hal_ctx)
         info->hal_ctx = libhal_ctx_new();
     if (!info->hal_ctx) {
-        ErrorF("[config/hal] couldn't create HAL context\n");
+        LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n");
         goto out_err;
     }
 
     if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) {
-        ErrorF("[config/hal] couldn't associate HAL context with bus\n");
+        LogMessage(X_ERROR, "config/hal: couldn't associate HAL context with bus\n");
         goto out_ctx;
     }
     if (!libhal_ctx_init(info->hal_ctx, &error)) {
-        ErrorF("[config/hal] couldn't initialise context: %s (%s)\n",
+        LogMessage(X_ERROR, "config/hal: couldn't initialise context: %s (%s)\n",
                error.name, error.message);
         goto out_ctx;
     }
     if (!libhal_device_property_watch_all(info->hal_ctx, &error)) {
-        ErrorF("[config/hal] couldn't watch all properties: %s (%s)\n",
+        LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n",
                error.name, error.message);
         goto out_ctx2;
     }
@@ -346,7 +379,7 @@ connect_hook(DBusConnection *connection, void *data)
 
 out_ctx2:
     if (!libhal_ctx_shutdown(info->hal_ctx, &error))
-        DebugF("[config/hal] couldn't shut down context: %s (%s)\n",
+        LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
                error.name, error.message);
 out_ctx:
     libhal_ctx_free(info->hal_ctx);
@@ -374,10 +407,13 @@ config_hal_init(void)
     hal_info.hal_ctx = NULL;
 
     if (!config_dbus_core_add_hook(&hook)) {
-        ErrorF("[config/hal] failed to add D-Bus hook\n");
+        LogMessage(X_ERROR, "config/hal: failed to add D-Bus hook\n");
         return 0;
     }
 
+    /* verbose message */
+    LogMessageVerb(X_INFO,7,"config/hal: initialized");
+    
     return 1;
 }
 
diff --git a/config/x11-input.fdi b/config/x11-input.fdi
index c390706..f2e2d50 100644
--- a/config/x11-input.fdi
+++ b/config/x11-input.fdi
@@ -1,7 +1,57 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <deviceinfo version="0.2">
   <device>
-    <!-- FIXME: Support tablets too. -->
+  
+    <!-- The way this works: 
+    
+    Match against some input device (see the HAL specification for more 
+    information), and then merge in keys, which you can use to specify 
+    the configuration similar to the way you would in xorg.conf. You will 
+    need to restart HAL after making changes. If you are having issues,
+    starting X with the -logverbose 7 flag may yield useful information.
+    
+    Keys Supported:
+    
+        Key "input.x11_driver" (string)
+            This specifies the driver to use. You MUST specify this option,
+            or a driver will not be loaded and the rest will be ignored by
+            Xorg
+            
+        Key "input.x11_options.<option name>" (string)
+            This allows you to specify arbitrary options to pass to the driver.
+            Anything you would normally specify in xorg.conf goes here. So, for
+            option "Mode" in xorg.conf, you would specify the key name of
+            "input.x11_options.Mode". 
+
+	    Do not specify "input.x11_options.Device" since "input.device"
+	    will be used automatically.
+
+        Legacy Keys
+	     "input.xkb.rules"
+             "input.xkb.model"
+             "input.xkb.layout"
+             "input.xkb.variant"
+             "input.xkb.options"
+             
+            These keys are deprecated. Use these instead:
+	     "input.x11_options.XkbRules"
+	     "input.x11_options.XkbModel"
+	     "input.x11_options.XkbLayout"
+	     "input.x11_options.XkbVariant"
+	     "input.x11_options.XkbOptions"
+
+	    See the evdev documentation for more information. 
+    
+    You will probably want to add the following option to the ServerFlags of 
+    your xorg.conf:
+    
+        Option "AllowEmptyInput" "True"
+        
+    FIXME: Support tablets too. 
+    TODO: I think its fixed, can't test
+    
+    -->
+    
     <match key="info.capabilities" contains="input.mouse">
       <merge key="input.x11_driver" type="string">mouse</merge>
       <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
@@ -11,21 +61,21 @@
     </match>
 
     <match key="info.capabilities" contains="input.keys">
-      <merge key="input.xkb.rules" type="string">base</merge>
+      <merge key="input.x11_options.XkbRules" type="string">base</merge>
 
       <!-- If we're using Linux, we use evdev by default (falling back to
            keyboard otherwise). -->
       <merge key="input.x11_driver" type="string">keyboard</merge>
-      <merge key="input.xkb.model" type="string">pc105</merge>
+      <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
       <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
              string="Linux">
         <merge key="input.x11_driver" type="string">evdev</merge>
-        <merge key="input.xkb.model" type="string">evdev</merge>
+        <merge key="input.x11_options.XkbModel" type="string">evdev</merge>
       </match>
 
-      <merge key="input.xkb.layout" type="string">us</merge>
+      <merge key="input.x11_options.XkbLayout" type="string">us</merge>
 
-      <merge key="input.xkb.variant" type="string" />
+      <merge key="input.x11_options.XkbVariant" type="string" />
     </match>
   </device>
 </deviceinfo>
diff --git a/configure.ac b/configure.ac
index 3b00705..959f0ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1009,6 +1009,8 @@ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
 
 AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
                                         [Do not have 'strcasecmp'.]))
+AC_CHECK_FUNC(strncasecmp, [], AC_DEFINE([NEED_STRNCASECMP], 1,
+                                        [Do not have 'strncasecmp'.]))
 
 if test "x$NULL_ROOT_CURSOR" = xyes; then
         AC_DEFINE(NULL_ROOT_CURSOR, 1, [Use an empty root cursor])
commit e7a364425547103a98acabfc67d16e1ae0c2967f
Author: Sascha Hlusiak <saschahlusiak at arcor.de>
Date:   Tue Mar 25 12:32:33 2008 -0400

    Fix getValuatorEvents to compute number of valuators correctly.

diff --git a/dix/getevents.c b/dix/getevents.c
index 3e6fe5a..6a2f7ba 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -349,7 +349,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator,
     for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) {
         xv->type = DeviceValuator;
         xv->first_valuator = i;
-        xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i);
+        xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (final_valuator - i);
         xv->deviceid = pDev->id;
         switch (final_valuator - i) {
         case 6:
commit f028e245a7932362656701c08fcfbfa8e8949077
Author: David Nusinow <dnusinow at debian.org>
Date:   Thu Feb 28 19:45:21 2008 -0500

    Bug #10016: Implement WM_CLASS hints in Xephyr.

diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index 8ed7e23..5d58a21 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <signal.h>
+#include <libgen.h>
 
 #include "os.h"  		/* for OsSignal() */
 #include "kdrive.h"
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 6196996..47ddb3d 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -109,6 +109,7 @@ ddxUseMsg (void)
   ErrorF("-nodri               do not use DRI\n");
 #endif
   ErrorF("-noxv                do not use XV\n");
+  ErrorF("-name [name]         define the name in the WM_CLASS property\n");
   ErrorF("\n");
 
   exit(1);
@@ -148,6 +149,11 @@ ddxProcessArgument (int argc, char **argv, int i)
 {
   EPHYR_DBG("mark argv[%d]='%s'", i, argv[i] );
 
+  if (i == 1)
+    {
+      hostx_use_resname(basename(argv[0]), 0);
+    }
+
   if (!strcmp (argv[i], "-parent"))
     {
       if(i+1 < argc)
@@ -223,6 +229,19 @@ ddxProcessArgument (int argc, char **argv, int i)
        EPHYR_LOG ("no XVideo enabled\n") ;
        return 1 ;
    }
+  else if (!strcmp (argv[i], "-name"))
+   {
+       if (i+1 < argc && argv[i+1][0] != '-')
+         {
+           hostx_use_resname(argv[i+1], 1);
+           return 2;
+         }
+       else
+         {
+           UseMsg();
+           return 0;
+         }
+   }
   else if (argv[i][0] == ':')
     {
       hostx_set_display_name(argv[i]);
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index fd84ec0..1a71d06 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -107,6 +107,9 @@ extern EphyrKeySyms   ephyrKeySyms;
 
 extern int            monitorResolution;
 
+char           *ephyrResName = NULL;
+int             ephyrResNameFromCmd = 0;
+
 static void
 hostx_set_fullscreen_hint(void);
 
@@ -296,6 +299,13 @@ hostx_handle_signal (int signum)
               HostXWantDamageDebug);
 }
 
+void
+hostx_use_resname (char *name, int fromcmd)
+{
+  ephyrResName = name;
+  ephyrResNameFromCmd = fromcmd;
+}
+
 int
 hostx_init (void)
 {
@@ -304,6 +314,8 @@ hostx_init (void)
   Pixmap                cursor_pxm;
   XColor                col;
   int                   index;
+  char                  *tmpstr;
+  XClassHint            *class_hint;
 
   attr.event_mask =
     ButtonPressMask
@@ -327,6 +339,8 @@ hostx_init (void)
   HostX.depth   = DefaultDepth(HostX.dpy, HostX.screen);
   HostX.visual  = DefaultVisual(HostX.dpy, HostX.screen);
 
+  class_hint = XAllocClassHint();
+
   for (index = 0 ; index < HostX.n_screens ; index++)
     {
       struct EphyrHostScreen *host_screen = &HostX.screens[index];
@@ -389,9 +403,23 @@ hostx_init (void)
 
               hostx_set_fullscreen_hint();
             }
+
+          if (class_hint) 
+            {
+              tmpstr = getenv("RESOURCE_NAME");
+              if (tmpstr && (!ephyrResNameFromCmd))
+                ephyrResName = tmpstr;
+              class_hint->res_name = ephyrResName;
+              class_hint->res_class = "Xephyr";
+              XSetClassHint(hostx_get_display(), host_screen->win, class_hint);
+
+            }
+
         }
     }
 
+  if (class_hint)
+      XFree(class_hint);
 
   XParseColor (HostX.dpy, DefaultColormap (HostX.dpy,HostX.screen),
                "red", &col);
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index 48d3147..47ba61b 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -145,6 +145,9 @@ hostx_want_preexisting_window(EphyrScreenInfo screen);
 void
 hostx_use_preexisting_window(unsigned long win_id);
 
+void
+hostx_use_resname (char *name, int fromcmd);
+
 void 
 hostx_handle_signal(int signum);
 
commit 862ff9ac92037e13629329eb6ba50ff6bd2c5f71
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 24 13:37:42 2008 -0400

    Bug #11510: Fix build without RECORD.

diff --git a/Makefile.am b/Makefile.am
index e382d58..71ba2c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,6 +30,10 @@ if DBE
 DBE_DIR=dbe
 endif
 
+if RECORD
+RECORD_DIR=record
+endif
+
 SUBDIRS = \
 	doc \
 	include \
@@ -48,7 +52,7 @@ SUBDIRS = \
 	$(AFB_DIR) \
 	$(CFB_DIR) \
 	$(CFB32_DIR) \
-	record \
+	$(RECORD_DIR) \
 	xfixes \
 	damageext \
 	$(XTRAP_DIR) \
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index efc5f4a..dad2dd3 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -26,6 +26,10 @@ if MFB
 MFBMOD = libmfb.la
 endif
 
+if RECORD
+RECORDMOD = librecord.la
+endif
+
 module_LTLIBRARIES = $(AFBMOD) \
                      $(CFBMOD) \
                      libfb.la \
@@ -34,7 +38,7 @@ module_LTLIBRARIES = $(AFBMOD) \
                      libshadow.la
 
 extsmoduledir = $(moduledir)/extensions
-extsmodule_LTLIBRARIES = librecord.la \
+extsmodule_LTLIBRARIES = $(RECORDMOD) \
 			 $(DBEMOD) \
                          $(GLXMODS) \
                          $(XTRAPMOD)
commit 87bfd3bd96c714a1c252d42408b5a1a4ff9dab06
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 24 13:33:38 2008 -0400

    Bug #11508: Fix build without XV.

diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index f86a143..24fc44c 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -68,8 +68,10 @@
 # include "xf86Xinput.h"
 #endif
 #include "xf86OSmouse.h"
+#ifdef XV
 #include "xf86xv.h"
 #include "xf86xvmc.h"
+#endif
 #include "xf86cmap.h"
 #include "xf86fbman.h"
 #include "dgaproc.h"
commit 536f2ff5382aaaace3b55481e15366bb15d87801
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 24 12:22:19 2008 -0400

    Bug #13962: Re-arm the DPMS timer when re-enabling DPMS.

diff --git a/Xext/dpms.c b/Xext/dpms.c
index 6f01fa3..e3204fe 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -188,12 +188,15 @@ static int
 ProcDPMSEnable(client)
     register ClientPtr client;
 {
-    /* REQUEST(xDPMSEnableReq); */
+    Bool was_enabled = DPMSEnabled;
 
     REQUEST_SIZE_MATCH(xDPMSEnableReq);
 
-    if (DPMSCapableFlag)
+    if (DPMSCapableFlag) {
 	DPMSEnabled = TRUE;
+	if (!was_enabled)
+	    SetScreenSaverTimer();
+    }
 
     return(client->noClientException);
 }
commit 4217ba0cf0c9bbea3774760e836ab372acf3237c
Author: Julien Cristau <jcristau at debian.org>
Date:   Sat Mar 22 17:31:08 2008 +0100

    xaa: use xf86ReturnOptValBool instead of xf86IsOptionSet
    
    The latter doesn't return the option's value, just whether it's present
    in the configuration.

diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c
index 1b7c154..53795f0 100644
--- a/hw/xfree86/xaa/xaaInitAccel.c
+++ b/hw/xfree86/xaa/xaaInitAccel.c
@@ -181,7 +181,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
     if(infoRec->SetupForScreenToScreenCopy &&
        infoRec->SubsequentScreenToScreenCopy &&
-       !xf86IsOptionSet(options, XAAOPT_SCREEN_TO_SCREEN_COPY)) {
+       !xf86ReturnOptValBool(options, XAAOPT_SCREEN_TO_SCREEN_COPY, FALSE)) {
 	HaveScreenToScreenCopy = TRUE;
     } else {
 	infoRec->ScreenToScreenCopyFlags = 0;
@@ -192,10 +192,10 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
     /**** Solid Filled Rects ****/
 
     if(infoRec->SetupForSolidFill && infoRec->SubsequentSolidFillRect &&
-       !xf86IsOptionSet(options, XAAOPT_SOLID_FILL_RECT)) {
+       !xf86ReturnOptValBool(options, XAAOPT_SOLID_FILL_RECT, FALSE)) {
 		HaveSolidFillRect = TRUE;
 	if(infoRec->SubsequentSolidFillTrap &&
-	   !xf86IsOptionSet(options, XAAOPT_SOLID_FILL_TRAP))
+	   !xf86ReturnOptValBool(options, XAAOPT_SOLID_FILL_TRAP, FALSE))
 		HaveSolidFillTrap = TRUE;
 	else
 		infoRec->SubsequentSolidFillTrap = NULL;
@@ -210,10 +210,11 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
     if(infoRec->SetupForSolidLine) {
 	if(infoRec->SubsequentSolidTwoPointLine &&
-		!xf86IsOptionSet(options, XAAOPT_SOLID_TWO_POINT_LINE))
+		!xf86ReturnOptValBool(options,
+		                      XAAOPT_SOLID_TWO_POINT_LINE, FALSE))
 	    HaveSolidTwoPointLine = TRUE;
 	if(infoRec->SubsequentSolidBresenhamLine &&
-		!xf86IsOptionSet(options, XAAOPT_SOLID_BRESENHAM_LINE)) {
+		!xf86ReturnOptValBool(options, XAAOPT_SOLID_BRESENHAM_LINE, FALSE)) {
 	    HaveSolidBresenhamLine = TRUE;
 
 	    if(infoRec->SolidBresenhamLineErrorTermBits)
@@ -222,7 +223,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 	}
 
 	if(infoRec->SubsequentSolidHorVertLine &&
-		!xf86IsOptionSet(options, XAAOPT_SOLID_HORVERT_LINE))
+		!xf86ReturnOptValBool(options,
+		                      XAAOPT_SOLID_HORVERT_LINE, FALSE))
 	    HaveSolidHorVertLine = TRUE;
 	else if(HaveSolidTwoPointLine) {
 	    infoRec->SubsequentSolidHorVertLine = 
@@ -265,10 +267,14 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
    if(infoRec->SetupForMono8x8PatternFill &&
 		infoRec->SubsequentMono8x8PatternFillRect &&
-		!xf86IsOptionSet(options, XAAOPT_MONO_8x8_PATTERN_FILL_RECT)) {
+		!xf86ReturnOptValBool(options,
+		                      XAAOPT_MONO_8x8_PATTERN_FILL_RECT,
+		                      FALSE)) {
 	HaveMono8x8PatternFillRect = TRUE;
 	if(infoRec->SubsequentMono8x8PatternFillTrap &&
-		!xf86IsOptionSet(options, XAAOPT_MONO_8x8_PATTERN_FILL_TRAP))
+		!xf86ReturnOptValBool(options,
+		                      XAAOPT_MONO_8x8_PATTERN_FILL_TRAP,
+		                      FALSE))
 		HaveMono8x8PatternFillTrap = TRUE;
 
         if(infoRec->Mono8x8PatternFillFlags & 
@@ -318,10 +324,12 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
     if(infoRec->SetupForDashedLine && infoRec->DashPatternMaxLength) {
 	if(infoRec->SubsequentDashedTwoPointLine &&
-		!xf86IsOptionSet(options, XAAOPT_DASHED_TWO_POINT_LINE))
+		!xf86ReturnOptValBool(options, XAAOPT_DASHED_TWO_POINT_LINE,
+		                      FALSE))
 	    HaveDashedTwoPointLine = TRUE;
 	if(infoRec->SubsequentDashedBresenhamLine &&
-		!xf86IsOptionSet(options, XAAOPT_DASHED_BRESENHAM_LINE)) {
+		!xf86ReturnOptValBool(options, XAAOPT_DASHED_BRESENHAM_LINE,
+		                      FALSE)) {
 	    HaveDashedBresenhamLine = TRUE;
 
 	    if(infoRec->DashedBresenhamLineErrorTermBits)
@@ -345,10 +353,11 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
    if(infoRec->SetupForColor8x8PatternFill &&
       infoRec->SubsequentColor8x8PatternFillRect &&
-      !xf86IsOptionSet(options, XAAOPT_COL_8x8_PATTERN_FILL_RECT)) {
+      !xf86ReturnOptValBool(options, XAAOPT_COL_8x8_PATTERN_FILL_RECT, FALSE)) {
 	HaveColor8x8PatternFillRect = TRUE;
 	if(infoRec->SubsequentColor8x8PatternFillTrap &&
-	   !xf86IsOptionSet(options, XAAOPT_COL_8x8_PATTERN_FILL_TRAP))
+	   !xf86ReturnOptValBool(options, XAAOPT_COL_8x8_PATTERN_FILL_TRAP,
+	                         FALSE))
 		HaveColor8x8PatternFillTrap = TRUE;
 	else
 		infoRec->SubsequentColor8x8PatternFillTrap = NULL;
@@ -381,7 +390,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
     if(infoRec->SetupForCPUToScreenColorExpandFill && 
 	infoRec->ColorExpandBase &&
        	infoRec->SubsequentCPUToScreenColorExpandFill &&
-        !xf86IsOptionSet(options, XAAOPT_CPU_TO_SCREEN_COL_EXP_FILL)) {
+        !xf86ReturnOptValBool(options, XAAOPT_CPU_TO_SCREEN_COL_EXP_FILL,
+	                      FALSE)) {
 	int dwordsNeeded = pScrn->virtualX;
 
 	infoRec->ColorExpandRange >>= 2;	/* convert to DWORDS */
@@ -406,7 +416,9 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
        infoRec->SubsequentColorExpandScanline &&
        infoRec->ScanlineColorExpandBuffers && 
        (infoRec->NumScanlineColorExpandBuffers > 0) &&
-       !xf86IsOptionSet(options, XAAOPT_SCANLINE_CPU_TO_SCREEN_COL_EXP_FILL)) {
+       !xf86ReturnOptValBool(options,
+                             XAAOPT_SCANLINE_CPU_TO_SCREEN_COL_EXP_FILL,
+                             FALSE)) {
 	HaveScanlineColorExpansion = TRUE;
     } else {
 	infoRec->ScanlineCPUToScreenColorExpandFillFlags = 0;
@@ -419,7 +431,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
     if(infoRec->SetupForScreenToScreenColorExpandFill &&
        infoRec->SubsequentScreenToScreenColorExpandFill &&
-       !xf86IsOptionSet(options, XAAOPT_SCREEN_TO_SCREEN_COL_EXP_FILL)) {
+       !xf86ReturnOptValBool(options, XAAOPT_SCREEN_TO_SCREEN_COL_EXP_FILL,
+                             FALSE)) {
 	HaveScreenToScreenColorExpandFill = TRUE;
 	if (!infoRec->CacheColorExpandDensity)
 	    infoRec->CacheColorExpandDensity = 1;
@@ -433,7 +446,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
     if(infoRec->SetupForImageWrite && infoRec->ImageWriteBase &&
        infoRec->SubsequentImageWriteRect &&
-       !xf86IsOptionSet(options, XAAOPT_IMAGE_WRITE_RECT)) {
+       !xf86ReturnOptValBool(options, XAAOPT_IMAGE_WRITE_RECT, FALSE)) {
 
 	infoRec->ImageWriteRange >>= 2;	/* convert to DWORDS */
 	if(infoRec->ImageWriteFlags & CPU_TRANSFER_BASE_FIXED)
@@ -452,7 +465,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
        infoRec->SubsequentImageWriteScanline &&
        infoRec->ScanlineImageWriteBuffers && 
        (infoRec->NumScanlineImageWriteBuffers > 0) &&
-       !xf86IsOptionSet(options, XAAOPT_SCANLINE_IMAGE_WRITE_RECT)) {
+       !xf86ReturnOptValBool(options, XAAOPT_SCANLINE_IMAGE_WRITE_RECT,
+                             FALSE)) {
 	HaveScanlineImageWriteRect = TRUE;
     } else {
 	infoRec->ScanlineImageWriteFlags = 0;
@@ -518,7 +532,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 #define XAAMSG(s) do { if (serverGeneration == 1) xf86ErrorF(s); } while (0)
 
     if((infoRec->Flags & OFFSCREEN_PIXMAPS) && HaveScreenToScreenCopy &&
-		!xf86IsOptionSet(options, XAAOPT_OFFSCREEN_PIXMAPS)) {
+		!xf86ReturnOptValBool(options, XAAOPT_OFFSCREEN_PIXMAPS,
+		                      FALSE)) {
 	XAAMSG("\tOffscreen Pixmaps\n");
     } else {
 	infoRec->Flags &= ~OFFSCREEN_PIXMAPS;
@@ -800,7 +815,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
     /**** WriteBitmap ****/
 
     if(infoRec->WriteBitmap && 
-      !xf86IsOptionSet(options, XAAOPT_WRITE_BITMAP)) {
+      !xf86ReturnOptValBool(options, XAAOPT_WRITE_BITMAP, FALSE)) {
 	XAAMSG("\tDriver provided WriteBitmap replacement\n");
     } else if(HaveColorExpansion) {
 	if (infoRec->CPUToScreenColorExpandFillFlags & TRIPLE_BITS_24BPP) {
@@ -959,7 +974,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
     /**** WritePixmap ****/
 
     if(infoRec->WritePixmap &&
-      !xf86IsOptionSet(options, XAAOPT_WRITE_PIXMAP)) {
+      !xf86ReturnOptValBool(options, XAAOPT_WRITE_PIXMAP, FALSE)) {
 	XAAMSG("\tDriver provided WritePixmap replacement\n");
     } else if(HaveImageWriteRect) {
 	infoRec->WritePixmap = XAAWritePixmap;
@@ -1433,7 +1448,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
     else
 	infoRec->Flags &= ~PIXMAP_CACHE;
 
-    if (xf86IsOptionSet(options, XAAOPT_PIXMAP_CACHE))
+    if (xf86ReturnOptValBool(options, XAAOPT_PIXMAP_CACHE, FALSE))
 	infoRec->Flags &= ~PIXMAP_CACHE;
 
     if(infoRec->WriteMono8x8PatternToCache) {}
commit 6b9d2bb1f7f87acbf275027af9c2982e91e5faed
Author: Julien Cristau <jcristau at debian.org>
Date:   Sat Mar 22 17:28:48 2008 +0100

    exa: use xf86ReturnOptValBool instead of xf86IsOptionSet
    
    The latter doesn't give you the option's value, it just tells you if
    it's present in the configuration.  So using Option "EXANoComposite" "false"
    disabled composite acceleration.

diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c
index 086639c..e18da0a 100644
--- a/hw/xfree86/exa/examodule.c
+++ b/hw/xfree86/exa/examodule.c
@@ -148,22 +148,23 @@ exaDDXDriverInit(ScreenPtr pScreen)
 				 FALSE);
     }
 
-    if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
-	xf86DrvMsg(pScreen->myNum, X_INFO,
+    if (xf86ReturnOptValBool(pScreenPriv->options,
+                             EXAOPT_NO_COMPOSITE, FALSE)) {
+	xf86DrvMsg(pScreen->myNum, X_CONFIG,
 		   "EXA: Disabling Composite operation "
 		   "(RENDER acceleration)\n");
 	pExaScr->info->CheckComposite = NULL;
 	pExaScr->info->PrepareComposite = NULL;
     }
 
-    if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_UTS)) {
-	xf86DrvMsg(pScreen->myNum, X_INFO,
+    if (xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_NO_UTS, FALSE)) {
+	xf86DrvMsg(pScreen->myNum, X_CONFIG,
 		   "EXA: Disabling UploadToScreen\n");
 	pExaScr->info->UploadToScreen = NULL;
     }
 
-    if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_DFS)) {
-	xf86DrvMsg(pScreen->myNum, X_INFO,
+    if (xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_NO_DFS, FALSE)) {
+	xf86DrvMsg(pScreen->myNum, X_CONFIG,
 		   "EXA: Disabling DownloadFromScreen\n");
 	pExaScr->info->DownloadFromScreen = NULL;
     }
commit 63859473965f911515bc6e8d87b32a65ec41eb73
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Fri Mar 21 19:31:31 2008 -0700

    XQuartz: Disable 256 color option and fullscreen option
    (cherry picked from commit 7c1964338a33558d3f25e369dfca99e3ef9d10f9)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 1cf992d..b7c8763 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -612,8 +612,10 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
 	
     quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
                         default:quartzUseSysBeep];
-    quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS
-                        default:quartzEnableRootless];
+
+    // TODO: Add fullscreen support
+    //quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS
+    //                    default:quartzEnableRootless];
 #ifdef DARWIN_DDX_MISSING
     quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:
 					      @PREFS_FULLSCREEN_HOTKEYS default:
@@ -645,6 +647,10 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
 	
     darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
                           default:darwinDesiredDepth];
+    
+    // TODO: Add 256 color support
+    if(darwinDesiredDepth == 8)
+        darwinDesiredDepth = -1;
 	
     enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO
                      default:false];
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 3880b3f..a9d2add 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -635,22 +635,27 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 
 - (IBAction) prefs_show:sender
 {
-  [fake_buttons setIntValue:darwinFakeButtons];
-  [use_sysbeep setIntValue:quartzUseSysBeep];
-  [enable_keyequivs setIntValue:X11EnableKeyEquivalents];
-  [sync_keymap setIntValue:darwinSyncKeymap];
-  [sync_keymap setEnabled:darwinKeymapFile == NULL];
-  [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_CLICK_THROUGH default:NO]];
-  [focus_follows_mouse setIntValue:[NSApp prefs_get_boolean:@PREFS_FFM default:NO]];
-  [focus_on_new_window setIntValue:[NSApp prefs_get_boolean:@PREFS_FOCUS_ON_NEW_WINDOW default:YES]];
-
-  [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]];
-  [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
-  [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
-	
-  [enable_fullscreen setIntValue:!quartzEnableRootless];
-	
-  [prefs_panel makeKeyAndOrderFront:sender];
+    [fake_buttons setIntValue:darwinFakeButtons];
+    [use_sysbeep setIntValue:quartzUseSysBeep];
+    [enable_keyequivs setIntValue:X11EnableKeyEquivalents];
+    [sync_keymap setIntValue:darwinSyncKeymap];
+    [sync_keymap setEnabled:darwinKeymapFile == NULL];
+    [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_CLICK_THROUGH default:NO]];
+    [focus_follows_mouse setIntValue:[NSApp prefs_get_boolean:@PREFS_FFM default:NO]];
+    [focus_on_new_window setIntValue:[NSApp prefs_get_boolean:@PREFS_FOCUS_ON_NEW_WINDOW default:YES]];
+    
+    [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]];
+    [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
+
+    [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
+    // TODO: Add 256 color support
+    [depth removeItemAtIndex:[depth indexOfItemWithTag:8]];
+	
+    [enable_fullscreen setIntValue:!quartzEnableRootless];
+    // TODO: Add fullscreen support
+    [enable_fullscreen setEnabled:NO];
+	
+    [prefs_panel makeKeyAndOrderFront:sender];
 }
 
 - (IBAction) quit:sender
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
index adc0340..672ba90 100644
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
@@ -472,7 +472,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>
@@ -616,6 +616,7 @@ 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"/>
@@ -839,7 +840,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</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 +957,6 @@ 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"/>
@@ -1068,14 +1068,14 @@ 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>
@@ -3363,9 +3363,9 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{271, 666}, {301, 153}}</string>
-					<string>{{460, 353}, {484, 280}}</string>
+					<string>{{313, 353}, {484, 280}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>{{460, 353}, {484, 280}}</string>
+					<string>{{313, 353}, {484, 280}}</string>
 					<reference ref="9"/>
 					<string>{{184, 290}, {481, 345}}</string>
 					<object class="NSDictionary">
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index 400ee5c..91a7c5a 100644
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib differ
commit 93daa3a3bf1a981757024847882ce92b6bdaae83
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Fri Mar 21 19:11:59 2008 -0700

    Xquartz: Added separate preference tab for quartz-wm settings
    Added FFM and "Focus on new window" options
    (cherry picked from commit 6841d078b7cb0b0db3db948d26b4d5ec7747deb8)

diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h
index 86da67f..ea9a6b7 100644
--- a/hw/xquartz/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -98,6 +98,8 @@ extern int quartzHasRoot, quartzEnableRootless;
 #define PREFS_XP_OPTIONS            "xp_options"
 #define PREFS_ENABLE_STEREO         "enable_stereo"
 #define PREFS_LOGIN_SHELL           "login_shell"
-#define PREFS_QUARTZ_WM_CLICK_THROUGH "wm_click_through"
+#define PREFS_CLICK_THROUGH         "wm_click_through"
+#define PREFS_FFM                   "wm_ffm"
+#define PREFS_FOCUS_ON_NEW_WINDOW   "wm_focus_on_new_window"
 
 #endif /* X11APPLICATION_H */
diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index 64d5cd1..8d6a38f 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -45,6 +45,8 @@
     IBOutlet NSButton *enable_keyequivs;
     IBOutlet NSButton *sync_keymap;
     IBOutlet NSButton *click_through;
+    IBOutlet NSButton *focus_follows_mouse;
+    IBOutlet NSButton *focus_on_new_window;
     IBOutlet NSButton *enable_auth;
     IBOutlet NSButton *enable_tcp;
     IBOutlet NSPopUpButton *depth;
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 5111eaf..3880b3f 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -609,24 +609,28 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 
 - (IBAction)prefs_changed:sender
 {
-  darwinFakeButtons = [fake_buttons intValue];
-  quartzUseSysBeep = [use_sysbeep intValue];
-  X11EnableKeyEquivalents = [enable_keyequivs intValue];
-  darwinSyncKeymap = [sync_keymap intValue];
-
-  /* after adding prefs here, also add to [X11Application read_defaults]
+    darwinFakeButtons = [fake_buttons intValue];
+    quartzUseSysBeep = [use_sysbeep intValue];
+    X11EnableKeyEquivalents = [enable_keyequivs intValue];
+    darwinSyncKeymap = [sync_keymap intValue];
+    
+    /* after adding prefs here, also add to [X11Application read_defaults]
      and below */
 	
-  [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons];
-  [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep];
-  [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents];
-  [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap];
-  [NSApp prefs_set_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH value:[click_through intValue]];
-  [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]];
-  [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]];
-  [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]];
+    [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons];
+    [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep];
+    [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents];
+    [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap];
+    [NSApp prefs_set_boolean:@PREFS_CLICK_THROUGH value:[click_through intValue]];
+    [NSApp prefs_set_boolean:@PREFS_FFM value:[focus_follows_mouse intValue]];
+    [NSApp prefs_set_boolean:@PREFS_FOCUS_ON_NEW_WINDOW value:[focus_on_new_window intValue]];
+    [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]];
+    [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]];
+    [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]];
+    
+    system("killall -HUP quartz-wm");
 	
-  [NSApp prefs_synchronize];
+    [NSApp prefs_synchronize];
 }
 
 - (IBAction) prefs_show:sender
@@ -636,8 +640,10 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
   [enable_keyequivs setIntValue:X11EnableKeyEquivalents];
   [sync_keymap setIntValue:darwinSyncKeymap];
   [sync_keymap setEnabled:darwinKeymapFile == NULL];
-  [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH default:NO]];
-	
+  [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_CLICK_THROUGH default:NO]];
+  [focus_follows_mouse setIntValue:[NSApp prefs_get_boolean:@PREFS_FFM default:NO]];
+  [focus_on_new_window setIntValue:[NSApp prefs_get_boolean:@PREFS_FOCUS_ON_NEW_WINDOW default:YES]];
+
   [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]];
   [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
   [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
index ea3a0da..adc0340 100644
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/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="285"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -448,7 +446,7 @@
 			<object class="NSWindowTemplate" id="124913468">
 				<int key="NSWindowStyleMask">3</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{319, 294}, {481, 345}}</string>
+				<string key="NSWindowRect">{{266, 392}, {484, 280}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Preferences</string>
 				<string key="NSWindowClass">NSPanel</string>
@@ -465,7 +463,7 @@
 						<object class="NSTabView" id="448510093">
 							<reference key="NSNextResponder" ref="941366957"/>
 							<int key="NSvFlags">256</int>
-							<string key="NSFrame">{{10, 10}, {458, 325}}</string>
+							<string key="NSFrame">{{13, 10}, {458, 264}}</string>
 							<reference key="NSSuperview" ref="941366957"/>
 							<object class="NSMutableArray" key="NSTabViewItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
@@ -474,14 +472,14 @@
 										<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>
 											<object class="NSButton" id="119157981">
 												<reference key="NSNextResponder" ref="596750588"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 243}, {402, 18}}</string>
+												<string key="NSFrame">{{18, 182}, {402, 18}}</string>
 												<reference key="NSSuperview" ref="596750588"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSButtonCell" key="NSCell" id="990762273">
@@ -508,7 +506,7 @@
 											<object class="NSTextField" id="443008216">
 												<reference key="NSNextResponder" ref="596750588"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 93}, {385, 31}}</string>
+												<string key="NSFrame">{{36, 32}, {385, 31}}</string>
 												<reference key="NSSuperview" ref="596750588"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="391919450">
@@ -544,7 +542,7 @@
 											<object class="NSTextField" id="282885445">
 												<reference key="NSNextResponder" ref="596750588"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 208}, {385, 29}}</string>
+												<string key="NSFrame">{{36, 147}, {385, 29}}</string>
 												<reference key="NSSuperview" ref="596750588"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="649334366">
@@ -561,7 +559,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSButton" id="842100515">
 												<reference key="NSNextResponder" ref="596750588"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 130}, {402, 18}}</string>
+												<string key="NSFrame">{{18, 69}, {402, 18}}</string>
 												<reference key="NSSuperview" ref="596750588"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSButtonCell" key="NSCell" id="940564599">
@@ -582,7 +580,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSTextField" id="31160162">
 												<reference key="NSNextResponder" ref="596750588"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 159}, {385, 14}}</string>
+												<string key="NSFrame">{{36, 98}, {385, 14}}</string>
 												<reference key="NSSuperview" ref="596750588"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="666057093">
@@ -598,7 +596,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSButton" id="179949713">
 												<reference key="NSNextResponder" ref="596750588"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 179}, {402, 18}}</string>
+												<string key="NSFrame">{{18, 118}, {402, 18}}</string>
 												<reference key="NSSuperview" ref="596750588"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSButtonCell" key="NSCell" id="967619578">
@@ -616,46 +614,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
 											</object>
-											<object class="NSButton" id="915448994">
-												<reference key="NSNextResponder" ref="596750588"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 69}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="596750588"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="117056849">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Click-through Inactive Windows</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="915448994"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="707276799">
-												<reference key="NSNextResponder" ref="596750588"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{33, 32}, {385, 31}}</string>
-												<reference key="NSSuperview" ref="596750588"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="318286890">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="707276799"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
 										</object>
-										<string key="NSFrame">{{10, 33}, {438, 279}}</string>
-										<reference key="NSSuperview" ref="448510093"/>
+										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
 									</object>
 									<string key="NSLabel">Input</string>
 									<reference key="NSColor" ref="57160303"/>
@@ -673,7 +633,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSButton" id="418227126">
 												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 116}, {402, 18}}</string>
+												<string key="NSFrame">{{18, 55}, {402, 18}}</string>
 												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSButtonCell" key="NSCell" id="1016069354">
@@ -694,7 +654,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSTextField" id="1039016593">
 												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 82}, {385, 28}}</string>
+												<string key="NSFrame">{{36, 21}, {385, 28}}</string>
 												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="624655599">
@@ -710,7 +670,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSPopUpButton" id="709074847">
 												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{74, 235}, {128, 26}}</string>
+												<string key="NSFrame">{{74, 174}, {128, 26}}</string>
 												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSPopUpButtonCell" key="NSCell" id="633115429">
@@ -801,7 +761,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSTextField" id="201731424">
 												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{17, 238}, {55, 20}}</string>
+												<string key="NSFrame">{{17, 177}, {55, 20}}</string>
 												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="930265681">
@@ -817,7 +777,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSTextField" id="86150604">
 												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 216}, {392, 14}}</string>
+												<string key="NSFrame">{{36, 155}, {392, 14}}</string>
 												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="311969422">
@@ -833,7 +793,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSButton" id="477203622">
 												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 182}, {409, 23}}</string>
+												<string key="NSFrame">{{18, 121}, {409, 23}}</string>
 												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSButtonCell" key="NSCell" id="631531164">
@@ -854,7 +814,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSTextField" id="298603383">
 												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 145}, {385, 31}}</string>
+												<string key="NSFrame">{{36, 84}, {385, 31}}</string>
 												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="761107402">
@@ -868,12 +828,140 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 												</object>
 											</object>
 										</object>
-										<string key="NSFrame">{{10, 33}, {438, 279}}</string>
+										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
 									</object>
 									<string key="NSLabel">Output</string>
 									<reference key="NSColor" ref="57160303"/>
 									<reference key="NSTabView" ref="448510093"/>
 								</object>
+								<object class="NSTabViewItem" id="10973343">
+									<object class="NSMutableString" key="NSIdentifier">
+										<characters key="NS.bytes">2</characters>
+									</object>
+									<object class="NSView" key="NSView" id="184765684">
+										<reference key="NSNextResponder" ref="448510093"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSButton" id="657659108">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{15, 184}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="259618205">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Click-through Inactive Windows</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="657659108"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="290578835">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{23, 147}, {385, 31}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="399127858">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="290578835"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSButton" id="992839333">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{15, 123}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="959555182">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Focus Follows Mouse</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="992839333"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="138261120">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{23, 100}, {385, 17}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<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>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="138261120"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSButton" id="128352289">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{15, 79}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="556463187">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Focus On New Windows</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="128352289"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="57161931">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{23, 45}, {385, 28}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="989804990">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">When enabled, creation of a new X11 window will cause X11.app to move to the foreground (instead of Finder.app, Terminal.app, etc.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="57161931"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</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"/>
+									<reference key="NSTabView" ref="448510093"/>
+								</object>
 								<object class="NSTabViewItem" id="348328898">
 									<object class="NSView" key="NSView" id="300811574">
 										<nil key="NSNextResponder"/>
@@ -883,7 +971,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSButton" id="989050925">
 												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 243}, {402, 18}}</string>
+												<string key="NSFrame">{{18, 182}, {402, 18}}</string>
 												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSButtonCell" key="NSCell" id="189594322">
@@ -904,7 +992,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSButton" id="700826966">
 												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 166}, {402, 18}}</string>
+												<string key="NSFrame">{{18, 105}, {402, 18}}</string>
 												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSButtonCell" key="NSCell" id="489340979">
@@ -925,7 +1013,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 											<object class="NSTextField" id="168436707">
 												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 195}, {385, 42}}</string>
+												<string key="NSFrame">{{36, 134}, {385, 42}}</string>
 												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="53243865">
@@ -943,7 +1031,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 											<object class="NSTextField" id="363817195">
 												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 118}, {385, 42}}</string>
+												<string key="NSFrame">{{36, 57}, {385, 42}}</string>
 												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="390084685">
@@ -959,7 +1047,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 											<object class="NSTextField" id="223835729">
 												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{20, 17}, {404, 14}}</string>
+												<string key="NSFrame">{{20, -44}, {404, 14}}</string>
 												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
 												<object class="NSTextFieldCell" key="NSCell" id="283628678">
@@ -973,27 +1061,27 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 												</object>
 											</object>
 										</object>
-										<string key="NSFrame">{{10, 33}, {438, 279}}</string>
+										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
 									</object>
 									<string key="NSLabel">Security</string>
 									<reference key="NSColor" ref="57160303"/>
 									<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>
-					<string key="NSFrameSize">{481, 345}</string>
+					<string key="NSFrameSize">{484, 280}</string>
 				</object>
-				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
 				<string key="NSMinSize">{213, 129}</string>
 				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSFrameAutosaveName">x11_prefs</string>
@@ -1001,7 +1089,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 			<object class="NSWindowTemplate" id="604417141">
 				<int key="NSWindowStyleMask">11</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{361, 362}, {454, 311}}</string>
+				<string key="NSWindowRect">{{302, 400}, {454, 311}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Application Menu</string>
 				<string key="NSWindowClass">NSPanel</string>
@@ -1011,7 +1099,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				<string key="NSWindowContentMaxSize">{10000, 10000}</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>
@@ -1353,9 +1441,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 					</object>
 					<string key="NSFrameSize">{454, 311}</string>
-					<reference key="NSSuperview"/>
 				</object>
-				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
 				<string key="NSMinSize">{320, 262}</string>
 				<string key="NSFrameAutosaveName">x11_apps</string>
 			</object>
@@ -1842,14 +1929,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<int key="connectionID">549</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="915448994"/>
-					</object>
-					<int key="connectionID">300300</int>
-				</object>
-				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">window_separator</string>
 						<reference key="source" ref="485884620"/>
@@ -1859,14 +1938,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
-						<string key="label">click_through</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="915448994"/>
-					</object>
-					<int key="connectionID">300332</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
 						<string key="label">menu</string>
 						<reference key="source" ref="815810918"/>
 						<reference key="destination" ref="524015605"/>
@@ -1881,6 +1952,54 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					</object>
 					<int key="connectionID">300336</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="657659108"/>
+					</object>
+					<int key="connectionID">300389</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="992839333"/>
+					</object>
+					<int key="connectionID">300390</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="128352289"/>
+					</object>
+					<int key="connectionID">300391</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">click_through</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="657659108"/>
+					</object>
+					<int key="connectionID">300392</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">focus_follows_mouse</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="992839333"/>
+					</object>
+					<int key="connectionID">300393</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">focus_on_new_window</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="128352289"/>
+					</object>
+					<int key="connectionID">300394</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
@@ -2239,6 +2358,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<reference ref="287591690"/>
 							<reference ref="960678392"/>
 							<reference ref="348328898"/>
+							<reference ref="10973343"/>
 						</object>
 						<reference key="parent" ref="941366957"/>
 					</object>
@@ -2262,8 +2382,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<reference ref="842100515"/>
 							<reference ref="31160162"/>
 							<reference ref="179949713"/>
-							<reference ref="915448994"/>
-							<reference ref="707276799"/>
 						</object>
 						<reference key="parent" ref="287591690"/>
 					</object>
@@ -2671,34 +2789,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<reference key="parent" ref="341113515"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">300296</int>
-						<reference key="object" ref="915448994"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="117056849"/>
-						</object>
-						<reference key="parent" ref="596750588"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300297</int>
-						<reference key="object" ref="117056849"/>
-						<reference key="parent" ref="915448994"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300298</int>
-						<reference key="object" ref="707276799"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="318286890"/>
-						</object>
-						<reference key="parent" ref="596750588"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300299</int>
-						<reference key="object" ref="318286890"/>
-						<reference key="parent" ref="707276799"/>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">295</int>
 						<reference key="object" ref="1063387772"/>
 						<object class="NSMutableArray" key="children">
@@ -2853,6 +2943,113 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<reference key="object" ref="444952046"/>
 						<reference key="parent" ref="96874957"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300337</int>
+						<reference key="object" ref="10973343"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="184765684"/>
+						</object>
+						<reference key="parent" ref="448510093"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300338</int>
+						<reference key="object" ref="184765684"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="657659108"/>
+							<reference ref="290578835"/>
+							<reference ref="992839333"/>
+							<reference ref="138261120"/>
+							<reference ref="128352289"/>
+							<reference ref="57161931"/>
+						</object>
+						<reference key="parent" ref="10973343"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300358</int>
+						<reference key="object" ref="290578835"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="399127858"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300359</int>
+						<reference key="object" ref="657659108"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="259618205"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300360</int>
+						<reference key="object" ref="259618205"/>
+						<reference key="parent" ref="657659108"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300361</int>
+						<reference key="object" ref="399127858"/>
+						<reference key="parent" ref="290578835"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300362</int>
+						<reference key="object" ref="992839333"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="959555182"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300363</int>
+						<reference key="object" ref="959555182"/>
+						<reference key="parent" ref="992839333"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300364</int>
+						<reference key="object" ref="138261120"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="183409141"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300365</int>
+						<reference key="object" ref="183409141"/>
+						<reference key="parent" ref="138261120"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300368</int>
+						<reference key="object" ref="128352289"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="556463187"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300369</int>
+						<reference key="object" ref="556463187"/>
+						<reference key="parent" ref="128352289"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300370</int>
+						<reference key="object" ref="57161931"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="989804990"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300371</int>
+						<reference key="object" ref="989804990"/>
+						<reference key="parent" ref="57161931"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
@@ -2919,10 +3116,12 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>24.IBPluginDependency</string>
 					<string>24.ImportedFromIB2</string>
 					<string>24.editorWindowContentRectSynchronizationRect</string>
+					<string>244.IBEditorWindowLastContentRect</string>
 					<string>244.IBPluginDependency</string>
 					<string>244.IBWindowTemplateEditedContentRect</string>
 					<string>244.ImportedFromIB2</string>
 					<string>244.editorWindowContentRectSynchronizationRect</string>
+					<string>244.lastResizeAction</string>
 					<string>244.windowTemplate.hasMaxSize</string>
 					<string>244.windowTemplate.hasMinSize</string>
 					<string>244.windowTemplate.maxSize</string>
@@ -2971,12 +3170,24 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>299.IBPluginDependency</string>
 					<string>299.ImportedFromIB2</string>
 					<string>300295.IBShouldRemoveOnLegacySave</string>
-					<string>300296.IBPluginDependency</string>
-					<string>300296.ImportedFromIB2</string>
-					<string>300298.IBPluginDependency</string>
-					<string>300298.ImportedFromIB2</string>
 					<string>300330.IBPluginDependency</string>
 					<string>300330.ImportedFromIB2</string>
+					<string>300337.IBPluginDependency</string>
+					<string>300337.ImportedFromIB2</string>
+					<string>300338.IBPluginDependency</string>
+					<string>300338.ImportedFromIB2</string>
+					<string>300358.IBPluginDependency</string>
+					<string>300358.ImportedFromIB2</string>
+					<string>300359.IBPluginDependency</string>
+					<string>300359.ImportedFromIB2</string>
+					<string>300362.IBPluginDependency</string>
+					<string>300362.ImportedFromIB2</string>
+					<string>300364.IBPluginDependency</string>
+					<string>300364.ImportedFromIB2</string>
+					<string>300368.IBPluginDependency</string>
+					<string>300368.ImportedFromIB2</string>
+					<string>300370.IBPluginDependency</string>
+					<string>300370.ImportedFromIB2</string>
 					<string>305.IBPluginDependency</string>
 					<string>305.ImportedFromIB2</string>
 					<string>310.IBPluginDependency</string>
@@ -3152,10 +3363,24 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{271, 666}, {301, 153}}</string>
+					<string>{{460, 353}, {484, 280}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>{{184, 290}, {481, 345}}</string>
+					<string>{{460, 353}, {484, 280}}</string>
 					<reference ref="9"/>
 					<string>{{184, 290}, {481, 345}}</string>
+					<object class="NSDictionary">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSMutableArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>IBResizeActionFinalFrame</string>
+							<string>IBResizeActionInitialFrame</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>{{182, 481}, {484, 280}}</string>
+							<string>{{182, 103}, {536, 658}}</string>
+						</object>
+					</object>
 					<reference ref="9"/>
 					<reference ref="9"/>
 					<string>{3.40282e+38, 3.40282e+38}</string>
@@ -3169,11 +3394,11 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>{{100, 746}, {155, 33}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<string>{{537, 545}, {454, 311}}</string>
+					<string>{{407, 545}, {454, 311}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<reference ref="9"/>
-					<string>{{537, 545}, {454, 311}}</string>
+					<string>{{407, 545}, {454, 311}}</string>
 					<reference ref="9"/>
 					<string>{{433, 406}, {486, 327}}</string>
 					<object class="NSDictionary">
@@ -3320,6 +3545,18 @@ 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"/>
+					<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"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
 					<string>{{12, 633}, {218, 203}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
@@ -3356,7 +3593,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">300336</int>
+			<int key="maxID">300394</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -3378,6 +3615,17 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				<object class="IBPartialClassDescription">
 					<string key="className">X11Controller</string>
 					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<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">
@@ -3439,6 +3687,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</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>
@@ -3460,6 +3710,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</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>
@@ -3469,8 +3721,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBUserSource</string>
-						<string key="minorKey"/>
+						<string key="majorKey">IBDocumentRelativeSource</string>
+						<string key="minorKey">../../X11Controller.h</string>
 					</object>
 				</object>
 			</object>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index f60dcba..400ee5c 100644
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/quartzCommon.h b/hw/xquartz/quartzCommon.h
index a0d4673..c4bd2d8 100644
--- a/hw/xquartz/quartzCommon.h
+++ b/hw/xquartz/quartzCommon.h
@@ -68,6 +68,7 @@ extern int              quartzEventWriteFD;
 // User preferences used by Quartz modes
 extern int              quartzRootless;
 extern int              quartzUseSysBeep;
+extern int              focusOnNewWindow;
 extern int              quartzUseAGL;
 extern int              quartzEnableKeyEquivalents;
 
@@ -91,17 +92,4 @@ int  QuartzFSUseQDCursor(int depth);
 void QuartzBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask);
 void QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask);
 
-// Messages that can be sent to the main thread.
-enum {
-    kQuartzServerHidden,
-    kQuartzServerStarted,
-    kQuartzServerDied,
-    kQuartzCursorUpdate,
-    kQuartzPostEvent,
-    kQuartzSetWindowMenu,
-    kQuartzSetWindowMenuCheck,
-    kQuartzSetFrontProcess,
-    kQuartzSetCanQuit
-};
-
 #endif  /* _QUARTZCOMMON_H */
diff --git a/hw/xquartz/quartzForeground.c b/hw/xquartz/quartzForeground.c
index 0e724de..80a04a1 100644
--- a/hw/xquartz/quartzForeground.c
+++ b/hw/xquartz/quartzForeground.c
@@ -38,7 +38,7 @@ int QuartzMoveToForeground() {
    ProcessSerialNumber psn = { 0, kCurrentProcess };
    OSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication);
    if( returnCode == 0) {
-       fprintf(stderr, "TransformProcessType: Success\n");
+       /* fprintf(stderr, "TransformProcessType: Success\n"); */
        SetFrontProcess(&psn);
    } else {
        fprintf(stderr, "TransformProcessType: Failure\n");
commit c49e11268322712c211f29d51d664d3f8a59b00b
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Fri Mar 21 18:07:38 2008 -0700

    XQuartz: Initial framework for dealing with spaces on OS-X
    (cherry picked from commit 9831324998f9d1f05ff944c58c5bf60dcae17355)

diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index c5e2ed8..325122d 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -106,6 +106,7 @@ enum {
     kXDarwinBringAllToFront,  // bring all X windows to front
     kXDarwinToggleFullscreen, // Enable/Disable fullscreen mode
     kXDarwinSetRootless,      // Set rootless mode
+    kXDarwinSpaceChanged,     // Spaces changed
     /*
      * AppleWM events
      */
@@ -116,7 +117,7 @@ enum {
      */
     kXDarwinDisplayChanged,   // display configuration has changed
     kXDarwinWindowState,      // window visibility state has changed
-    kXDarwinWindowMoved       // window has moved on screen
+    kXDarwinWindowMoved,      // window has moved on screen
 };
 
 #define ENABLE_DEBUG_LOG 1
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 6f42c53..a034c9f 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -266,7 +266,7 @@ static void QuartzUpdateScreens(void)
     
 #ifndef FAKE_RANDR
     if(!QuartzRandRInit(pScreen))
-      FatalError("Failed to init RandR extension.\n");
+        FatalError("Failed to init RandR extension.\n");
 #endif
 
     DarwinAdjustScreenOrigins(&screenInfo);
@@ -364,6 +364,14 @@ static void QuartzSetRootClip(
     }
 }
 
+/* 
+ * QuartzSpaceChanged
+ *  Unmap offscreen windows, map onscreen windows
+ */
+static void QuartzSpaceChanged(uint32_t space_id) {
+    /* Do something special here, so we don't depend on quartz-wm for spaces to work... */
+    DEBUG_LOG("Space Changed (%u) ... do something interesting...\n", space_id);
+}
 
 /*
  * QuartzMessageServerThread
@@ -494,6 +502,10 @@ void QuartzProcessEvent(xEvent *xe) {
             RootlessOrderAllWindows();
             break;
 
+        case kXDarwinSpaceChanged:
+            DEBUG_LOG("kXDarwinSpaceChanged\n");
+            QuartzSpaceChanged(xe->u.clientMessage.u.l.longs0);
+            break;
         default:
             ErrorF("Unknown application defined event type %d.\n", xe->u.u.type);
     }
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index db36403..4dc5846 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -63,6 +63,7 @@ static const char *xprOpenGLBundle = "glxCGL.bundle";
  */
 static void eventHandler(unsigned int type, const void *arg,
                          unsigned int arg_size, void *data) {
+    
     switch (type) {
         case XP_EVENT_DISPLAY_CHANGED:
             DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
@@ -105,6 +106,13 @@ static void eventHandler(unsigned int type, const void *arg,
                 DRISurfaceNotify(*(xp_surface_id *) arg, kind);
             }
             break;
+        case  XP_EVENT_SPACE_CHANGED:
+            ErrorF("XP_EVENT_SPACE_CHANGED\n");
+            if(arg_size == sizeof(uint32_t)) {
+                uint32_t space_id = *(uint32_t *)arg;
+                QuartzMessageServerThread(kXDarwinSpaceChanged, 1, space_id);
+            }
+            break;
         default:
             ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n", type);
     }
@@ -233,7 +241,8 @@ xprDisplayInit(void)
                      | XP_EVENT_WINDOW_STATE_CHANGED
                      | XP_EVENT_WINDOW_MOVED
                      | XP_EVENT_SURFACE_CHANGED
-                     | XP_EVENT_SURFACE_DESTROYED,
+                     | XP_EVENT_SURFACE_DESTROYED
+                     | XP_EVENT_SPACE_CHANGED,
                      eventHandler, NULL);
 
     AppleDRIExtensionInit();
commit 4c76607b699431183ee7e88fa7818cb7644a5a02
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Mon Mar 17 23:57:41 2008 -0700

    Rootless: Removed safeAlphaXXXX() in favor of using fb/pixman
    (cherry picked from commit f03202ad15457c98be7ca78cc59bac88cf5f1966)

diff --git a/configure.ac b/configure.ac
index 49f2395..3b00705 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2120,7 +2120,6 @@ miext/damage/Makefile
 miext/shadow/Makefile
 miext/cw/Makefile
 miext/rootless/Makefile
-miext/rootless/safeAlpha/Makefile
 miext/rootless/accel/Makefile
 os/Makefile
 randr/Makefile
diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am
index ae1b192..b4d67c7 100644
--- a/hw/xquartz/xpr/Makefile.am
+++ b/hw/xquartz/xpr/Makefile.am
@@ -4,8 +4,7 @@ AM_CFLAGS =  $(XSERVER_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = \
 	-I$(srcdir) -I$(srcdir)/.. \
 	-I$(top_srcdir)/miext \
-	-I$(top_srcdir)/miext/rootless \
-	-I$(top_srcdir)/miext/rootless/safeAlpha
+	-I$(top_srcdir)/miext/rootless
 
 Xquartz_SOURCES = \
 	appledri.c \
@@ -41,7 +40,6 @@ Xquartz_LDADD = \
 	$(top_builddir)/record/librecord.la \
 	$(top_builddir)/XTrap/libxtrap.la \
 	$(top_builddir)/miext/rootless/librootless.la \
-	$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
 	$(top_builddir)/miext/rootless/accel/librlAccel.la \
 	$(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
 
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index e4e1fda..db36403 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -37,7 +37,6 @@
 #include "pseudoramiX.h"
 #include "darwin.h"
 #include "rootless.h"
-#include "safeAlpha/safeAlpha.h"
 #include "dri.h"
 #include "globals.h"
 #include "Xplugin.h"
@@ -341,15 +340,6 @@ xprAddScreen(int index, ScreenPtr pScreen)
 static Bool
 xprSetupScreen(int index, ScreenPtr pScreen)
 {
-    // Add alpha protecting replacements for fb screen functions
-
-#ifdef RENDER
-    {
-        PictureScreenPtr ps = GetPictureScreen(pScreen);
-        ps->Composite = SafeAlphaComposite;
-    }
-#endif /* RENDER */
-
     // Initialize accelerated rootless drawing
     // Note that this must be done before DamageSetup().
     RootlessAccelInit(pScreen);
diff --git a/miext/rootless/Makefile.am b/miext/rootless/Makefile.am
index aa8528e..dc85170 100644
--- a/miext/rootless/Makefile.am
+++ b/miext/rootless/Makefile.am
@@ -1,7 +1,7 @@
 AM_CFLAGS = $(DIX_CFLAGS) $(XSERVER_CFLAGS)
 AM_CPPFLAGS = -I$(top_srcdir)/hw/xfree86/os-support
 
-SUBDIRS = safeAlpha accel
+SUBDIRS = accel
 
 noinst_LTLIBRARIES = librootless.la
 librootless_la_SOURCES = \
diff --git a/miext/rootless/safeAlpha/Makefile.am b/miext/rootless/safeAlpha/Makefile.am
deleted file mode 100644
index a22afb6..0000000
--- a/miext/rootless/safeAlpha/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-AM_CFLAGS = $(DIX_CFLAGS) $(XSERVER_CFLAGS)
-AM_CPPFLAGS = -I$(srcdir)/.. -I$(top_srcdir)/hw/xfree86/os-support
-
-noinst_LTLIBRARIES = libsafeAlpha.la
-libsafeAlpha_la_SOURCES = safeAlphaPicture.c
-
-EXTRA_DIST = safeAlpha.h
diff --git a/miext/rootless/safeAlpha/safeAlpha.h b/miext/rootless/safeAlpha/safeAlpha.h
deleted file mode 100644
index 9b9b39c..0000000
--- a/miext/rootless/safeAlpha/safeAlpha.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Replacement functions to protect the alpha channel
- */
-/*
- * Copyright (c) 2002-2003 Torrey T. Lyons. 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 ABOVE LISTED COPYRIGHT HOLDER(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(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifndef _SAFEALPHA_H
-#define _SAFEALPHA_H
-
-#include "picturestr.h"
-
-#ifdef RENDER
-void
-SafeAlphaComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
-                   INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
-                   INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
-#endif /* RENDER */
-
-#endif /* _SAFEALPHA_H */
diff --git a/miext/rootless/safeAlpha/safeAlphaPicture.c b/miext/rootless/safeAlpha/safeAlphaPicture.c
deleted file mode 100644
index 8f66315..0000000
--- a/miext/rootless/safeAlpha/safeAlphaPicture.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Support for RENDER extension while protecting the alpha channel
- */
-/*
- * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
- * Copyright (c) 2002 Apple Computer, 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 ABOVE LISTED COPYRIGHT HOLDER(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(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-/* This file is largely based on fbcompose.c and fbpict.c, which contain
- * the following copyright:
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- */
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-#ifdef RENDER
-
-#include <stddef.h> /* For NULL */
-#include "fb.h"
-#include "picturestr.h"
-#include "mipict.h"
-#include "fbpict.h"
-#include "safeAlpha.h"
-#include "rootlessCommon.h"
-# define mod(a,b)	((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
-
-/* Optimized version of fbCompositeSolidMask_nx8x8888 */
-void
-SafeAlphaCompositeSolidMask_nx8x8888(
-    CARD8      op,
-    PicturePtr pSrc,
-    PicturePtr pMask,
-    PicturePtr pDst,
-    INT16      xSrc,
-    INT16      ySrc,
-    INT16      xMask,
-    INT16      yMask,
-    INT16      xDst,
-    INT16      yDst,
-    CARD16     width,
-    CARD16     height)
-{
-    CARD32	src, srca;
-    CARD32	*dstLine, *dst, d, dstMask;
-    CARD8	*maskLine, *mask, m;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-
-    fbComposeGetSolid(pSrc, src, pDst->format);
-
-    dstMask = FbFullMask (pDst->pDrawable->depth);
-    srca = src >> 24;
-    if (src == 0)
-	return;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    if (dstMask == FB_ALLONES && pDst->pDrawable->bitsPerPixel == 32 &&
-        width * height > rootless_CompositePixels_threshold &&
-        SCREENREC(pDst->pDrawable->pScreen)->imp->CompositePixels)
-    {
-	void *srcp[2], *destp[2];
-	unsigned int dest_rowbytes[2];
-	unsigned int fn;
-
-	srcp[0] = &src; srcp[1] = &src;
-	/* null rowbytes pointer means use first value as a constant */
-	destp[0] = dstLine; destp[1] = dstLine;
-	dest_rowbytes[0] = dstStride * 4; dest_rowbytes[1] = dest_rowbytes[0];
-	fn = RL_COMPOSITE_FUNCTION(RL_COMPOSITE_OVER, RL_DEPTH_ARGB8888,
-                                   RL_DEPTH_A8, RL_DEPTH_ARGB8888);
-
-	if (SCREENREC(pDst->pDrawable->pScreen)->imp->CompositePixels(
-                width, height, fn, srcp, NULL,
-                maskLine, maskStride,
-                destp, dest_rowbytes) == Success)
-	{
-	    return;
-	}
-    }
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	while (w--)
-	{
-	    m = *mask++;
-	    if (m == 0xff)
-	    {
-		if (srca == 0xff)
-		    *dst = src & dstMask;
-		else
-		    *dst = fbOver (src, *dst) & dstMask;
-	    }
-	    else if (m)
-	    {
-		d = fbIn (src, m);
-		*dst = fbOver (d, *dst) & dstMask;
-	    }
-	    dst++;
-	}
-    }
-}
-
-void
-SafeAlphaComposite (CARD8           op,
-                    PicturePtr      pSrc,
-                    PicturePtr      pMask,
-                    PicturePtr      pDst,
-                    INT16           xSrc,
-                    INT16           ySrc,
-                    INT16           xMask,
-                    INT16           yMask,
-                    INT16           xDst,
-                    INT16           yDst,
-                    CARD16          width,
-                    CARD16          height)
-{
-  if (!pSrc) {
-    ErrorF("SafeAlphaComposite: pSrc must not be null!\n");
-    return;
-  }
-
-  if (!pDst) {
-    ErrorF("SafeAlphaComposite: pDst must not be null!\n");
-    return;
-  }
-  
-  int oldDepth = pDst->pDrawable->depth;
-  int oldFormat = pDst->format;
-    
-  /*
-   * We can use the more optimized fbpict code, but it sets bits above
-   * the depth to zero. Temporarily adjust destination depth if needed.
-   */
-  if (pDst->pDrawable->type == DRAWABLE_WINDOW
-        && pDst->pDrawable->depth == 24
-      && pDst->pDrawable->bitsPerPixel == 32)
-    {
-      pDst->pDrawable->depth = 32;
-    }
-    
-  /* For rootless preserve the alpha in x8r8g8b8 which really is
-   * a8r8g8b8
-   */
-  if (oldFormat == PICT_x8r8g8b8)
-    {
-      pDst->format = PICT_a8r8g8b8;
-    }
-    
-  if (pSrc->pDrawable && pMask && pMask->pDrawable &&
-        !pSrc->transform && !pMask->transform &&
-        !pSrc->alphaMap && !pMask->alphaMap &&
-        !pMask->repeat && !pMask->componentAlpha && !pDst->alphaMap &&
-        pMask->format == PICT_a8 &&
-       pSrc->repeatType == RepeatNormal && 
-        pSrc->pDrawable->width == 1 &&
-        pSrc->pDrawable->height == 1 &&
-      (pDst->format == PICT_a8r8g8b8 ||
-         pDst->format == PICT_x8r8g8b8 ||
-         pDst->format == PICT_a8b8g8r8 ||
-       pDst->format == PICT_x8b8g8r8))
-    {
-      fbWalkCompositeRegion (op, pSrc, pMask, pDst,
-			     xSrc, ySrc, xMask, yMask, xDst, yDst,
-			     width, height,
-			     TRUE /* srcRepeat */,
-			     FALSE /* maskRepeat */,
-			     SafeAlphaCompositeSolidMask_nx8x8888);
-    }
-  else
-    {
-      fbComposite (op, pSrc, pMask, pDst,
-		   xSrc, ySrc, xMask, yMask, xDst, yDst, width, height);
-    }
-
-  pDst->pDrawable->depth = oldDepth;
-  pDst->format = oldFormat;
-}
-
-#endif /* RENDER */
commit 87c64cfd6901083da5a9375d0bde65691d374b5b
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Fri Mar 14 17:31:54 2008 -0700

    =?utf-8?q?Apple:=20Xserver=20half=20of=20the=20Expos=C3=A9=20bug-fix=20(requires=20updated=20libXplugin=20from=20Apple...=20coming=20with=202.2)
    
    =20(cherry=20picked=20from=20commit=2037be23e8c1d8e5c7a1157e9d66ef3f30a4c472c5)?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index be5511d..1cf992d 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -320,6 +320,8 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
     SetFrontProcess(&psn);
 
     QuartzMessageServerThread(kXDarwinBringAllToFront, 0);
+    ProcessSerialNumber psn = { 0, kCurrentProcess };
+    SetFrontProcess(&psn);
 }
 
 - (void) set_can_quit:(NSNumber *)state {
commit 3bbd77ff98478153afe3251de9ba11d757218213
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Mar 20 20:03:02 2008 -0400

    XSELinux: Do a check for whether background "None" is allowed.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 3035898..17ce7af 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -1026,6 +1026,13 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     rc = SELinuxDoCheck(subj, obj, class, access_mode, &auditdata);
     if (rc != Success)
 	rec->status = rc;
+
+    /* Perform the background none check on windows */
+    if (access_mode & DixCreateAccess && rec->rtype == RT_WINDOW) {
+	rc = SELinuxDoCheck(subj, obj, class, DixBlendAccess, &auditdata);
+	if (rc != Success)
+	    ((WindowPtr)rec->res)->forcedBG = TRUE;
+    }
 }
 
 static void
commit e323bb426ce8a072d119cb2720b773241259c137
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Mar 20 19:42:09 2008 -0400

    XSELinux: Correctly handle some permission bits that are used more than once.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 18c6526..3035898 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -152,6 +152,12 @@ static struct security_class_mapping map[] = {
     { NULL }
 };
 
+/* x_resource "read" bits from the list above */
+#define SELinuxReadMask (DixReadAccess|DixGetAttrAccess|DixListPropAccess| \
+			 DixGetPropAccess|DixGetFocusAccess|DixListAccess| \
+			 DixShowAccess|DixBlendAccess|DixReceiveAccess| \
+			 DixUseAccess|DixDebugAccess)
+
 /* forward declarations */
 static void SELinuxScreen(CallbackListPtr *, pointer, pointer);
 
@@ -853,6 +859,7 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     SELinuxObjectRec *obj, *data;
     Selection *pSel = *rec->ppSel;
     Atom name = pSel->selection;
+    Mask access_mode = rec->access_mode;
     SELinuxAuditRec auditdata = { .client = rec->client, .selection = name };
     security_id_t tsid;
     int rc;
@@ -861,11 +868,12 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     obj = dixLookupPrivate(&pSel->devPrivates, objectKey);
 
     /* If this is a new object that needs labeling, do it now */
-    if (rec->access_mode & DixCreateAccess) {
+    if (access_mode & DixCreateAccess) {
 	sidput(obj->sid);
 	rc = SELinuxSelectionToSID(name, subj, &obj->sid, &obj->poly);
 	if (rc != Success)
 	    obj->sid = unlabeled_sid;
+	access_mode = DixSetAttrAccess;
     }
     /* If this is a polyinstantiated object, find the right instance */
     else if (obj->poly) {
@@ -890,13 +898,13 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     }
 
     /* Perform the security check */
-    rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, rec->access_mode,
+    rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, access_mode,
 			&auditdata);
     if (rc != Success)
 	rec->status = rc;
 
     /* Label the content (advisory only) */
-    if (rec->access_mode & DixSetAttrAccess) {
+    if (access_mode & DixSetAttrAccess) {
 	data = dixLookupPrivate(&pSel->devPrivates, dataKey);
 	sidput(data->sid);
 	if (subj->sel_create_sid)
@@ -976,6 +984,7 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     SELinuxSubjectRec *subj;
     SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
+    Mask access_mode = rec->access_mode;
     PrivateRec **privatePtr;
     security_class_t class;
     int rc, offset;
@@ -997,7 +1006,7 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     }
 
     /* If this is a new object that needs labeling, do it now */
-    if (rec->access_mode & DixCreateAccess && offset >= 0) {
+    if (access_mode & DixCreateAccess && offset >= 0) {
 	rc = SELinuxLabelResource(rec, subj, obj, class);
 	if (rc != Success) {
 	    rec->status = rc;
@@ -1005,10 +1014,16 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	}
     }
 
+    /* Collapse generic resource permissions down to read/write */
+    if (class == SECCLASS_X_RESOURCE) {
+	access_mode = !!(rec->access_mode & SELinuxReadMask); /* rd */
+	access_mode |= !!(rec->access_mode & ~SELinuxReadMask) << 1; /* wr */
+    }
+
     /* Perform the security check */
     auditdata.restype = rec->rtype;
     auditdata.id = rec->id;
-    rc = SELinuxDoCheck(subj, obj, class, rec->access_mode, &auditdata);
+    rc = SELinuxDoCheck(subj, obj, class, access_mode, &auditdata);
     if (rc != Success)
 	rec->status = rc;
 }
commit da973e962d09854b571320dee7dd9569060bc39e
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Mar 20 09:18:29 2008 -0400

    Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB
    
    This patch (and not setting HARDWARE_CURSOR_BIT_ORDER_MSBFIRST on big endian
    platforms) fixes it for me with the radeon driver and doesn't break intel.
    
    Correct patch this time :)

diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 08cf78d..57cfcb6 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -137,7 +137,8 @@ cursor_bitpos (int flags, int x, Bool mask)
 	mask = !mask;
     if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
 	x = (x & ~3) | (3 - (x & 3));
-    if (flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST)
+    if (((flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) == 0) ==
+	(X_BYTE_ORDER == X_BIG_ENDIAN))
 	x = (x & ~7) | (7 - (x & 7));
     if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
 	x = (x << 1) + mask;
commit f8c1eb29e28818895d744c4e1d6897353d51790b
Author: Alex Deucher <alex at cube.(none)>
Date:   Thu Mar 20 09:14:41 2008 -0400

    Revert "Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB"
    
    This reverts commit 267352579612155adfd4743432d6569b2cdeebde.
    
    Pushed the wrong patch.

diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 4fe94f3..08cf78d 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -137,9 +137,7 @@ cursor_bitpos (int flags, int x, Bool mask)
 	mask = !mask;
     if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
 	x = (x & ~3) | (3 - (x & 3));
-#if X_BYTE_ORDER == X_LITTLE_ENDIAN
     if (flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST)
-#endif
 	x = (x & ~7) | (7 - (x & 7));
     if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
 	x = (x << 1) + mask;
commit 267352579612155adfd4743432d6569b2cdeebde
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Wed Mar 19 19:12:37 2008 -0400

    Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB
    
    See bug 11796

diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 08cf78d..4fe94f3 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -137,7 +137,9 @@ cursor_bitpos (int flags, int x, Bool mask)
 	mask = !mask;
     if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
 	x = (x & ~3) | (3 - (x & 3));
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
     if (flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST)
+#endif
 	x = (x & ~7) | (7 - (x & 7));
     if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
 	x = (x << 1) + mask;
commit 060a99444ee25a684b0ab9b4819bf8e855aea2d8
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Wed Mar 19 16:04:16 2008 -0700

    Make Xevie private symbol names less generic
    
    Makes it easier to figure out what you're seeing in the stack trace
    instead of wondering where in the server "ProcSend" is.

diff --git a/Xext/xevie.c b/Xext/xevie.c
index f36ead4..5e20bd9 100644
--- a/Xext/xevie.c
+++ b/Xext/xevie.c
@@ -63,11 +63,13 @@ extern Bool noXkbExtension;
 #endif
 extern int    xeviegrabState;
 
-static int		ProcDispatch (register ClientPtr client), SProcDispatch (register ClientPtr client);
-static void		ResetProc (ExtensionEntry *extEntry);
+static DISPATCH_PROC(ProcXevieDispatch);
+static DISPATCH_PROC(SProcXevieDispatch);
 
-static unsigned char	ReqCode = 0;
-static int		ErrorBase;
+static void		XevieResetProc (ExtensionEntry *extEntry);
+
+static unsigned char	XevieReqCode = 0;
+static int		XevieErrorBase;
 
 int			xevieFlag = 0;
 int	 		xevieClientIndex = 0;
@@ -77,7 +79,7 @@ Mask			xevieMask = 0;
 int       		xevieEventSent = 0;
 int			xevieKBEventSent = 0;
 static DevPrivateKey    xevieDevicePrivateKey = &xevieDevicePrivateKey;
-static Bool                     xevieModifiersOn = FALSE;
+static Bool             xevieModifiersOn = FALSE;
 
 #define XEVIEINFO(dev)  ((xevieDeviceInfoPtr) \
     dixLookupPrivate(&(dev)->devPrivates, xevieDevicePrivateKey))
@@ -108,11 +110,6 @@ typedef struct {
 static xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}};
 static int keycqHead = 0, keycqTail = 0;
 
-static int              ProcDispatch (ClientPtr), SProcDispatch (ClientPtr);
-static void             ResetProc (ExtensionEntry*);
-
-static int              ErrorBase;
-
 static Bool XevieStart(void);
 static void XevieEnd(int clientIndex);
 static void XevieClientStateCallback(CallbackListPtr *pcbl, pointer nulldata,
@@ -140,23 +137,23 @@ XevieExtensionInit (void)
     if ((extEntry = AddExtension (XEVIENAME,
 				0,
 				XevieNumberErrors,
-				ProcDispatch,
-				SProcDispatch,
-				ResetProc,
+				ProcXevieDispatch,
+				SProcXevieDispatch,
+				XevieResetProc,
 				StandardMinorOpcode))) {
-	ReqCode = (unsigned char)extEntry->base;
-	ErrorBase = extEntry->errorBase;
+	XevieReqCode = (unsigned char)extEntry->base;
+	XevieErrorBase = extEntry->errorBase;
     }
 }
 
 /*ARGSUSED*/
 static 
-void ResetProc (ExtensionEntry *extEntry)
+void XevieResetProc (ExtensionEntry *extEntry)
 {
 }
 
 static 
-int ProcQueryVersion (register ClientPtr client)
+int ProcXevieQueryVersion (register ClientPtr client)
 {
     xXevieQueryVersionReply rep;
 
@@ -171,7 +168,7 @@ int ProcQueryVersion (register ClientPtr client)
 }
 
 static
-int ProcStart (register ClientPtr client)
+int ProcXevieStart (register ClientPtr client)
 {
     xXevieStartReply rep;
 
@@ -212,7 +209,7 @@ int ProcStart (register ClientPtr client)
 }
 
 static
-int ProcEnd (register ClientPtr client)
+int ProcXevieEnd (register ClientPtr client)
 {
     xXevieEndReply rep;
 
@@ -233,7 +230,7 @@ int ProcEnd (register ClientPtr client)
 }
 
 static
-int ProcSend (register ClientPtr client)
+int ProcXevieSend (register ClientPtr client)
 {
     REQUEST (xXevieSendReq);
     xXevieSendReply rep;
@@ -281,7 +278,7 @@ int ProcSend (register ClientPtr client)
 }
 
 static
-int ProcSelectInput (register ClientPtr client)
+int ProcXevieSelectInput (register ClientPtr client)
 {
     REQUEST (xXevieSelectInputReq);
     xXevieSelectInputReply rep;
@@ -299,28 +296,28 @@ int ProcSelectInput (register ClientPtr client)
 }
 
 static 
-int ProcDispatch (register ClientPtr client)
+int ProcXevieDispatch (register ClientPtr client)
 {
     REQUEST (xReq);
     switch (stuff->data)
     {
     case X_XevieQueryVersion:
-	return ProcQueryVersion (client);
+	return ProcXevieQueryVersion (client);
     case X_XevieStart:
-	return ProcStart (client);
+	return ProcXevieStart (client);
     case X_XevieEnd:
-	return ProcEnd (client);
+	return ProcXevieEnd (client);
     case X_XevieSend:
-	return ProcSend (client);
+	return ProcXevieSend (client);
     case X_XevieSelectInput:
-	return ProcSelectInput(client);
+	return ProcXevieSelectInput(client);
     default:
 	return BadRequest;
     }
 }
 
 static 
-int SProcQueryVersion (register ClientPtr client)
+int SProcXevieQueryVersion (register ClientPtr client)
 {
     register int n;
 
@@ -329,11 +326,11 @@ int SProcQueryVersion (register ClientPtr client)
     REQUEST_SIZE_MATCH (xXevieQueryVersionReq);
     swaps (&stuff->client_major_version, n);
     swaps (&stuff->client_minor_version, n);
-    return ProcQueryVersion(client);
+    return ProcXevieQueryVersion(client);
 }
 
 static 
-int SProcStart (ClientPtr client)
+int SProcXevieStart (ClientPtr client)
 {
     register int n;
 
@@ -341,11 +338,11 @@ int SProcStart (ClientPtr client)
     swaps (&stuff->length, n);
     REQUEST_SIZE_MATCH (xXevieStartReq);
     swapl (&stuff->screen, n);
-    return ProcStart (client);
+    return ProcXevieStart (client);
 }
 
 static 
-int SProcEnd (ClientPtr client)
+int SProcXevieEnd (ClientPtr client)
 {
     register int n;
 
@@ -353,11 +350,11 @@ int SProcEnd (ClientPtr client)
     swaps (&stuff->length, n);
     REQUEST_SIZE_MATCH (xXevieEndReq);
     swapl (&stuff->cmap, n);
-    return ProcEnd (client);
+    return ProcXevieEnd (client);
 }
 
 static
-int SProcSend (ClientPtr client)
+int SProcXevieSend (ClientPtr client)
 {
     register int n;
     xEvent eventT;
@@ -375,11 +372,11 @@ int SProcSend (ClientPtr client)
     (*proc)(&stuff->event, &eventT);
     stuff->event = eventT;
     
-    return ProcSend (client);
+    return ProcXevieSend (client);
 }
 
 static
-int SProcSelectInput (ClientPtr client)
+int SProcXevieSelectInput (ClientPtr client)
 {
     register int n;
 
@@ -387,26 +384,26 @@ int SProcSelectInput (ClientPtr client)
     swaps (&stuff->length, n);
     REQUEST_SIZE_MATCH (xXevieSelectInputReq);
     swapl (&stuff->event_mask, n);
-    return ProcSelectInput (client);
+    return ProcXevieSelectInput (client);
 }
 
 
 static 
-int SProcDispatch (register ClientPtr client)
+int SProcXevieDispatch (register ClientPtr client)
 {
     REQUEST(xReq);
     switch (stuff->data)
     {
     case X_XevieQueryVersion:
-	return SProcQueryVersion (client);
+	return SProcXevieQueryVersion (client);
     case X_XevieStart:
-	return SProcStart (client);
+	return SProcXevieStart (client);
     case X_XevieEnd:
-	return SProcEnd (client);
+	return SProcXevieEnd (client);
     case X_XevieSend:
-	return SProcSend (client);
+	return SProcXevieSend (client);
     case X_XevieSelectInput:
-	return SProcSelectInput(client);
+	return SProcXevieSelectInput(client);
     default:
 	return BadRequest;
     }
commit f37046984d7839faefa4d716624e4a85ddde9634
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Wed Mar 19 14:06:53 2008 -0700

    Xevie cleanups, byteswapping fixes & request length check fixes

diff --git a/Xext/xevie.c b/Xext/xevie.c
index ea409f1..f36ead4 100644
--- a/Xext/xevie.c
+++ b/Xext/xevie.c
@@ -147,8 +147,6 @@ XevieExtensionInit (void)
 	ReqCode = (unsigned char)extEntry->base;
 	ErrorBase = extEntry->errorBase;
     }
-
-    /* PC servers initialize the desktop colors (citems) here! */
 }
 
 /*ARGSUSED*/
@@ -218,6 +216,8 @@ int ProcEnd (register ClientPtr client)
 {
     xXevieEndReply rep;
 
+    REQUEST_SIZE_MATCH (xXevieEndReq);
+    
     if (xevieFlag) {
         if (client->index != xevieClientIndex)
             return BadAccess;
@@ -240,6 +240,8 @@ int ProcSend (register ClientPtr client)
     xEvent *xE;
     static unsigned char lastDetail = 0, lastType = 0;
 
+    REQUEST_SIZE_MATCH (xXevieSendReq);
+    
     if (client->index != xevieClientIndex)
         return BadAccess;
 
@@ -284,10 +286,12 @@ int ProcSelectInput (register ClientPtr client)
     REQUEST (xXevieSelectInputReq);
     xXevieSelectInputReply rep;
 
+    REQUEST_SIZE_MATCH (xXevieSelectInputReq);
+
     if (client->index != xevieClientIndex)
         return BadAccess;
 
-    xevieMask = (long)stuff->event_mask;
+    xevieMask = stuff->event_mask;
     rep.type = X_Reply;
     rep.sequence_number = client->sequence;
     WriteToClient (client, sizeof (xXevieSelectInputReply), (char *)&rep);
@@ -321,7 +325,10 @@ int SProcQueryVersion (register ClientPtr client)
     register int n;
 
     REQUEST(xXevieQueryVersionReq);
-    swaps(&stuff->length, n);
+    swaps (&stuff->length, n);
+    REQUEST_SIZE_MATCH (xXevieQueryVersionReq);
+    swaps (&stuff->client_major_version, n);
+    swaps (&stuff->client_minor_version, n);
     return ProcQueryVersion(client);
 }
 
@@ -332,8 +339,8 @@ int SProcStart (ClientPtr client)
 
     REQUEST (xXevieStartReq);
     swaps (&stuff->length, n);
+    REQUEST_SIZE_MATCH (xXevieStartReq);
     swapl (&stuff->screen, n);
-    REQUEST_AT_LEAST_SIZE (xXevieStartReq);
     return ProcStart (client);
 }
 
@@ -344,8 +351,8 @@ int SProcEnd (ClientPtr client)
 
     REQUEST (xXevieEndReq);
     swaps (&stuff->length, n);
-    REQUEST_AT_LEAST_SIZE (xXevieEndReq);
-    swapl(&stuff->cmap, n);
+    REQUEST_SIZE_MATCH (xXevieEndReq);
+    swapl (&stuff->cmap, n);
     return ProcEnd (client);
 }
 
@@ -353,11 +360,21 @@ static
 int SProcSend (ClientPtr client)
 {
     register int n;
+    xEvent eventT;
+    EventSwapPtr proc;
 
     REQUEST (xXevieSendReq);
     swaps (&stuff->length, n);
-    REQUEST_AT_LEAST_SIZE (xXevieSendReq);
-    swapl(&stuff->event, n);
+    REQUEST_SIZE_MATCH (xXevieSendReq);
+    swapl (&stuff->dataType, n);
+
+    /* Swap event */
+    proc = EventSwapVector[stuff->event.u.u.type & 0177];
+    if (!proc ||  proc == NotImplemented) /* no swapping proc; invalid event type? */
+	return (BadValue);
+    (*proc)(&stuff->event, &eventT);
+    stuff->event = eventT;
+    
     return ProcSend (client);
 }
 
@@ -368,8 +385,8 @@ int SProcSelectInput (ClientPtr client)
 
     REQUEST (xXevieSelectInputReq);
     swaps (&stuff->length, n);
-    REQUEST_AT_LEAST_SIZE (xXevieSelectInputReq);
-    swapl(&stuff->event_mask, n);
+    REQUEST_SIZE_MATCH (xXevieSelectInputReq);
+    swapl (&stuff->event_mask, n);
     return ProcSelectInput (client);
 }
 
commit edad0a9dfebcce5c54b2f9c32bd9d45549e20c51
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Mar 18 17:51:21 2008 -0400

    Apply __glXDisp_GetVisualConfigs message patch
    From http://bugs.freedesktop.org/show_bug.cgi?id=13863
    
    Problem was that the glxcmds.c __glXDisp_GetVisualConfigs
    function left garbage in the tail end of the message used for extensions.

diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c
index 32d1bc8..3b79cca 100644
--- a/GL/glx/glxcmds.c
+++ b/GL/glx/glxcmds.c
@@ -944,6 +944,12 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
 	buf[p++] = modes->transparentAlpha;
 	buf[p++] = GLX_TRANSPARENT_INDEX_VALUE;
 	buf[p++] = modes->transparentIndex;
+	buf[p++] = 0;
+	buf[p++] = 0;
+	buf[p++] = 0;
+	buf[p++] = 0;
+	buf[p++] = 0;
+	buf[p++] = 0;
 
 	if (client->swapped) {
 	    __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
commit cdadd2ff9bade318caac5c1d9bcdc8a001347da9
Author: Dodji Seketeli <dodji at seketeli.org>
Date:   Tue Mar 18 14:00:15 2008 +0100

    [Xephyr/DRI] correctly route motion events targeted at GL drawable

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index e95001d..b02f990 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -891,9 +891,12 @@ ephyrPoll(void)
               continue;
           }
           {
-            if (ephyrCurScreen != ev.data.mouse_motion.screen)
+            if (ev.data.mouse_motion.screen >=0
+                && (ephyrCurScreen != ev.data.mouse_motion.screen))
               {
-                  EPHYR_LOG ("warping mouse cursor:%d\n", ephyrCurScreen) ;
+                  EPHYR_LOG ("warping mouse cursor. "
+                             "cur_screen%d, motion_screen:%d\n",
+                             ephyrCurScreen, ev.data.mouse_motion.screen) ;
                   if (ev.data.mouse_motion.screen >= 0)
                     {
                       ephyrWarpCursor
@@ -904,11 +907,30 @@ ephyrPoll(void)
               }
             else
               {
+                  int x=0, y=0;
+#ifdef XEPHYR_DRI
+                  EphyrWindowPair *pair = NULL;
+#endif
                   EPHYR_LOG ("enqueuing mouse motion:%d\n", ephyrCurScreen) ;
-                  KdEnqueuePointerEvent(ephyrMouse, mouseState,
-                                        ev.data.mouse_motion.x,
-                                        ev.data.mouse_motion.y,
-                                        0);
+                  x = ev.data.mouse_motion.x;
+                  y = ev.data.mouse_motion.y;
+                  EPHYR_LOG ("initial (x,y):(%d,%d)\n", x, y) ;
+#ifdef XEPHYR_DRI
+                  EPHYR_LOG ("is this window peered by a gl drawable ?\n") ;
+                  if (findWindowPairFromRemote (ev.data.mouse_motion.window,
+                                                &pair))
+                    {
+                        EPHYR_LOG ("yes, it is peered\n") ;
+                        x += pair->local->drawable.x;
+                        y += pair->local->drawable.y;
+                    }
+                  else
+                    {
+                        EPHYR_LOG ("no, it is not peered\n") ;
+                    }
+                  EPHYR_LOG ("final (x,y):(%d,%d)\n", x, y) ;
+#endif
+                  KdEnqueuePointerEvent(ephyrMouse, mouseState, x, y, 0);
               }
           }
           break;
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index ae1bb4b..fd84ec0 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -914,8 +914,9 @@ hostx_get_event(EphyrHostXEvent *ev)
                 host_screen_from_window (xev.xmotion.window);
 
 	    ev->type = EPHYR_EV_MOUSE_MOTION;
-	    ev->data.mouse_motion.x = xev.xmotion.x; 
+	    ev->data.mouse_motion.x = xev.xmotion.x;
 	    ev->data.mouse_motion.y = xev.xmotion.y;
+	    ev->data.mouse_motion.window = xev.xmotion.window;
 	    ev->data.mouse_motion.screen = (host_screen ? host_screen->mynum : -1);
 	  }
 	  return 1;
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index f72cfe7..48d3147 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -70,6 +70,7 @@ struct EphyrHostXEvent
       int x;
       int y;
       int screen;
+      int window;
     } mouse_motion;
 
     struct mouse_down { 	
commit afd7428690d87097117ab20335658f6d59d60103
Author: Jesse Barnes <jbarnes at jbarnes-t61.(none)>
Date:   Mon Mar 17 14:55:44 2008 -0700

    Cleanup logic in xf86PrepareOutputs
    
    Should have done this in the first place.  Since we're checking for the absence
    of the get_crtc callback in the first place, we'll short circuit the later call
    and disable the output, so the ugly "continue" block is unnecesary.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 536b530..8c2b247 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2047,13 +2047,9 @@ xf86PrepareOutputs (ScrnInfoPtr scrn)
     for (o = 0; o < config->num_output; o++) {
 	xf86OutputPtr output = config->output[o];
 #if RANDR_GET_CRTC_INTERFACE
-	/* If we can't get the current CRTC, play it safe */
-	if (!output->funcs->get_crtc) {
-	    (*output->funcs->dpms)(output, DPMSModeOff);
-	    continue;
-	}
 	/* Disable outputs that are unused or will be re-routed */
-	if (output->crtc != (*output->funcs->get_crtc)(output) ||
+	if (!output->funcs->get_crtc ||
+	    output->crtc != (*output->funcs->get_crtc)(output) ||
 	    output->crtc == NULL)
 #endif
 	    (*output->funcs->dpms)(output, DPMSModeOff);
commit ba85caacb565b9aa0aeace52a362350304b0566d
Author: Jesse Barnes <jbarnes at jbarnes-t61.(none)>
Date:   Mon Mar 17 14:13:09 2008 -0700

    Make xf86SetDesiredModes aware of current output configuration
    
    By adding a new output callback, ->get_crtc, xf86SetDesiredModes is able to
    avoid turning off outputs & CRTCs if the current output<->CRTC mappings are the
    same as the desired configuration.  This helps avoid flickering displays at
    startup time, which speeds things up a little and looks better.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 6b845b7..536b530 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2034,6 +2034,72 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
 }
 
 /*
+ * Check the CRTC we're going to map each output to vs. it's current
+ * CRTC.  If they don't match, we have to disable the output and the CRTC
+ * since the driver will have to re-route things.
+ */
+static void
+xf86PrepareOutputs (ScrnInfoPtr scrn)
+{
+    xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(scrn);
+    int			o;
+
+    for (o = 0; o < config->num_output; o++) {
+	xf86OutputPtr output = config->output[o];
+#if RANDR_GET_CRTC_INTERFACE
+	/* If we can't get the current CRTC, play it safe */
+	if (!output->funcs->get_crtc) {
+	    (*output->funcs->dpms)(output, DPMSModeOff);
+	    continue;
+	}
+	/* Disable outputs that are unused or will be re-routed */
+	if (output->crtc != (*output->funcs->get_crtc)(output) ||
+	    output->crtc == NULL)
+#endif
+	    (*output->funcs->dpms)(output, DPMSModeOff);
+    }
+}
+
+static void
+xf86PrepareCrtcs (ScrnInfoPtr scrn)
+{
+    xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(scrn);
+    int			c;
+
+    for (c = 0; c < config->num_crtc; c++) {
+#if RANDR_GET_CRTC_INTERFACE
+	xf86CrtcPtr	crtc = config->crtc[c];
+	xf86OutputPtr	output = NULL;
+	uint32_t	desired_outputs = 0, current_outputs = 0;
+	int		o;
+
+	for (o = 0; o < config->num_output; o++) {
+	    output = config->output[o];
+	    if (output->crtc == crtc)
+		desired_outputs |= (1<<o);
+	    /* If we can't tell where it's mapped, force it off */
+	    if (!output->funcs->get_crtc) {
+		desired_outputs = 0;
+		break;
+	    }
+	    if ((*output->funcs->get_crtc)(output) == crtc)
+		current_outputs |= (1<<o);
+	}
+
+	/*
+	 * If mappings are different or the CRTC is unused,
+	 * we need to disable it
+	 */
+	if (desired_outputs != current_outputs ||
+	    !desired_outputs)
+	    (*crtc->funcs->dpms)(crtc, DPMSModeOff);
+#else
+	(*crtc->funcs->dpms)(crtc, DPMSModeOff);
+#endif
+    }
+}
+
+/*
  * Using the desired mode information in each crtc, set
  * modes (used in EnterVT functions, or at server startup)
  */
@@ -2042,26 +2108,11 @@ _X_EXPORT Bool
 xf86SetDesiredModes (ScrnInfoPtr scrn)
 {
     xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(scrn);
-    int			c, o;
-
-    /*
-     * Turn off everything so mode setting is done
-     * with hardware in a consistent state
-     */
-    for (o = 0; o < config->num_output; o++) 
-    {
-	xf86OutputPtr  output = config->output[o];
-	(*output->funcs->dpms)(output, DPMSModeOff);
-    }
+    int			c;
 
-    for (c = 0; c < config->num_crtc; c++) 
-    {
-	xf86CrtcPtr crtc = config->crtc[c];
+    xf86PrepareOutputs(scrn);
+    xf86PrepareCrtcs(scrn);
 
-	crtc->funcs->dpms(crtc, DPMSModeOff);
-	memset(&crtc->mode, 0, sizeof(crtc->mode));
-    }
-    
     for (c = 0; c < config->num_crtc; c++)
     {
 	xf86CrtcPtr	crtc = config->crtc[c];
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index a542e7f..2d723a5 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -425,6 +425,13 @@ typedef struct _xf86OutputFuncs {
     (*get_property)(xf86OutputPtr output,
 		    Atom property);
 #endif
+#ifdef RANDR_GET_CRTC_INTERFACE
+    /**
+     * Callback to get current CRTC for a given output
+     */
+    xf86CrtcPtr
+    (*get_crtc)(xf86OutputPtr output);
+#endif
     /**
      * Clean up driver-specific bits of the output
      */
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 4d7c9cc..62d4bbf 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -55,6 +55,7 @@
 #define RANDR_10_INTERFACE 1
 #define RANDR_12_INTERFACE 1
 #define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
+#define RANDR_GET_CRTC_INTERFACE 1
 
 #define RANDR_INTERFACE_VERSION 0x0103
 
commit bee2ddf35f75086cee951142098637f2c756b96b
Author: Jesse Barnes <jbarnes at jbarnes-t61.(none)>
Date:   Mon Mar 17 08:33:01 2008 -0700

    Fail CRTC configuration if !vtSema
    
    Unless we check for vtSema before calling into the CRTC and output callbacks,
    we may end up trying to access video memory that no longer exists, leading to a
    crash.  So if we don't have vtSema, return FALSE to the caller, indicating that
    we didn't do anything.
    
    Fixes #14444.

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 1dca223..4767f26 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -743,6 +743,9 @@ xf86RandR12CrtcSet (ScreenPtr	pScreen,
     xf86CrtcPtr		*save_crtcs;
     Bool		save_enabled = crtc->enabled;
 
+    if (!crtc->scrn->vtSema)
+	return FALSE;
+
     save_crtcs = xalloc(config->num_output * sizeof (xf86CrtcPtr));
     if ((randr_mode != NULL) != crtc->enabled)
 	changed = TRUE;
commit db248ffb840a0c113b6eb508a0fa1e74e752474d
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Sun Mar 16 18:46:11 2008 +0100

    test for the presence of pci_system_init_dev_mem() before calling it.
    
    This avoids creating a dependency on -current libpciaccess for
    BSD systems other than OpenBSD (which don't otherwise need it).

diff --git a/configure.ac b/configure.ac
index 5417bbb..49f2395 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1308,6 +1308,13 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
 	XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $SELINUX_LIB"
 
 	PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+	SAVE_LIBS=$LIBS
+	SAVE_CFLAGS=$CFLAGS
+	CFLAGS=$PCIACCESS_CFLAGS
+	LIBS=$PCIACCESS_LIBS
+	AC_CHECK_FUNCS([pci_system_init_dev_mem])
+	LIBS=$SAVE_LIBS
+	CFLAGS=$SAVE_CFLAGS
 	XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS"
 	XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
 
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 7e4a4d2..1ebac67 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -212,8 +212,10 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 	pVidMem->mapMem = mapVidMem;
 	pVidMem->unmapMem = unmapVidMem;
 
+#if HAVE_PCI_SYSTEM_INIT_DEV_MEM
 	if (useDevMem)
 		pci_system_init_dev_mem(devMemFd);
+#endif
 
 #ifdef HAS_MTRR_SUPPORT
 	if (useDevMem) {
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index 0603eab..5587c0a 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -115,6 +115,9 @@
 /* Have execinfo.h */
 #undef HAVE_EXECINFO_H
 
+/* Have pci_system_init_dev_mem() */
+#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
+
 /* Path to text files containing PCI IDs */
 #undef PCI_TXT_IDS_PATH
 
commit aa231f28d56402d7daea6cbd3002fbf760f79497
Author: Donnie Berkholz <dberkholz at gentoo.org>
Date:   Fri Mar 14 18:41:25 2008 -0700

    Xephyr: Build fix: Port across XF86dri.c changes from Mesa.

diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c
index 506d7be..e656ff5 100644
--- a/hw/kdrive/ephyr/XF86dri.c
+++ b/hw/kdrive/ephyr/XF86dri.c
@@ -385,9 +385,8 @@ Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
 					   context, hHWContext );
 }
 
-GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context)
+GLboolean XF86DRIDestroyContext( Display *dpy, int screen, XID context)
 {
-    Display * const dpy = (Display *) ndpy;
     XExtDisplayInfo *info = find_display (dpy);
     xXF86DRIDestroyContextReq *req;
 
@@ -407,10 +406,9 @@ GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid
 }
 
 GLboolean
-XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen,
-                       __DRIid drawable, drm_drawable_t * hHWDrawable)
+XF86DRICreateDrawable (Display *dpy, int screen,
+                       XID drawable, drm_drawable_t * hHWDrawable)
 {
-    Display * const dpy = (Display *) ndpy;
     XExtDisplayInfo *info = find_display (dpy);
     xXF86DRICreateDrawableReply rep;
     xXF86DRICreateDrawableReq *req;
@@ -437,16 +435,36 @@ XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen,
     return True;
 }
 
-GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
-    __DRIid drawable )
+static int noopErrorHandler(Display *dpy, XErrorEvent *xerr)
+{
+    return 0;
+}
+
+GLboolean XF86DRIDestroyDrawable( Display *dpy, int screen,
+    XID drawable )
 {
-    Display * const dpy = (Display *) ndpy;
     XExtDisplayInfo *info = find_display (dpy);
     xXF86DRIDestroyDrawableReq *req;
+    int (*oldXErrorHandler)(Display *, XErrorEvent *);
 
     TRACE("DestroyDrawable...");
     XF86DRICheckExtension (dpy, info, False);
 
+    /* This is called from the DRI driver, which used call it like this
+     *
+     *   if (windowExists(drawable))
+     *     destroyDrawable(drawable);
+     *
+     * which is a textbook race condition - the window may disappear
+     * from the server between checking for its existance and
+     * destroying it.  Instead we change the semantics of
+     * __DRIinterfaceMethodsRec::destroyDrawable() to succeed even if
+     * the windows is gone, by wrapping the destroy call in an error
+     * handler. */
+
+    XSync(dpy, GL_FALSE);
+    oldXErrorHandler = XSetErrorHandler(noopErrorHandler);
+
     LockDisplay(dpy);
     GetReq(XF86DRIDestroyDrawable, req);
     req->reqType = info->codes->major_opcode;
@@ -455,6 +473,9 @@ GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
     req->drawable = drawable;
     UnlockDisplay(dpy);
     SyncHandle();
+
+    XSetErrorHandler(oldXErrorHandler);
+
     TRACE("DestroyDrawable... return True");
     return True;
 }
commit a955c3b587b22b8bf20cb6bedbbec4ad5fcb32ac
Author: Donnie Berkholz <dberkholz at gentoo.org>
Date:   Fri Mar 14 18:41:07 2008 -0700

    Xephyr: Distribute ephyrdriext.h in tarballs.

diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am
index d025c20..81d3d69 100644
--- a/hw/kdrive/ephyr/Makefile.am
+++ b/hw/kdrive/ephyr/Makefile.am
@@ -35,6 +35,7 @@ if XEPHYR_HAS_DRI
 
 libxephyr_hostdri_a_SOURCES= \
 ephyrdriext.c	\
+ephyrdriext.h	\
 ephyrdri.c	\
 ephyrdri.h	\
 XF86dri.c	\
commit 090b26db767d296e7a3452da83b136d1caa0ed01
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Mar 14 21:58:27 2008 +0200

    XkbCopyKeymap: Fix broken indentation
    
    An astute observer will note that the entirety of XkbCopyKeymap is indented
    with spaces, and no tabs whatsoever, and not commit changes which break the
    otherwise consistent indentation.
    A non-astute observer will note the breakage when the commit mail comes
    through with clearly broken indentation.
    A polite, non-astute, observer will then fix it.
    
    C'est la vie.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index a3ae655..8339cef 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1796,7 +1796,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                   dsection = dst->geom->sections;
                  i < src->geom->num_sections;
                  i++, ssection++, dsection++) {
-		*dsection = *ssection;
+                *dsection = *ssection;
                 if (ssection->num_rows) {
                     tmp = xcalloc(ssection->num_rows, sizeof(XkbRowRec));
                     if (!tmp)
@@ -1852,9 +1852,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                     }
                     ddoodad->any.type = sdoodad->any.type;
                 }
-		dsection->overlays = NULL;
-		dsection->sz_overlays = 0;
-		dsection->num_overlays = 0;
+                dsection->overlays = NULL;
+                dsection->sz_overlays = 0;
+                dsection->num_overlays = 0;
             }
         }
         else {
commit 88bec0915e3867f8dbf859a3dfbb771d0d07092d
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Mar 14 21:54:13 2008 +0200

    mi: More meaningful assert crashes
    
    When we fail an assert in miregion.c (which happens every now and then,
    though I haven't yet checked up why), at least generate a segfault, so
    we'll get a backtrace.

diff --git a/mi/miregion.c b/mi/miregion.c
index 45768a3..69ecdc2 100644
--- a/mi/miregion.c
+++ b/mi/miregion.c
@@ -89,9 +89,14 @@ Equipment Corporation.
 
 #undef assert
 #ifdef DEBUG
-#define assert(expr) {if (!(expr)) \
-		FatalError("Assertion failed file %s, line %d: expr\n", \
-			__FILE__, __LINE__); }
+#define assert(expr) { \
+            CARD32 *foo = NULL; \
+            if (!(expr)) { \
+                ErrorF("Assertion failed file %s, line %d: %s\n", \
+                       __FILE__, __LINE__, #expr); \
+                *foo = 0xdeadbeef; /* to get a backtrace */ \
+            } \
+        }
 #else
 #define assert(expr)
 #endif
commit 57d48d94b8947c571925e6fd4c9bf041fbd1b2ac
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Mar 14 14:37:42 2008 -0400

    Fix a stray use of ALLOCATE_LOCAL.

diff --git a/hw/xfree86/xf4bpp/ppcSpMcro.h b/hw/xfree86/xf4bpp/ppcSpMcro.h
index 2b7f951..655a883 100644
--- a/hw/xfree86/xf4bpp/ppcSpMcro.h
+++ b/hw/xfree86/xf4bpp/ppcSpMcro.h
@@ -28,11 +28,11 @@
 #define SETSPANPTRS(IN,N,IPW,PW,IPPT,PPT,FPW,FPPT,FSORT)		\
 	{								\
 	N = IN * miFindMaxBand(pGC->pCompositeClip);			\
-	if(!(PW = (int *)ALLOCATE_LOCAL(N * sizeof(int))))		\
+	if(!(PW = (int *)xalloc(N * sizeof(int))))		\
 		return;							\
-	if(!(PPT = (DDXPointRec *)ALLOCATE_LOCAL(N * sizeof(DDXPointRec)))) \
+	if(!(PPT = (DDXPointRec *)xalloc(N * sizeof(DDXPointRec)))) \
 		{							\
-		DEALLOCATE_LOCAL(PW);					\
+		free(PW);					\
 		return;							\
     		}							\
 	FPW = PW;							\
commit 824853772241acf64bc37ac8b85254194741ae13
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Mar 14 14:24:21 2008 -0400

    RANDR 1.2: Fix initial mode aspect ratio match in a corner case.
    
    Actually more like in the mainline case, where the ideal mode happens to
    be the very first aspect match on the first monitor.  But let's not
    split hairs.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 39e84e6..6b845b7 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1683,14 +1683,19 @@ aspectMatch(float a, float b)
 }
 
 static DisplayModePtr
-nextAspectMode(DisplayModePtr start, float aspect)
+nextAspectMode(xf86OutputPtr o, DisplayModePtr last, float aspect)
 {
-    DisplayModePtr m = start;
+    DisplayModePtr m = NULL;
 
-    if (!m)
+    if (!o)
 	return NULL;
 
-    for (m = m->next; m; m = m->next)
+    if (!last)
+	m = o->probed_modes;
+    else
+	m = last->next;
+
+    for (; m; m = m->next)
 	if (aspectMatch(aspect, (float)m->HDisplay / (float)m->VDisplay))
 	    return m;
 
@@ -1700,31 +1705,29 @@ nextAspectMode(DisplayModePtr start, float aspect)
 static DisplayModePtr
 bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect)
 {
-    int o, p;
-    DisplayModePtr mode, test = NULL, match = NULL;
+    int o = -1, p;
+    DisplayModePtr mode = NULL, test = NULL, match = NULL;
 
-    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
-	mode = config->output[o]->probed_modes;
-	while ((mode = nextAspectMode(mode, aspect))) {
-	    for (p = o; nextEnabledOutput(config, enabled, &p); ) {
-		test = xf86OutputFindClosestMode(config->output[p], mode);
-		if (!test)
-		    break;
-		if (test->HDisplay != mode->HDisplay ||
+    nextEnabledOutput(config, enabled, &o);
+    while ((mode = nextAspectMode(config->output[o], mode, aspect))) {
+	for (p = o; nextEnabledOutput(config, enabled, &p); ) {
+	    test = xf86OutputFindClosestMode(config->output[p], mode);
+	    if (!test)
+		break;
+	    if (test->HDisplay != mode->HDisplay ||
 		    test->VDisplay != mode->VDisplay) {
-		    test = NULL;
-		    break;
-		}
+		test = NULL;
+		break;
 	    }
+	}
 
-	    /* if we didn't match it on all outputs, try the next one */
-	    if (!test)
-		continue;
+	/* if we didn't match it on all outputs, try the next one */
+	if (!test)
+	    continue;
 
-	    /* if it's bigger than the last one, save it */
-	    if (!match || (test->HDisplay > match->HDisplay))
-		match = test;
-	}
+	/* if it's bigger than the last one, save it */
+	if (!match || (test->HDisplay > match->HDisplay))
+	    match = test;
     }
 
     /* return the biggest one found */
commit 1b9878ffcfc0c0dbc4a6e674827fe508ba77db4b
Author: Bart Trojanowski <bart at jukie.net>
Date:   Thu Mar 13 17:42:16 2008 -0400

    Bug #14332: Fix PCI access cycles from x86emu.
    
    The address written to 0xcf8 contains the PCI slot address to send the
    config cycle to.  However, we would ignore that and always send the
    cycle to the device whose BIOS we were running.  This breaks some
    integrated graphics platforms that have explicit knowledge about the
    system's host bridge, for example.

diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index de6fde5..9daff22 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -33,6 +33,7 @@
 #ifdef _X86EMU
 #include "x86emu/x86emui.h"
 #endif
+#include <pciaccess.h>
 
 static int pciCfg1in(CARD16 addr, CARD32 *val);
 static int pciCfg1out(CARD16 addr, CARD32 val);
@@ -459,7 +460,43 @@ Mem_wl(CARD32 addr, CARD32 val)
 
 static CARD32 PciCfg1Addr = 0;
 
-#define OFFSET(Cfg1Addr) (Cfg1Addr & 0xff)
+#define PCI_OFFSET(x) ((x) & 0x000000ff)
+#define PCI_TAG(x)    ((x) & 0xffffff00)
+
+static struct pci_device*
+pci_device_for_cfg_address (CARD32 addr)
+{
+	struct pci_device *dev = NULL;
+	PCITAG tag = PCI_TAG(addr);
+	struct pci_slot_match slot_match = {
+		.domain = PCI_DOM_FROM_TAG(tag),
+		.bus = PCI_BUS_NO_DOMAIN(PCI_BUS_FROM_TAG(tag)),
+		.dev = PCI_DEV_FROM_TAG(tag),
+		.func = PCI_FUNC_FROM_TAG(tag),
+		.match_data = 0
+	};
+
+	struct pci_device_iterator *iter =
+	    pci_slot_match_iterator_create (&slot_match);
+	if (iter)
+		dev = pci_device_next(iter);
+	if (!dev) {
+		char buf[128]; /* enough to store "%u@%u" */
+		xf86FormatPciBusNumber(tag >> 16, buf);
+		ErrorF("Failed to find device matching %s:%u:%u\n",
+				buf, slot_match.dev, slot_match.func);
+		return NULL;
+	}
+
+	if (pci_device_next(iter)) {
+		char buf[128]; /* enough to store "%u@%u" */
+		xf86FormatPciBusNumber(tag >> 16, buf);
+		ErrorF("Multiple devices matching %s:%u:%u\n",
+				buf, slot_match.dev, slot_match.func);
+	}
+
+	return dev;
+}
 
 static int
 pciCfg1in(CARD16 addr, CARD32 *val)
@@ -469,7 +506,8 @@ pciCfg1in(CARD16 addr, CARD32 *val)
 	return 1;
     }
     if (addr == 0xCFC) {
-	pci_device_cfg_read_u32(Int10Current->dev, val, OFFSET(PciCfg1Addr));
+	pci_device_cfg_read_u32(pci_device_for_cfg_address(PciCfg1Addr),
+			val, PCI_OFFSET(PciCfg1Addr));
 	if (PRINT_PORT && DEBUG_IO_TRACE())
 	    ErrorF(" cfg_inl(%#x) = %8.8x\n", PciCfg1Addr, *val);
 	return 1;
@@ -487,7 +525,8 @@ pciCfg1out(CARD16 addr, CARD32 val)
     if (addr == 0xCFC) {
 	if (PRINT_PORT && DEBUG_IO_TRACE())
 	    ErrorF(" cfg_outl(%#x, %8.8x)\n", PciCfg1Addr, val);
-	pci_device_cfg_write_u32(Int10Current->dev, val, OFFSET(PciCfg1Addr));
+	pci_device_cfg_write_u32(pci_device_for_cfg_address(PciCfg1Addr),
+			val, PCI_OFFSET(PciCfg1Addr));
 	return 1;
     }
     return 0;
@@ -506,7 +545,8 @@ pciCfg1inw(CARD16 addr, CARD16 *val)
     if ((addr >= 0xCFC) && (addr <= 0xCFF)) {
 	const unsigned offset = addr - 0xCFC;
 
-	pci_device_cfg_read_u16(Int10Current->dev, val, OFFSET(PciCfg1Addr) + offset);
+	pci_device_cfg_read_u16(pci_device_for_cfg_address(PciCfg1Addr),
+			val, PCI_OFFSET(PciCfg1Addr) + offset);
 	if (PRINT_PORT && DEBUG_IO_TRACE())
 	    ErrorF(" cfg_inw(%#x) = %4.4x\n", PciCfg1Addr + offset, *val);
 	return 1;
@@ -530,7 +570,8 @@ pciCfg1outw(CARD16 addr, CARD16 val)
 
 	if (PRINT_PORT && DEBUG_IO_TRACE())
 	    ErrorF(" cfg_outw(%#x, %4.4x)\n", PciCfg1Addr + offset, val);
-	pci_device_cfg_write_u16(Int10Current->dev, val, OFFSET(PciCfg1Addr) + offset);
+	pci_device_cfg_write_u16(pci_device_for_cfg_address(PciCfg1Addr),
+			val, PCI_OFFSET(PciCfg1Addr) + offset);
 	return 1;
     }
     return 0;
@@ -549,7 +590,8 @@ pciCfg1inb(CARD16 addr, CARD8 *val)
     if ((addr >= 0xCFC) && (addr <= 0xCFF)) {
 	const unsigned offset = addr - 0xCFC;
 
-	pci_device_cfg_read_u8(Int10Current->dev, val, OFFSET(PciCfg1Addr) + offset);
+	pci_device_cfg_read_u8(pci_device_for_cfg_address(PciCfg1Addr),
+			val, PCI_OFFSET(PciCfg1Addr) + offset);
 	if (PRINT_PORT && DEBUG_IO_TRACE())
 	    ErrorF(" cfg_inb(%#x) = %2.2x\n", PciCfg1Addr + offset, *val);
 	return 1;
@@ -573,7 +615,8 @@ pciCfg1outb(CARD16 addr, CARD8 val)
 
 	if (PRINT_PORT && DEBUG_IO_TRACE())
 	    ErrorF(" cfg_outb(%#x, %2.2x)\n", PciCfg1Addr + offset, val);
-	pci_device_cfg_write_u8(Int10Current->dev, val, OFFSET(PciCfg1Addr) + offset);
+	pci_device_cfg_write_u8(pci_device_for_cfg_address(PciCfg1Addr),
+			val, PCI_OFFSET(PciCfg1Addr) + offset);
 	return 1;
     }
     return 0;
commit f7abe05b3306ed9a6f2cf5e3e45ed524d725d029
Author: Doug Chapman <doug.chapman at hp.com>
Date:   Thu Mar 13 17:40:34 2008 -0400

    Bug #14091: Fix build (and runtime) on ia64.

diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am
index 381b992..5a15430 100644
--- a/hw/xfree86/os-support/bus/Makefile.am
+++ b/hw/xfree86/os-support/bus/Makefile.am
@@ -27,18 +27,6 @@ if LINUX_ALPHA
 PCI_SOURCES += axpPci.c
 endif
 
-if LINUX_IA64
-PLATFORM_PCI_SOURCES = \
-	460gxPCI.c \
-	460gxPCI.h \
-	altixPCI.c \
-	altixPCI.h \
-	e8870PCI.c \
-	e8870PCI.h \
-	zx1PCI.c \
-	zx1PCI.h
-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 0abb34f..ebac090 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -207,9 +207,8 @@
 # endif
 #elif defined(__ia64__)
 # if defined(linux)
-#  define ARCH_PCI_INIT ia64linuxPciInit
+#  define ARCH_PCI_INIT linuxPciInit
 # endif
-# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
 #elif defined(__i386__) || defined(__i386)
 # if defined(linux)
 #  define ARCH_PCI_INIT linuxPciInit
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 5a52ffd..beaae3d 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -1,7 +1,7 @@
 noinst_LTLIBRARIES = liblinux.la
 
 if LINUX_IA64
-PLATFORM_PCI_SUPPORT = $(srcdir)/lnx_ia64.c $(srcdir)/../shared/ia64Pci.c
+PLATFORM_PCI_SUPPORT = $(srcdir)/../shared/ia64Pci.c
 PLATFORM_DEFINES = -DOS_PROBE_PCI_CHIPSET=lnxProbePciChipset
 PLATFORM_INCLUDES = -I$(srcdir)/../shared
 endif
diff --git a/hw/xfree86/os-support/shared/ia64Pci.c b/hw/xfree86/os-support/shared/ia64Pci.c
index 45522e9..6f6924b 100644
--- a/hw/xfree86/os-support/shared/ia64Pci.c
+++ b/hw/xfree86/os-support/shared/ia64Pci.c
@@ -42,12 +42,7 @@
 #include <linux/pci.h>
 
 #include "compiler.h"
-#include "460gxPCI.h"
-#include "e8870PCI.h"
-#include "zx1PCI.h"
-#include "altixPCI.h"
 #include "Pci.h"
-#include "ia64Pci.h"
 
 /*
  * We use special in/out routines here since Altix platforms require the
@@ -191,53 +186,3 @@ _X_EXPORT unsigned int inl(unsigned long port)
     return val;
 }
 
-void
-ia64ScanPCIWrapper(scanpciWrapperOpt flags)
-{
-    static IA64Chipset chipset = NONE_CHIPSET;
-    
-    if (flags == SCANPCI_INIT) {
-
-	/* PCI configuration space probes should be done first */
-	if (xorgProbe460GX(flags)) {
-	    chipset = I460GX_CHIPSET;
-	    xf86PreScan460GX();	
-	    return;
-	} else if (xorgProbeE8870(flags)) {
-	    chipset = E8870_CHIPSET;
-	    xf86PreScanE8870();
-	    return;
-	}
-#ifdef OS_PROBE_PCI_CHIPSET
-	chipset = OS_PROBE_PCI_CHIPSET(flags);
-	switch (chipset) {
-	    case ZX1_CHIPSET:
-		xf86PreScanZX1();
-		return;
-	    case ALTIX_CHIPSET:
-		xf86PreScanAltix();
-		return;
-	    default:
-		return;
-	}
-#endif
-    } else /* if (flags == SCANPCI_TERM) */ {
-
-	switch (chipset) {
-	    case I460GX_CHIPSET:
-		xf86PostScan460GX();
-		return;
-	    case E8870_CHIPSET:
-		xf86PostScanE8870();
-		return;
-	    case ZX1_CHIPSET:
-		xf86PostScanZX1();
-		return;
-	    case ALTIX_CHIPSET:
-		xf86PostScanAltix();
-		return;
-	    default:
-		return;
-	}
-    }
-}
commit 5d7437c29e686a081b20823450d78c4c2f4e0aec
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Mar 13 17:37:12 2008 -0400

    RANDR 1.2: Fix the RANDR 1.1 screen size estimation to approach reality.
    
    While the ScreenRec's notion of size in millimeters would get updates,
    the RANDR 1.1 notion wouldn't, so your screen would appear to be square
    and probably at some ludicrous DPI.

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index af950e6..1dca223 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -355,8 +355,8 @@ xf86RandR12ScreenSetSize (ScreenPtr	pScreen,
 
     pScreen->width = pScrnPix->drawable.width = width;
     pScreen->height = pScrnPix->drawable.height = height;
-    pScreen->mmWidth = mmWidth;
-    pScreen->mmHeight = mmHeight;
+    randrp->mmWidth = pScreen->mmWidth = mmWidth;
+    randrp->mmHeight = pScreen->mmHeight = mmHeight;
 
     xf86SetViewport (pScreen, pScreen->width-1, pScreen->height-1);
     xf86SetViewport (pScreen, 0, 0);
commit 61c3f63a75d8b0cc47ffed4a0e30147fab2ae8f4
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Mar 13 17:34:54 2008 -0400

    RANDR 1.2: Don't report a square resolution to RANDR 1.1 clients.
    
    It can't possibly do anything useful, and older versions of Gnome (and
    proably others) get very confused by it.  So do the drivers, for that
    matter.

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 816175c..af950e6 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -145,23 +145,6 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations)
 	randrp->maxY = maxY;
     }
 
-    if (scrp->currentMode->HDisplay != randrp->virtualX ||
-	scrp->currentMode->VDisplay != randrp->virtualY)
-    {
-	pSize = RRRegisterSize (pScreen,
-				randrp->virtualX, randrp->virtualY,
-				randrp->mmWidth,
-				randrp->mmHeight);
-	if (!pSize)
-	    return FALSE;
-	RRRegisterRate (pScreen, pSize, refresh0);
-	if (scrp->virtualX == randrp->virtualX &&
-	    scrp->virtualY == randrp->virtualY)
-	{
-	    RRSetCurrentConfig (pScreen, randrp->rotation, refresh0, pSize);
-	}
-    }
-
     return TRUE;
 }
 
commit 06c0372c3a1b45005eb6d50406f77f4e93f1de1e
Author: Mark Kettenis <mark.kettenis at xs4all.nl>
Date:   Wed Mar 12 21:45:37 2008 +0100

    OpenBSD support for libpciaccess.
    
    xserver and libpciaccess both need to open /dev/xf86, which can only
    be opened once.  I implemented pci_system_init_dev_mem() like Ian
    suggested.  This requires some minor changes to the BSD-specific
    os-support code.  Since pci_system_init_dev_mem() is a no-op on
    FreeBSD this should be no problem.

diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 0dcff66..7e4a4d2 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -212,6 +212,9 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 	pVidMem->mapMem = mapVidMem;
 	pVidMem->unmapMem = unmapVidMem;
 
+	if (useDevMem)
+		pci_system_init_dev_mem(devMemFd);
+
 #ifdef HAS_MTRR_SUPPORT
 	if (useDevMem) {
 		if (cleanMTRR()) {
diff --git a/hw/xfree86/os-support/bus/bsd_pci.c b/hw/xfree86/os-support/bus/bsd_pci.c
index bceb108..57ad09b 100644
--- a/hw/xfree86/os-support/bus/bsd_pci.c
+++ b/hw/xfree86/os-support/bus/bsd_pci.c
@@ -81,4 +81,6 @@ bsdPciInit(void)
 {
     pciNumBuses = 1;
     pciBusInfo[0] = &bsd_pci;
+
+    xf86InitVidMem();
 }
diff --git a/hw/xfree86/utils/ioport/Makefile.am b/hw/xfree86/utils/ioport/Makefile.am
index c1f9453..12f8613 100644
--- a/hw/xfree86/utils/ioport/Makefile.am
+++ b/hw/xfree86/utils/ioport/Makefile.am
@@ -37,7 +37,7 @@ ioport_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
 ioport_LDADD = \
 	../../os-support/libxorgos.la \
 	../../dummylib/libdummy-nonserver.a \
-	${UTILS_SYS_LIBS}
+	${UTILS_SYS_LIBS} ${PCIACCESS_LIBS}
 
 
 ioport_SOURCES =	\
commit 2036851125226065891f13583ade3ce559e7bd37
Author: Matthias Hopf <mhopf at suse.de>
Date:   Mon Mar 10 19:29:07 2008 +0100

    Return randr interface version in xf86CrtcScreenInit()
    
    Necessary to allow drivers to be run-time backwards compatible when using the
    modes/ functions w/o providing their own copy.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 0bef5b4..39e84e6 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -694,7 +694,12 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen)
 /*
  * Called at ScreenInit time to set up
  */
-_X_EXPORT Bool
+_X_EXPORT
+#ifdef RANDR_13_INTERFACE
+int
+#else
+Bool
+#endif
 xf86CrtcScreenInit (ScreenPtr screen)
 {
     ScrnInfoPtr		scrn = xf86Screens[screen->myNum];
@@ -727,7 +732,11 @@ xf86CrtcScreenInit (ScreenPtr screen)
     config->CloseScreen = screen->CloseScreen;
     screen->CloseScreen = xf86CrtcCloseScreen;
     
+#ifdef RANDR_13_INTERFACE
+    return RANDR_INTERFACE_VERSION;
+#else
     return TRUE;
+#endif
 }
 
 static DisplayModePtr
@@ -2228,7 +2237,7 @@ xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation)
 	}
     }
     xf86DisableUnusedFunctions(pScrn);
-#if RANDR_12_INTERFACE
+#ifdef RANDR_12_INTERFACE
     xf86RandR12TellChanged (pScrn->pScreen);
 #endif
     return ok;
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index b87a325..a542e7f 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -692,7 +692,11 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY);
 void
 xf86SetScrnInfoModes (ScrnInfoPtr pScrn);
 
+#ifdef RANDR_13_INTERFACE
+int
+#else
 Bool
+#endif
 xf86CrtcScreenInit (ScreenPtr pScreen);
 
 Bool
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 3b48f5c..4d7c9cc 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -56,6 +56,8 @@
 #define RANDR_12_INTERFACE 1
 #define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
 
+#define RANDR_INTERFACE_VERSION 0x0103
+
 typedef XID	RRMode;
 typedef XID	RROutput;
 typedef XID	RRCrtc;
commit c7536f4b87e089a7e7c43026b189922fec70c565
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Tue Mar 11 13:11:04 2008 -0400

    Silence REGION_INIT() warning.
    
    Evaluating the address of a BoxRec as a boolean gives this warning:
    
      i830_driver.c:2317: warning: the address of 'ScreenBox' will always
      evaluate as 'true'
    
    which is pretty annoying.  This patch compares the address to NULL to
    avoid the pointer->bool conversion and gets rid of the warning.  Seems
    like a lame hack, but the warning is worse.

diff --git a/include/regionstr.h b/include/regionstr.h
index f44cab7..5a79b12 100644
--- a/include/regionstr.h
+++ b/include/regionstr.h
@@ -158,7 +158,7 @@ extern RegDataRec miBrokenData;
 
 #define REGION_INIT(_pScreen, _pReg, _rect, _size) \
 { \
-    if (_rect) \
+    if ((_rect) != NULL)				\
     { \
         (_pReg)->extents = *(_rect); \
         (_pReg)->data = (RegDataPtr)NULL; \
commit cc05255191413b3f376edbc600122ff085f45f7b
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Tue Mar 11 00:51:43 2008 -0400

    Make WriteToClient take a const void * like any decent IO write function.
    
    Enough with the casting.  Doesn't break API or even ABI, but does make
    a lot of silly casts superfluos.

diff --git a/include/os.h b/include/os.h
index 4be6b80..c0f04c6 100644
--- a/include/os.h
+++ b/include/os.h
@@ -115,7 +115,7 @@ extern void FlushIfCriticalOutputPending(void);
 
 extern void SetCriticalOutputPending(void);
 
-extern int WriteToClient(ClientPtr /*who*/, int /*count*/, char* /*buf*/);
+extern int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/);
 
 extern void ResetOsBuffers(void);
 
@@ -448,7 +448,7 @@ typedef struct {
 extern CallbackListPtr ReplyCallback;
 typedef struct {
     ClientPtr client;
-    pointer replyData;
+    const void *replyData;
     unsigned long dataLenBytes;
     unsigned long bytesRemaining;
     Bool startOfReply;
diff --git a/os/io.c b/os/io.c
index e7ec609..4f4a109 100644
--- a/os/io.c
+++ b/os/io.c
@@ -730,11 +730,12 @@ SetCriticalOutputPending(void)
  *****************/
 
 _X_EXPORT int
-WriteToClient (ClientPtr who, int count, char *buf)
+WriteToClient (ClientPtr who, int count, const void *__buf)
 {
     OsCommPtr oc = (OsCommPtr)who->osPrivate;
     ConnectionOutputPtr oco = oc->output;
     int padBytes;
+    const char *buf = __buf;
 #ifdef DEBUG_COMMUNICATION
     Bool multicount = FALSE;
 #endif
@@ -871,13 +872,14 @@ WriteToClient (ClientPtr who, int count, char *buf)
  **********************/
 
 int
-FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
+FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
 {
     ConnectionOutputPtr oco = oc->output;
     int connection = oc->fd;
     XtransConnInfo trans_conn = oc->trans_conn;
     struct iovec iov[3];
     static char padBuffer[3];
+    const char *extraBuf = __extraBuf;
     long written;
     long padsize;
     long notWritten;
@@ -916,14 +918,14 @@ FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
 	    before = (-len); \
 	} else { \
 	    iov[i].iov_len = len; \
-	    iov[i].iov_base = (pointer) + before; \
+	    iov[i].iov_base = (pointer) + before;	\
 	    i++; \
 	    remain -= len; \
 	    before = 0; \
 	}
 
 	InsertIOV ((char *)oco->buf, oco->count)
-	InsertIOV (extraBuf, extraCount)
+	InsertIOV ((char *)extraBuf, extraCount)
 	InsertIOV (padBuffer, padsize)
 
 	errno = 0;
diff --git a/os/osdep.h b/os/osdep.h
index b6894c1..84f7177 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -184,7 +184,7 @@ typedef struct _osComm {
 extern int FlushClient(
     ClientPtr /*who*/,
     OsCommPtr /*oc*/,
-    char* /*extraBuf*/,
+    const void * /*extraBuf*/,
     int /*extraCount*/
 );
 
commit bc504ffbba3dec2e3467bab8ba1ac25db6dd317e
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Tue Mar 11 00:35:31 2008 -0400

    DRI2: Add DRI2AuthConnection().
    
    DRI2 uses the same authentication scheme as XF86DRI, so implement this
    entry point so DRI2 protocol code can access it.

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index d2664b1..d527387 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -342,6 +342,17 @@ DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName,
     return TRUE;
 }
 
+Bool
+DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic)
+{
+    DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
+
+    if (ds == NULL || drmAuthMagic(ds->fd, magic))
+	return FALSE;
+
+    return TRUE;
+}
+
 unsigned int
 DRI2GetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags)
 {
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index a319085..126087a 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -58,6 +58,8 @@ Bool DRI2Connect(ScreenPtr pScreen,
 		 const char **driverName,
 		 unsigned int *sareaHandle);
 
+Bool DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic);
+
 unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap,
 				 unsigned int *flags);
 
commit b2657ec5981122e7cc0bda0d8802aec63cde9014
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Feb 6 16:51:57 2008 -0800

    XkbCopyKeymap was mangling doodads and overlays

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index b313270..a3ae655 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1796,6 +1796,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                   dsection = dst->geom->sections;
                  i < src->geom->num_sections;
                  i++, ssection++, dsection++) {
+		*dsection = *ssection;
                 if (ssection->num_rows) {
                     tmp = xcalloc(ssection->num_rows, sizeof(XkbRowRec));
                     if (!tmp)
@@ -1830,6 +1831,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                     dsection->doodads = NULL;
                 }
 
+                dsection->sz_doodads = ssection->num_doodads;
                 for (k = 0,
                       sdoodad = ssection->doodads,
                       ddoodad = dsection->doodads;
@@ -1850,8 +1852,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                     }
                     ddoodad->any.type = sdoodad->any.type;
                 }
-                dsection->num_doodads = ssection->num_doodads;
-                dsection->sz_doodads = ssection->num_doodads;
+		dsection->overlays = NULL;
+		dsection->sz_overlays = 0;
+		dsection->num_overlays = 0;
             }
         }
         else {
commit ab9b0b36ac8ac72fc48c0abd91a83de49a18313c
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 10 13:40:00 2008 -0400

    Add the "amd" driver to magic driver selection.

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index e3e0bb3..268b50c 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -140,12 +140,13 @@ videoPtrToDriverName(struct pci_device *dev)
 {
     /*
      * things not handled yet:
-     * amd/cyrix/nsc
-     * xgi
+     * cyrix/nsc.  should be merged into geode anyway.
+     * xgi.
      */
 
     switch (dev->vendor_id)
     {
+	case 0x1022:		    return "amd";
 	case 0x1142:		    return "apm";
 	case 0xedd8:		    return "ark";
 	case 0x1a03:		    return "ast";
commit 0f6aaf636b7ac4c98467284ff7baf1b83e0b72e7
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 10 09:14:20 2008 -0400

    Bug #14927: Fix the math for xf86NumDefaultModes.

diff --git a/hw/xfree86/common/modeline2c.awk b/hw/xfree86/common/modeline2c.awk
index ca32e2f..71a956e 100644
--- a/hw/xfree86/common/modeline2c.awk
+++ b/hw/xfree86/common/modeline2c.awk
@@ -92,5 +92,5 @@ BEGIN {
 
 END {
 	print "};"
-	printf "const int xf86NumDefaultModes = sizeof(xf86NumDefaultModes) / sizeof(DisplayModeRec);"
+	printf "const int xf86NumDefaultModes = sizeof(xf86DefaultModes) / sizeof(DisplayModeRec);"
 }
commit 01c2e01f2aee580438b74bfb9da8f584f3878e6b
Author: Kristian Høgsberg <krh at sasori.boston.redhat.com>
Date:   Sun Mar 9 21:40:27 2008 -0400

    GLX: Track changes to DRI_TEX_BUFFER extension.
    
    We now just pass in the __DRIdrawable.

diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c
index fbc018c..fecfb19 100644
--- a/GL/glx/glxdri2.c
+++ b/GL/glx/glxdri2.c
@@ -225,7 +225,7 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
     __GLXDRIscreen * const screen = (__GLXDRIscreen *) glxGetScreen(pScreen);
     PixmapPtr pixmap;
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
-    unsigned int flags;
+    __GLXDRIdrawable *drawable = (__GLXDRIdrawable *) glxPixmap;
 
     if (screen->texBuffer == NULL)
         return Success;
@@ -233,10 +233,7 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
     pixmap = (PixmapPtr) glxPixmap->pDraw;
     screen->texBuffer->setTexBuffer(&context->driContext,
 				    glxPixmap->target,
-				    DRI2GetPixmapHandle(pixmap, &flags),
-				    pixmap->drawable.depth,
-				    pixmap->devKind,
-				    pixmap->drawable.height);
+				    &drawable->driDrawable);
 
     return Success;
 }
commit acedc03367e9e69f03b4838f0f0e8d8a8e872b9b
Author: Kristian Høgsberg <krh at sasori.boston.redhat.com>
Date:   Sun Mar 9 21:39:19 2008 -0400

    DRI2: Return event buffer head index in DRI2CreateDrawable.
    
    And pass it to the DRI driver in AIGLX.

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index dc15b0f..1e17911 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -704,7 +704,7 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
 	(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
 						 modes,
 						 &private->driDrawable,
-						 hwDrawable, 0, NULL);
+						 hwDrawable, 0, 0, NULL);
 
     if (private->driDrawable.private == NULL) {
 	__glXenterServer(GL_FALSE);
diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c
index 27257d3..fbc018c 100644
--- a/GL/glx/glxdri2.c
+++ b/GL/glx/glxdri2.c
@@ -341,6 +341,7 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
     __GLXDRIdrawable *private;
     GLboolean retval;
     drm_drawable_t hwDrawable;
+    unsigned int head;
 
     private = xalloc(sizeof *private);
     if (private == NULL)
@@ -359,13 +360,14 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
     private->base.swapBuffers   = __glXDRIdrawableSwapBuffers;
     private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
 
-    retval = DRI2CreateDrawable(screen->pScreen, pDraw, &hwDrawable);
+    retval = DRI2CreateDrawable(screen->pScreen, pDraw,
+				&hwDrawable, &head);
 
     private->driDrawable.private =
 	(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
 						 modes,
 						 &private->driDrawable,
-						 hwDrawable, 0, NULL);
+						 hwDrawable, head, 0, NULL);
 
     return &private->base;
 }
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 9b4c18c..d2664b1 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -262,8 +262,8 @@ DRI2CloseScreen(ScreenPtr pScreen)
 }
 
 Bool
-DRI2CreateDrawable(ScreenPtr pScreen,
-		   DrawablePtr pDraw, drm_drawable_t *pDrmDrawable)
+DRI2CreateDrawable(ScreenPtr pScreen, DrawablePtr pDraw,
+		   drm_drawable_t *pDrmDrawable, unsigned int *head)
 {
     DRI2ScreenPtr	ds = DRI2GetScreen(pScreen);
     WindowPtr		pWin;
@@ -293,6 +293,7 @@ DRI2CreateDrawable(ScreenPtr pScreen,
 
     *pDrmDrawable = pPriv->drawable;
 
+    *head = ds->buffer->head;
     DRI2PostDrawableConfig(pDraw);
     DRI2PostBufferAttach(pDraw);
     DRI2ScreenCommitEvents(ds);
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index c848247..a319085 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -66,7 +66,8 @@ void DRI2Unlock(ScreenPtr pScreen);
 
 Bool DRI2CreateDrawable(ScreenPtr	 pScreen,
 			DrawablePtr	 pDraw,
-			drm_drawable_t	*pDrmDrawable);
+			drm_drawable_t	*pDrmDrawable,
+			unsigned int    *head);
 
 void DRI2DestroyDrawable(ScreenPtr	pScreen,
 			 DrawablePtr	pDraw);
commit 911f0c147699d3b8d97491be2ef6d2e4a6682a0b
Author: Julien Cristau <jcristau at debian.org>
Date:   Fri Mar 7 23:24:06 2008 +0100

    Programs in hw/dmx/examples/ want client-side xkb headers.

diff --git a/hw/dmx/examples/xinput.c b/hw/dmx/examples/xinput.c
index b6753e4..74353a9 100644
--- a/hw/dmx/examples/xinput.c
+++ b/hw/dmx/examples/xinput.c
@@ -38,7 +38,7 @@
 #include <X11/XKBlib.h>
 #include <X11/extensions/XInput.h>
 #include <X11/extensions/XKB.h>
-#include "xkbstr.h"
+#include <X11/extensions/XKBstr.h>
 #include <X11/extensions/dmxext.h>
 #include <sys/time.h>
 
diff --git a/hw/dmx/examples/xled.c b/hw/dmx/examples/xled.c
index 322dda2..270f805 100644
--- a/hw/dmx/examples/xled.c
+++ b/hw/dmx/examples/xled.c
@@ -37,7 +37,7 @@
 #include <X11/Xlib.h>
 #include <X11/XKBlib.h>
 #include <X11/extensions/XKB.h>
-#include "xkbstr.h"
+#include <X11/extensions/XKBstr.h>
 #include <sys/time.h>
 
 int main(int argc, char **argv)
commit 9abaad115cb6245b12b2adb3552ace99b634ab4a
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Fri Mar 7 14:12:28 2008 -0500

    Fix DRI2 texture target for GLX_EXT_texture_from_pixmap.
    
    Thanks to Dennis Kasprzyk for pointing it out and for reminding me to
    commit it.

diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c
index b0082a0..27257d3 100644
--- a/GL/glx/glxdri2.c
+++ b/GL/glx/glxdri2.c
@@ -216,8 +216,6 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
 
 #ifdef __DRI_TEX_BUFFER
 
-#define isPowerOfTwo(n) (((n) & ((n) - 1 )) == 0)
-
 static int
 __glXDRIbindTexImage(__GLXcontext *baseContext,
 		     int buffer,
@@ -228,26 +226,17 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
     PixmapPtr pixmap;
     __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
     unsigned int flags;
-    int w, h, target;
 
     if (screen->texBuffer == NULL)
         return Success;
 
     pixmap = (PixmapPtr) glxPixmap->pDraw;
-    w = pixmap->drawable.width;
-    h = pixmap->drawable.height;
-
-    if (!isPowerOfTwo(w) || !isPowerOfTwo(h))
-	target = GL_TEXTURE_RECTANGLE_ARB;
-    else
-	target = GL_TEXTURE_2D;
-
     screen->texBuffer->setTexBuffer(&context->driContext,
-				    target,
+				    glxPixmap->target,
 				    DRI2GetPixmapHandle(pixmap, &flags),
 				    pixmap->drawable.depth,
 				    pixmap->devKind,
-				    h);
+				    pixmap->drawable.height);
 
     return Success;
 }
commit 3bf7ff70323d533a3a05c0f3e22393e63beada99
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Mar 7 09:25:06 2008 -0500

    Size xf86DefaultModes explicitly.
    
    i.e., don't check for the end of the list by ->name == NULL, since that
    won't work now.  Fix the consumers of xf86DefaultModes to use the new
    explicit size as well.

diff --git a/hw/xfree86/common/modeline2c.awk b/hw/xfree86/common/modeline2c.awk
index b9ad3cd..ca32e2f 100644
--- a/hw/xfree86/common/modeline2c.awk
+++ b/hw/xfree86/common/modeline2c.awk
@@ -91,5 +91,6 @@ BEGIN {
 }
 
 END {
-	printf("\t{MODEPREFIX,0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}\n};\n")
+	print "};"
+	printf "const int xf86NumDefaultModes = sizeof(xf86NumDefaultModes) / sizeof(DisplayModeRec);"
 }
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 635a88c..4a4aabc 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2420,28 +2420,16 @@ addDefaultModes(MonPtr monitorp)
     DisplayModePtr last = monitorp->Last;
     int i = 0;
 
-    while (xf86DefaultModes[i].name != NULL)
+    for (i = 0; i < xf86NumDefaultModes; i++)
     {
-	if ( ! modeIsPresent(xf86DefaultModes[i].name,monitorp) )
-	    do
-	    {
-		mode = xf86DuplicateMode(&xf86DefaultModes[i]);
-		if( last ) {
-		    mode->prev = last;
-		    last->next = mode;
-		}
-		else {
-		    /* this is the first mode */
-		    monitorp->Modes = mode;
-		    mode->prev = NULL;
-		}
-		last = mode;
-		i++;
-	    }
-	    while((xf86DefaultModes[i].name != NULL) &&
-		  (!strcmp(xf86DefaultModes[i].name,xf86DefaultModes[i-1].name)));
-	else
-	    i++;
+	mode = xf86DuplicateMode(&xf86DefaultModes[i]);
+	if (!modeIsPresent(mode, monitorp))
+	{
+	    monitorp->Modes = xf86ModesAdd(monitorp->Modes, mode);
+	    last = mode;
+	} else {
+	    xfree(mode);
+	}
     }
     monitorp->Last = last;
 
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index dd8b5a0..c0d240d 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -154,6 +154,7 @@ Bool xf86PathIsSafe(const char *path);
 /* xf86DefaultModes */
 
 extern const DisplayModeRec xf86DefaultModes[];
+extern const int xf86NumDefaultModes;
 
 /* xf86DoProbe.c */
 void DoProbe(void);
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index aa2635c..2dff31b 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -214,11 +214,7 @@ xf86DuplicateMode(DisplayModePtr pMode)
     *pNew = *pMode;
     pNew->next = NULL;
     pNew->prev = NULL;
-    /*
-     * It is important to copy the name explicitly.
-     * Otherwise a mode could reference an invalid piece of memory, after one of them runs free().
-     * This will lead to obscure problems, that you really don't want.
-     */
+
     if (pMode->name == NULL)
 	xf86SetModeDefaultName(pNew);
     else
@@ -667,7 +663,7 @@ xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed)
     DisplayModePtr  head = NULL, prev = NULL, mode;
     int		    i;
 
-    for (i = 0; xf86DefaultModes[i].name != NULL; i++)
+    for (i = 0; i < xf86NumDefaultModes; i++)
     {
 	DisplayModePtr	defMode = &xf86DefaultModes[i];
 	
@@ -676,23 +672,9 @@ xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed)
 	if (!doubleScanAllowed && (defMode->Flags & V_DBLSCAN))
 	    continue;
 
-	mode = xalloc(sizeof(DisplayModeRec));
-	if (!mode)
-	    continue;
-        memcpy(mode,&xf86DefaultModes[i],sizeof(DisplayModeRec));
-        mode->name = xstrdup(xf86DefaultModes[i].name);
-        if (!mode->name)
-	{
-	    xfree (mode);
-	    continue;
-	}
-        mode->prev = prev;
-	mode->next = NULL;
-	if (prev)
-	    prev->next = mode;
-	else
-	    head = mode;
-	prev = mode;
+	mode = xf86DuplicateMode(defMode);
+
+	head = xf86ModesAdd(head, mode);
     }
     return head;
 }
commit 3fcb6445dc08f42488287162e3b7009d405e9c5b
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Mar 7 08:29:49 2008 -0500

    Fix segfault when a monitor exists but has no modes.
    
    Thanks to Zhenyu Wang for finding this.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 4d5d7b8..0bef5b4 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1678,6 +1678,9 @@ nextAspectMode(DisplayModePtr start, float aspect)
 {
     DisplayModePtr m = start;
 
+    if (!m)
+	return NULL;
+
     for (m = m->next; m; m = m->next)
 	if (aspectMatch(aspect, (float)m->HDisplay / (float)m->VDisplay))
 	    return m;
commit a8d760f567b19268329c4682495caa591f08a854
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Sun Mar 2 20:13:11 2008 -0800

    Get modes code building with old X servers again.
    
    This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer than 1.2"
    since XORG_VERSION current went backwards at some point.

diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 5a4d0f6..08cf78d 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -226,8 +226,13 @@ xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg)
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
     CursorPtr		cursor = xf86_config->cursor;
     int			c;
-    CARD8		*bits = cursor ? dixLookupPrivate(&cursor->devPrivates,
-							  screen) : NULL;
+    CARD8		*bits = cursor ?
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
+        dixLookupPrivate(&cursor->devPrivates, screen)
+#else
+        cursor->devPriv[screen->myNum]
+#endif
+      : NULL;
 
     /* Save ARGB versions of these colors */
     xf86_config->cursor_fg = (CARD32) fg | 0xff000000;
@@ -613,7 +618,12 @@ xf86_reload_cursors (ScreenPtr screen)
 	else
 #endif
 	    (*cursor_info->LoadCursorImage)(cursor_info->pScrn,
-			dixLookupPrivate(&cursor->devPrivates, screen));
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
+			dixLookupPrivate(&cursor->devPrivates, screen)
+#else
+			cursor->devPriv[screen->myNum]
+#endif
+	    );
 
 	(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
 	(*cursor_info->ShowCursor)(cursor_info->pScrn);
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index ea36d0a..2d1a6ab 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -410,6 +410,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
     return Mode;
 }
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
 static DisplayModePtr
 DDCModesFromCVT(int scrnIndex, struct cvt_timings *t)
 {
@@ -438,6 +439,7 @@ DDCModesFromCVT(int scrnIndex, struct cvt_timings *t)
 
     return modes;
 }
+#endif
 
 
 /*
@@ -621,10 +623,12 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC)
 					      quirks, timing_level);
             Modes = xf86ModesAdd(Modes, Mode);
             break;
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
 	case DS_CVT:
 	    Mode = DDCModesFromCVT(scrnIndex, det_mon->section.cvt);
 	    Modes = xf86ModesAdd(Modes, Mode);
 	    break;
+#endif
         default:
             break;
         }
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index 9e31512..aa2635c 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -513,7 +513,12 @@ xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
 
     for (mode = modeList; mode != NULL; mode = mode->next) {
 	if (xf86ModeBandwidth(mode, depth) > bandwidth)
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
 	    mode->status = MODE_BANDWIDTH;
+#else
+	    /* MODE_BANDWIDTH didn't exist in xserver 1.2 */
+	    mode->status = MODE_BAD;
+#endif
     }
 }
 
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 8b13758..816175c 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -60,11 +60,21 @@ static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen);
 #endif
 
 static int xf86RandR12Generation;
-static DevPrivateKey xf86RandR12Key;
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
 
+static DevPrivateKey xf86RandR12Key;
 #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
     dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key))
 
+#else /* XORG_VERSION_CURRENT < 7.0 */
+
+static int xf86RandR12Index;
+#define XF86RANDRINFO(p) \
+    ((XF86RandRInfoPtr)(p)->devPrivates[xf86RandR12Index].ptr)
+
+#endif /* XORG_VERSION_CURRENT < 7.0 */
+
+
 static int
 xf86RandR12ModeRefresh (DisplayModePtr mode)
 {
@@ -340,13 +350,17 @@ xf86RandR12ScreenSetSize (ScreenPtr	pScreen,
     PixmapPtr		pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
     Bool		ret = FALSE;
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
     if (xf86RandR12Key) {
+#endif
         if (randrp->virtualX == -1 || randrp->virtualY == -1)
         {
 	    randrp->virtualX = pScrn->virtualX;
 	    randrp->virtualY = pScrn->virtualY;
         }
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
     }
+#endif
     if (pRoot && pScrn->vtSema)
 	(*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
 
@@ -468,8 +482,10 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
 				  mmHeight);
     }
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
     if (xf86RandR12Key == NULL)
 	return TRUE;
+#endif
 
     if (randrp->virtualX == -1 || randrp->virtualY == -1)
     {
@@ -500,7 +516,11 @@ xf86RandR12Init (ScreenPtr pScreen)
     if (xf86RandR12Generation != serverGeneration)
 	xf86RandR12Generation = serverGeneration;
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
     xf86RandR12Key = &xf86RandR12Key;
+#else
+    xf86RandR12Index = AllocateScreenPrivateIndex();
+#endif
 
     randrp = xalloc (sizeof (XF86RandRInfoRec));
     if (!randrp)
@@ -526,7 +546,11 @@ xf86RandR12Init (ScreenPtr pScreen)
 
     randrp->maxX = randrp->maxY = 0;
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
     dixSetPrivate(&pScreen->devPrivates, xf86RandR12Key, randrp);
+#else
+    pScreen->devPrivates[xf86RandR12Index].ptr = randrp;
+#endif
 
 #if RANDR_12_INTERFACE
     if (!xf86RandR12Init12 (pScreen))
@@ -545,8 +569,10 @@ xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations)
     xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(pScrn);
 #endif
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
     if (xf86RandR12Key == NULL)
 	return;
+#endif
 
     randrp = XF86RANDRINFO(pScreen);
 #if RANDR_12_INTERFACE
@@ -1090,8 +1116,10 @@ xf86RandR12CreateScreenResources12 (ScreenPtr pScreen)
     ScrnInfoPtr		pScrn = xf86Screens[pScreen->myNum];
     xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(pScrn);
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
     if (xf86RandR12Key == NULL)
 	return TRUE;
+#endif
 
     for (c = 0; c < config->num_crtc; c++)
         xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
@@ -1113,8 +1141,13 @@ xf86RandR12TellChanged (ScreenPtr pScreen)
     xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(pScrn);
     int			c;
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
     if (xf86RandR12Key == NULL)
 	return;
+#else
+    if (!XF86RANDRINFO(pScreen))
+	return;
+#endif
 
     xf86RandR12SetInfo12 (pScreen);
     for (c = 0; c < config->num_crtc; c++)
diff --git a/hw/xfree86/modes/xf86gtf.c b/hw/xfree86/modes/xf86gtf.c
index acbac83..fed56bd 100644
--- a/hw/xfree86/modes/xf86gtf.c
+++ b/hw/xfree86/modes/xf86gtf.c
@@ -62,6 +62,10 @@
 
 #ifdef HAVE_XORG_CONFIG_H
 # include <xorg-config.h>
+#else
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #endif
 
 #include "xf86.h"
commit ca616b902b2c5d0f046c7a042c11f045479e373a
Author: Jesse Barnes <jbarnes at jbarnes-t61.(none)>
Date:   Thu Mar 6 13:47:44 2008 -0800

    Allow RandR get output property to call into drivers
    
    In order to report accurate values to users of the RandR property interface,
    it's sometimes necessary to ask the driver to update the value (for example
    when backlight brightness changes without the server's knowledge, due to hotkey
    events or direct sysfs banging).
    
    This patch wires up the core server code with a new xf86CrtcFuncs callback,
    get_property, to allow for this.
    
    The new code is available under the RANDR_13_INTERFACE define, which in turn
    depends on the RANDR_12_INTERFACE code.

diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index cc045b2..b87a325 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -215,8 +215,15 @@ typedef struct _xf86CrtcFuncs {
 		      Rotation rotation, int x, int y);
 } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
 
+#define XF86_CRTC_VERSION 1
+
 struct _xf86Crtc {
     /**
+     * ABI versioning
+     */
+    int version;
+
+    /**
      * Associated ScrnInfo
      */
     ScrnInfoPtr	    scrn;
@@ -410,6 +417,14 @@ typedef struct _xf86OutputFuncs {
 		    Atom property,
 		    RRPropertyValuePtr value);
 #endif
+#ifdef RANDR_13_INTERFACE
+    /**
+     * Callback to get an updated property value
+     */
+    Bool
+    (*get_property)(xf86OutputPtr output,
+		    Atom property);
+#endif
     /**
      * Clean up driver-specific bits of the output
      */
@@ -417,8 +432,16 @@ typedef struct _xf86OutputFuncs {
     (*destroy) (xf86OutputPtr	    output);
 } xf86OutputFuncsRec, *xf86OutputFuncsPtr;
 
+
+#define XF86_OUTPUT_VERSION 1
+
 struct _xf86Output {
     /**
+     * ABI versioning
+     */
+    int version;
+
+    /**
      * Associated ScrnInfo
      */
     ScrnInfoPtr		scrn;
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index e2668fb..8b13758 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -848,6 +848,20 @@ xf86RandR12OutputSetProperty (ScreenPtr pScreen,
 }
 
 static Bool
+xf86RandR13OutputGetProperty (ScreenPtr pScreen,
+			      RROutputPtr randr_output,
+			      Atom property)
+{
+    xf86OutputPtr output = randr_output->devPrivate;
+
+    if (output->funcs->get_property == NULL)
+	return TRUE;
+
+    /* Should be safe even w/o vtSema */
+    return output->funcs->get_property(output, property);
+}
+
+static Bool
 xf86RandR12OutputValidateMode (ScreenPtr    pScreen,
 			       RROutputPtr  randr_output,
 			       RRModePtr    randr_mode)
@@ -1126,6 +1140,9 @@ xf86RandR12Init12 (ScreenPtr pScreen)
     rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma;
     rp->rrOutputSetProperty = xf86RandR12OutputSetProperty;
     rp->rrOutputValidateMode = xf86RandR12OutputValidateMode;
+#if RANDR_13_INTERFACE
+    rp->rrOutputGetProperty = xf86RandR13OutputGetProperty;
+#endif
     rp->rrModeDestroy = xf86RandR12ModeDestroy;
     rp->rrSetConfig = NULL;
     pScrn->PointerMoved = xf86RandR12PointerMoved;
diff --git a/randr/mirandr.c b/randr/mirandr.c
index 3c4991e..7777853 100644
--- a/randr/mirandr.c
+++ b/randr/mirandr.c
@@ -74,6 +74,14 @@ miRROutputSetProperty (ScreenPtr	    pScreen,
 }
 
 Bool
+miRROutputGetProperty (ScreenPtr	    pScreen,
+		       RROutputPtr	    output,
+		       Atom		    property)
+{
+	return TRUE;
+}
+
+Bool
 miRROutputValidateMode (ScreenPtr	    pScreen,
 			RROutputPtr	    output,
 			RRModePtr	    mode)
@@ -116,6 +124,9 @@ miRandRInit (ScreenPtr pScreen)
     pScrPriv->rrCrtcSet = miRRCrtcSet;
     pScrPriv->rrCrtcSetGamma = miRRCrtcSetGamma;
     pScrPriv->rrOutputSetProperty = miRROutputSetProperty;
+#if RANDR_13_INTERFACE
+    pScrPriv->rrOutputGetProperty = miRROutputGetProperty;
+#endif
     pScrPriv->rrOutputValidateMode = miRROutputValidateMode;
     pScrPriv->rrModeDestroy = miRRModeDestroy;
     
diff --git a/randr/randrstr.h b/randr/randrstr.h
index e8358bc..3b48f5c 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -54,6 +54,7 @@
 /* required for ABI compatibility for now */
 #define RANDR_10_INTERFACE 1
 #define RANDR_12_INTERFACE 1
+#define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
 
 typedef XID	RRMode;
 typedef XID	RROutput;
@@ -175,6 +176,12 @@ typedef void (*RRModeDestroyProcPtr) (ScreenPtr	    pScreen,
 
 #endif
 
+#if RANDR_13_INTERFACE
+typedef Bool (*RROutputGetPropertyProcPtr) (ScreenPtr		pScreen,
+					    RROutputPtr		output,
+					    Atom		property);
+#endif /* RANDR_13_INTERFACE */
+
 typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation *rotations);
 typedef Bool (*RRCloseScreenProcPtr) ( int i, ScreenPtr pscreen);
 
@@ -220,6 +227,9 @@ typedef struct _rrScrPriv {
     RROutputValidateModeProcPtr	rrOutputValidateMode;
     RRModeDestroyProcPtr	rrModeDestroy;
 #endif
+#if RANDR_13_INTERFACE
+    RROutputGetPropertyProcPtr	rrOutputGetProperty;
+#endif
     
     /*
      * Private part of the structure; not considered part of the ABI
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 4617064..9bb7081 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -300,13 +300,21 @@ RRPropertyValuePtr
 RRGetOutputProperty (RROutputPtr output, Atom property, Bool pending)
 {
     RRPropertyPtr   prop = RRQueryOutputProperty (output, property);
+    rrScrPrivPtr    pScrPriv = rrGetScrPriv(output->pScreen);
 
     if (!prop)
 	return NULL;
     if (pending && prop->is_pending)
 	return &prop->pending;
-    else
+    else {
+#if RANDR_13_INTERFACE
+	/* If we can, try to update the property value first */
+	if (pScrPriv->rrOutputGetProperty)
+	    pScrPriv->rrOutputGetProperty(output->pScreen, output,
+					  prop->propertyName);
+#endif
 	return &prop->current;
+    }
 }
 
 int
@@ -610,11 +618,10 @@ ProcRRGetOutputProperty (ClientPtr client)
     if (prop->immutable && stuff->delete)
 	return BadAccess;
 
-    if (stuff->pending && prop->is_pending)
-	prop_value = &prop->pending;
-    else
-	prop_value = &prop->current;
-    
+    prop_value = RRGetOutputProperty(output, stuff->property, stuff->pending);
+    if (!prop_value)
+	return BadAtom;
+
     /* If the request type and actual type don't match. Return the
     property information, but not the data. */
 
commit 34b69e3bc0e6462eb60029fbcb4f5479494007a2
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Mar 5 23:56:49 2008 -0500

    Fix distcheck.
    (cherry picked from commit 2a47accff8dccded4dfe031f9366c028ba927824)

diff --git a/GL/apple/Makefile.am b/GL/apple/Makefile.am
index 33ad157..c064c03 100644
--- a/GL/apple/Makefile.am
+++ b/GL/apple/Makefile.am
@@ -11,10 +11,10 @@ AM_CPPFLAGS = \
 if HAVE_AGL_FRAMEWORK
 noinst_LIBRARIES = libAGLcore.a 
 libAGLcore_a_SOURCES = aglGlx.c \
-		       $(top_srcdir)/hw/darwin/quartz/xpr/x-list.c \
-		       $(top_srcdir)/hw/darwin/quartz/xpr/x-list.h \
-		       $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c \
-		       $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.h \
+		       $(top_srcdir)/hw/xquartz/xpr/x-list.c \
+		       $(top_srcdir)/hw/xquartz/xpr/x-list.h \
+		       $(top_srcdir)/hw/xquartz/xpr/x-hash.c \
+		       $(top_srcdir)/hw/xquartz/xpr/x-hash.h \
 		       $(top_srcdir)/hw/dmx/glxProxy/compsize.c
 endif
 
diff --git a/hw/xfree86/x86emu/Makefile.am b/hw/xfree86/x86emu/Makefile.am
index 9f9c87f..acd249c 100644
--- a/hw/xfree86/x86emu/Makefile.am
+++ b/hw/xfree86/x86emu/Makefile.am
@@ -21,6 +21,7 @@ EXTRA_DIST = validate.c \
              x86emu/ops.h \
              x86emu/prim_asm.h \
              x86emu/prim_ops.h \
+	     x86emu/prim_x86_gcc.h \
              x86emu/regs.h \
              x86emu/types.h \
              x86emu/x86emui.h
diff --git a/include/Makefile.am b/include/Makefile.am
index 0654b57..673a976 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -50,10 +50,10 @@ sdk_HEADERS =		\
 	validate.h	\
 	window.h	\
 	windowstr.h	\
-	xkbsrv.h	\
 	xorg-server.h
 endif
 
 AM_CFLAGS = $(DIX_CFLAGS)
 
-EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h
+EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h \
+	xkb-config.h xkbfile.h xkbsrv.h xkbstr.h
diff --git a/xkb/Makefile.am b/xkb/Makefile.am
index e750d60..5b594c1 100644
--- a/xkb/Makefile.am
+++ b/xkb/Makefile.am
@@ -47,7 +47,7 @@ libxkb_la_SOURCES = $(DDX_SRCS) $(DIX_SRCS) $(XI_SRCS) $(XKBFILE_SRCS) \
                     $(X11_SRCS)
 libxkbstubs_la_SOURCES = ddxVT.c ddxPrivate.c ddxKillSrv.c
 
-EXTRA_DIST = xkb.h xkbDflts.h
+EXTRA_DIST = xkbDflts.h xkbgeom.h xkb.h
 
 xkbcompileddir = $(XKB_COMPILED_DIR)
 dist_xkbcompiled_DATA = README.compiled
commit 8e562fe26ff77c03be0855afb08e43f3ed0bd4b9
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Wed Mar 5 15:11:41 2008 +1030

    Xi: remove false memset from DeepCopyDeviceClasses.
    
    It's wrong, needs to be different, but I haven't had enough coffee to figure
    out what it needs to do yet.

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 46ee66d..fe7f8dc 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -356,7 +356,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
         int i;
         DeviceIntPtr sd;
 
-        memset(to->button, 0, MAP_LENGTH);
         /* merge button states from all attached devices */
         for (sd = inputInfo.devices; sd; sd = sd->next)
         {
commit d4101140f4e569f18554cf0cbf43138d08bd1277
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Mar 4 22:39:41 2008 -0500

    xselinux: Implement polyinstantiation support and related protocol.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index a7d3999..18c6526 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -60,31 +60,36 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  * Globals
  */
 
-/* private state record */
+/* private state keys */
 static DevPrivateKey subjectKey = &subjectKey;
 static DevPrivateKey objectKey = &objectKey;
+static DevPrivateKey dataKey = &dataKey;
 
-/* This is what we store for security state */
+/* subject state (clients and devices only) */
 typedef struct {
     security_id_t sid;
+    security_id_t dev_create_sid;
+    security_id_t win_create_sid;
+    security_id_t sel_create_sid;
+    security_id_t prp_create_sid;
+    security_id_t sel_use_sid;
+    security_id_t prp_use_sid;
     struct avc_entry_ref aeref;
     char *command;
     int privileged;
 } SELinuxSubjectRec;
 
+/* object state */
 typedef struct {
     security_id_t sid;
     int poly;
 } SELinuxObjectRec;
 
-/* selection manager */
+/* selection and property atom cache */
 typedef struct {
-    Atom selection;
-    security_id_t sid;
-} SELinuxSelectionRec;
-
-static ClientPtr securityManager;
-static Window securityWindow;
+    SELinuxObjectRec prp;
+    SELinuxObjectRec sel;
+} SELinuxAtomRec;
 
 /* audit file descriptor */
 static int audit_fd;
@@ -123,9 +128,9 @@ static unsigned numKnownTypes;
 static security_id_t *knownEvents;
 static unsigned numKnownEvents;
 
-/* Array of selection SID structures */
-static SELinuxSelectionRec *knownSelections;
-static unsigned numKnownSelections;
+/* Array of property and selection SID structures */
+static SELinuxAtomRec *knownAtoms;
+static unsigned numKnownAtoms;
 
 /* dynamically allocated security classes and permissions */
 static struct security_class_mapping map[] = {
@@ -135,7 +140,7 @@ static struct security_class_mapping map[] = {
     { "x_font", { "", "", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_glyph", "remove_glyph", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_colormap", { "read", "write", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_color", "remove_color", "", "", "", "", "", "", "install", "uninstall", "", "", "use", NULL }},
     { "x_property", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "write", NULL }},
-    { "x_selection", { "read", "", "", "", "getattr", "setattr", NULL }},
+    { "x_selection", { "read", "", "", "setattr", "getattr", "setattr", NULL }},
     { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }},
     { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "use", "manage", "", "bell", NULL }},
@@ -159,48 +164,164 @@ static pointer truep = (pointer)1;
  */
 
 /*
- * Looks up the SID corresponding to the given selection atom
+ * Looks up a name in the selection or property mappings
  */
 static int
-SELinuxSelectionToSID(Atom selection, SELinuxObjectRec *sid_return)
+SELinuxAtomToSIDLookup(Atom atom, SELinuxObjectRec *obj, int map, int polymap)
 {
-    const char *name;
-    unsigned i, size;
+    const char *name = NameForAtom(atom);
+    security_context_t ctx;
+    int rc = Success;
 
-    for (i = 0; i < numKnownSelections; i++)
-	if (knownSelections[i].selection == selection) {
-	    sid_return->sid = knownSelections[i].sid;
-	    return Success;
-	}
+    obj->poly = 1;
 
-    /* Need to increase size of array */
-    i = numKnownSelections;
-    size = (i + 1) * sizeof(SELinuxSelectionRec);
-    knownSelections = xrealloc(knownSelections, size);
-    if (!knownSelections)
-	return BadAlloc;
-    knownSelections[i].selection = selection;
+    /* Look in the mappings of names to contexts */
+    if (selabel_lookup(label_hnd, &ctx, name, map) == 0) {
+	obj->poly = 0;
+    } else if (errno != ENOENT) {
+	ErrorF("SELinux: a property label lookup failed!\n");
+	return BadValue;
+    } else if (selabel_lookup(label_hnd, &ctx, name, polymap) < 0) {
+	ErrorF("SELinux: a property label lookup failed!\n");
+	return BadValue;
+    }
 
-    /* Look in the mappings of selection names to contexts */
-    name = NameForAtom(selection);
-    if (name) {
-	security_context_t con;
-	security_id_t sid;
+    /* Get a SID for context */
+    if (avc_context_to_sid(ctx, &obj->sid) < 0) {
+	ErrorF("SELinux: a context_to_SID call failed!\n");
+	rc = BadAlloc;
+    }
 
-	if (selabel_lookup(label_hnd, &con, name, SELABEL_X_SELN) < 0) {
-	    ErrorF("SELinux: a selection label lookup failed!\n");
-	    return BadValue;
-	}
-	/* Get a SID for context */
-	if (avc_context_to_sid(con, &sid) < 0) {
-	    ErrorF("SELinux: a context_to_SID call failed!\n");
+    freecon(ctx);
+    return rc;
+}
+
+/*
+ * Looks up the SID corresponding to the given property or selection atom
+ */
+static int
+SELinuxAtomToSID(Atom atom, int prop, SELinuxObjectRec **obj_rtn)
+{
+    SELinuxObjectRec *obj;
+    int rc, map, polymap;
+
+    if (atom >= numKnownAtoms) {
+	/* Need to increase size of atoms array */
+	unsigned size = sizeof(SELinuxAtomRec);
+	knownAtoms = xrealloc(knownAtoms, (atom + 1) * size);
+	if (!knownAtoms)
 	    return BadAlloc;
+	memset(knownAtoms + numKnownAtoms, 0,
+	       (atom - numKnownAtoms + 1) * size);
+	numKnownAtoms = atom + 1;
+    }
+
+    if (prop) {
+	obj = &knownAtoms[atom].prp;
+	map = SELABEL_X_PROP;
+	polymap = SELABEL_X_POLYPROP;
+    } else {
+	obj = &knownAtoms[atom].sel;
+	map = SELABEL_X_SELN;
+	polymap = SELABEL_X_POLYSELN;
+    }
+
+    if (!obj->sid) {
+	rc = SELinuxAtomToSIDLookup(atom, obj, map, polymap);
+	if (rc != Success)
+	    goto out;
+    }
+
+    *obj_rtn = obj;
+    rc = Success;
+out:
+    return rc;
+}
+
+/*
+ * Looks up a SID for a selection/subject pair
+ */
+static int
+SELinuxSelectionToSID(Atom selection, SELinuxSubjectRec *subj,
+		      security_id_t *sid_rtn, int *poly_rtn)
+{
+    int rc;
+    SELinuxObjectRec *obj;
+    security_id_t tsid;
+
+    /* Get the default context and polyinstantiation bit */
+    rc = SELinuxAtomToSID(selection, 0, &obj);
+    if (rc != Success)
+	return rc;
+
+    /* Check for an override context next */
+    if (subj->sel_use_sid) {
+	sidget(tsid = subj->sel_use_sid);
+	goto out;
+    }
+
+    sidget(tsid = obj->sid);
+
+    /* Polyinstantiate if necessary to obtain the final SID */
+    if (obj->poly) {
+	sidput(tsid);
+	if (avc_compute_member(subj->sid, obj->sid,
+			       SECCLASS_X_SELECTION, &tsid) < 0) {
+	    ErrorF("SELinux: a compute_member call failed!\n");
+	    return BadValue;
 	}
-	freecon(con);
-	knownSelections[i].sid = sid_return->sid = sid;
-    } else
-	knownSelections[i].sid = sid_return->sid = unlabeled_sid;
+    }
+out:
+    *sid_rtn = tsid;
+    if (poly_rtn)
+	*poly_rtn = obj->poly;
+    return Success;
+}
 
+/*
+ * Looks up a SID for a property/subject pair
+ */
+static int
+SELinuxPropertyToSID(Atom property, SELinuxSubjectRec *subj,
+		     security_id_t *sid_rtn, int *poly_rtn)
+{
+    int rc;
+    SELinuxObjectRec *obj;
+    security_id_t tsid, tsid2;
+
+    /* Get the default context and polyinstantiation bit */
+    rc = SELinuxAtomToSID(property, 1, &obj);
+    if (rc != Success)
+	return rc;
+
+    /* Check for an override context next */
+    if (subj->prp_use_sid) {
+	sidget(tsid = subj->prp_use_sid);
+	goto out;
+    }
+
+    /* Perform a transition */
+    if (avc_compute_create(subj->sid, obj->sid,
+			   SECCLASS_X_PROPERTY, &tsid) < 0) {
+	ErrorF("SELinux: a compute_create call failed!\n");
+	return BadValue;
+    }
+
+    /* Polyinstantiate if necessary to obtain the final SID */
+    if (obj->poly) {
+	tsid2 = tsid;
+	if (avc_compute_member(subj->sid, tsid2,
+			       SECCLASS_X_PROPERTY, &tsid) < 0) {
+	    ErrorF("SELinux: a compute_member call failed!\n");
+	    sidput(tsid2);
+	    return BadValue;
+	}
+	sidput(tsid2);
+    }
+out:
+    *sid_rtn = tsid;
+    if (poly_rtn)
+	*poly_rtn = obj->poly;
     return Success;
 }
 
@@ -383,8 +504,7 @@ finish:
 	FatalError("SELinux: client %d: context_to_sid(%s) failed\n",
 		   client->index, ctx);
 
-    sidget(subj->sid);
-    obj->sid = subj->sid;
+    sidget(obj->sid = subj->sid);
     freecon(ctx);
 }
 
@@ -415,8 +535,7 @@ SELinuxLabelInitial(void)
     if (avc_context_to_sid(ctx, &subj->sid) < 0)
 	FatalError("SELinux: serverClient: context_to_sid(%s) failed\n", ctx);
 
-    sidget(subj->sid);
-    obj->sid = subj->sid;
+    sidget(obj->sid = subj->sid);
     freecon(ctx);
 
     srec.client = serverClient;
@@ -434,6 +553,44 @@ SELinuxLabelInitial(void)
     }
 }
 
+/*
+ * Labels new resource objects.
+ */
+static int
+SELinuxLabelResource(XaceResourceAccessRec *rec, SELinuxSubjectRec *subj,
+		     SELinuxObjectRec *obj, security_class_t class)
+{
+    int offset;
+    security_id_t tsid;
+
+    /* Check for a create context */
+    if (rec->rtype == RT_WINDOW && subj->win_create_sid) {
+	sidget(obj->sid = subj->win_create_sid);
+	return Success;
+    }
+
+    if (rec->parent)
+	offset = dixLookupPrivateOffset(rec->ptype);
+
+    if (rec->parent && offset >= 0) {
+	/* Use the SID of the parent object in the labeling operation */
+	PrivateRec **privatePtr = DEVPRIV_AT(rec->parent, offset);
+	SELinuxObjectRec *pobj = dixLookupPrivate(privatePtr, objectKey);
+	tsid = pobj->sid;
+    } else {
+	/* Use the SID of the subject */
+	tsid = subj->sid;
+    }
+
+    /* Perform a transition to obtain the final SID */
+    if (avc_compute_create(subj->sid, tsid, class, &obj->sid) < 0) {
+	ErrorF("SELinux: a compute_create call failed!\n");
+	return BadValue;
+    }
+
+    return Success;
+}
+
 
 /*
  * Libselinux Callbacks
@@ -525,11 +682,15 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	sidput(dsubj->sid);
 	sidput(obj->sid);
 
-	/* Label the device directly with the process SID */
-	sidget(subj->sid);
-	obj->sid = subj->sid;
-	sidget(subj->sid);
-	dsubj->sid = subj->sid;
+	if (subj->dev_create_sid) {
+	    /* Label the device with the create context */
+	    sidget(obj->sid = subj->dev_create_sid);
+	    sidget(dsubj->sid = subj->dev_create_sid);
+	} else {
+	    /* Label the device directly with the process SID */
+	    sidget(obj->sid = subj->sid);
+	    sidget(dsubj->sid = subj->sid);
+	}
     }
 
     /* XXX only check read permission on XQueryKeymap */
@@ -685,13 +846,76 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 }
 
 static void
+SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+    XaceSelectionAccessRec *rec = calldata;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj, *data;
+    Selection *pSel = *rec->ppSel;
+    Atom name = pSel->selection;
+    SELinuxAuditRec auditdata = { .client = rec->client, .selection = name };
+    security_id_t tsid;
+    int rc;
+
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&pSel->devPrivates, objectKey);
+
+    /* If this is a new object that needs labeling, do it now */
+    if (rec->access_mode & DixCreateAccess) {
+	sidput(obj->sid);
+	rc = SELinuxSelectionToSID(name, subj, &obj->sid, &obj->poly);
+	if (rc != Success)
+	    obj->sid = unlabeled_sid;
+    }
+    /* If this is a polyinstantiated object, find the right instance */
+    else if (obj->poly) {
+	rc = SELinuxSelectionToSID(name, subj, &tsid, NULL);
+	if (rc != Success) {
+	    rec->status = rc;
+	    return;
+	}
+	while (pSel->selection != name || obj->sid != tsid) {
+	    if ((pSel = pSel->next) == NULL)
+		break;
+	    obj = dixLookupPrivate(&pSel->devPrivates, objectKey);
+	}
+	sidput(tsid);
+	
+	if (pSel)
+	    *rec->ppSel = pSel;
+	else {
+	    rec->status = BadMatch;
+	    return;
+	}
+    }
+
+    /* Perform the security check */
+    rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, rec->access_mode,
+			&auditdata);
+    if (rc != Success)
+	rec->status = rc;
+
+    /* Label the content (advisory only) */
+    if (rec->access_mode & DixSetAttrAccess) {
+	data = dixLookupPrivate(&pSel->devPrivates, dataKey);
+	sidput(data->sid);
+	if (subj->sel_create_sid)
+	    sidget(data->sid = subj->sel_create_sid);
+	else
+	    sidget(data->sid = obj->sid);
+    }
+}
+
+static void
 SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XacePropertyAccessRec *rec = calldata;
     SELinuxSubjectRec *subj;
-    SELinuxObjectRec *obj;
-    SELinuxAuditRec auditdata = { .client = rec->client };
+    SELinuxObjectRec *obj, *data;
     PropertyPtr pProp = *rec->ppProp;
+    Atom name = pProp->propertyName;
+    SELinuxAuditRec auditdata = { .client = rec->client, .property = name };
+    security_id_t tsid;
     int rc;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
@@ -699,42 +923,50 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 
     /* If this is a new object that needs labeling, do it now */
     if (rec->access_mode & DixCreateAccess) {
-	const char *name = NameForAtom(pProp->propertyName);
-	security_context_t con;
-	security_id_t sid;
-
-	/* Look in the mappings of property names to contexts */
-	if (selabel_lookup(label_hnd, &con, name, SELABEL_X_PROP) < 0) {
-	    ErrorF("SELinux: a property label lookup failed!\n");
-	    rec->status = BadValue;
+	sidput(obj->sid);
+	rc = SELinuxPropertyToSID(name, subj, &obj->sid, &obj->poly);
+	if (rc != Success) {
+	    rec->status = rc;
 	    return;
 	}
-	/* Get a SID for context */
-	if (avc_context_to_sid(con, &sid) < 0) {
-	    ErrorF("SELinux: a context_to_SID call failed!\n");
-	    rec->status = BadAlloc;
+    }
+    /* If this is a polyinstantiated object, find the right instance */
+    else if (obj->poly) {
+	rc = SELinuxPropertyToSID(name, subj, &tsid, NULL);
+	if (rc != Success) {
+	    rec->status = rc;
 	    return;
 	}
+	while (pProp->propertyName != name || obj->sid != tsid) {
+	    if ((pProp = pProp->next) == NULL)
+		break;
+	    obj = dixLookupPrivate(&pProp->devPrivates, objectKey);
+	}
+	sidput(tsid);
 
-	sidput(obj->sid);
-
-	/* Perform a transition to obtain the final SID */
-	if (avc_compute_create(subj->sid, sid, SECCLASS_X_PROPERTY,
-			       &obj->sid) < 0) {
-	    ErrorF("SELinux: a SID transition call failed!\n");
-	    freecon(con);
-	    rec->status = BadValue;
+	if (pProp)
+	    *rec->ppProp = pProp;
+	else {
+	    rec->status = BadMatch;
 	    return;
 	}
-	freecon(con);
     }
 
     /* Perform the security check */
-    auditdata.property = pProp->propertyName;
     rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode,
 			&auditdata);
     if (rc != Success)
 	rec->status = rc;
+
+    /* Label the content (advisory only) */
+    if (rec->access_mode & DixWriteAccess) {
+	data = dixLookupPrivate(&pProp->devPrivates, dataKey);
+	sidput(data->sid);
+	if (subj->prp_create_sid)
+	    sidget(data->sid = subj->prp_create_sid);
+	else
+	    sidget(data->sid = obj->sid);
+    }
 }
 
 static void
@@ -742,14 +974,13 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceResourceAccessRec *rec = calldata;
     SELinuxSubjectRec *subj;
-    SELinuxObjectRec *obj, *sobj, *pobj;
+    SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
     PrivateRec **privatePtr;
     security_class_t class;
     int rc, offset;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
-    sobj = dixLookupPrivate(&rec->client->devPrivates, objectKey);
 
     /* Determine if the resource object has a devPrivates field */
     offset = dixLookupPrivateOffset(rec->rtype);
@@ -767,21 +998,9 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 
     /* If this is a new object that needs labeling, do it now */
     if (rec->access_mode & DixCreateAccess && offset >= 0) {
-	if (rec->parent)
-	    offset = dixLookupPrivateOffset(rec->ptype);
-	if (rec->parent && offset >= 0)
-	    /* Use the SID of the parent object in the labeling operation */
-	    pobj = dixLookupPrivate(DEVPRIV_AT(rec->parent, offset), objectKey);
-	else
-	    /* Use the SID of the subject */
-	    pobj = sobj;
-
-	sidput(obj->sid);
-
-	/* Perform a transition to obtain the final SID */
-	if (avc_compute_create(subj->sid, pobj->sid, class, &obj->sid) < 0) {
-	    ErrorF("SELinux: a compute_create call failed!\n");
-	    rec->status = BadValue;
+	rc = SELinuxLabelResource(rec, subj, obj, class);
+	if (rc != Success) {
+	    rec->status = rc;
 	    return;
 	}
     }
@@ -864,34 +1083,6 @@ SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	rec->status = rc;
 }
 
-static void
-SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
-    XaceSelectionAccessRec *rec = (XaceSelectionAccessRec *)calldata;
-    SELinuxSubjectRec *subj;
-    SELinuxObjectRec sel_sid;
-    SELinuxAuditRec auditdata = { .client = rec->client };
-    Selection *pSel = *rec->ppSel;
-    int rc;
-
-    if (rec->access_mode & DixCreateAccess)
-	return; /* don't use create currently */
-
-    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
-
-    rc = SELinuxSelectionToSID(pSel->selection, &sel_sid);
-    if (rc != Success) {
-	rec->status = rc;
-	return;
-    }
-
-    auditdata.selection = pSel->selection;
-    rc = SELinuxDoCheck(subj, &sel_sid, SECCLASS_X_SELECTION, rec->access_mode,
-			&auditdata);
-    if (rc != Success)
-	rec->status = rc;
-}
-
 
 /*
  * DIX Callbacks
@@ -907,14 +1098,6 @@ SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	SELinuxLabelClient(pci->client);
 	break;
 
-    case ClientStateRetained:
-    case ClientStateGone:
-	if (pci->client == securityManager) {
-	    securityManager = NULL;
-	    securityWindow = 0;
-	}
-	break;
-
     default:
 	break;
     }
@@ -965,18 +1148,6 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	FatalError("SELinux: Unexpected unlabeled window found\n");
 }
 
-static void
-SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
-{
-    SelectionInfoRec *rec = calldata;
-
-    switch (rec->kind) {
-    case SelectionSetOwner:
-    default:
-	break;
-    }
-}
-
 
 /*
  * DevPrivates Callbacks
@@ -1002,8 +1173,13 @@ SELinuxSubjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 
     xfree(subj->command);
 
-    if (avc_active)
+    if (avc_active) {
 	sidput(subj->sid);
+	sidput(subj->dev_create_sid);
+	sidput(subj->win_create_sid);
+	sidput(subj->sel_create_sid);
+	sidput(subj->prp_create_sid);
+    }
 }
 
 static void
@@ -1031,6 +1207,21 @@ SELinuxObjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata)
  * Extension Dispatch
  */
 
+#define CTX_DEV offsetof(SELinuxSubjectRec, dev_create_sid)
+#define CTX_WIN offsetof(SELinuxSubjectRec, win_create_sid)
+#define CTX_PRP offsetof(SELinuxSubjectRec, prp_create_sid)
+#define CTX_SEL offsetof(SELinuxSubjectRec, sel_create_sid)
+#define USE_PRP offsetof(SELinuxSubjectRec, prp_use_sid)
+#define USE_SEL offsetof(SELinuxSubjectRec, sel_use_sid)
+
+typedef struct {
+    security_context_t octx;
+    security_context_t dctx;
+    CARD32 octx_len;
+    CARD32 dctx_len;
+    CARD32 id;
+} SELinuxListItemRec;
+
 static int
 ProcSELinuxQueryVersion(ClientPtr client)
 {
@@ -1053,65 +1244,101 @@ ProcSELinuxQueryVersion(ClientPtr client)
 }
 
 static int
-ProcSELinuxSetSecurityManager(ClientPtr client)
+SELinuxSendContextReply(ClientPtr client, security_id_t sid)
 {
-    WindowPtr pWin;
-    int rc;
-
-    REQUEST(SELinuxSetSecurityManagerReq);
-    REQUEST_SIZE_MATCH(SELinuxSetSecurityManagerReq);
-
-    if (stuff->window == None) {
-	securityManager = NULL;
-	securityWindow = None;
-    } else {
-	rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW,
-			       client, DixGetAttrAccess);
-	if (rc != Success)
-	    return rc;
+    SELinuxGetContextReply rep;
+    security_context_t ctx = NULL;
+    int len = 0;
 
-	securityManager = client;
-	securityWindow = stuff->window;
+    if (sid) {
+	if (avc_sid_to_context(sid, &ctx) < 0)
+	    return BadValue;
+	len = strlen(ctx) + 1;
     }
 
-    return Success;
-}
-
-static int
-ProcSELinuxGetSecurityManager(ClientPtr client)
-{
-    SELinuxGetSecurityManagerReply rep;
-
     rep.type = X_Reply;
-    rep.length = 0;
+    rep.length = (len + 3) >> 2;
     rep.sequenceNumber = client->sequence;
-    rep.window = securityWindow;
+    rep.context_len = len;
+
     if (client->swapped) {
 	int n;
-	swaps(&rep.sequenceNumber, n);
 	swapl(&rep.length, n);
-	swapl(&rep.window, n);
+	swaps(&rep.sequenceNumber, n);
+	swapl(&rep.context_len, n);
     }
-    WriteToClient(client, sizeof(rep), (char *)&rep);
-    return (client->noClientException);
+
+    WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
+    WriteToClient(client, len, ctx);
+    freecon(ctx);
+    return client->noClientException;
 }
 
 static int
-ProcSELinuxSetDeviceCreateContext(ClientPtr client)
+ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
 {
+    PrivateRec **privPtr = &client->devPrivates;
+    security_id_t *pSid;
+    security_context_t ctx;
+    char *ptr;
+
+    REQUEST(SELinuxSetCreateContextReq);
+    REQUEST_FIXED_SIZE(SELinuxSetCreateContextReq, stuff->context_len);
+
+    ctx = (char *)(stuff + 1);
+    if (stuff->context_len > 0 && ctx[stuff->context_len - 1])
+	return BadLength;
+
+    if (offset == CTX_DEV) {
+	/* Device create context currently requires manage permission */
+	int rc = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess);
+	if (rc != Success)
+	    return rc;
+	privPtr = &serverClient->devPrivates;
+    }
+    else if (offset == USE_SEL) {
+	/* Selection use context currently requires no selections owned */
+	Selection *pSel;
+	for (pSel = CurrentSelections; pSel; pSel = pSel->next)
+	    if (pSel->client == client)
+		return BadMatch;
+    }
+
+    ptr = dixLookupPrivate(privPtr, subjectKey);
+    pSid = (security_id_t *)(ptr + offset);
+    sidput(*pSid);
+    *pSid = NULL;
+
+    if (stuff->context_len > 0) {
+	if (security_check_context(ctx) < 0)
+	    return BadValue;
+	if (avc_context_to_sid(ctx, pSid) < 0)
+	    return BadValue;
+    }
     return Success;
 }
 
 static int
-ProcSELinuxGetDeviceCreateContext(ClientPtr client)
+ProcSELinuxGetCreateContext(ClientPtr client, unsigned offset)
 {
-    return Success;
+    security_id_t *pSid;
+    char *ptr;
+
+    REQUEST_SIZE_MATCH(SELinuxGetCreateContextReq);
+
+    if (offset == CTX_DEV)
+	ptr = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
+    else
+	ptr = dixLookupPrivate(&client->devPrivates, subjectKey);
+
+    pSid = (security_id_t *)(ptr + offset);
+    return SELinuxSendContextReply(client, *pSid);
 }
 
 static int
 ProcSELinuxSetDeviceContext(ClientPtr client)
 {
-    char *ctx;
+    security_context_t ctx;
     security_id_t sid;
     DeviceIntPtr dev;
     SELinuxSubjectRec *subj;
@@ -1122,15 +1349,16 @@ ProcSELinuxSetDeviceContext(ClientPtr client)
     REQUEST_FIXED_SIZE(SELinuxSetContextReq, stuff->context_len);
 
     ctx = (char *)(stuff + 1);
-    if (ctx[stuff->context_len - 1])
+    if (stuff->context_len < 1 || ctx[stuff->context_len - 1])
 	return BadLength;
 
     rc = dixLookupDevice(&dev, stuff->id, client, DixManageAccess);
     if (rc != Success)
 	return rc;
 
-    rc = avc_context_to_sid(ctx, &sid);
-    if (rc != Success)
+    if (security_check_context(ctx) < 0)
+	return BadValue;
+    if (avc_context_to_sid(ctx, &sid) < 0)
 	return BadValue;
 
     subj = dixLookupPrivate(&dev->devPrivates, subjectKey);
@@ -1138,7 +1366,7 @@ ProcSELinuxSetDeviceContext(ClientPtr client)
     subj->sid = sid;
     obj = dixLookupPrivate(&dev->devPrivates, objectKey);
     sidput(obj->sid);
-    obj->sid = sid;
+    sidget(obj->sid = sid);
 
     return Success;
 }
@@ -1146,10 +1374,8 @@ ProcSELinuxSetDeviceContext(ClientPtr client)
 static int
 ProcSELinuxGetDeviceContext(ClientPtr client)
 {
-    char *ctx;
     DeviceIntPtr dev;
     SELinuxSubjectRec *subj;
-    SELinuxGetContextReply rep;
     int rc;
 
     REQUEST(SELinuxGetContextReq);
@@ -1160,48 +1386,33 @@ ProcSELinuxGetDeviceContext(ClientPtr client)
 	return rc;
 
     subj = dixLookupPrivate(&dev->devPrivates, subjectKey);
-    rc = avc_sid_to_context(subj->sid, &ctx);
-    if (rc != Success)
-	return BadValue;
-
-    rep.type = X_Reply;
-    rep.length = (strlen(ctx) + 4) >> 2;
-    rep.sequenceNumber = client->sequence;
-    rep.context_len = strlen(ctx) + 1;
-
-    if (client->swapped) {
-	int n;
-	swapl(&rep.length, n);
-	swaps(&rep.sequenceNumber, n);
-	swaps(&rep.context_len, n);
-    }
-
-    WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
-    WriteToClient(client, rep.context_len, ctx);
-    free(ctx);
-    return client->noClientException;
+    return SELinuxSendContextReply(client, subj->sid);
 }
 
 static int
-ProcSELinuxSetPropertyCreateContext(ClientPtr client)
+ProcSELinuxGetWindowContext(ClientPtr client)
 {
-    return Success;
-}
+    WindowPtr pWin;
+    SELinuxObjectRec *obj;
+    int rc;
 
-static int
-ProcSELinuxGetPropertyCreateContext(ClientPtr client)
-{
-    return Success;
+    REQUEST(SELinuxGetContextReq);
+    REQUEST_SIZE_MATCH(SELinuxGetContextReq);
+
+    rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
+    if (rc != Success)
+	return rc;
+
+    obj = dixLookupPrivate(&pWin->devPrivates, objectKey);
+    return SELinuxSendContextReply(client, obj->sid);
 }
 
 static int
-ProcSELinuxGetPropertyContext(ClientPtr client)
+ProcSELinuxGetPropertyContext(ClientPtr client, pointer privKey)
 {
-    char *ctx;
     WindowPtr pWin;
     PropertyPtr pProp;
     SELinuxObjectRec *obj;
-    SELinuxGetContextReply rep;
     int rc;
 
     REQUEST(SELinuxGetPropertyContextReq);
@@ -1216,96 +1427,191 @@ ProcSELinuxGetPropertyContext(ClientPtr client)
     if (rc != Success)
 	return rc;
 
-    obj = dixLookupPrivate(&pProp->devPrivates, objectKey);
-    rc = avc_sid_to_context(obj->sid, &ctx);
-    if (rc != Success)
-	return BadValue;
+    obj = dixLookupPrivate(&pProp->devPrivates, privKey);
+    return SELinuxSendContextReply(client, obj->sid);
+}
 
-    rep.type = X_Reply;
-    rep.length = (strlen(ctx) + 4) >> 2;
-    rep.sequenceNumber = client->sequence;
-    rep.context_len = strlen(ctx) + 1;
+static int
+ProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey)
+{
+    Selection *pSel;
+    SELinuxObjectRec *obj;
+    int rc;
 
-    if (client->swapped) {
-	int n;
-	swapl(&rep.length, n);
-	swaps(&rep.sequenceNumber, n);
-	swaps(&rep.context_len, n);
-    }
+    REQUEST(SELinuxGetContextReq);
+    REQUEST_SIZE_MATCH(SELinuxGetContextReq);
 
-    WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
-    WriteToClient(client, rep.context_len, ctx);
-    free(ctx);
-    return client->noClientException;
+    rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess);
+    if (rc != Success)
+	return rc;
+
+    obj = dixLookupPrivate(&pSel->devPrivates, privKey);
+    return SELinuxSendContextReply(client, obj->sid);
 }
 
 static int
-ProcSELinuxSetWindowCreateContext(ClientPtr client)
+SELinuxPopulateItem(SELinuxListItemRec *i, PrivateRec **privPtr, CARD32 id,
+		    int *size)
 {
+    SELinuxObjectRec *obj = dixLookupPrivate(privPtr, objectKey);
+    SELinuxObjectRec *data = dixLookupPrivate(privPtr, dataKey);
+
+    if (avc_sid_to_context(obj->sid, &i->octx) < 0)
+	return BadValue;
+    if (avc_sid_to_context(data->sid, &i->dctx) < 0)
+	return BadValue;
+
+    i->id = id;
+    i->octx_len = (strlen(i->octx) + 4) >> 2;
+    i->dctx_len = (strlen(i->dctx) + 4) >> 2;
+
+    *size += i->octx_len + i->dctx_len + 3;
     return Success;
 }
 
-static int
-ProcSELinuxGetWindowCreateContext(ClientPtr client)
+static void
+SELinuxFreeItems(SELinuxListItemRec *items, int count)
 {
-    return Success;
+    int k;
+    for (k = 0; k < count; k++) {
+	freecon(items[k].octx);
+	freecon(items[k].dctx);
+    }
+    xfree(items);
 }
 
 static int
-ProcSELinuxGetWindowContext(ClientPtr client)
+SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
+			 int size, int count)
 {
-    char *ctx;
-    WindowPtr pWin;
-    SELinuxObjectRec *obj;
-    SELinuxGetContextReply rep;
-    int rc;
-
-    REQUEST(SELinuxGetContextReq);
-    REQUEST_SIZE_MATCH(SELinuxGetContextReq);
-
-    rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
-    if (rc != Success)
-	return rc;
+    int rc, k, n, pos = 0;
+    SELinuxListItemsReply rep;
+    CARD32 *buf;
+
+    buf = xcalloc(size, sizeof(CARD32));
+    if (!buf) {
+	rc = BadAlloc;
+	goto out;
+    }
 
-    obj = dixLookupPrivate(&pWin->devPrivates, objectKey);
-    rc = avc_sid_to_context(obj->sid, &ctx);
-    if (rc != Success)
-	return BadValue;
+    /* Fill in the buffer */
+    for (k = 0; k < count; k++) {
+	buf[pos] = items[k].id;
+	if (client->swapped)
+	    swapl(buf + pos, n);
+	pos++;
+
+	buf[pos] = items[k].octx_len * 4;
+	if (client->swapped)
+	    swapl(buf + pos, n);
+	pos++;
+
+	buf[pos] = items[k].dctx_len * 4;
+	if (client->swapped)
+	    swapl(buf + pos, n);
+	pos++;
+
+	memcpy((char *)(buf + pos), items[k].octx, strlen(items[k].octx) + 1);
+	pos += items[k].octx_len;
+	memcpy((char *)(buf + pos), items[k].dctx, strlen(items[k].dctx) + 1);
+	pos += items[k].dctx_len;
+    }
 
+    /* Send reply to client */
     rep.type = X_Reply;
-    rep.length = (strlen(ctx) + 4) >> 2;
+    rep.length = size;
     rep.sequenceNumber = client->sequence;
-    rep.context_len = strlen(ctx) + 1;
+    rep.count = count;
 
     if (client->swapped) {
-	int n;
 	swapl(&rep.length, n);
 	swaps(&rep.sequenceNumber, n);
-	swaps(&rep.context_len, n);
+	swapl(&rep.count, n);
     }
 
-    WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
-    WriteToClient(client, rep.context_len, ctx);
-    free(ctx);
-    return client->noClientException;
-}
+    WriteToClient(client, sizeof(SELinuxListItemsReply), (char *)&rep);
+    WriteToClient(client, size * 4, (char *)buf);
 
-static int
-ProcSELinuxSetSelectionCreateContext(ClientPtr client)
-{
-    return Success;
+    /* Free stuff and return */
+    rc = client->noClientException;
+    xfree(buf);
+out:
+    SELinuxFreeItems(items, count);
+    return rc;
 }
 
 static int
-ProcSELinuxGetSelectionCreateContext(ClientPtr client)
+ProcSELinuxListProperties(ClientPtr client)
 {
-    return Success;
+    WindowPtr pWin;
+    PropertyPtr pProp;
+    SELinuxListItemRec *items;
+    int rc, count, size, i;
+    CARD32 id;
+
+    REQUEST(SELinuxGetContextReq);
+    REQUEST_SIZE_MATCH(SELinuxGetContextReq);
+
+    rc = dixLookupWindow(&pWin, stuff->id, client, DixListPropAccess);
+    if (rc != Success)
+	return rc;
+
+    /* Count the number of properties and allocate items */
+    count = 0;
+    for (pProp = wUserProps(pWin); pProp; pProp = pProp->next)
+	count++;
+    items = xcalloc(count, sizeof(SELinuxListItemRec));
+    if (!items)
+	return BadAlloc;
+
+    /* Fill in the items and calculate size */
+    i = 0;
+    size = 0;
+    for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) {
+	id = pProp->propertyName;
+	rc = SELinuxPopulateItem(items + i, &pProp->devPrivates, id, &size);
+	if (rc != Success) {
+	    SELinuxFreeItems(items, count);
+	    return rc;
+	}
+	i++;
+    }
+
+    return SELinuxSendItemsToClient(client, items, size, count);
 }
 
 static int
-ProcSELinuxGetSelectionContext(ClientPtr client)
+ProcSELinuxListSelections(ClientPtr client)
 {
-    return Success;
+    Selection *pSel;
+    SELinuxListItemRec *items;
+    int rc, count, size, i;
+    CARD32 id;
+
+    REQUEST_SIZE_MATCH(SELinuxGetCreateContextReq);
+
+    /* Count the number of selections and allocate items */
+    count = 0;
+    for (pSel = CurrentSelections; pSel; pSel = pSel->next)
+	count++;
+    items = xcalloc(count, sizeof(SELinuxListItemRec));
+    if (!items)
+	return BadAlloc;
+
+    /* Fill in the items and calculate size */
+    i = 0;
+    size = 0;
+    for (pSel = CurrentSelections; pSel; pSel = pSel->next) {
+	id = pSel->selection;
+	rc = SELinuxPopulateItem(items + i, &pSel->devPrivates, id, &size);
+	if (rc != Success) {
+	    SELinuxFreeItems(items, count);
+	    return rc;
+	}
+	i++;
+    }
+
+    return SELinuxSendItemsToClient(client, items, size, count);
 }
 
 static int
@@ -1315,36 +1621,48 @@ ProcSELinuxDispatch(ClientPtr client)
     switch (stuff->data) {
     case X_SELinuxQueryVersion:
 	return ProcSELinuxQueryVersion(client);
-    case X_SELinuxSetSecurityManager:
-	return ProcSELinuxSetSecurityManager(client);
-    case X_SELinuxGetSecurityManager:
-	return ProcSELinuxGetSecurityManager(client);
     case X_SELinuxSetDeviceCreateContext:
-	return ProcSELinuxSetDeviceCreateContext(client);
+	return ProcSELinuxSetCreateContext(client, CTX_DEV);
     case X_SELinuxGetDeviceCreateContext:
-	return ProcSELinuxGetDeviceCreateContext(client);
+	return ProcSELinuxGetCreateContext(client, CTX_DEV);
     case X_SELinuxSetDeviceContext:
 	return ProcSELinuxSetDeviceContext(client);
     case X_SELinuxGetDeviceContext:
 	return ProcSELinuxGetDeviceContext(client);
-    case X_SELinuxSetPropertyCreateContext:
-	return ProcSELinuxSetPropertyCreateContext(client);
-    case X_SELinuxGetPropertyCreateContext:
-	return ProcSELinuxGetPropertyCreateContext(client);
-    case X_SELinuxGetPropertyContext:
-	return ProcSELinuxGetPropertyContext(client);
     case X_SELinuxSetWindowCreateContext:
-	return ProcSELinuxSetWindowCreateContext(client);
+	return ProcSELinuxSetCreateContext(client, CTX_WIN);
     case X_SELinuxGetWindowCreateContext:
-	return ProcSELinuxGetWindowCreateContext(client);
+	return ProcSELinuxGetCreateContext(client, CTX_WIN);
     case X_SELinuxGetWindowContext:
 	return ProcSELinuxGetWindowContext(client);
+    case X_SELinuxSetPropertyCreateContext:
+	return ProcSELinuxSetCreateContext(client, CTX_PRP);
+    case X_SELinuxGetPropertyCreateContext:
+	return ProcSELinuxGetCreateContext(client, CTX_PRP);
+    case X_SELinuxSetPropertyUseContext:
+	return ProcSELinuxSetCreateContext(client, USE_PRP);
+    case X_SELinuxGetPropertyUseContext:
+	return ProcSELinuxGetCreateContext(client, USE_PRP);
+    case X_SELinuxGetPropertyContext:
+	return ProcSELinuxGetPropertyContext(client, objectKey);
+    case X_SELinuxGetPropertyDataContext:
+	return ProcSELinuxGetPropertyContext(client, dataKey);
+    case X_SELinuxListProperties:
+	return ProcSELinuxListProperties(client);
     case X_SELinuxSetSelectionCreateContext:
-	return ProcSELinuxSetSelectionCreateContext(client);
+	return ProcSELinuxSetCreateContext(client, CTX_SEL);
     case X_SELinuxGetSelectionCreateContext:
-	return ProcSELinuxGetSelectionCreateContext(client);
+	return ProcSELinuxGetCreateContext(client, CTX_SEL);
+    case X_SELinuxSetSelectionUseContext:
+	return ProcSELinuxSetCreateContext(client, USE_SEL);
+    case X_SELinuxGetSelectionUseContext:
+	return ProcSELinuxGetCreateContext(client, USE_SEL);
     case X_SELinuxGetSelectionContext:
-	return ProcSELinuxGetSelectionContext(client);
+	return ProcSELinuxGetSelectionContext(client, objectKey);
+    case X_SELinuxGetSelectionDataContext:
+	return ProcSELinuxGetSelectionContext(client, dataKey);
+    case X_SELinuxListSelections:
+	return ProcSELinuxListSelections(client);
     default:
 	return BadRequest;
     }
@@ -1363,25 +1681,14 @@ SProcSELinuxQueryVersion(ClientPtr client)
 }
 
 static int
-SProcSELinuxSetSecurityManager(ClientPtr client)
-{
-    REQUEST(SELinuxSetSecurityManagerReq);
-    int n;
-
-    REQUEST_SIZE_MATCH(SELinuxSetSecurityManagerReq);
-    swapl(&stuff->window, n);
-    return ProcSELinuxSetSecurityManager(client);
-}
-
-static int
-SProcSELinuxSetDeviceCreateContext(ClientPtr client)
+SProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
 {
     REQUEST(SELinuxSetCreateContextReq);
     int n;
 
     REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
-    swaps(&stuff->context_len, n);
-    return ProcSELinuxSetDeviceCreateContext(client);
+    swapl(&stuff->context_len, n);
+    return ProcSELinuxSetCreateContext(client, offset);
 }
 
 static int
@@ -1392,7 +1699,7 @@ SProcSELinuxSetDeviceContext(ClientPtr client)
 
     REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq);
     swapl(&stuff->id, n);
-    swaps(&stuff->context_len, n);
+    swapl(&stuff->context_len, n);
     return ProcSELinuxSetDeviceContext(client);
 }
 
@@ -1408,18 +1715,18 @@ SProcSELinuxGetDeviceContext(ClientPtr client)
 }
 
 static int
-SProcSELinuxSetPropertyCreateContext(ClientPtr client)
+SProcSELinuxGetWindowContext(ClientPtr client)
 {
-    REQUEST(SELinuxSetCreateContextReq);
+    REQUEST(SELinuxGetContextReq);
     int n;
 
-    REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
-    swaps(&stuff->context_len, n);
-    return ProcSELinuxSetPropertyCreateContext(client);
+    REQUEST_SIZE_MATCH(SELinuxGetContextReq);
+    swapl(&stuff->id, n);
+    return ProcSELinuxGetWindowContext(client);
 }
 
 static int
-SProcSELinuxGetPropertyContext(ClientPtr client)
+SProcSELinuxGetPropertyContext(ClientPtr client, pointer privKey)
 {
     REQUEST(SELinuxGetPropertyContextReq);
     int n;
@@ -1427,51 +1734,29 @@ SProcSELinuxGetPropertyContext(ClientPtr client)
     REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq);
     swapl(&stuff->window, n);
     swapl(&stuff->property, n);
-    return ProcSELinuxGetPropertyContext(client);
+    return ProcSELinuxGetPropertyContext(client, privKey);
 }
 
 static int
-SProcSELinuxSetWindowCreateContext(ClientPtr client)
-{
-    REQUEST(SELinuxSetCreateContextReq);
-    int n;
-
-    REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
-    swaps(&stuff->context_len, n);
-    return ProcSELinuxSetWindowCreateContext(client);
-}
-
-static int
-SProcSELinuxGetWindowContext(ClientPtr client)
+SProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey)
 {
     REQUEST(SELinuxGetContextReq);
     int n;
 
     REQUEST_SIZE_MATCH(SELinuxGetContextReq);
     swapl(&stuff->id, n);
-    return ProcSELinuxGetWindowContext(client);
-}
-
-static int
-SProcSELinuxSetSelectionCreateContext(ClientPtr client)
-{
-    REQUEST(SELinuxSetCreateContextReq);
-    int n;
-
-    REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
-    swaps(&stuff->context_len, n);
-    return ProcSELinuxSetSelectionCreateContext(client);
+    return ProcSELinuxGetSelectionContext(client, privKey);
 }
 
 static int
-SProcSELinuxGetSelectionContext(ClientPtr client)
+SProcSELinuxListProperties(ClientPtr client)
 {
     REQUEST(SELinuxGetContextReq);
     int n;
 
     REQUEST_SIZE_MATCH(SELinuxGetContextReq);
     swapl(&stuff->id, n);
-    return ProcSELinuxGetSelectionContext(client);
+    return ProcSELinuxListProperties(client);
 }
 
 static int
@@ -1485,36 +1770,48 @@ SProcSELinuxDispatch(ClientPtr client)
     switch (stuff->data) {
     case X_SELinuxQueryVersion:
 	return SProcSELinuxQueryVersion(client);
-    case X_SELinuxSetSecurityManager:
-	return SProcSELinuxSetSecurityManager(client);
-    case X_SELinuxGetSecurityManager:
-	return ProcSELinuxGetSecurityManager(client);
     case X_SELinuxSetDeviceCreateContext:
-	return SProcSELinuxSetDeviceCreateContext(client);
+	return SProcSELinuxSetCreateContext(client, CTX_DEV);
     case X_SELinuxGetDeviceCreateContext:
-	return ProcSELinuxGetDeviceCreateContext(client);
+	return ProcSELinuxGetCreateContext(client, CTX_DEV);
     case X_SELinuxSetDeviceContext:
 	return SProcSELinuxSetDeviceContext(client);
     case X_SELinuxGetDeviceContext:
 	return SProcSELinuxGetDeviceContext(client);
-    case X_SELinuxSetPropertyCreateContext:
-	return SProcSELinuxSetPropertyCreateContext(client);
-    case X_SELinuxGetPropertyCreateContext:
-	return ProcSELinuxGetPropertyCreateContext(client);
-    case X_SELinuxGetPropertyContext:
-	return SProcSELinuxGetPropertyContext(client);
     case X_SELinuxSetWindowCreateContext:
-	return SProcSELinuxSetWindowCreateContext(client);
+	return SProcSELinuxSetCreateContext(client, CTX_WIN);
     case X_SELinuxGetWindowCreateContext:
-	return ProcSELinuxGetWindowCreateContext(client);
+	return ProcSELinuxGetCreateContext(client, CTX_WIN);
     case X_SELinuxGetWindowContext:
 	return SProcSELinuxGetWindowContext(client);
+    case X_SELinuxSetPropertyCreateContext:
+	return SProcSELinuxSetCreateContext(client, CTX_PRP);
+    case X_SELinuxGetPropertyCreateContext:
+	return ProcSELinuxGetCreateContext(client, CTX_PRP);
+    case X_SELinuxSetPropertyUseContext:
+	return SProcSELinuxSetCreateContext(client, USE_PRP);
+    case X_SELinuxGetPropertyUseContext:
+	return ProcSELinuxGetCreateContext(client, USE_PRP);
+    case X_SELinuxGetPropertyContext:
+	return SProcSELinuxGetPropertyContext(client, objectKey);
+    case X_SELinuxGetPropertyDataContext:
+	return SProcSELinuxGetPropertyContext(client, dataKey);
+    case X_SELinuxListProperties:
+	return SProcSELinuxListProperties(client);
     case X_SELinuxSetSelectionCreateContext:
-	return SProcSELinuxSetSelectionCreateContext(client);
+	return SProcSELinuxSetCreateContext(client, CTX_SEL);
     case X_SELinuxGetSelectionCreateContext:
-	return ProcSELinuxGetSelectionCreateContext(client);
+	return ProcSELinuxGetCreateContext(client, CTX_SEL);
+    case X_SELinuxSetSelectionUseContext:
+	return SProcSELinuxSetCreateContext(client, USE_SEL);
+    case X_SELinuxGetSelectionUseContext:
+	return ProcSELinuxGetCreateContext(client, USE_SEL);
     case X_SELinuxGetSelectionContext:
-	return SProcSELinuxGetSelectionContext(client);
+	return SProcSELinuxGetSelectionContext(client, objectKey);
+    case X_SELinuxGetSelectionDataContext:
+	return SProcSELinuxGetSelectionContext(client, dataKey);
+    case X_SELinuxListSelections:
+	return ProcSELinuxListSelections(client);
     default:
 	return BadRequest;
     }
@@ -1531,7 +1828,6 @@ SELinuxResetProc(ExtensionEntry *extEntry)
     /* Unregister callbacks */
     DeleteCallback(&ClientStateCallback, SELinuxClientState, NULL);
     DeleteCallback(&ResourceStateCallback, SELinuxResourceState, NULL);
-    DeleteCallback(&SelectionCallback, SELinuxSelectionState, NULL);
 
     XaceDeleteCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL);
     XaceDeleteCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL);
@@ -1556,9 +1852,9 @@ SELinuxResetProc(ExtensionEntry *extEntry)
     avc_active = 0;
 
     /* Free local state */
-    xfree(knownSelections);
-    knownSelections = NULL;
-    numKnownSelections = 0;
+    xfree(knownAtoms);
+    knownAtoms = NULL;
+    numKnownAtoms = 0;
 
     xfree(knownEvents);
     knownEvents = NULL;
@@ -1615,7 +1911,8 @@ SELinuxExtensionInit(INITARGS)
 
     /* Allocate private storage */
     if (!dixRequestPrivate(subjectKey, sizeof(SELinuxSubjectRec)) ||
-	!dixRequestPrivate(objectKey, sizeof(SELinuxObjectRec)))
+	!dixRequestPrivate(objectKey, sizeof(SELinuxObjectRec)) ||
+	!dixRequestPrivate(dataKey, sizeof(SELinuxObjectRec)))
 	FatalError("SELinux: Failed to allocate private storage.\n");
 
     /* Create atoms for doing window labeling */
@@ -1631,10 +1928,11 @@ SELinuxExtensionInit(INITARGS)
     ret &= dixRegisterPrivateDeleteFunc(subjectKey, SELinuxSubjectFree, NULL);
     ret &= dixRegisterPrivateInitFunc(objectKey, SELinuxObjectInit, NULL);
     ret &= dixRegisterPrivateDeleteFunc(objectKey, SELinuxObjectFree, NULL);
+    ret &= dixRegisterPrivateInitFunc(dataKey, SELinuxObjectInit, NULL);
+    ret &= dixRegisterPrivateDeleteFunc(dataKey, SELinuxObjectFree, NULL);
 
     ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL);
     ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL);
-    ret &= AddCallback(&SelectionCallback, SELinuxSelectionState, NULL);
 
     ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL);
     ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL);
diff --git a/Xext/xselinux.h b/Xext/xselinux.h
index 4802761..2d0de32 100644
--- a/Xext/xselinux.h
+++ b/Xext/xselinux.h
@@ -31,21 +31,27 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 /* Extension protocol */
 #define X_SELinuxQueryVersion			0
-#define X_SELinuxSetSecurityManager		1
-#define X_SELinuxGetSecurityManager		2
-#define X_SELinuxSetDeviceCreateContext		3
-#define X_SELinuxGetDeviceCreateContext		4
-#define X_SELinuxSetDeviceContext		5
-#define X_SELinuxGetDeviceContext		6
-#define X_SELinuxSetPropertyCreateContext	7
-#define X_SELinuxGetPropertyCreateContext	8
-#define X_SELinuxGetPropertyContext		9
-#define X_SELinuxSetWindowCreateContext		10
-#define X_SELinuxGetWindowCreateContext		11
-#define X_SELinuxGetWindowContext		12
-#define X_SELinuxSetSelectionCreateContext	13
-#define X_SELinuxGetSelectionCreateContext	14
-#define X_SELinuxGetSelectionContext		15
+#define X_SELinuxSetDeviceCreateContext		1
+#define X_SELinuxGetDeviceCreateContext		2
+#define X_SELinuxSetDeviceContext		3
+#define X_SELinuxGetDeviceContext		4
+#define X_SELinuxSetWindowCreateContext		5
+#define X_SELinuxGetWindowCreateContext		6
+#define X_SELinuxGetWindowContext		7
+#define X_SELinuxSetPropertyCreateContext	8
+#define X_SELinuxGetPropertyCreateContext	9
+#define X_SELinuxSetPropertyUseContext		10
+#define X_SELinuxGetPropertyUseContext		11
+#define X_SELinuxGetPropertyContext		12
+#define X_SELinuxGetPropertyDataContext		13
+#define X_SELinuxListProperties			14
+#define X_SELinuxSetSelectionCreateContext	15
+#define X_SELinuxGetSelectionCreateContext	16
+#define X_SELinuxSetSelectionUseContext		17
+#define X_SELinuxGetSelectionUseContext		18
+#define X_SELinuxGetSelectionContext		19
+#define X_SELinuxGetSelectionDataContext	20
+#define X_SELinuxListSelections			21
 
 typedef struct {
     CARD8   reqType;
@@ -53,7 +59,6 @@ typedef struct {
     CARD16  length;
     CARD8   client_major;
     CARD8   client_minor;
-    CARD16  unused;
 } SELinuxQueryVersionReq;
 
 typedef struct {
@@ -74,35 +79,7 @@ typedef struct {
     CARD8   reqType;
     CARD8   SELinuxReqType;
     CARD16  length;
-    CARD32  window;
-} SELinuxSetSecurityManagerReq;
-
-typedef struct {
-    CARD8   reqType;
-    CARD8   SELinuxReqType;
-    CARD16  length;
-} SELinuxGetSecurityManagerReq;
-
-typedef struct {
-    CARD8   type;
-    CARD8   pad1;
-    CARD16  sequenceNumber;
-    CARD32  length;
-    CARD32  window;
-    CARD32  pad2;
-    CARD32  pad3;
-    CARD32  pad4;
-    CARD32  pad5;
-    CARD32  pad6;
-} SELinuxGetSecurityManagerReply;
-
-typedef struct {
-    CARD8   reqType;
-    CARD8   SELinuxReqType;
-    CARD16  length;
-    CARD8   permanent;
-    CARD8   unused;
-    CARD16  context_len;
+    CARD32  context_len;
 } SELinuxSetCreateContextReq;
 
 typedef struct {
@@ -112,26 +89,11 @@ typedef struct {
 } SELinuxGetCreateContextReq;
 
 typedef struct {
-    CARD8   type;
-    CARD8   permanent;
-    CARD16  sequenceNumber;
-    CARD32  length;
-    CARD16  context_len;
-    CARD16  pad1;
-    CARD32  pad2;
-    CARD32  pad3;
-    CARD32  pad4;
-    CARD32  pad5;
-    CARD32  pad6;
-} SELinuxGetCreateContextReply;
-
-typedef struct {
     CARD8   reqType;
     CARD8   SELinuxReqType;
     CARD16  length;
     CARD32  id;
-    CARD16  unused;
-    CARD16  context_len;
+    CARD32  context_len;
 } SELinuxSetContextReq;
 
 typedef struct {
@@ -154,15 +116,27 @@ typedef struct {
     CARD8   pad1;
     CARD16  sequenceNumber;
     CARD32  length;
-    CARD16  context_len;
-    CARD16  pad2;
+    CARD32  context_len;
+    CARD32  pad2;
     CARD32  pad3;
     CARD32  pad4;
     CARD32  pad5;
     CARD32  pad6;
-    CARD32  pad7;
 } SELinuxGetContextReply;
 
+typedef struct {
+    CARD8   type;
+    CARD8   pad1;
+    CARD16  sequenceNumber;
+    CARD32  length;
+    CARD32  count;
+    CARD32  pad2;
+    CARD32  pad3;
+    CARD32  pad4;
+    CARD32  pad5;
+    CARD32  pad6;
+} SELinuxListItemsReply;
+
 
 /* Private Flask definitions */
 #define SECCLASS_X_DRAWABLE		1
commit cf984dcc156958d4f8d98110e7add150628ce97e
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Tue Mar 4 16:03:04 2008 -0800

    Make sure SIOGLIFCONF buffer is properly aligned for socket structures

diff --git a/os/access.c b/os/access.c
index e91dd37..db14380 100644
--- a/os/access.c
+++ b/os/access.c
@@ -713,19 +713,21 @@ void
 DefineSelf (int fd)
 {
 #ifndef HAS_GETIFADDRS
-    char		buf[2048], *cp, *cplim;
-    void *		bufptr = buf;   
-#ifdef USE_SIOCGLIFCONF
+    char 		*cp, *cplim;
+# ifdef USE_SIOCGLIFCONF
+    struct sockaddr_storage buf[16];
     struct lifconf	ifc;
     register struct lifreq *ifr;
-#ifdef SIOCGLIFNUM
+#  ifdef SIOCGLIFNUM
     struct lifnum	ifn;
-#endif
-#else
+#  endif
+# else /* !USE_SIOCGLIFCONF */
+    char		buf[2048];
     struct ifconf	ifc;
     register struct ifreq *ifr;
-#endif 
-#else 
+# endif
+    void *		bufptr = buf;   
+#else /* HAS_GETIFADDRS */
     struct ifaddrs *	ifap, *ifr;
 #endif
     int 		len;
commit 27e7dacbf7ef17712be31ff90f98ee3a5c5cf909
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Mar 4 11:38:34 2008 -0500

    Make xf86InitialConfiguration slightly smarter.
    
    Old heuristic was to find the first monitor that expressed a preference,
    then attempt to get all other monitors to agree.  This doesn't work
    particularly well when the two sets of modes don't precisely intersect,
    you get overlapping-but-not-identical output geometry and things go wrong.
    
    New heuristic is:
    - Exact user preference, if given
    - Exact output preference, if the same for all outputs
    - Best (largest) mode of modes common to all outputs:
      - with the same aspect ratio as all outputs (may be NULL)
      - with 4:3 aspect ratio
    - Then the old heuristic to try to get something lit
    
    Note that it is simply not doable to have a reliable initial output guess if
    you insist on trying to clone all outputs together.  It's far too easy to
    end up with displays that simply don't have modes in common.  We need to
    switch to right-of placement someday, once we're not limited to CRTC size
    limits and we have working multi-GPU in RANDR.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 14b6049..4d5d7b8 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2006 Keith Packard
+ * Copyright © 2008 Red Hat, Inc.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -808,7 +809,7 @@ xf86ClosestMode (xf86OutputPtr output,
     return target_mode;
 }
 
-static Bool
+static DisplayModePtr
 xf86OutputHasPreferredMode (xf86OutputPtr output, int width, int height)
 {
     DisplayModePtr  mode;
@@ -820,9 +821,21 @@ xf86OutputHasPreferredMode (xf86OutputPtr output, int width, int height)
 	    continue;
 
 	if (mode->type & M_T_PREFERRED)
-	    return TRUE;
+	    return mode;
     }
-    return FALSE;
+    return NULL;
+}
+
+static DisplayModePtr
+xf86OutputHasUserPreferredMode (xf86OutputPtr output)
+{
+    DisplayModePtr mode, first = output->probed_modes;
+
+    for (mode = first; mode && mode->next != first; mode = mode->next)
+	if (mode->type & M_T_USERPREF)
+	    return mode;
+
+    return NULL;
 }
 
 static int
@@ -1577,6 +1590,265 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
     scrn->currentMode = scrn->modes;
 }
 
+static void
+xf86EnableOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, Bool *enabled)
+{
+    Bool any_enabled = FALSE;
+    int o;
+
+    for (o = 0; o < config->num_output; o++)
+	any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], TRUE);
+    
+    if (!any_enabled) {
+	xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+		   "No outputs definitely connected, trying again...\n");
+
+	for (o = 0; o < config->num_output; o++)
+	    enabled[o] = xf86OutputEnabled(config->output[o], FALSE);
+    }
+}
+
+static Bool
+nextEnabledOutput(xf86CrtcConfigPtr config, Bool *enabled, int *index)
+{
+    int o = *index;
+
+    for (o++; o < config->num_output; o++) {
+	if (enabled[o]) {
+	    *index = o;
+	    return TRUE;
+	}
+    }
+    
+    return FALSE;
+}
+
+static Bool
+xf86TargetExact(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+		DisplayModePtr *modes, Bool *enabled,
+		int width, int height)
+{
+    int o;
+    int pref_width = 0, pref_height = 0;
+    DisplayModePtr *preferred;
+    Bool ret = FALSE;
+
+    preferred = xnfcalloc(config->num_output, sizeof(DisplayModePtr));
+
+    /* Find all the preferred modes; fail if any outputs lack them */
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	preferred[o] =
+	    xf86OutputHasPreferredMode(config->output[o], width, height);
+
+	if (!preferred[o])
+	    goto out;
+    }
+
+    /* check that they're all the same size */
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	Rotation r = config->output[o]->initial_rotation;
+	if (!pref_width) {
+	    pref_width = xf86ModeWidth(preferred[o], r);
+	    pref_height = xf86ModeHeight(preferred[o], r);
+	} else {
+	    if (pref_width != xf86ModeWidth(preferred[o], r))
+		goto out;
+	    if (pref_height != xf86ModeHeight(preferred[o], r))
+		goto out;
+	}
+    }
+
+    /* oh good, they match.  stash the selected modes and return. */
+    memcpy(modes, preferred, config->num_output * sizeof(DisplayModePtr));
+    ret = TRUE;
+
+out:
+    xfree(preferred);
+    return ret;
+}
+
+static Bool
+aspectMatch(float a, float b)
+{
+    return fabs(1 - (a / b)) < 0.05;
+}
+
+static DisplayModePtr
+nextAspectMode(DisplayModePtr start, float aspect)
+{
+    DisplayModePtr m = start;
+
+    for (m = m->next; m; m = m->next)
+	if (aspectMatch(aspect, (float)m->HDisplay / (float)m->VDisplay))
+	    return m;
+
+    return NULL;
+}
+
+static DisplayModePtr
+bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect)
+{
+    int o, p;
+    DisplayModePtr mode, test = NULL, match = NULL;
+
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	mode = config->output[o]->probed_modes;
+	while ((mode = nextAspectMode(mode, aspect))) {
+	    for (p = o; nextEnabledOutput(config, enabled, &p); ) {
+		test = xf86OutputFindClosestMode(config->output[p], mode);
+		if (!test)
+		    break;
+		if (test->HDisplay != mode->HDisplay ||
+		    test->VDisplay != mode->VDisplay) {
+		    test = NULL;
+		    break;
+		}
+	    }
+
+	    /* if we didn't match it on all outputs, try the next one */
+	    if (!test)
+		continue;
+
+	    /* if it's bigger than the last one, save it */
+	    if (!match || (test->HDisplay > match->HDisplay))
+		match = test;
+	}
+    }
+
+    /* return the biggest one found */
+    return match;
+}
+
+static DisplayModePtr
+biggestMode(DisplayModePtr a, DisplayModePtr b)
+{
+    int A, B;
+
+    if (!a)
+	return b;
+    if (!b)
+	return a;
+
+    A = a->HDisplay * a->VDisplay;
+    B = b->HDisplay * b->VDisplay;
+
+    if (A > B)
+	return a;
+
+    return b;
+}
+
+static Bool
+xf86TargetAspect(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+		 DisplayModePtr *modes, Bool *enabled,
+		 int width, int height)
+{
+    int o;
+    float aspect = 0.0, *aspects;
+    xf86OutputPtr output;
+    Bool ret = FALSE;
+    DisplayModePtr guess = NULL, aspect_guess = NULL, base_guess = NULL;
+
+    aspects = xnfcalloc(config->num_output, sizeof(float));
+
+    /* collect the aspect ratios */
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	output = config->output[o];
+	if (output->mm_height)
+	    aspects[o] = (float)output->mm_width / (float)output->mm_height;
+	else
+	    aspects[o] = 4.0 / 3.0;
+    }
+
+    /* check that they're all the same */
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	output = config->output[o];
+	if (!aspect) {
+	    aspect = aspects[o];
+	} else if (!aspectMatch(aspect, aspects[o])) {
+	    goto no_aspect_match;
+	}
+    }
+
+    /* if they're all 4:3, just skip ahead and save effort */
+    if (!aspectMatch(aspect, 4.0/3.0))
+	aspect_guess = bestModeForAspect(config, enabled, aspect);
+
+no_aspect_match:
+    base_guess = bestModeForAspect(config, enabled, 4.0/3.0);
+
+    guess = biggestMode(base_guess, aspect_guess);
+
+    if (!guess)
+	goto out;
+
+    /* found a mode that works everywhere, now apply it */
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	modes[o] = xf86OutputFindClosestMode(config->output[o], guess);
+    }
+    ret = TRUE;
+
+out:
+    xfree(aspects);
+    return ret;
+}
+
+static Bool
+xf86TargetFallback(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+		   DisplayModePtr *modes, Bool *enabled,
+		   int width, int height)
+{
+    DisplayModePtr target_mode = NULL;
+    Rotation target_rotation = RR_Rotate_0;
+    DisplayModePtr default_mode;
+    int default_preferred, target_preferred = 0, o;
+
+    /* User preferred > preferred > other modes */
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	default_mode = xf86DefaultMode (config->output[o], width, height);
+	if (!default_mode)
+	    continue;
+
+	default_preferred = (((default_mode->type & M_T_PREFERRED) != 0) +
+		((default_mode->type & M_T_USERPREF) != 0));
+
+	if (default_preferred > target_preferred || !target_mode) {
+	    target_mode = default_mode;
+	    target_preferred = default_preferred;
+	    target_rotation = config->output[o]->initial_rotation;
+	    config->compat_output = o;
+	}
+    }
+
+    if (target_mode)
+	modes[config->compat_output] = target_mode;
+
+    /* Fill in other output modes */
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	if (!modes[o])
+	    modes[o] = xf86ClosestMode(config->output[o], target_mode,
+				       target_rotation, width, height);
+    }
+
+    return (target_mode != NULL);
+}
+
+static Bool
+xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+		   DisplayModePtr *modes, Bool *enabled,
+		   int width, int height)
+{
+    int o;
+
+    for (o = -1; nextEnabledOutput(config, enabled, &o); )
+	if (xf86OutputHasUserPreferredMode(config->output[o]))
+	    return 
+		xf86TargetFallback(scrn, config, modes, enabled, width, height);
+
+    return FALSE;
+}
+
+
 /**
  * Construct default screen configuration
  *
@@ -1596,14 +1868,11 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
 {
     xf86CrtcConfigPtr	config = XF86_CRTC_CONFIG_PTR(scrn);
     int			o, c;
-    DisplayModePtr	target_mode = NULL;
-    int			target_preferred = 0;
-    Rotation		target_rotation = RR_Rotate_0;
     xf86CrtcPtr		*crtcs;
     DisplayModePtr	*modes;
-    Bool		*enabled, any_enabled = FALSE;
-    int			width;
-    int			height;
+    Bool		*enabled;
+    int			width, height;
+    int			i = scrn->scrnIndex;
 
     /* Set up the device options */
     config->options = xnfalloc (sizeof (xf86DeviceOptions));
@@ -1629,75 +1898,28 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
     modes = xnfcalloc (config->num_output, sizeof (DisplayModePtr));
     enabled = xnfcalloc (config->num_output, sizeof (Bool));
     
-    for (o = 0; o < config->num_output; o++)
-    {
-	xf86OutputPtr output = config->output[o];
-	
-	modes[o] = NULL;
-	any_enabled |= (enabled[o] = xf86OutputEnabled (output, TRUE));
-    }
-    
-    if (!any_enabled)
-    {
-	xf86DrvMsg (scrn->scrnIndex, X_WARNING,
-		    "No outputs definitely connected, trying again...\n");
-
-	for (o = 0; o < config->num_output; o++)
-	{
-	    xf86OutputPtr output = config->output[o];
-	
-	    modes[o] = NULL;
-	    enabled[o] = xf86OutputEnabled (output, FALSE);
-	}
-    }
-
-    /*
-     * User preferred > preferred > other modes
-     */
-    for (o = 0; o < config->num_output; o++)
-    {
-	xf86OutputPtr	output = config->output[o];
-	DisplayModePtr	default_mode;
-	int		default_preferred;
+    xf86EnableOutputs(scrn, config, enabled);
+
+    if (xf86TargetUserpref(scrn, config, modes, enabled, width, height))
+	xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
+    else if (xf86TargetExact(scrn, config, modes, enabled, width, height))
+	xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n");
+    else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
+	xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n");
+    else if (xf86TargetFallback(scrn, config, modes, enabled, width, height))
+	xf86DrvMsg(i, X_INFO, "Using sloppy heuristic for initial modes\n");
+    else
+	xf86DrvMsg(i, X_WARNING, "Unable to find initial modes\n");
 
-	if (!enabled[o])
-	    continue;
-	default_mode = xf86DefaultMode (output, width, height);
-	if (!default_mode)
-	    continue;
-	default_preferred = (((default_mode->type & M_T_PREFERRED) != 0) +
-			     ((default_mode->type & M_T_USERPREF) != 0));
-	if (default_preferred > target_preferred || !target_mode)
-	{
-	    target_mode = default_mode;
-	    target_preferred = default_preferred;
-	    target_rotation = output->initial_rotation;
-	    config->compat_output = o;
-	}
-    }
-    if (target_mode)
-	modes[config->compat_output] = target_mode;
-    /*
-     * Fill in other output modes
-     */
-    for (o = 0; o < config->num_output; o++)
-    {
-	xf86OutputPtr output = config->output[o];
-	
-	if (enabled[o])
-	{
-	    if (!modes[o])
-		modes[o] = xf86ClosestMode (output, target_mode,
-					    target_rotation, width, height);
-	    if (!modes[o])
-		xf86DrvMsg (scrn->scrnIndex, X_ERROR,
-			    "Output %s enabled but has no modes\n",
-			    output->name);
-	    else
-		xf86DrvMsg (scrn->scrnIndex, X_INFO,
-			    "Output %s using initial mode %s\n",
-			    output->name, modes[o]->name);
-	}
+    for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
+	if (!modes[o])
+	    xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+			"Output %s enabled but has no modes\n",
+			config->output[o]->name);
+	else
+	    xf86DrvMsg (scrn->scrnIndex, X_INFO,
+			"Output %s using initial mode %s\n",
+			config->output[o]->name, modes[o]->name);
     }
 
     /*
commit 95df04b744c6a3498a9a9e2ea9bb03ee780e60f8
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Mar 4 10:59:24 2008 -0500

    Remove all mention of the vga driver from the config logic.

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index da6c3f3..e3e0bb3 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -82,7 +82,6 @@ static int builtinLines = 0;
 static const char *deviceList[] = {
 	"fbdev",
 	"vesa",
-	"vga",
 	NULL
 };
 
@@ -450,8 +449,6 @@ chooseVideoDriver(void)
 	if (chosen_driver == NULL) {
 #if defined  __i386__ || defined __amd64__ || defined __hurd__
 	    chosen_driver = "vesa";
-#elif defined __alpha__
-	    chosen_driver = "vga";
 #elif defined __sparc__
 	    chosen_driver = "sunffb";
 #else
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index de3edf6..635a88c 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -494,7 +494,7 @@ xf86InputDriverlistFromConfig()
 static void
 fixup_video_driver_list(char **drivers)
 {
-    static const char *fallback[5] = { "vga", "vesa", "fbdev", "wsfb", NULL };
+    static const char *fallback[4] = { "vesa", "fbdev", "wsfb", NULL };
     char **end, **drv;
     char *x;
     char **ati, **atimisc;
commit 7b4f3616f75a541b819d99c28bb6cb73761b6066
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Tue Mar 4 18:29:15 2008 +1030

    Xi: add deviceid to QueryDevicePointer request.
    
    Why not, we had the padding anyway.
    Suggested by Jim Gettys on the X.Org mailing list.

diff --git a/Xi/querydp.c b/Xi/querydp.c
index 3103346..ac11025 100644
--- a/Xi/querydp.c
+++ b/Xi/querydp.c
@@ -113,6 +113,7 @@ ProcXQueryDevicePointer(ClientPtr client)
     rep.rootX = pSprite->hot.x;
     rep.rootY = pSprite->hot.y;
     rep.child = None;
+    rep.deviceid = pDev->id;
 
     if (pSprite->hot.pScreen == pWin->drawable.pScreen)
     {
commit 056a2ce02ce85013e89055ee44a7aa3eabedac09
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Mar 4 02:44:48 2008 -0500

    XACE: Check the return value of the selection create hook call.

diff --git a/dix/selection.c b/dix/selection.c
index 11a174e..6a9198e 100644
--- a/dix/selection.c
+++ b/dix/selection.c
@@ -206,7 +206,12 @@ ProcSetSelectionOwner(ClientPtr client)
 	pSel->devPrivates = NULL;
 
 	/* security creation/labeling check */
-	(void)XaceHookSelectionAccess(client, &pSel, DixCreateAccess);
+	rc = XaceHookSelectionAccess(client, &pSel,
+				     DixCreateAccess|DixSetAttrAccess);
+	if (rc != Success) {
+	    xfree(pSel);
+	    return rc;
+	}
 
 	pSel->next = CurrentSelections;
 	CurrentSelections = pSel;
commit 4f2cd0ed96d3b10c78774c721c2ffbfb0556dddd
Merge: 23ae68a... 453661a...
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Tue Mar 4 18:11:10 2008 +1030

    Merge branch 'master' into mpx
    
    This merge reverts Magnus' device coorindate scaling changes. MPX core event
    generation is very different, so we can't scale in GetPointerEvents.
    
    Conflicts:
    
    	Xi/opendev.c
    	dix/devices.c
    	dix/dixfonts.c
    	dix/getevents.c
    	dix/resource.c
    	dix/window.c
    	hw/xfree86/common/xf86Xinput.c
    	mi/mipointer.c
    	xkb/ddxBeep.c
    	xkb/ddxCtrls.c
    	xkb/ddxKeyClick.c
    	xkb/ddxList.c
    	xkb/ddxLoad.c
    	xkb/xkb.c
    	xkb/xkbAccessX.c
    	xkb/xkbEvents.c
    	xkb/xkbInit.c
    	xkb/xkbPrKeyEv.c
    	xkb/xkbUtils.c

diff --cc Xi/opendev.c
index f4c0066,acda385..f14f848
--- a/Xi/opendev.c
+++ b/Xi/opendev.c
@@@ -102,7 -102,11 +102,8 @@@ ProcXOpenDevice(ClientPtr client
      REQUEST(xOpenDeviceReq);
      REQUEST_SIZE_MATCH(xOpenDeviceReq);
  
-     status = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess);
 -    if (stuff->deviceid == inputInfo.pointer->id ||
 -	stuff->deviceid == inputInfo.keyboard->id)
 -	return BadDevice;
 -
+     status = dixLookupDevice(&dev, stuff->deviceid, client, DixUseAccess);
++
      if (status == BadDevice) {  /* not open */
  	for (dev = inputInfo.off_devices; dev; dev = dev->next)
  	    if (dev->id == stuff->deviceid)
diff --cc dix/devices.c
index f036985,4b20655..61b3b66
--- a/dix/devices.c
+++ b/dix/devices.c
@@@ -663,212 -498,104 +663,211 @@@ InitAndStartDevices(WindowPtr root
      return Success;
  }
  
 -/**
 - * Close down a device and free all resources. 
 - * Once closed down, the driver will probably not expect you that you'll ever
 - * enable it again and free associated structs. If you want the device to just
 - * be disabled, DisableDevice().
 - * Don't call this function directly, use RemoveDevice() instead.
 - */
 -static void
 -CloseDevice(DeviceIntPtr dev)
 +_X_EXPORT void
 +FreeAllDeviceClasses(ClassesPtr classes)
  {
 -    KbdFeedbackPtr k, knext;
 -    PtrFeedbackPtr p, pnext;
 -    IntegerFeedbackPtr i, inext;
 -    StringFeedbackPtr s, snext;
 -    BellFeedbackPtr b, bnext;
 -    LedFeedbackPtr l, lnext;
 +    if (!classes)
 +        return;
 +
 +    FreeDeviceClass(KeyClass, (pointer)&classes->key);
 +    FreeDeviceClass(ValuatorClass, (pointer)&classes->valuator);
 +    FreeDeviceClass(ButtonClass, (pointer)&classes->button);
 +    FreeDeviceClass(FocusClass, (pointer)&classes->focus);
 +    FreeDeviceClass(ProximityClass, (pointer)&classes->proximity);
 +
 +    FreeFeedbackClass(KbdFeedbackClass, (pointer)&classes->kbdfeed);
 +    FreeFeedbackClass(PtrFeedbackClass, (pointer)&classes->ptrfeed);
 +    FreeFeedbackClass(IntegerFeedbackClass, (pointer)&classes->intfeed);
 +    FreeFeedbackClass(StringFeedbackClass, (pointer)&classes->stringfeed);
 +    FreeFeedbackClass(BellFeedbackClass, (pointer)&classes->bell);
 +    FreeFeedbackClass(LedFeedbackClass, (pointer)&classes->leds);
  
 -    if (dev->inited)
 -	(void)(*dev->deviceProc)(dev, DEVICE_CLOSE);
 +}
  
 -    xfree(dev->name);
 +/**
 + * Free the given device class and reset the pointer to NULL.
 + */
 +_X_EXPORT void
 +FreeDeviceClass(int type, pointer *class)
 +{
 +    if (!(*class))
 +        return;
  
 -    if (dev->key) {
 +    switch(type)
 +    {
 +        case KeyClass:
 +            {
 +                KeyClassPtr* k = (KeyClassPtr*)class;
 +#ifdef XKB
 +                if ((*k)->xkbInfo)
 +                {
 +                    XkbFreeInfo((*k)->xkbInfo);
 +                    (*k)->xkbInfo = NULL;
 +                }
 +#endif
 +                xfree((*k)->curKeySyms.map);
 +                xfree((*k)->modifierKeyMap);
 +                xfree((*k));
 +                break;
 +            }
 +        case ButtonClass:
 +            {
 +                ButtonClassPtr *b = (ButtonClassPtr*)class;
  #ifdef XKB
 -	if (dev->key->xkbInfo)
 -	    XkbFreeInfo(dev->key->xkbInfo);
 +                if ((*b)->xkb_acts)
 +                    xfree((*b)->xkb_acts);
  #endif
 -        dev->key->xkbInfo = NULL;
 -	xfree(dev->key->curKeySyms.map);
 -	xfree(dev->key->modifierKeyMap);
 -	xfree(dev->key);
 -        dev->key = NULL;
 -    }
 -
 -    if (dev->valuator) {
 -        /* Counterpart to 'biggest hack ever' in init. */
 -        if (dev->valuator->motion &&
 -            dev->valuator->GetMotionProc == GetMotionHistory)
 -            xfree(dev->valuator->motion);
 -        xfree(dev->valuator);
 +                xfree((*b));
 +                break;
 +            }
 +        case ValuatorClass:
 +            {
 +                ValuatorClassPtr *v = (ValuatorClassPtr*)class;
 +
 +                /* Counterpart to 'biggest hack ever' in init. */
 +                if ((*v)->motion && (*v)->GetMotionProc == GetMotionHistory)
 +                    xfree((*v)->motion);
 +                xfree((*v));
 +                break;
 +            }
 +        case FocusClass:
 +            {
 +                FocusClassPtr *f = (FocusClassPtr*)class;
 +                xfree((*f)->trace);
 +                xfree((*f));
 +                break;
 +            }
 +        case ProximityClass:
 +            {
 +                ProximityClassPtr *p = (ProximityClassPtr*)class;
 +                xfree((*p));
 +                break;
 +            }
- 
      }
 +    *class = NULL;
 +}
 +_X_EXPORT void
 +FreeFeedbackClass(int type, pointer *class)
 +{
 +    if (!(*class))
 +        return;
  
 -    if (dev->button) {
 +    switch(type)
 +    {
 +        case KbdFeedbackClass:
 +            {
 +                KbdFeedbackPtr *kbdfeed = (KbdFeedbackPtr*)class;
 +                KbdFeedbackPtr k, knext;
 +                for (k = (*kbdfeed); k; k = knext) {
 +                    knext = k->next;
  #ifdef XKB
 -        if (dev->button->xkb_acts)
 -            xfree(dev->button->xkb_acts);
 +                    if (k->xkb_sli)
 +                        XkbFreeSrvLedInfo(k->xkb_sli);
  #endif
 -        xfree(dev->button);
 -    }
 -
 -    if (dev->focus) {
 -	xfree(dev->focus->trace);
 -	xfree(dev->focus);
 -    }
 -
 -    if (dev->proximity)
 -        xfree(dev->proximity);
 +                    xfree(k);
 +                }
 +                break;
 +            }
 +        case PtrFeedbackClass:
 +            {
 +                PtrFeedbackPtr *ptrfeed = (PtrFeedbackPtr*)class;
 +                PtrFeedbackPtr p, pnext;
 +
 +                for (p = (*ptrfeed); p; p = pnext) {
 +                    pnext = p->next;
 +                    xfree(p);
 +                }
 +                break;
 +            }
 +        case IntegerFeedbackClass:
 +            {
 +                IntegerFeedbackPtr *intfeed = (IntegerFeedbackPtr*)class;
 +                IntegerFeedbackPtr i, inext;
 +
 +                for (i = (*intfeed); i; i = inext) {
 +                    inext = i->next;
 +                    xfree(i);
 +                }
 +                break;
 +            }
 +        case StringFeedbackClass:
 +            {
 +                StringFeedbackPtr *stringfeed = (StringFeedbackPtr*)class;
 +                StringFeedbackPtr s, snext;
 +
 +                for (s = (*stringfeed); s; s = snext) {
 +                    snext = s->next;
 +                    xfree(s->ctrl.symbols_supported);
 +                    xfree(s->ctrl.symbols_displayed);
 +                    xfree(s);
 +                }
 +                break;
 +            }
 +        case BellFeedbackClass:
 +            {
 +                BellFeedbackPtr *bell = (BellFeedbackPtr*)class;
 +                BellFeedbackPtr b, bnext;
 +
 +                for (b = (*bell); b; b = bnext) {
 +                    bnext = b->next;
 +                    xfree(b);
 +                }
 +                break;
 +            }
 +        case LedFeedbackClass:
 +            {
 +                LedFeedbackPtr *leds = (LedFeedbackPtr*)class;
 +                LedFeedbackPtr l, lnext;
  
 -    for (k = dev->kbdfeed; k; k = knext) {
 -	knext = k->next;
 +                for (l = (*leds); l; l = lnext) {
 +                    lnext = l->next;
  #ifdef XKB
 -	if (k->xkb_sli)
 -	    XkbFreeSrvLedInfo(k->xkb_sli);
 +                    if (l->xkb_sli)
 +                        XkbFreeSrvLedInfo(l->xkb_sli);
  #endif
 -	xfree(k);
 +                    xfree(l);
 +                }
 +                break;
 +            }
      }
 +    *class = NULL;
 +}
 +/**
 + * Close down a device and free all resources.
 + * Once closed down, the driver will probably not expect you that you'll ever
 + * enable it again and free associated structs. If you want the device to just
 + * be disabled, DisableDevice().
 + * Don't call this function directly, use RemoveDevice() instead.
 + */
 +static void
 +CloseDevice(DeviceIntPtr dev)
 +{
 +    ScreenPtr screen = screenInfo.screens[0];
 +    ClassesPtr classes;
 +    int j;
  
 -    for (p = dev->ptrfeed; p; p = pnext) {
 -	pnext = p->next;
 -	xfree(p);
 -    }
 -    
 -    for (i = dev->intfeed; i; i = inext) {
 -	inext = i->next;
 -	xfree(i);
 -    }
 +    if (!dev)
 +        return;
  
 -    for (s = dev->stringfeed; s; s = snext) {
 -	snext = s->next;
 -	xfree(s->ctrl.symbols_supported);
 -	xfree(s->ctrl.symbols_displayed);
 -	xfree(s);
 -    }
 +    if (dev->inited)
 +	(void)(*dev->deviceProc)(dev, DEVICE_CLOSE);
  
 -    for (b = dev->bell; b; b = bnext) {
 -	bnext = b->next;
 -	xfree(b);
 -    }
 +    /* free sprite memory */
 +    if (dev->isMaster && dev->spriteInfo->sprite)
 +        screen->DeviceCursorCleanup(dev, screen);
  
 -    for (l = dev->leds; l; l = lnext) {
 -	lnext = l->next;
 -#ifdef XKB
 -	if (l->xkb_sli)
 -	    XkbFreeSrvLedInfo(l->xkb_sli);
 -#endif
 -	xfree(l);
 +    xfree(dev->name);
 +
 +    if (dev->isMaster)
 +    {
 +        classes = (ClassesPtr)dixLookupPrivate(&dev->devPrivates,
 +                MasterDevClassesPrivateKey);
 +        FreeAllDeviceClasses(classes);
      }
  
 +    classes = (ClassesPtr)&dev->key;
 +    FreeAllDeviceClasses(classes);
 +
  #ifdef XKB
      while (dev->xkb_interest)
  	XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource);
diff --cc dix/getevents.c
index 7537906,3e6fe5a..b2be9bd
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@@ -659,14 -528,10 +662,10 @@@ GetPointerEvents(EventList *events, Dev
      int num_events = 0, final_valuator = 0;
      CARD32 ms = 0;
      deviceKeyButtonPointer *kbp = NULL;
 -    DeviceIntPtr cp = inputInfo.pointer;
 +    DeviceIntPtr master;
- 
-     /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies
-      * with DeviceValuators. */
-     Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE);
      int x = 0, y = 0;
 +    /* The core pointer must not send Xi events. */
      Bool coreOnly = (pDev == inputInfo.pointer);
 -    ScreenPtr scr = miPointerGetScreen(pDev);
  
      /* Sanity checks. */
      if (type != MotionNotify && type != ButtonPress && type != ButtonRelease)
@@@ -683,25 -548,13 +682,25 @@@
 -    if (!coreOnly && pDev->coreEvents)
 -        num_events = 2;
 -    else
 -        num_events = 1;
 -
      if (type == MotionNotify && num_valuators <= 0)
          return 0;
  
 +    ms = GetTimeInMillis();
 +
 +    num_events = 1;
 +
 +    master = pDev->u.master;
 +    if (master && master->u.lastSlave != pDev)
 +    {
 +        CreateClassesChangedEvent(events, master, pDev);
 +
 +        pDev->lastx = master->lastx;
 +        pDev->lasty = master->lasty;
 +        master->u.lastSlave = pDev;
 +
 +        num_events++;
 +        events++;
 +    }
 +
      /* Do we need to send a DeviceValuator event? */
-     if (!coreOnly && sendValuators) {
+     if (!coreOnly && num_valuators) {
          if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS)
              num_valuators = MAX_VALUATOR_EVENTS * 6;
          num_events += ((num_valuators - 1) / 6) + 1;
@@@ -789,11 -757,11 +788,11 @@@
              kbp->detail = pDev->button->map[buttons];
          }
  
 -        kbp->root_x = pDev->valuator->lastx;
 -        kbp->root_y = pDev->valuator->lasty;
 +        kbp->root_x = x;
 +        kbp->root_y = y;
  
          events++;
-         if (sendValuators) {
+         if (num_valuators) {
              kbp->deviceid |= MORE_EVENTS;
              clipValuators(pDev, first_valuator, num_valuators, valuators);
              events = getValuatorEvents(events, pDev, first_valuator,
diff --cc dix/window.c
index a941dac,9975b5e..ee4c756
--- a/dix/window.c
+++ b/dix/window.c
@@@ -305,12 -290,8 +305,11 @@@ SetWindowToDefaults(WindowPtr pWin
      pWin->deliverableEvents = 0;
      pWin->dontPropagate = 0;
      pWin->forcedBS = FALSE;
- #ifdef COMPOSITE
      pWin->redirectDraw = RedirectDrawNone;
- #endif
+     pWin->forcedBG = FALSE;
 +
 +    sem = xcalloc(1, sizeof(FocusSemaphoresRec));
 +    dixSetPrivate(&pWin->devPrivates, FocusPrivatesKey, sem);
  }
  
  static void
diff --cc hw/xfree86/common/xf86Xinput.c
index d2c0531,eafc0e9..d8e23ee
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@@ -606,9 -583,8 +620,8 @@@ xf86PostProximityEvent(DeviceIntPtr	dev
                                   is_in ? ProximityIn : ProximityOut, 
                                   first_valuator, num_valuators, valuators);
      for (i = 0; i < nevents; i++)
 -        mieqEnqueue(device, xf86Events + i);
 +        mieqEnqueue(device, (xf86Events + i)->event);
  
-     xfree(valuators);
  }
  
  _X_EXPORT void
@@@ -632,8 -608,12 +645,12 @@@ xf86PostButtonEvent(DeviceIntPtr	device
              return;
      }
  #endif
-     valuators = xcalloc(sizeof(int), num_valuators);
+     if (num_valuators > MAX_VALUATORS) {
+ 	xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d"
+ 	    " is greater than MAX_VALUATORS\n", num_valuators);
+ 	return;
+     }
 -    
 +
      va_start(var, num_valuators);
      for (i = 0; i < num_valuators; i++)
          valuators[i] = va_arg(var, int);
@@@ -646,9 -629,7 +663,8 @@@
                                 first_valuator, num_valuators, valuators);
  
      for (i = 0; i < nevents; i++)
 -        mieqEnqueue(device, xf86Events + i);
 +        mieqEnqueue(device, (xf86Events + i)->event);
 +
-     xfree(valuators);
  }
  
  _X_EXPORT void
@@@ -668,8 -650,16 +685,13 @@@ xf86PostKeyEvent(DeviceIntPtr	device
             "badly south after this message, then xf86PostKeyEvent is "
             "broken.\n");
  
+     if (num_valuators > MAX_VALUATORS) {
+ 	xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d"
+ 	    " is greater than MAX_VALUATORS\n", num_valuators);
+ 	return;
+     }
+ 
 -    if (!xf86Events)
 -        FatalError("Didn't allocate event store\n");
 -
      if (is_absolute) {
-         valuators = xcalloc(sizeof(int), num_valuators);
          va_start(var, num_valuators);
          for (i = 0; i < num_valuators; i++)
              valuators[i] = va_arg(var, int);
diff --cc include/misc.h
index e6a5e9e,a1cbe86..0107a30
--- a/include/misc.h
+++ b/include/misc.h
@@@ -87,10 -87,7 +87,8 @@@ extern unsigned long serverGeneration
  #define MAXSCREENS	16
  #endif
  #define MAXCLIENTS	256
- #define MAXDITS		1
- #define MAXEXTENSIONS	128
++#define MAXEXTENSIONS   128
  #define MAXFORMATS	8
- #define MAXVISUALS_PER_SCREEN 50
  
  typedef unsigned long PIXEL;
  typedef unsigned long ATOM;
diff --cc mi/mipointer.c
index 5706ef4,b55e68b..42d38c0
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@@ -341,22 -227,16 +341,22 @@@ miPointerDeviceCleanup(pDev, pScreen
  /* Once signals are ignored, the WarpCursor function can call this */
  
  _X_EXPORT void
 -miPointerWarpCursor (pScreen, x, y)
 -    ScreenPtr	pScreen;
 -    int		x, y;
 +miPointerWarpCursor (pDev, pScreen, x, y)
 +    DeviceIntPtr pDev;
 +    ScreenPtr	 pScreen;
 +    int	   	 x, y;
  {
 +    miPointerPtr pPointer;
      BOOL changedScreen = FALSE;
-     
++
 +    if (!pDev->isMaster && !pDev->u.master)
 +        return;
 +    pPointer = MIPOINTER(pDev);
      SetupScreen (pScreen);
  
 -    if (miPointer.pScreen != pScreen)
 +    if (pPointer->pScreen != pScreen)
      {
 -	(*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, TRUE);
 +	(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen, TRUE);
          changedScreen = TRUE;
      }
  
@@@ -368,19 -248,20 +368,20 @@@
      {
  	/* everything from miPointerMove except the event and history */
  
 -    	if (!pScreenPriv->waitForUpdate && pScreen == miPointer.pSpriteScreen)
 +    	if (!pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen)
      	{
 -	    miPointer.devx = x;
 -	    miPointer.devy = y;
 -	    if(!miPointer.pCursor->bits->emptyMask)
 -		(*pScreenPriv->spriteFuncs->MoveCursor) (pScreen, x, y);
 +	    pPointer->devx = x;
 +	    pPointer->devy = y;
 +	    if(!pPointer->pCursor->bits->emptyMask)
 +		(*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y);
      	}
 -	miPointer.x = x;
 -	miPointer.y = y;
 -	miPointer.pScreen = pScreen;
 +	pPointer->x = x;
 +	pPointer->y = y;
 +	pPointer->pScreen = pScreen;
      }
+ 
      if (changedScreen)
 -        UpdateSpriteForScreen (pScreen) ;
 +        UpdateSpriteForScreen (pDev, pScreen) ;
  }
  
  /*
diff --cc xkb/ddxList.c
index 2baf652,80e0505..ae3a7f7
--- a/xkb/ddxList.c
+++ b/xkb/ddxList.c
@@@ -199,11 -191,10 +191,10 @@@ char	tmpname[PATH_MAX]
  #ifndef WIN32
  	in= Popen(buf,"r");
  #else
- #ifdef DEBUG_CMD
- 	ErrorF("[xkb] xkb executes: %s\n",buf);
- #endif
+         if (xkbDebugFlags)
 -            DebugF("xkbList executes: %s\n",buf);
++            DebugF("[xkb] xkbList executes: %s\n",buf);
  	if (System(buf) < 0)
 -	    ErrorF("Could not invoke keymap compiler\n");
 +	    ErrorF("[xkb] Could not invoke keymap compiler\n");
  	else
  	    in= fopen(tmpname, "r");
  #endif
diff --cc xkb/ddxLoad.c
index a0fa606,d80ce62..ee64c3b
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@@ -360,23 -252,19 +252,19 @@@ char tmpname[PATH_MAX]
      if (out!=NULL) {
  #ifdef DEBUG
      if (xkbDebugFlags) {
 -       ErrorF("XkbDDXCompileKeymapByNames compiling keymap:\n");
 +       ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
-        XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need);
+        XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
      }
  #endif
- 	XkbWriteXKBKeymapForNames(out,names,NULL,xkb,want,need);
+ 	XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
  #ifndef WIN32
  	if (Pclose(out)==0)
  #else
  	if (fclose(out)==0 && System(buf) >= 0)
  #endif
  	{
- #ifdef DEBUG_CMD
- 	    ErrorF("[xkb] xkb executes: %s\n",buf);
- 	    ErrorF("[xkb] xkbcomp input:\n");
- 	    XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need);
- 	    ErrorF("[xkb] end xkbcomp input\n");
- #endif
+             if (xkbDebugFlags)
 -                DebugF("xkb executes: %s\n",buf);
++                DebugF("[xkb] xkb executes: %s\n",buf);
  	    if (nameRtrn) {
  		strncpy(nameRtrn,keymap,nameRtrnLen);
  		nameRtrn[nameRtrnLen-1]= '\0';
@@@ -385,24 -273,20 +273,20 @@@
                  xfree (buf);
  	    return True;
  	}
- #ifdef DEBUG
  	else
- 	    ErrorF("[xkb] Error compiling keymap (%s)\n",keymap);
- #endif
 -	    DebugF("Error compiling keymap (%s)\n",keymap);
++	    DebugF("[xkb] Error compiling keymap (%s)\n",keymap);
  #ifdef WIN32
          /* remove the temporary file */
          unlink(tmpname);
  #endif
      }
- #ifdef DEBUG
      else {
  #ifndef WIN32
- 	ErrorF("[xkb] Could not invoke keymap compiler\n");
 -	DebugF("Could not invoke keymap compiler\n");
++	DebugF("[xkb] Could not invoke keymap compiler\n");
  #else
- 	ErrorF("[xkb] Could not open file %s\n", tmpname);
 -	DebugF("Could not open file %s\n", tmpname);
++	DebugF("[xkb] Could not open file %s\n", tmpname);
  #endif
      }
- #endif
      if (nameRtrn)
  	nameRtrn[0]= '\0';
      if (buf != NULL)
@@@ -466,28 -350,11 +350,11 @@@ unsigned	missing
      if ((names->keycodes==NULL)&&(names->types==NULL)&&
  	(names->compat==NULL)&&(names->symbols==NULL)&&
  	(names->geometry==NULL)) {
- 	if (names->keymap==NULL) {
- 	    bzero(finfoRtrn,sizeof(XkbFileInfo));
- 	    if (xkb && XkbDetermineFileType(finfoRtrn,XkbXKMFile,NULL) &&
- 	   				((finfoRtrn->defined&need)==need) ) {
- 		finfoRtrn->xkb= xkb;
- 		nameRtrn[0]= '\0';
- 		return finfoRtrn->defined;
- 	    }
- 	    return 0;
- 	}
- 	else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) {
- #ifdef NOISY
- 	    ErrorF("[xkb] Couldn't compile keymap file\n");
- #endif
- 	    return 0;
- 	}
+         return 0;
      }
      else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need,
- 						nameRtrn,nameRtrnLen)){
- #ifdef NOISY
- 	ErrorF("[xkb] Couldn't compile keymap file\n");
- #endif
+                                          nameRtrn,nameRtrnLen)){
 -	DebugF("Couldn't compile keymap file\n");
++	DebugF("[xkb] Couldn't compile keymap file\n");
  	return 0;
      }
      file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX);
@@@ -502,11 -369,9 +369,9 @@@
  	(void) unlink (fileName);
  	return 0;
      }
- #ifdef DEBUG
      else if (xkbDebugFlags) {
- 	ErrorF("[xkb] Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined);
 -	DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
++	DebugF("[xkb] Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
      }
- #endif
      fclose(file);
      (void) unlink (fileName);
      return (need|want)&(~missing);
diff --cc xkb/xkb.c
index 835b613,07f57a7..9b3d78e
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@@ -5784,10 -5778,8 +5778,8 @@@ char *			str
  	    return status;
      }
      else if (length!=0)  {
- #ifdef DEBUG
 -	ErrorF("Internal Error!  BadLength in ProcXkbGetDeviceInfo\n");
 -	ErrorF("                 Wrote %d fewer bytes than expected\n",length);
 +	ErrorF("[xkb] Internal Error!  BadLength in ProcXkbGetDeviceInfo\n");
 +	ErrorF("[xkb]                  Wrote %d fewer bytes than expected\n",length);
- #endif
  	return BadLength;
      }
      if (stuff->wanted&(~supported)) {
diff --cc xkb/xkbAccessX.c
index 975b2eb,75b8c5a..28107d0
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@@ -130,11 -130,9 +130,9 @@@ xEvent		xE
      xE.u.u.type = type;
      xE.u.u.detail = keyCode;
      xE.u.keyButtonPointer.time = GetTimeInMillis();	    
- #ifdef DEBUG
      if (xkbDebugFlags&0x8) {
- 	ErrorF("[xkb] AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up"));
 -	DebugF("AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up"));
++	DebugF("[xkb] AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up"));
      }
- #endif
  
      if (_XkbIsPressEvent(type))
  	XkbDDXKeyClick(keybd,keyCode,TRUE);
diff --cc xkb/xkbEvents.c
index 351a328,49725d0..6389b90
--- a/xkb/xkbEvents.c
+++ b/xkb/xkbEvents.c
@@@ -818,18 -817,17 +817,17 @@@ XkbSrvInfoPtr	xkbi
  		((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)||
                   (xE[0].u.u.type==DeviceKeyPress)||
                   (xE[0].u.u.type == DeviceKeyRelease))) {
- 	    ErrorF("[xkb] XKbFilterWriteEvents:\n");
- 	    ErrorF("[xkb]    Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state);
- 	    ErrorF("[xkb]    XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n",
 -	    DebugF("XKbFilterWriteEvents:\n");
 -	    DebugF("   Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state);
 -	    DebugF("   XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n",
++	    DebugF("[xkb] XKbFilterWriteEvents:\n");
++	    DebugF("[xkb]    Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state);
++	    DebugF("[xkb]    XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n",
  			XkbLastRepeatEvent,xE,
  			((XkbLastRepeatEvent!=(pointer)xE)?"True":"False"));
- 	    ErrorF("[xkb]    (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n",
 -	    DebugF("   (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n",
++	    DebugF("[xkb]   (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n",
  		pClient->xkbClientFlags,
  		(_XkbWantsDetectableAutoRepeat(pClient)?"True":"False"));
- 	    ErrorF("[xkb]    !IsRelease(%d) %s\n",xE[0].u.u.type,
 -	    DebugF("   !IsRelease(%d) %s\n",xE[0].u.u.type,
++	    DebugF("[xkb]   !IsRelease(%d) %s\n",xE[0].u.u.type,
  			(!_XkbIsReleaseEvent(xE[0].u.u.type))?"True":"False");
  	}
- #endif /* DEBUG */
  	if (	(XkbLastRepeatEvent==(pointer)xE) &&
  	     	(_XkbWantsDetectableAutoRepeat(pClient)) &&
  	     	(_XkbIsReleaseEvent(xE[0].u.u.type)) ) {
@@@ -872,8 -868,7 +869,7 @@@
  	     * when the mouse is released, the server does not behave properly.
  	     * Faking a release of the button here solves the problem.
  	     */
- 	    ErrorF("[xkb] Faking release of button %d\n", xE[0].u.u.detail);
- #endif
 -	    DebugF("Faking release of button %d\n", xE[0].u.u.detail);
++	    DebugF("[xkb] Faking release of button %d\n", xE[0].u.u.detail);
  	    XkbDDXFakePointerButton(ButtonRelease, xE[0].u.u.detail);
          }
      }
@@@ -888,11 -882,11 +883,11 @@@
                   (xE[i].u.u.type==DeviceKeyPress)||
                   (xE[i].u.u.type == DeviceKeyRelease))) {
  		XkbStatePtr s= &xkbi->state;
- 		ErrorF("[xkb] XKbFilterWriteEvents (non-XKB):\n");
- 		ErrorF("[xkb] event= 0x%04x\n",xE[i].u.keyButtonPointer.state);
- 		ErrorF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods,
 -		DebugF("XKbFilterWriteEvents (non-XKB):\n");
 -		DebugF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state);
 -		DebugF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods,
++		DebugF("[xkb] XKbFilterWriteEvents (non-XKB):\n");
++		DebugF("[xkb] event= 0x%04x\n",xE[i].u.keyButtonPointer.state);
++		DebugF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods,
  							s->grab_mods);
- 		ErrorF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n",
 -		DebugF("compat lookup= 0x%02x, grab= 0x%02x\n",
++		DebugF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n",
  							s->compat_lookup_mods,
  							s->compat_grab_mods);
  	    }
@@@ -929,16 -918,12 +923,12 @@@
  	    if (type == ButtonPress &&
  		((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask &&
  		(xkbi->lockedPtrButtons & button_mask) == button_mask) {
- #ifdef DEBUG
- 		ErrorF("[xkb] Faking release of button %d\n", xE[i].u.u.detail);
- #endif
 -		DebugF("Faking release of button %d\n", xE[i].u.u.detail);
++		DebugF("[xkb] Faking release of button %d\n", xE[i].u.u.detail);
  		XkbDDXFakePointerButton(ButtonRelease, xE[i].u.u.detail);
  	    } else if (type == DeviceButtonPress &&
                      ((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask &&
                      (xkbi->lockedPtrButtons & button_mask) == button_mask) {
- #ifdef DEBUG
- 		ErrorF("[xkb] Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state);
- #endif
 -		DebugF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state);
++		DebugF("[xkb] Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state);
  		XkbDDXFakePointerButton(DeviceButtonRelease, ((deviceKeyButtonPointer*)&xE[i])->state);
              }
  	}
diff --cc xkb/xkbInit.c
index 0682cc4,2b5f1fb..09317e9
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@@ -771,9 -742,7 +742,7 @@@ XkbSrvLedInfoPtr	sli
      sli= XkbFindSrvLedInfo(pXDev,XkbDfltXIClass,XkbDfltXIId,0);
      if (sli && xkbi)
  	XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask);
- #ifdef DEBUG
-     else ErrorF("[xkb] No indicator feedback in XkbFinishInit (shouldn't happen)!\n");
- #endif
 -    else DebugF("No indicator feedback in XkbFinishInit (shouldn't happen)!\n");
++    else DebugF("[xkb] No indicator feedback in XkbFinishInit (shouldn't happen)!\n");
      return softRepeat;
  }
  
diff --cc xkb/xkbPrKeyEv.c
index f007f75,69c218c..74d02c6
--- a/xkb/xkbPrKeyEv.c
+++ b/xkb/xkbPrKeyEv.c
@@@ -56,11 -56,9 +56,9 @@@ int             xiEvent
      xkbi= keyc->xkbInfo;
      key= xE->u.u.detail;
      xiEvent= (xE->u.u.type & EXTENSION_EVENT_BASE);
- #ifdef DEBUG
      if (xkbDebugFlags&0x8) {
- 	ErrorF("[xkb] XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up"));
 -	DebugF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up"));
++	DebugF("[xkb] XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up"));
      }
- #endif
  
      if ( (xkbi->repeatKey==key) && (xE->u.u.type==KeyRelease) &&
  	 ((xkbi->desc->ctrls->enabled_ctrls&XkbRepeatKeysMask)==0) ) {
commit 72f2197545e734cd0aa785d05a57b2fc0351a763
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Mar 4 02:02:54 2008 -0500

    dix: Convert selection list to a linked list.
    
    Fixes a bug where pointers were being invalidated after a realloc.

diff --git a/dix/selection.c b/dix/selection.c
index 52b1611..11a174e 100644
--- a/dix/selection.c
+++ b/dix/selection.c
@@ -66,24 +66,22 @@ SOFTWARE.
  *****************************************************************/
 
 _X_EXPORT Selection *CurrentSelections;
-static int NumCurrentSelections;
 CallbackListPtr SelectionCallback;
 
 _X_EXPORT int
 dixLookupSelection(Selection **result, Atom selectionName,
 		   ClientPtr client, Mask access_mode)
 {
-    Selection *pSel = NULL;
-    int i, rc = BadMatch;
+    Selection *pSel;
+    int rc = BadMatch;
     client->errorValue = selectionName;
 
-    for (i = 0; i < NumCurrentSelections; i++)
-	if (CurrentSelections[i].selection == selectionName) {
-	    pSel = CurrentSelections + i;
-	    rc = XaceHookSelectionAccess(client, &pSel, access_mode);
+    for (pSel = CurrentSelections; pSel; pSel = pSel->next)
+	if (pSel->selection == selectionName)
 	    break;
-	}
 
+    if (pSel)
+	rc = XaceHookSelectionAccess(client, &pSel, access_mode);
     *result = pSel;
     return rc;
 }
@@ -91,14 +89,17 @@ dixLookupSelection(Selection **result, Atom selectionName,
 void
 InitSelections(void)
 {
-    Selection *pSel = CurrentSelections;
+    Selection *pSel, *pNextSel;
 
-    for (; pSel - CurrentSelections < NumCurrentSelections; pSel++)
+    pSel = CurrentSelections;
+    while (pSel) {
+	pNextSel = pSel->next;
 	dixFreePrivates(pSel->devPrivates);
+	xfree(pSel);
+	pSel = pNextSel;
+    }
 
-    xfree(CurrentSelections);
     CurrentSelections = NULL;
-    NumCurrentSelections = 0;
 }
 
 static _X_INLINE void
@@ -112,9 +113,9 @@ CallSelectionCallback(Selection *pSel, ClientPtr client,
 void
 DeleteWindowFromAnySelections(WindowPtr pWin)
 {
-    Selection *pSel = CurrentSelections;
+    Selection *pSel;
 
-    for (; pSel - CurrentSelections < NumCurrentSelections; pSel++)
+    for (pSel = CurrentSelections; pSel; pSel = pSel->next)
         if (pSel->pWin == pWin) {
 	    CallSelectionCallback(pSel, NULL, SelectionWindowDestroy);
 
@@ -127,9 +128,9 @@ DeleteWindowFromAnySelections(WindowPtr pWin)
 void
 DeleteClientFromAnySelections(ClientPtr client)
 {
-    Selection *pSel = CurrentSelections;
+    Selection *pSel;
 
-    for (; pSel - CurrentSelections < NumCurrentSelections; pSel++)
+    for (pSel = CurrentSelections; pSel; pSel = pSel->next)
         if (pSel->client == client) {
 	    CallSelectionCallback(pSel, NULL, SelectionClientClose);
 
@@ -197,23 +198,18 @@ ProcSetSelectionOwner(ClientPtr client)
 	/*
 	 * It doesn't exist, so add it...
 	 */
-	int size = (NumCurrentSelections + 1) * sizeof(Selection);
-	CurrentSelections = xrealloc(CurrentSelections, size);
-	if (!CurrentSelections) {
-	    NumCurrentSelections = 0;
+	pSel = xalloc(sizeof(Selection));
+	if (!pSel)
 	    return BadAlloc;
-	}
-	pSel = CurrentSelections + NumCurrentSelections;
+
 	pSel->selection = stuff->selection;
 	pSel->devPrivates = NULL;
 
 	/* security creation/labeling check */
 	(void)XaceHookSelectionAccess(client, &pSel, DixCreateAccess);
 
-	pSel->next = NULL;
-	if (NumCurrentSelections > 0)
-	    CurrentSelections[NumCurrentSelections - 1].next = pSel;
-	NumCurrentSelections++;
+	pSel->next = CurrentSelections;
+	CurrentSelections = pSel;
     }
     else
 	return rc;
commit 0bd0f90d7c7928052197da7119177e5a1c9eee2c
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Mar 4 03:47:36 2008 +0200

    XKB: Fix initial map setting on startup
    
    Due to an unwitting sense inversion when eliminating XkbFileInfo, we were
    setting the complete wrong keymap on startup (non-XKB map if we had an XKB
    map available, or the XKB map if we didn't have any available).  Invert the
    sense properly, and add two small bits that also went missing in that commit.

diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index c0afad0..3b47396 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -375,7 +375,8 @@ Atom		unknown;
             names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch");
     }
 
-    if (!(xkb->defined & XkmIndicatorsMask)) {
+    if (!(xkb->defined & XkmIndicatorsMask) ||
+        !(xkb->defined & XkmGeometryMask)) {
         initIndicatorNames(NULL,xkb);
         if (names->indicators[LED_CAPS-1]==None)
             names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock");
@@ -531,10 +532,10 @@ XkbEventCauseRec	cause;
 	XkbDDXInitDevice(pXDev);
 
         if (xkb->defined & XkmSymbolsMask)
+            XkbUpdateCoreDescription(pXDev, True);
+        else
             XkbUpdateKeyTypesFromCore(pXDev, xkb->min_key_code,
                                       XkbNumKeys(xkb), &changes);
-        else
-            XkbUpdateCoreDescription(pXDev, True);
 
 	XkbSetCauseUnknown(&cause);
 	XkbUpdateActions(pXDev,xkb->min_key_code, XkbNumKeys(xkb),&changes,
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 866b4b1..ae752e9 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -184,9 +184,27 @@ unsigned	wantNames,wantConfig,wantDflts;
     if (want==0)
 	return False;
 
-    if (xkb!=NULL)
-	 old_names= xkb->names;
-    else old_names= NULL;
+    if (xkb) {
+        old_names = xkb->names;
+
+        xkb->defined = 0;
+        /* Wow would it ever be neat if we didn't need this noise. */
+        if (xkb->names && xkb->names->keys)
+            xkb->defined |= XkmKeyNamesMask;
+        if (xkb->map && xkb->map->types)
+            xkb->defined |= XkmTypesMask;
+        if (xkb->compat)
+            xkb->defined |= XkmCompatMapMask;
+        if (xkb->map && xkb->map->num_syms)
+            xkb->defined |= XkmSymbolsMask;
+        if (xkb->indicators)
+            xkb->defined |= XkmIndicatorsMask;
+        if (xkb->geom)
+            xkb->defined |= XkmGeometryMask;
+    }
+    else {
+        old_names= NULL;
+    }
 
     wantConfig= want&(~complete);
     if (xkb!=NULL) {
commit 613852ce6a821ce6f6382fc14629f517776a3701
Author: James Cloos <cloos at jhcloos.com>
Date:   Mon Mar 3 16:10:04 2008 -0500

    Fix some documentation typos

diff --git a/hw/xfree86/ddc/DDC.HOWTO b/hw/xfree86/ddc/DDC.HOWTO
index 833a7ab..1d06ca1 100644
--- a/hw/xfree86/ddc/DDC.HOWTO
+++ b/hw/xfree86/ddc/DDC.HOWTO
@@ -6,24 +6,24 @@
 
    When implementing DDC in the driver one has the choice between
    DDC1 and DDC2. 
-   DDC1 data is contiuously transmitted by a DDC1 capable display 
+   DDC1 data is continuously transmitted by a DDC1 capable display 
    device. The data is send serially over a data line; the Vsync 
    signal serves as clock. Only one EDID 1.x data block can be 
    transmitted using DDC1. Since transmission of an EDID1 block 
    using a regular Vsync frequency would take up several seconds 
    the driver can increase the Vsync frequency to up to 25 kHz as 
-   soon as it detects DDC1 activety on the data line.
+   soon as it detects DDC1 activity on the data line.
    DDC2 data is transmitted using the I2C protocol. This requires
    an additional clock line. DDC2 is capable of transmitting EDID1
    and EDID2 block as well as a VDIF block on display devices that 
    support these.  
    Display devices switch into the DDC2 mode as soon as they detect
-   activety on the DDC clock line. Once the are in DDC2 mode they
+   activity on the DDC clock line. Once the are in DDC2 mode they
    stop transmitting DDC1 signals until the next power cycle.
 
    Some graphics chipset configurations which are not capable of
    DDC2 might still be able to read DDC1 data. Where available
-   DDC2 it is preferrable. 
+   DDC2 it is preferable. 
 	
    All relevant prototypes and defines are in xf86DDC.h.
    DDC2 additionally requires I2C support. The I2C prototypes
@@ -37,7 +37,7 @@
 
      unsigned int XXX_ddc1Read(ScrnInfoPtr pScrn)
      
-     Additionally a function is required to inclrease the Vsync
+     Additionally a function is required to increase the Vsync
      frequency to max. 25 kHz. 
  
      void XXX_ddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed)
@@ -58,7 +58,7 @@
      in PreInit(). DDC1SetSpeed is a pointer to the SetSpeed()
      function, DDC1Read has to point to the DDC1 read function.
      The function will return a pointer to the xf86Monitor structure
-     which contains all information retreived by DDC.
+     which contains all information retrieved by DDC.
      NULL will be returned on failure.
 
    DDC2 Support
@@ -73,7 +73,7 @@
      to the I2CBusRec of the appropriate I2C Bus has to be passed
      as the second argument.
      The function will return a pointer to the xf86Monitor structure
-     which contains all information retreived by DDC.
+     which contains all information retrieved by DDC.
      NULL will be returned on failure.
 
    Printing monitor parameters   
@@ -86,7 +86,7 @@
      is provided.
 
     Further processing of the xf86Monitor structure is not yet 
-    implemented. Howerver it is planned to use the information
+    implemented. However, it is planned to use the information
     about video modes, gamma values etc.
     Therefore it is strongly recommended to read out DDC data
     before any video mode processing is done.
commit 3f23139137e024e09d207be05a61968100cf53e8
Author: Jesse Barnes <jesse.barnes at intel.com>
Date:   Mon Mar 3 13:05:12 2008 -0800

    Add cscope files to .gitignore

diff --git a/.gitignore b/.gitignore
index 406b74c..fb2f7e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,6 +29,7 @@ ltmain.sh
 missing
 TAGS
 tags
+cscope*
 ylwrap
 xorg-server.pc
 stamp-h?
commit 708f07753ff22ade54e9ee8885e4198fff363b87
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 3 15:49:48 2008 -0500

    RANDR 1.2: Inherit PreferredMode from the global configuration, if any.
    
    If you don't do this, then Modes "800x600" in the Display subsection will
    be dutifully ignored and the driver will start at whatever resolution it
    feels like.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 266e081..14b6049 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1261,6 +1261,23 @@ xf86SortModes (DisplayModePtr input)
     return output;
 }
 
+static char *
+preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output)
+{
+    char *preferred_mode = NULL;
+
+    /* Check for a configured preference for a particular mode */
+    preferred_mode = xf86GetOptValString (output->options,
+					  OPTION_PREFERRED_MODE);
+    if (preferred_mode)
+	return preferred_mode;
+
+    if (pScrn->display->modes && *pScrn->display->modes)
+	preferred_mode = *pScrn->display->modes;
+
+    return preferred_mode;
+}
+
 _X_EXPORT void
 xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 {
@@ -1445,8 +1462,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 	output->probed_modes = xf86SortModes (output->probed_modes);
 	
 	/* Check for a configured preference for a particular mode */
-	preferred_mode = xf86GetOptValString (output->options,
-					      OPTION_PREFERRED_MODE);
+	preferred_mode = preferredMode(scrn, output);
 
 	if (preferred_mode)
 	{
commit 605e6764dfd3e9cb917b9cfcd92fe89857c1a1c9
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 3 15:45:17 2008 -0500

    Fix Motif menu drawing in Xnest.
    
    See also Red Hat bug #229350, OpenSolaris bug #6366490.

diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index 38fefa7..0735354 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -88,7 +88,7 @@ xnestCollectExposures(void)
   while (XCheckIfEvent(xnestDisplay, &X, xnestExposurePredicate, NULL)) {
     pWin = xnestWindowPtr(X.xexpose.window);
     
-    if (pWin) {
+    if (pWin && X.xexpose.width && X.xexpose.height) {
       Box.x1 = pWin->drawable.x + wBorderWidth(pWin) + X.xexpose.x;
       Box.y1 = pWin->drawable.y + wBorderWidth(pWin) + X.xexpose.y;
       Box.x2 = Box.x1 + X.xexpose.width;
@@ -96,7 +96,7 @@ xnestCollectExposures(void)
       
       REGION_INIT(pWin->drawable.pScreen, &Rgn, &Box, 1);
       
-      miWindowExposures(pWin, &Rgn, NullRegion); 
+      miSendExposures(pWin, &Rgn, Box.x2, Box.y2);
     }
   }
 }
commit 3b73d62791d925c465ec855f96981d151dd3c179
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 3 15:43:22 2008 -0500

    xf86DDCMonitorSet: Honor the DisplaySize from the config file.
    
    We honor sync ranges and pixel clock settings from the config here, no
    reason to ignore DisplaySize.

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index a9d6722..ea36d0a 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -662,8 +662,10 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
 
     Monitor->DDC = DDC;
 
-    Monitor->widthmm = 10 * DDC->features.hsize;
-    Monitor->heightmm = 10 * DDC->features.vsize;
+    if (Monitor->widthmm <= 0 && Monitor->heightmm <= 0) {
+	Monitor->widthmm = 10 * DDC->features.hsize;
+	Monitor->heightmm = 10 * DDC->features.vsize;
+    }
 
     /*
      * If this is a digital display, then we can use reduced blanking.
commit 7c16b68ab879f5b4b1aedfc6b2aadbe56193dd19
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 3 15:09:11 2008 -0500

    1.5 has branched, start 1.5.99.x.

diff --git a/configure.ac b/configure.ac
index 6388e74..5417bbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.4.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.5.99.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit f7ab2d3821e6bccc943f088e308fd58395a186d2
Author: David Nusinow <dnusinow at debian.org>
Date:   Sun Mar 2 18:36:25 2008 -0500

    Add missing file from previous commit.

diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 1f9b1b8..851b911 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -380,11 +380,20 @@ again:
 			if (c == '0')
 				if ((configBuf[configPos] == 'x') ||
 					(configBuf[configPos] == 'X'))
+                                {
 					base = 16;
+                                        val.numType = PARSE_HEX;
+                                }
 				else
+                                {
 					base = 8;
+                                        val.numType = PARSE_OCTAL;
+                                }
 			else
+                        {
 				base = 10;
+                                val.numType = PARSE_DECIMAL;
+                        }
 
 			configRBuf[0] = c;
 			i = 1;
commit b5ce0e1d0b861dc5521fcd9db6287ed6da817726
Author: David Nusinow <dnusinow at debian.org>
Date:   Sun Mar 2 17:12:02 2008 -0500

    Bug #13860: Ensure that the DRI mode is in octal format.

diff --git a/hw/xfree86/parser/Configint.h b/hw/xfree86/parser/Configint.h
index 4d5fbcf..684a001 100644
--- a/hw/xfree86/parser/Configint.h
+++ b/hw/xfree86/parser/Configint.h
@@ -71,11 +71,14 @@
 #include <stddef.h>
 #include "xf86Parser.h"
 
+typedef enum { PARSE_DECIMAL, PARSE_OCTAL, PARSE_HEX } ParserNumType;
+
 typedef struct
 {
 	int num;		/* returned number */
 	char *str;		/* private copy of the return-string */
 	double realnum;		/* returned number as a real */
+        ParserNumType numType;  /* used to enforce correct number formatting */
 }
 LexRec, *LexPtr;
 
@@ -211,6 +214,8 @@ else\
 "\ta numerical group id."
 #define MULTIPLE_MSG \
 "Multiple \"%s\" lines."
+#define MUST_BE_OCTAL_MSG \
+"The number \"%d\" given in this section must be in octal (0xxx) format."
 
 /* Warning messages */
 #define OBSOLETE_MSG \
diff --git a/hw/xfree86/parser/DRI.c b/hw/xfree86/parser/DRI.c
index 18644bc..68a6db9 100644
--- a/hw/xfree86/parser/DRI.c
+++ b/hw/xfree86/parser/DRI.c
@@ -117,6 +117,8 @@ xf86parseDRISection (void)
 	    case MODE:
 		if (xf86getSubToken (&(ptr->dri_comment)) != NUMBER)
 		    Error (NUMBER_MSG, "Mode");
+                if (val.numType != PARSE_OCTAL)
+                    Error (MUST_BE_OCTAL_MSG, val.num);
 		ptr->dri_mode = val.num;
 		break;
 	    case BUFFERS:
commit c934366424b0d20e013c84e6b94b226b20e7baa2
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Sun Mar 2 19:27:53 2008 +0100

    use UTILS_SYS_LIBS to pass SYS_LIBS to utils/ioports correctly

diff --git a/configure.ac b/configure.ac
index ebbf877..6388e74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1137,6 +1137,9 @@ XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${LIBCRYPTO}"
 AC_SUBST([XSERVER_LIBS])
 AC_SUBST([XSERVER_SYS_LIBS])
 
+UTILS_SYS_LIBS="${SYS_LIBS}"
+AC_SUBST([UTILS_SYS_LIBS])
+
 # The Xorg binary needs to export symbols so that they can be used from modules
 # Some platforms require extra flags to do this.   gcc should set these flags
 # when -rdynamic is passed to it, other compilers/linkers may need to be added
diff --git a/hw/xfree86/utils/ioport/Makefile.am b/hw/xfree86/utils/ioport/Makefile.am
index 1839c9a..c1f9453 100644
--- a/hw/xfree86/utils/ioport/Makefile.am
+++ b/hw/xfree86/utils/ioport/Makefile.am
@@ -37,7 +37,7 @@ ioport_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
 ioport_LDADD = \
 	../../os-support/libxorgos.la \
 	../../dummylib/libdummy-nonserver.a \
-	${SYS_LIBS}
+	${UTILS_SYS_LIBS}
 
 
 ioport_SOURCES =	\
commit 2bb9c1f36f685044b837f42076dec2ea7d22d034
Author: David Nusinow <dnusinow at debian.org>
Date:   Sat Mar 1 18:44:58 2008 -0500

    bug #10008: Make Xvfb.1 document the correct default depth

diff --git a/hw/vfb/Xvfb.man.pre b/hw/vfb/Xvfb.man.pre
index e78e296..569afe1 100644
--- a/hw/vfb/Xvfb.man.pre
+++ b/hw/vfb/Xvfb.man.pre
@@ -55,7 +55,7 @@ manual page, \fIXvfb\fP accepts the following command line switches:
 .B "\-screen \fIscreennum\fP \fIWxHxD\fP"
 This option creates screen \fIscreennum\fP and sets its width, height,
 and depth to W, H, and D respectively.  By default, only screen 0 exists
-and has the dimensions 1280x1024x12.
+and has the dimensions 1280x1024x8.
 .TP 4
 .B "\-pixdepths \fIlist-of-depths\fP"
 This option specifies a list of pixmap depths that the server should
@@ -106,12 +106,12 @@ will be depth 32 1600x1200.
 .TP 8
 Xvfb :1 -screen 1 1600x1200x16
 The server will listen for connections as server number 1, will have the
-default screen configuration (one screen, 1280x1024x12), and screen 1
+default screen configuration (one screen, 1280x1024x8), and screen 1
 will be depth 16 1600x1200.
 .TP 8
 Xvfb -pixdepths 3 27 -fbdir /var/tmp
 The server will listen for connections as server number 0, will have the
-default screen configuration (one screen, 1280x1024x12),
+default screen configuration (one screen, 1280x1024x8),
 will also support pixmap
 depths of 3 and 27, 
 and will use memory mapped files in /var/tmp for the framebuffer.
commit b0b9c811cda3e35a8f6d0813483f750602c55ff6
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Sat Mar 1 20:24:50 2008 +0200

    fix typo

diff --git a/GL/mesa/Makefile.am b/GL/mesa/Makefile.am
index 6d1a439..7f27c58 100644
--- a/GL/mesa/Makefile.am
+++ b/GL/mesa/Makefile.am
@@ -12,7 +12,7 @@ MESA_LIBS           = main/libmain.la \
                       shader/libshader.la \
 		      shader/grammar/libgrammar.la \
 		      shader/slang/libslang.la \
-                      vbo/libvbo.la \
+                      vbo/libvbo.la
 
 libGLcore_la_LIBADD = $(MESA_LIBS) \
                       X/libX.la
commit 3d642905477f4b1ec3223f1fbe0d0d37e959ec81
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Sat Mar 1 16:18:18 2008 +0200

    clean some "unused" warnings

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 0d2471a..1dd0bbc 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1093,7 +1093,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
     WindowPtr	pChild;
     Bool	WasViewable = (Bool)(pWin->viewable);
     Bool	anyMarked = FALSE;
-    RegionPtr	pOldClip = NULL;
 #ifdef DO_SAVE_UNDERS
     Bool	dosave = FALSE;
 #endif
diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index e47b8b8..28e2ead 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -13,8 +13,6 @@
 #include "ddcPriv.h"
 #include <string.h>
 
-static const OptionInfoRec *DDCAvailableOptions(void *unused);
-
 #define RETRIES 4
 
 static unsigned char *EDIDRead_DDC1(
@@ -58,13 +56,6 @@ static const OptionInfoRec DDCOptions[] = {
     { -1,		NULL,		OPTV_NONE,	{0},	FALSE },
 };
 
-/*ARGSUSED*/
-static const OptionInfoRec *
-DDCAvailableOptions(void *unused)
-{
-    return (DDCOptions);
-}
-
 /**
  * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC1 are
  * unset.  EDID information blocks are interpreted and the results returned in
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index e833426..de6fde5 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -46,8 +46,6 @@ static void SetResetBIOSVars(xf86Int10InfoPtr pInt, Bool set);
 
 #define REG pInt
 
-static int pci_config_cycle = 0;
-
 int
 setup_int(xf86Int10InfoPtr pInt)
 {
diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c
index ad08c13..dfc02bb 100644
--- a/hw/xfree86/parser/Screen.c
+++ b/hw/xfree86/parser/Screen.c
@@ -508,7 +508,6 @@ xf86validateScreen (XF86ConfigPtr p)
 {
 	XF86ConfScreenPtr screen = p->conf_screen_lst;
 	XF86ConfMonitorPtr monitor;
-	XF86ConfDevicePtr device;
 	XF86ConfAdaptorLinkPtr adaptor;
 
 	while (screen)
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 9706d48..1f9b1b8 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -612,7 +612,7 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
 {
 	char *result;
 	int i, l;
-	static const char *env = NULL, *home = NULL;
+	static const char *env = NULL;
 	static char *hostname = NULL;
 	static char majorvers[3] = "";
 
diff --git a/hw/xfree86/vbe/vbeModes.c b/hw/xfree86/vbe/vbeModes.c
index 061d7b6..fb730a7 100644
--- a/hw/xfree86/vbe/vbeModes.c
+++ b/hw/xfree86/vbe/vbeModes.c
@@ -127,10 +127,9 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
 {
     CARD16 major;
     VbeModeInfoBlock *mode;
-    DisplayModePtr pMode, p;
+    DisplayModePtr pMode;
     VbeModeInfoData *data;
     Bool modeOK = FALSE;
-    ModeStatus status = MODE_OK;
 
     major = (unsigned)(vbe->VESAVersion >> 8);
 
diff --git a/mi/midash.c b/mi/midash.c
index 912fb03..95a19c2 100644
--- a/mi/midash.c
+++ b/mi/midash.c
@@ -52,38 +52,6 @@ SOFTWARE.
 #include "mistruct.h"
 #include "mifpoly.h"
 
-static miDashPtr CheckDashStorage(miDashPtr *ppseg, int nseg, int *pnsegMax);
-
-#define NSEGDELTA 16
-
-/* returns a pointer to the pseg[nseg-1], growing the storage as
-necessary.  this interface seems unnecessarily cumbersome.
-
-*/
-
-static miDashPtr
-CheckDashStorage(
-    miDashPtr *ppseg,		/* base pointer */
-    int nseg,			/* number of segment we want to write to */
-    int *pnsegMax)		/* size (in segments) of list so far */
-{
-    if (nseg > *pnsegMax)
-    {
-	miDashPtr newppseg;
-
-	*pnsegMax += NSEGDELTA;
-	newppseg = (miDashPtr)xrealloc(*ppseg,
-				       (*pnsegMax)*sizeof(miDashRec));
-	if (!newppseg)
-	{
-	    xfree(*ppseg);
-	    return (miDashPtr)NULL;
-	}
-	*ppseg = newppseg;
-    }
-    return(*ppseg+(nseg-1));
-}
-
 _X_EXPORT void
 miStepDash (dist, pDashIndex, pDash, numInDashList, pDashOffset)
     int dist;			/* distance to step */
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 2d3b0d5..5c2bd03 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -288,8 +288,6 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
 #endif
     if (extents)
     {
-	WindowPtr pWin = (WindowPtr)pDstDrawable;
-
 	expBox = *REGION_EXTENTS(pscr, &rgnExposed);
 	REGION_RESET(pscr, &rgnExposed, &expBox);
     }
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index a0adac5..6ddcc05 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -1528,7 +1528,6 @@ miOverlaySetShape(WindowPtr pWin)
 {
     Bool	WasViewable = (Bool)(pWin->viewable);
     ScreenPtr 	pScreen = pWin->drawable.pScreen;
-    RegionPtr	pOldClip = NULL;
 #ifdef DO_SAVE_UNDERS
     Bool	dosave = FALSE;
 #endif
diff --git a/mi/miwindow.c b/mi/miwindow.c
index 77cb750..cb8400c 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -938,7 +938,6 @@ miSetShape(pWin)
     Bool	WasViewable = (Bool)(pWin->viewable);
     ScreenPtr 	pScreen = pWin->drawable.pScreen;
     Bool	anyMarked = FALSE;
-    RegionPtr	pOldClip = NULL;
 #ifdef DO_SAVE_UNDERS
     Bool	dosave = FALSE;
 #endif
diff --git a/os/connection.c b/os/connection.c
index 8b6541c..1ae50fe 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -546,7 +546,6 @@ AuthAudit (ClientPtr client, Bool letin,
 {
     char addr[128];
     char *out = addr;
-    int client_uid;
     char client_uid_string[64];
     LocalClientCredRec *lcc;
 #ifdef XSERVER_DTRACE
diff --git a/os/io.c b/os/io.c
index be89021..e7ec609 100644
--- a/os/io.c
+++ b/os/io.c
@@ -91,8 +91,6 @@ _X_EXPORT CallbackListPtr       FlushCallback;
 
 static ConnectionInputPtr AllocateInputBuffer(void);
 static ConnectionOutputPtr AllocateOutputBuffer(void);
-static xReqPtr PeekNextRequest(xReqPtr req, ClientPtr client, Bool readmore);
-static void SkipRequests(xReqPtr req, ClientPtr client, int numskipped);
 
 /* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
  * systems are broken and return EWOULDBLOCK when they should return EAGAIN
@@ -618,135 +616,8 @@ ResetCurrentRequest(ClientPtr client)
 
 
 
-/*****************************************************************
- *  PeekNextRequest and SkipRequests were implemented to support DBE 
- *  idioms, but can certainly be used outside of DBE.  There are two 
- *  related macros in os.h, ReqLen and CastxReq.  See the porting 
- *  layer document for more details.
- *
- **********************/
-
-
-/*****************************************************************
- *  PeekNextRequest
- *      lets you look ahead at the unexecuted requests in a 
- *      client's request buffer.
- *
- *      Note: this implementation of PeekNextRequest ignores the
- *      readmore parameter.
- *
- **********************/
-
-static xReqPtr
-PeekNextRequest(
-    xReqPtr req,	/* request we're starting from */
-    ClientPtr client,	/* client whose requests we're skipping */
-    Bool readmore)	/* attempt to read more if next request isn't there? */
-{
-    register ConnectionInputPtr oci = ((OsCommPtr)client->osPrivate)->input;
-    xReqPtr pnextreq;
-    int needed, gotnow, reqlen;
-
-    if (!oci) return NULL;
-
-    if (!req)
-    {
-	/* caller wants the request after the one currently being executed */
-	pnextreq = (xReqPtr)
-	    (((CARD32 *)client->requestBuffer) + client->req_len);
-    }
-    else
-    {
-	/* caller wants the request after the one specified by req */
-	reqlen = get_req_len(req, client);
-#ifdef BIGREQS
-	if (!reqlen) reqlen = get_big_req_len(req, client);
-#endif
-	pnextreq = (xReqPtr)(((char *)req) + (reqlen << 2));
-    }
-
-    /* see how much of the next request we have available */
-
-    gotnow = oci->bufcnt - (((char *)pnextreq) - oci->buffer);
-
-    if (gotnow < sizeof(xReq))
-	return NULL;
-
-    needed = get_req_len(pnextreq, client) << 2;
-#ifdef BIGREQS
-    if (!needed)
-    {
-	/* it's a big request */
-	if (gotnow < sizeof(xBigReq))
-	    return NULL;
-	needed = get_big_req_len(pnextreq, client) << 2;
-    }
-#endif
-
-    /* if we have less than we need, return NULL */
-
-    return (gotnow < needed) ? NULL : pnextreq;
-}
-
-/*****************************************************************
- *  SkipRequests 
- *      lets you skip over some of the requests in a client's
- *      request buffer.  Presumably the caller has used PeekNextRequest
- *      to examine the requests being skipped and has performed whatever 
- *      actions they dictate.
- *
- **********************/
-
 _X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL;
 
-static void
-SkipRequests(
-    xReqPtr req,	/* last request being skipped */
-    ClientPtr client,   /* client whose requests we're skipping */
-    int numskipped)	/* how many requests we're skipping */
-{
-    OsCommPtr oc = (OsCommPtr)client->osPrivate;
-    register ConnectionInputPtr oci = oc->input;
-    int reqlen;
-
-    /* see if anyone wants to snoop the skipped requests */
-
-    if (SkippedRequestsCallback)
-    {
-	SkippedRequestInfoRec skipinfo;
-	skipinfo.req = req;
-	skipinfo.client = client;
-	skipinfo.numskipped = numskipped;
-	CallCallbacks(&SkippedRequestsCallback, &skipinfo);
-    }
-
-    /* adjust the sequence number */
-    client->sequence += numskipped;
-
-    /* twiddle the oci to skip over the requests */
-
-    reqlen = get_req_len(req, client);
-#ifdef BIGREQS
-    if (!reqlen) reqlen = get_big_req_len(req, client);
-#endif
-    reqlen <<= 2;
-    oci->bufptr = (char *)req;
-    oci->lenLastReq = reqlen;
-
-    /* see if any requests left in the buffer */
-
-    if ( ((char *)req + reqlen) == (oci->buffer + oci->bufcnt) )
-    {
-	/* no requests; mark input buffer as available and client
-	 * as having no input
-	 */
-	int fd = oc->fd;
-	AvailableInput = oc;
-	YieldControlNoInput();
-    }
-}
-
-
     /* lookup table for adding padding bytes to data that is read from
     	or written to the X socket.  */
 static int padlength[4] = {0, 3, 2, 1};
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 811a557..f391973 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -731,7 +731,6 @@ ProcRRSetScreenConfig (ClientPtr client)
     int			    n, rc;
     ScreenPtr		    pScreen;
     rrScrPrivPtr	    pScrPriv;
-    TimeStamp		    configTime;
     TimeStamp		    time;
     int			    i;
     Rotation		    rotation;
commit e7a6f79754816976d92857d55840262cccff80a6
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Sat Mar 1 16:16:29 2008 +0200

    glcore: split mesa and X in build system

diff --git a/GL/mesa/Makefile.am b/GL/mesa/Makefile.am
index 99d3834..6d1a439 100644
--- a/GL/mesa/Makefile.am
+++ b/GL/mesa/Makefile.am
@@ -1,9 +1,10 @@
-SUBDIRS = main math swrast swrast_setup tnl shader X glapi vbo
+SUBDIRS = X
+SUBDIRS += main math swrast swrast_setup tnl shader glapi vbo
 
 noinst_LTLIBRARIES = libGLcore.la
 
 libGLcore_la_SOURCES = dummy.c
-libGLcore_la_LIBADD = main/libmain.la \
+MESA_LIBS           = main/libmain.la \
                       math/libmath.la \
                       swrast/libswrast.la \
                       swrast_setup/libss.la \
@@ -12,4 +13,6 @@ libGLcore_la_LIBADD = main/libmain.la \
 		      shader/grammar/libgrammar.la \
 		      shader/slang/libslang.la \
                       vbo/libvbo.la \
+
+libGLcore_la_LIBADD = $(MESA_LIBS) \
                       X/libX.la
diff --git a/GL/mesa/X/Makefile.am b/GL/mesa/X/Makefile.am
index ace1181..d8abbc6 100644
--- a/GL/mesa/X/Makefile.am
+++ b/GL/mesa/X/Makefile.am
@@ -1,19 +1,10 @@
 noinst_LTLIBRARIES = libX.la
 
 INCLUDES = -I at MESA_SOURCE@/include \
-           -I../X \
-           -I../glapi \
-           -I../main \
-           -I../math \
-           -I../shader \
-           -I../swrast \
-           -I../swrast_setup \
-           -I../tnl \
-           -I.. \
-           -I../../glx \
-           -I$(top_srcdir)/GL/glx \
-           -I$(top_srcdir)/GL/include \
-           -I$(top_srcdir)/hw/xfree86/os-support
+           -I. \
+           -I at MESA_SOURCE@/src/mesa/glapi \
+           -I at MESA_SOURCE@/src/mesa/main \
+           -I at MESA_SOURCE@/src/mesa
 
 # -DXFree86Server is required because the X11 driver in Mesa thinks that
 # symbol means "being built in the server"
@@ -22,12 +13,15 @@ AM_CFLAGS = \
 	-DXFree86Server \
 	@GLX_DEFINES@
 
-nodist_libX_la_SOURCES = \
-                  xm_api.c \
-		  xm_buffer.c \
-                  xm_dd.c \
-                  xm_image.c \
-                  xm_line.c \
-                  xm_span.c \
-                  xm_tri.c \
-		  drivers/common/driverfuncs.c
+XM_SOURCES = \
+	xm_api.c \
+	xm_buffer.c \
+	xm_dd.c \
+	xm_image.c \
+	xm_line.c \
+	xm_span.c \
+	xm_tri.c
+
+XM_SOURCES += drivers/common/driverfuncs.c
+
+nodist_libX_la_SOURCES = $(XM_SOURCES)
commit cdd46aa3cd2e720558186cdbe48d871ab385fcdd
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Sat Mar 1 15:57:57 2008 +0200

    configure: minor cleanup
    
    - dmx
    
    - darwin: remove from xorg options
    
    - xephyr: libxv is client lib

diff --git a/configure.ac b/configure.ac
index 10aa241..ebbf877 100644
--- a/configure.ac
+++ b/configure.ac
@@ -293,7 +293,6 @@ dnl Bus options and CPU capabilities.  Replaces logic in
 dnl hw/xfree86/os-support/bus/Makefile.am, among others.
 dnl ---------------------------------------------------------------------------
 DEFAULT_INT10="x86emu"
-use_x86_asm="no"
 
 dnl Override defaults as needed for specific platforms:
 
@@ -310,10 +309,8 @@ case $host_cpu in
 	ARM_VIDEO=yes
 	;;
   i*86)
-	use_x86_asm="yes"
 	I386_VIDEO=yes
 	case $host_os in
-	        darwin*)	use_x86_asm="no" ;;
 		*linux*)	DEFAULT_INT10=vm86 ;;
 		*freebsd*)	AC_DEFINE(USE_DEV_IO) ;;
 		*netbsd*)	AC_DEFINE(USE_I386_IOPL)
@@ -337,10 +334,8 @@ case $host_cpu in
 	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
 	;;
   x86_64*|amd64*)
-  	use_x86_asm="yes"
 	I386_VIDEO=yes
 	case $host_os in
-	        darwin*)	use_x86_asm="no" ;;
 		*freebsd*)	AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;;
 		*netbsd*)	AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl])
 				SYS_LIBS=-lx86_64
@@ -758,7 +753,6 @@ if test "x$XV" = xyes; then
 	AC_DEFINE(XV, 1, [Support Xv extension])
 	AC_DEFINE(XvExtension, 1, [Build Xv extension])
 	REQUIRED_MODULES="$REQUIRED_MODULES videoproto"
-        PKG_CHECK_MODULES(XV, [xv >= 0.22])
 else
 	XVMC=no
 fi
@@ -1160,9 +1154,6 @@ if test "x$GCC" = "xyes"; then
        LD_EXPORT_SYMBOLS_FLAG="-rdynamic"
 fi
 case $host_os in
-       darwin*)
-       LD_EXPORT_SYMBOLS_FLAG=""
-       ;;
        openbsd*)
        LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic"
        ;;
@@ -1423,17 +1414,9 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
 	esac
 
 	case $host_cpu in
-	  i*86)
-               case $host_os in
-                 darwin*) ;;
-		 *bsd*) ;;
-		 linux*) ;;
-                 *) xorg_bus_ix86pci=yes ;;
-               esac
-		;;
 	  powerpc*)
 		case $host_os in
-		  darwin*|linux*|freebsd*|netbsd*|openbsd*|kfreebsd*-gnu)
+		  linux*|freebsd*|netbsd*|openbsd*|kfreebsd*-gnu)
 			;;
 		  *)
 			xorg_bus_ppcpci="yes"
@@ -1444,9 +1427,9 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
 		xorg_bus_sparcpci="yes"
 		xorg_bus_sparc="yes"
 		;;
-	  x86_64*|amd64*)
+	  i*86|x86_64*|amd64*)
 		case $host_os in
-		  darwin*|*bsd*|linux*)
+		  *bsd*|linux*)
 			;;
 		  *)
 			xorg_bus_ix86pci="yes"
@@ -1649,17 +1632,17 @@ fi
 AC_MSG_RESULT([$XWIN])
 
 if test "x$XWIN" = xyes; then
-	XWIN_SERVER_NAME=XWin
 	case $host_os in
 		cygwin*)
+			XWIN_SERVER_NAME=XWin
 			PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont])
 			AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages])
 			AC_DEFINE(ROOTLESS,1,[Build Rootless code])
 			CFLAGS="$CFLAGS -DFD_SETSIZE=256"
 			;;
 		mingw*)
-			PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont])
 			XWIN_SERVER_NAME=Xming
+			PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont])
 			AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location])
 			AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets])
 			XWIN_SYS_LIBS=-lwinsock2
@@ -1755,10 +1738,6 @@ if test "x$XQUARTZ" = xyes; then
 		AC_MSG_NOTICE([Disabling DGA extension])
 		DGA=no
 	fi
-	if test "x$DMX" = xyes || test "x$DMX" = xauto; then
-		AC_MSG_NOTICE([Disabling DMX DDX])
-		DMX=no
-	fi
 fi
 
 # Support for objc in autotools is minimal and not documented.
@@ -1801,51 +1780,58 @@ if test "x$LAUNCHD" = "xyes" ; then
 fi
 AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "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])
 if test "x$DMX" = xauto; then
-       DMX="$have_dmx"
+	DMX="$have_dmx"
+	case $host_os in
+		cygwin*) DMX="no" ;;
+		darwin*) DMX="no" ;;
+	esac
 fi
 AC_MSG_RESULT([$DMX])
 AM_CONDITIONAL(DMX, [test "x$DMX" = xyes])
 
 if test "x$DMX" = xyes; then
-       if test "x$have_dmx" = xno; then
-               AC_MSG_ERROR([Xdmx build explicitly requested, but required
-                             modules not found.])
-       fi
-       DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC"
-       XDMX_CFLAGS="$DMXMODULES_CFLAGS"
-       XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB"
-       XDMX_SYS_LIBS="$DMXMODULES_LIBS"
-       AC_SUBST([XDMX_CFLAGS])
-       AC_SUBST([XDMX_LIBS])
-       AC_SUBST([XDMX_SYS_LIBS])
+	if test "x$have_dmx" = xno; then
+		AC_MSG_ERROR([Xdmx build explicitly requested, but required
+		              modules not found.])
+	fi
+	DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC"
+	XDMX_CFLAGS="$DMXMODULES_CFLAGS"
+	XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB"
+	XDMX_SYS_LIBS="$DMXMODULES_LIBS"
+	AC_SUBST([XDMX_CFLAGS])
+	AC_SUBST([XDMX_LIBS])
+	AC_SUBST([XDMX_SYS_LIBS])
 
 dnl USB sources in DMX require <linux/input.h>
-       AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes",
-                       DMX_BUILD_USB="no")
+	AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes",
+			DMX_BUILD_USB="no")
 dnl Linux sources in DMX require <linux/keyboard.h>
-       AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes",
-                       DMX_BUILD_LNX="no")
-       if test "x$GLX" = xyes; then
-               PKG_CHECK_MODULES([GL], [glproto])
-       fi
-       PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11])
-       AC_SUBST(XDMXCONFIG_DEP_CFLAGS)
-       AC_SUBST(XDMXCONFIG_DEP_LIBS)
-       PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx xext x11])
-       AC_SUBST(DMXEXAMPLES_DEP_LIBS)
-       PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [dmx xmu xext x11])
-       AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS)
-       PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx xi xext x11])
-       AC_SUBST(DMXXIEXAMPLES_DEP_LIBS)
-       PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [xtst xext x11])
-       AC_SUBST(XTSTEXAMPLES_DEP_LIBS)
-       PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres xext x11])
-       AC_SUBST(XRESEXAMPLES_DEP_LIBS)
-       PKG_CHECK_MODULES([X11EXAMPLES_DEP], [xext x11])
-       AC_SUBST(X11EXAMPLES_DEP_LIBS)
+	AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes",
+			DMX_BUILD_LNX="no")
+	if test "x$GLX" = xyes; then
+		PKG_CHECK_MODULES([GL], [glproto])
+	fi
+	PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11])
+	AC_SUBST(XDMXCONFIG_DEP_CFLAGS)
+	AC_SUBST(XDMXCONFIG_DEP_LIBS)
+	PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx xext x11])
+	AC_SUBST(DMXEXAMPLES_DEP_LIBS)
+	PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [dmx xmu xext x11])
+	AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS)
+	PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx xi xext x11])
+	AC_SUBST(DMXXIEXAMPLES_DEP_LIBS)
+	PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [xtst xext x11])
+	AC_SUBST(XTSTEXAMPLES_DEP_LIBS)
+	PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres xext x11])
+	AC_SUBST(XRESEXAMPLES_DEP_LIBS)
+	PKG_CHECK_MODULES([X11EXAMPLES_DEP], [xext x11])
+	AC_SUBST(X11EXAMPLES_DEP_LIBS)
 fi
 AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes])
 AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes])
@@ -1909,7 +1895,11 @@ if test "$KDRIVE" = yes; then
        XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS"
     fi
 
-    PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
+    XEPHYR_REQUIRED_LIBS="x11 xext xfont xau xdmcp"
+    if test "x$XV" = xyes; then
+        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
+    fi
+    PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])
     if test "x$XEPHYR" = xauto; then
         XEPHYR=$xephyr
     fi
@@ -1941,7 +1931,7 @@ if test "$KDRIVE" = yes; then
     KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
     KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
     
-    KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS $XV_CFLAGS"
+    KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
 
     KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
     KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
@@ -1955,10 +1945,10 @@ if test "$KDRIVE" = yes; then
     KDRIVE_LOCAL_LIBS="$TSLIB_LIBS $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
     KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
     KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
-    KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $XV_LIBS"
+    KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS"
 
     # check if we can build Xephyr
-    PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
+    PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])
 
     AC_SUBST([XEPHYR_LIBS])
     AC_SUBST([XEPHYR_INCS])
commit 8af2c39bcc4ddc4693d5a2597c9622fa17b6c272
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sat Mar 1 16:54:01 2008 +0100

    Fix big mistake in commit fd41f46ac62033a724bd1f4612f19448a21c1224.
    
    - When a mode is deleted, the name pointer is also free()'ed.
    - This leaves other modes with an invalid pointer.

diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index d6aa61a..9e31512 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -214,8 +214,15 @@ xf86DuplicateMode(DisplayModePtr pMode)
     *pNew = *pMode;
     pNew->next = NULL;
     pNew->prev = NULL;
-    if (pNew->name == NULL)
+    /*
+     * It is important to copy the name explicitly.
+     * Otherwise a mode could reference an invalid piece of memory, after one of them runs free().
+     * This will lead to obscure problems, that you really don't want.
+     */
+    if (pMode->name == NULL)
 	xf86SetModeDefaultName(pNew);
+    else
+	pNew->name = xnfstrdup(pMode->name);
 
     return pNew;
 }
commit ef60632e200853680282016e32a7a9fb01882852
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Fri Feb 29 18:00:27 2008 -0500

    dix: Modify callers of property and selection API to use new interfaces.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index d1603c0..6d5eaad 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -172,12 +172,11 @@ xf86CreateRootWindow(WindowPtr pWin)
 	  Atom prop;
 
 	  prop = MakeAtom(pProp->name, strlen(pProp->name), TRUE);
-	  err = ChangeWindowProperty(pWin,
-				     prop, pProp->type,
-				     pProp->format, PropModeReplace,
-				     pProp->size, pProp->data,
-				     FALSE
-				     );
+	  err = dixChangeWindowProperty(serverClient, pWin,
+					prop, pProp->type,
+					pProp->format, PropModeReplace,
+					pProp->size, pProp->data,
+					FALSE);
 	}
       
       /* Look at err */
diff --git a/hw/xprint/pcl/PclMisc.c b/hw/xprint/pcl/PclMisc.c
index e0b7dce..0b37836 100644
--- a/hw/xprint/pcl/PclMisc.c
+++ b/hw/xprint/pcl/PclMisc.c
@@ -115,7 +115,7 @@ GetPropString(
     if(atom != BAD_RESOURCE)
     {
         WindowPtr pPropWin;
-	int n;
+	int rc, n;
 
 	/*
 	 * The atom has been defined, but it might only exist as a
@@ -124,15 +124,12 @@ GetPropString(
         for(pPropWin = pWin; pPropWin != (WindowPtr)NULL; 
 	    pPropWin = pPropWin->parent)
         {
-	    for(pProp = (PropertyPtr)(wUserProps(pPropWin)); 
-		pProp != (PropertyPtr)NULL;
-	        pProp = pProp->next)
-	    {
-                if (pProp->propertyName == atom)
-                    break;
-	    }
-	    if(pProp != (PropertyPtr)NULL)
-	        break;
+	    rc = dixLookupProperty(&pProp, pPropWin, atom,
+				   serverClient, DixReadAccess);
+	    if (rc == Success)
+		break;
+	    else
+		pProp = NULL;
         }
 	if(pProp == (PropertyPtr)NULL)
 	    return (char *)NULL;
diff --git a/hw/xprint/pcl/PclWindow.c b/hw/xprint/pcl/PclWindow.c
index a87dc0e..950933e 100644
--- a/hw/xprint/pcl/PclWindow.c
+++ b/hw/xprint/pcl/PclWindow.c
@@ -128,9 +128,9 @@ PclCreateWindow(
 	    {
                 propName = MakeAtom(propStrings[i], strlen(propStrings[i]),
 				    TRUE);
-	        ChangeWindowProperty(pWin, propName, XA_STRING, 8, 
-			             PropModeReplace,  strlen(propVal), 
-			             (pointer)propVal, FALSE);
+	        dixChangeWindowProperty(serverClient, pWin, propName, XA_STRING,
+					8, PropModeReplace, strlen(propVal),
+					(pointer)propVal, FALSE);
 	        xfree(propVal);
 	    }
 	}
diff --git a/hw/xprint/ps/PsMisc.c b/hw/xprint/ps/PsMisc.c
index 0df039e..8d5005f 100644
--- a/hw/xprint/ps/PsMisc.c
+++ b/hw/xprint/ps/PsMisc.c
@@ -175,7 +175,7 @@ GetPropString(
     if(atom != BAD_RESOURCE)
     {
         WindowPtr pPropWin;
-	int n;
+	int rc, n;
 */
 
 	/*
@@ -186,15 +186,12 @@ GetPropString(
         for(pPropWin = pWin; pPropWin != (WindowPtr)NULL; 
 	    pPropWin = pPropWin->parent)
         {
-	    for(pProp = (PropertyPtr)(wUserProps(pPropWin)); 
-		pProp != (PropertyPtr)NULL;
-	        pProp = pProp->next)
-	    {
-                if (pProp->propertyName == atom)
-                    break;
-	    }
-	    if(pProp != (PropertyPtr)NULL)
-	        break;
+	    rc = dixLookupProperty(&pProp, pPropWin, atom,
+				   serverClient, DixReadAccess);
+	    if (rc == Success)
+		break;
+	    else
+		pProp = NULL;
         }
 	if(pProp == (PropertyPtr)NULL)
 	    return (char *)NULL;
diff --git a/hw/xprint/ps/PsWindow.c b/hw/xprint/ps/PsWindow.c
index d17cf8c..8bfde4b 100644
--- a/hw/xprint/ps/PsWindow.c
+++ b/hw/xprint/ps/PsWindow.c
@@ -154,9 +154,9 @@ PsCreateWindow(WindowPtr pWin)
 	    {
                 propName = MakeAtom(propStrings[i], strlen(propStrings[i]),
 				    TRUE);
-	        ChangeWindowProperty(pWin, propName, XA_STRING, 8, 
-			             PropModeReplace,  strlen(propVal), 
-			             (pointer)propVal, FALSE);
+	        dixChangeWindowProperty(serverClient, pWin, propName, XA_STRING,
+					8, PropModeReplace, strlen(propVal),
+					(pointer)propVal, FALSE);
 	        xfree(propVal);
 	    }
 	}
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index c460ec6..072e57f 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -154,8 +154,8 @@ AppleWMSetScreenOrigin(
     data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y
                 + darwinMainScreenY);
 
-    ChangeWindowProperty(pWin, xa_native_screen_origin(), XA_INTEGER,
-                         32, PropModeReplace, 2, data, TRUE);
+    dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(),
+			    XA_INTEGER, 32, PropModeReplace, 2, data, TRUE);
 }
 
 /* Window managers can set the _APPLE_NO_ORDER_IN property on windows
@@ -169,15 +169,11 @@ AppleWMDoReorderWindow(
 {
     Atom atom;
     PropertyPtr prop;
+    int rc;
 
     atom = xa_apple_no_order_in();
-    for (prop = wUserProps(pWin); prop != NULL; prop = prop->next)
-    {
-        if (prop->propertyName == atom && prop->type == atom)
-            return FALSE;
-    }
-
-    return TRUE;
+    rc = dixLookupProperty(&prop, pWin, atom, serverClient, DixReadAccess);
+    return (rc == Success) && (prop->type == atom);
 }
 
 
diff --git a/hw/xquartz/quartzPasteboard.c b/hw/xquartz/quartzPasteboard.c
index 0cecff5..0bf84f5 100644
--- a/hw/xquartz/quartzPasteboard.c
+++ b/hw/xquartz/quartzPasteboard.c
@@ -43,9 +43,6 @@
 #include "selection.h"
 #include "globals.h"
 
-extern Selection *CurrentSelections;
-extern int NumCurrentSelections;
-
 
 // Helper function to read the X11 cut buffer
 // FIXME: What about multiple screens? Currently, this reads the first
@@ -54,18 +51,16 @@ extern int NumCurrentSelections;
 // Returns NULL if there is no cut text or there is not enough memory.
 static char * QuartzReadCutBuffer(void)
 {
-    int i;
+    int rc, i;
     char *text = NULL;
 
     for (i = 0; i < screenInfo.numScreens; i++) {
         ScreenPtr pScreen = screenInfo.screens[i];
         PropertyPtr pProp;
 
-        pProp = wUserProps (WindowTable[pScreen->myNum]);
-        while (pProp && pProp->propertyName != XA_CUT_BUFFER0) {
-	    pProp = pProp->next;
-        }
-        if (! pProp) continue;
+	rc = dixLookupProperty(&pProp, WindowTable[pScreen->myNum],
+			       XA_CUT_BUFFER0, serverClient, DixReadAccess);
+        if (rc != Success) continue;
         if (pProp->type != XA_STRING) continue;
         if (pProp->format != 8) continue;
 
@@ -108,43 +103,40 @@ void QuartzReadPasteboard(void)
 
     if ((text && oldText && !strequal(text, oldText)) ||
         (text && !oldText)) {
-        int scrn, sel;
+        int scrn, rc;
+	Selection *pSel;
 
         for (scrn = 0; scrn < screenInfo.numScreens; scrn++) {
 	    ScreenPtr pScreen = screenInfo.screens[scrn];
 	    // Set the cut buffers on each screen
 	    // fixme really on each screen?
-	    ChangeWindowProperty(WindowTable[pScreen->myNum], XA_CUT_BUFFER0,
-				 XA_STRING, 8, PropModeReplace,
-				 strlen(text), (pointer)text, TRUE);
+	    dixChangeWindowProperty(serverClient, WindowTable[pScreen->myNum],
+				    XA_CUT_BUFFER0, XA_STRING, 8, PropModeReplace,
+				    strlen(text), (pointer)text, TRUE);
         }
 
         // Undo any current X selection (similar to code in dispatch.c)
         // FIXME: what about secondary selection?
         // FIXME: only touch first XA_PRIMARY selection?
-        sel = 0;
-        while ((sel < NumCurrentSelections)  &&
-	       CurrentSelections[sel].selection != XA_PRIMARY)
-	    sel++;
-        if (sel < NumCurrentSelections) {
+	rc = dixLookupSelection(&pSel, XA_PRIMARY, serverClient,
+				DixSetAttrAccess);
+        if (rc == Success) {
 	    // Notify client if necessary
-	    if (CurrentSelections[sel].client) {
+	    if (pSel->client) {
 	        xEvent event;
 
 	        event.u.u.type = SelectionClear;
 		event.u.selectionClear.time = GetTimeInMillis();
-		event.u.selectionClear.window = CurrentSelections[sel].window;
-		event.u.selectionClear.atom = CurrentSelections[sel].selection;
-		TryClientEvents(CurrentSelections[sel].client, &event, 1,
-				NoEventMask, NoEventMask /*CantBeFiltered*/,
-				NullGrab);
+		event.u.selectionClear.window = pSel->window;
+		event.u.selectionClear.atom = pSel->selection;
+		TryClientEvents(pSel->client, &event, 1, NoEventMask,
+				NoEventMask /*CantBeFiltered*/, NullGrab);
 	    }
 
 	    // Erase it
-	    // FIXME: need to erase .selection too? dispatch.c doesn't
-	    CurrentSelections[sel].pWin = NullWindow;
-	    CurrentSelections[sel].window = None;
-	    CurrentSelections[sel].client = NullClient;
+	    pSel->pWin = NullWindow;
+	    pSel->window = None;
+	    pSel->client = NullClient;
         }
     }
 
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index b9a33de..864ef0d 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -90,8 +90,8 @@ xprSetNativeProperty(RootlessWindowPtr pFrame)
         /* FIXME: move this to AppleWM extension */
 
         data = native_id;
-        ChangeWindowProperty(pFrame->win, xa_native_window_id(),
-                             XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE);
+        dixChangeWindowProperty(serverClient, pFrame->win, xa_native_window_id(),
+				XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE);
     }
 }
 
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 4b4cd3d..6f4e2c9 100755
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -1087,6 +1087,6 @@ winMWExtWMSetNativeProperty (RootlessWindowPtr pFrame)
   /* FIXME: move this to WindowsWM extension */
 
   lData = (long) pRLWinPriv->hWnd;
-  ChangeWindowProperty (pFrame->win, AtmWindowsWmNativeHwnd (),
-			XA_INTEGER, 32, PropModeReplace, 1, &lData, TRUE);
+  dixChangeWindowProperty(serverClient, pFrame->win, AtmWindowsWmNativeHwnd(),
+			  XA_INTEGER, 32, PropModeReplace, 1, &lData, TRUE);
 }
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 7285f95..0dad44a 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -181,8 +181,8 @@ set_screen_origin (WindowPtr pWin)
   data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y
 	     + darwinMainScreenY);
 
-  ChangeWindowProperty (pWin, xa_native_screen_origin (), XA_INTEGER,
-			32, PropModeReplace, 2, data, TRUE);
+  dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(),
+			  XA_INTEGER, 32, PropModeReplace, 2, data, TRUE);
 }
 
 /*
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 2b5f1fb..c0afad0 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -222,8 +222,8 @@ char *			pval;
 	ErrorF("Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
 								out,len);
     }
-    ChangeWindowProperty(WindowTable[0],name,XA_STRING,8,PropModeReplace,
-							len,pval,True);
+    dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8,
+			    PropModeReplace, len, pval, True);
     xfree(pval);
     return True;
 }
commit cc76ea6e3ac6a405f0c198c4e62be40aa8d2b546
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Fri Feb 29 17:55:31 2008 -0500

    XACE: Add generic support for property and selection polyinstantiation.

diff --git a/Xext/security.c b/Xext/security.c
index cd67120..e82b976 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -910,7 +910,7 @@ SecurityProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {    
     XacePropertyAccessRec *rec = calldata;
     SecurityStateRec *subj, *obj;
-    ATOM name = rec->pProp->propertyName;
+    ATOM name = (*rec->ppProp)->propertyName;
     Mask requested = rec->access_mode;
     Mask allowed = SecurityResourceMask | DixReadAccess;
 
diff --git a/Xext/xace.c b/Xext/xace.c
index e88debc..8a8f8c6 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -56,16 +56,17 @@ int XaceHookDispatch(ClientPtr client, int major)
 }
 
 int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin,
-			   PropertyPtr pProp, Mask access_mode)
+			   PropertyPtr *ppProp, Mask access_mode)
 {
-    XacePropertyAccessRec rec = { client, pWin, pProp, access_mode, Success };
+    XacePropertyAccessRec rec = { client, pWin, ppProp, access_mode, Success };
     CallCallbacks(&XaceHooks[XACE_PROPERTY_ACCESS], &rec);
     return rec.status;
 }
 
-int XaceHookSelectionAccess(ClientPtr client, Atom name, Mask access_mode)
+int XaceHookSelectionAccess(ClientPtr client,
+			    Selection **ppSel, Mask access_mode)
 {
-    XaceSelectionAccessRec rec = { client, name, access_mode, Success };
+    XaceSelectionAccessRec rec = { client, ppSel, access_mode, Success };
     CallCallbacks(&XaceHooks[XACE_SELECTION_ACCESS], &rec);
     return rec.status;
 }
diff --git a/Xext/xace.h b/Xext/xace.h
index 1f07d9f..bd69bca 100644
--- a/Xext/xace.h
+++ b/Xext/xace.h
@@ -29,6 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "region.h"
 #include "window.h"
 #include "property.h"
+#include "selection.h"
 
 /* Default window background */
 #define XaceBackgroundNoneState(w) ((w)->forcedBG ? BackgroundPixel : None)
@@ -68,9 +69,9 @@ extern int XaceHook(
  */
 extern int XaceHookDispatch(ClientPtr ptr, int major);
 extern int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin,
-				  PropertyPtr pProp, Mask access_mode);
-extern int XaceHookSelectionAccess(ClientPtr ptr, Atom name,
-				   Mask access_mode);
+				  PropertyPtr *ppProp, Mask access_mode);
+extern int XaceHookSelectionAccess(ClientPtr ptr,
+				   Selection **ppSel, Mask access_mode);
 extern void XaceHookAuditEnd(ClientPtr ptr, int result);
 
 /* Register a callback for a given hook.
diff --git a/Xext/xacestr.h b/Xext/xacestr.h
index e31d424..ba115a4 100644
--- a/Xext/xacestr.h
+++ b/Xext/xacestr.h
@@ -59,7 +59,7 @@ typedef struct {
 typedef struct {
     ClientPtr client;
     WindowPtr pWin;
-    PropertyPtr pProp;
+    PropertyPtr *ppProp;
     Mask access_mode;
     int status;
 } XacePropertyAccessRec;
@@ -110,7 +110,7 @@ typedef struct {
 /* XACE_SELECTION_ACCESS */
 typedef struct {
     ClientPtr client;
-    Atom name;
+    Selection **ppSel;
     Mask access_mode;
     int status;
 } XaceSelectionAccessRec;
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 8d66ea1..a7d3999 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -134,7 +134,7 @@ static struct security_class_mapping map[] = {
     { "x_gc", { "", "", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_font", { "", "", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_glyph", "remove_glyph", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_colormap", { "read", "write", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_color", "remove_color", "", "", "", "", "", "", "install", "uninstall", "", "", "use", NULL }},
-    { "x_property", { "read", "write", "destroy", "create", "getattr", "setattr", NULL }},
+    { "x_property", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "write", NULL }},
     { "x_selection", { "read", "", "", "", "getattr", "setattr", NULL }},
     { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }},
@@ -691,14 +691,15 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     SELinuxSubjectRec *subj;
     SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
+    PropertyPtr pProp = *rec->ppProp;
     int rc;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
-    obj = dixLookupPrivate(&rec->pProp->devPrivates, objectKey);
+    obj = dixLookupPrivate(&pProp->devPrivates, objectKey);
 
     /* If this is a new object that needs labeling, do it now */
     if (rec->access_mode & DixCreateAccess) {
-	const char *name = NameForAtom(rec->pProp->propertyName);
+	const char *name = NameForAtom(pProp->propertyName);
 	security_context_t con;
 	security_id_t sid;
 
@@ -729,7 +730,7 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     }
 
     /* Perform the security check */
-    auditdata.property = rec->pProp->propertyName;
+    auditdata.property = pProp->propertyName;
     rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode,
 			&auditdata);
     if (rc != Success)
@@ -870,17 +871,21 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     SELinuxSubjectRec *subj;
     SELinuxObjectRec sel_sid;
     SELinuxAuditRec auditdata = { .client = rec->client };
+    Selection *pSel = *rec->ppSel;
     int rc;
 
+    if (rec->access_mode & DixCreateAccess)
+	return; /* don't use create currently */
+
     subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
 
-    rc = SELinuxSelectionToSID(rec->name, &sel_sid);
+    rc = SELinuxSelectionToSID(pSel->selection, &sel_sid);
     if (rc != Success) {
 	rec->status = rc;
 	return;
     }
 
-    auditdata.selection = rec->name;
+    auditdata.selection = pSel->selection;
     rc = SELinuxDoCheck(subj, &sel_sid, SECCLASS_X_SELECTION, rec->access_mode,
 			&auditdata);
     if (rc != Success)
@@ -1206,16 +1211,8 @@ ProcSELinuxGetPropertyContext(ClientPtr client)
     if (rc != Success)
 	return rc;
 
-    pProp = wUserProps(pWin);
-    while (pProp) {
-	if (pProp->propertyName == stuff->property)
-	    break;
-	pProp = pProp->next;
-    }
-    if (!pProp)
-	return BadValue;
-
-    rc = XaceHookPropertyAccess(client, pWin, pProp, DixGetAttrAccess);
+    rc = dixLookupProperty(&pProp, pWin, stuff->property, client,
+			   DixGetAttrAccess);
     if (rc != Success)
 	return rc;
 
diff --git a/dix/property.c b/dix/property.c
index e74becf..8b66ad6 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -103,7 +103,7 @@ dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName,
 	    break;
 
     if (pProp)
-	rc = XaceHookPropertyAccess(client, pWin, pProp, access_mode);
+	rc = XaceHookPropertyAccess(client, pWin, &pProp, access_mode);
     *result = pProp;
     return rc;
 }
@@ -256,12 +256,14 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
     PropertyPtr pProp;
     int sizeInBytes, totalSize, rc;
     pointer data;
+    Mask access_mode;
 
     sizeInBytes = format>>3;
     totalSize = len * sizeInBytes;
+    access_mode = (mode == PropModeReplace) ? DixWriteAccess : DixBlendAccess;
 
     /* first see if property already exists */
-    rc = dixLookupProperty(&pProp, pWin, property, pClient, DixWriteAccess);
+    rc = dixLookupProperty(&pProp, pWin, property, pClient, access_mode);
 
     if (rc == BadMatch)   /* just add to list */
     {
@@ -284,7 +286,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
 	    memmove((char *)data, (char *)value, totalSize);
 	pProp->size = len;
 	pProp->devPrivates = NULL;
-	rc = XaceHookPropertyAccess(pClient, pWin, pProp,
+	rc = XaceHookPropertyAccess(pClient, pWin, &pProp,
 				    DixCreateAccess|DixWriteAccess);
 	if (rc != Success) {
 	    xfree(data);
@@ -588,7 +590,7 @@ ProcListProperties(ClientPtr client)
     temppAtoms = pAtoms;
     for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) {
 	realProp = pProp;
-	rc = XaceHookPropertyAccess(client, pWin, pProp, DixGetAttrAccess);
+	rc = XaceHookPropertyAccess(client, pWin, &realProp, DixGetAttrAccess);
 	if (rc == Success && realProp == pProp) {
 	    *temppAtoms++ = pProp->propertyName;
 	    numProps++;
diff --git a/dix/selection.c b/dix/selection.c
index e2e279a..52b1611 100644
--- a/dix/selection.c
+++ b/dix/selection.c
@@ -80,7 +80,7 @@ dixLookupSelection(Selection **result, Atom selectionName,
     for (i = 0; i < NumCurrentSelections; i++)
 	if (CurrentSelections[i].selection == selectionName) {
 	    pSel = CurrentSelections + i;
-	    rc = XaceHookSelectionAccess(client, selectionName, access_mode);
+	    rc = XaceHookSelectionAccess(client, &pSel, access_mode);
 	    break;
 	}
 
@@ -206,6 +206,10 @@ ProcSetSelectionOwner(ClientPtr client)
 	pSel = CurrentSelections + NumCurrentSelections;
 	pSel->selection = stuff->selection;
 	pSel->devPrivates = NULL;
+
+	/* security creation/labeling check */
+	(void)XaceHookSelectionAccess(client, &pSel, DixCreateAccess);
+
 	pSel->next = NULL;
 	if (NumCurrentSelections > 0)
 	    CurrentSelections[NumCurrentSelections - 1].next = pSel;
commit 34bf308a9e66f1a2f48630a15b1802afad50ec24
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Fri Feb 29 18:00:23 2008 -0500

    dix: Refactoring of selection code to allow for polyinstantiation.
    Introduces dixLookupSelection() API.
    Removes NumCurrentSelections from API.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 9adc931..8d66ea1 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -967,8 +967,6 @@ SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 
     switch (rec->kind) {
     case SelectionSetOwner:
-    case SelectionGetOwner:
-    case SelectionConvertSelection:
     default:
 	break;
     }
diff --git a/dix/Makefile.am b/dix/Makefile.am
index 2cf9014..b7b1ec0 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -29,6 +29,7 @@ libdix_la_SOURCES = 	\
 	property.c	\
 	registry.c	\
 	resource.c	\
+	selection.c	\
 	swaprep.c	\
 	swapreq.c	\
 	tables.c	\
diff --git a/dix/dispatch.c b/dix/dispatch.c
index e8e650a..bb8b0c4 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -165,10 +165,6 @@ typedef const char *string;
 extern xConnSetupPrefix connSetupPrefix;
 extern char *ConnectionInfo;
 
-_X_EXPORT Selection *CurrentSelections;
-_X_EXPORT int NumCurrentSelections;
-CallbackListPtr SelectionCallback = NULL;
-
 static ClientPtr grabClient;
 #define GrabNone 0
 #define GrabActive 1
@@ -181,8 +177,6 @@ extern int connBlockScreenStart;
 
 static void KillAllClients(void);
 
-static void DeleteClientFromAnySelections(ClientPtr client);
-
 static int nextFreeClientID; /* always MIN free client ID */
 
 static int	nClients;	/* number of authorized clients */
@@ -246,14 +240,6 @@ UpdateCurrentTimeIf(void)
 	currentTime = systime;
 }
 
-static void
-InitSelections(void)
-{
-    if (CurrentSelections)
-	xfree(CurrentSelections);
-    CurrentSelections = (Selection *)NULL;
-    NumCurrentSelections = 0;
-}
 #ifdef SMART_SCHEDULE
 
 #undef SMART_DEBUG
@@ -372,7 +358,6 @@ Dispatch(void)
 #endif
 
     nextFreeClientID = 1;
-    InitSelections();
     nClients = 0;
 
     clientReady = (int *) xalloc(sizeof(int) * MaxClients);
@@ -968,217 +953,6 @@ ProcGetAtomName(ClientPtr client)
 }
 
 int
-ProcSetSelectionOwner(ClientPtr client)
-{
-    WindowPtr pWin;
-    TimeStamp time;
-    int rc;
-    REQUEST(xSetSelectionOwnerReq);
-    REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
-
-    UpdateCurrentTime();
-    time = ClientTimeToServerTime(stuff->time);
-
-    /* If the client's time stamp is in the future relative to the server's
-	time stamp, do not set the selection, just return success. */
-    if (CompareTimeStamps(time, currentTime) == LATER)
-    	return Success;
-    if (stuff->window != None)
-    {
-	rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess);
-        if (rc != Success)
-            return rc;
-    }
-    else
-        pWin = (WindowPtr)None;
-    if (ValidAtom(stuff->selection))
-    {
-	int i = 0;
-
-	rc = XaceHookSelectionAccess(client, stuff->selection,
-				     DixSetAttrAccess);
-	if (rc != Success)
-	    return rc;
-
-	/*
-	 * First, see if the selection is already set... 
-	 */
-	while ((i < NumCurrentSelections) && 
-	       CurrentSelections[i].selection != stuff->selection) 
-            i++;
-        if (i < NumCurrentSelections)
-        {        
-	    xEvent event;
-
-	    /* If the timestamp in client's request is in the past relative
-		to the time stamp indicating the last time the owner of the
-		selection was set, do not set the selection, just return 
-		success. */
-            if (CompareTimeStamps(time, CurrentSelections[i].lastTimeChanged)
-		== EARLIER)
-		return Success;
-	    if (CurrentSelections[i].client &&
-		(!pWin || (CurrentSelections[i].client != client)))
-	    {
-		event.u.u.type = SelectionClear;
-		event.u.selectionClear.time = time.milliseconds;
-		event.u.selectionClear.window = CurrentSelections[i].window;
-		event.u.selectionClear.atom = CurrentSelections[i].selection;
-		(void) TryClientEvents (CurrentSelections[i].client, &event, 1,
-				NoEventMask, NoEventMask /* CantBeFiltered */,
-				NullGrab);
-	    }
-	}
-	else
-	{
-	    /*
-	     * It doesn't exist, so add it...
-	     */
-	    Selection *newsels;
-
-	    if (i == 0)
-		newsels = (Selection *)xalloc(sizeof(Selection));
-	    else
-		newsels = (Selection *)xrealloc(CurrentSelections,
-			    (NumCurrentSelections + 1) * sizeof(Selection));
-	    if (!newsels)
-		return BadAlloc;
-	    NumCurrentSelections++;
-	    CurrentSelections = newsels;
-	    CurrentSelections[i].selection = stuff->selection;
-	    CurrentSelections[i].devPrivates = NULL;
-	}
-        CurrentSelections[i].lastTimeChanged = time;
-	CurrentSelections[i].window = stuff->window;
-	CurrentSelections[i].pWin = pWin;
-	CurrentSelections[i].client = (pWin ? client : NullClient);
-	if (SelectionCallback)
-	{
-	    SelectionInfoRec	info;
-
-	    info.selection = &CurrentSelections[i];
-	    info.client = client;
-	    info.kind= SelectionSetOwner;
-	    CallCallbacks(&SelectionCallback, &info);
-	}
-	return (client->noClientException);
-    }
-    else 
-    {
-	client->errorValue = stuff->selection;
-        return (BadAtom);
-    }
-}
-
-int
-ProcGetSelectionOwner(ClientPtr client)
-{
-    REQUEST(xResourceReq);
-
-    REQUEST_SIZE_MATCH(xResourceReq);
-    if (ValidAtom(stuff->id))
-    {
-	int rc, i;
-        xGetSelectionOwnerReply reply;
-
-	rc = XaceHookSelectionAccess(client, stuff->id, DixGetAttrAccess);
-	if (rc != Success)
-	    return rc;
-
-	i = 0;
-        while ((i < NumCurrentSelections) && 
-	       CurrentSelections[i].selection != stuff->id) i++;
-        reply.type = X_Reply;
-	reply.length = 0;
-	reply.sequenceNumber = client->sequence;
-	if (i < NumCurrentSelections) {
-	    if (SelectionCallback) {
-		SelectionInfoRec info;
-
-		info.selection = &CurrentSelections[i];
-		info.client = client;
-		info.kind= SelectionGetOwner;
-		CallCallbacks(&SelectionCallback, &info);
-	    }
-            reply.owner = CurrentSelections[i].window;
-	} else
-            reply.owner = None;
-        WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply);
-        return(client->noClientException);
-    }
-    else            
-    {
-	client->errorValue = stuff->id;
-        return (BadAtom); 
-    }
-}
-
-int
-ProcConvertSelection(ClientPtr client)
-{
-    Bool paramsOkay;
-    xEvent event;
-    WindowPtr pWin;
-    REQUEST(xConvertSelectionReq);
-    int rc;
-
-    REQUEST_SIZE_MATCH(xConvertSelectionReq);
-    rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess);
-    if (rc != Success)
-        return rc;
-    rc = XaceHookSelectionAccess(client, stuff->selection, DixReadAccess);
-    if (rc != Success)
-	return rc;
-
-    paramsOkay = (ValidAtom(stuff->selection) && ValidAtom(stuff->target));
-    if (stuff->property != None)
-	paramsOkay &= ValidAtom(stuff->property);
-    if (paramsOkay)
-    {
-	int i;
-
-	i = 0;
-	while ((i < NumCurrentSelections) && 
-	       CurrentSelections[i].selection != stuff->selection) i++;
-	if (i < NumCurrentSelections && CurrentSelections[i].window != None) {
-	    if (SelectionCallback) {
-		SelectionInfoRec info;
-
-		info.selection = &CurrentSelections[i];
-		info.client = client;
-		info.kind= SelectionConvertSelection;
-		CallCallbacks(&SelectionCallback, &info);
-	    }
-	    event.u.u.type = SelectionRequest;
-	    event.u.selectionRequest.time = stuff->time;
-	    event.u.selectionRequest.owner = CurrentSelections[i].window;
-	    event.u.selectionRequest.requestor = stuff->requestor;
-	    event.u.selectionRequest.selection = stuff->selection;
-	    event.u.selectionRequest.target = stuff->target;
-	    event.u.selectionRequest.property = stuff->property;
-	    if (TryClientEvents(
-		CurrentSelections[i].client, &event, 1, NoEventMask,
-		NoEventMask /* CantBeFiltered */, NullGrab))
-		return (client->noClientException);
-	}
-	event.u.u.type = SelectionNotify;
-	event.u.selectionNotify.time = stuff->time;
-	event.u.selectionNotify.requestor = stuff->requestor;
-	event.u.selectionNotify.selection = stuff->selection;
-	event.u.selectionNotify.target = stuff->target;
-	event.u.selectionNotify.property = None;
-	(void) TryClientEvents(client, &event, 1, NoEventMask,
-			       NoEventMask /* CantBeFiltered */, NullGrab);
-	return (client->noClientException);
-    }
-    else 
-    {
-	client->errorValue = stuff->property;
-        return (BadAtom);
-    }
-}
-
-int
 ProcGrabServer(ClientPtr client)
 {
     int rc;
@@ -3981,54 +3755,6 @@ SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
 }
 
 void
-DeleteWindowFromAnySelections(WindowPtr pWin)
-{
-    int i;
-
-    for (i = 0; i< NumCurrentSelections; i++)
-        if (CurrentSelections[i].pWin == pWin)
-        {
-	    if (SelectionCallback)
-	    {
-	        SelectionInfoRec    info;
-
-		info.selection = &CurrentSelections[i];
-		info.kind = SelectionWindowDestroy;
-		CallCallbacks(&SelectionCallback, &info);
-	    }
-	    dixFreePrivates(CurrentSelections[i].devPrivates);
-            CurrentSelections[i].pWin = (WindowPtr)NULL;
-            CurrentSelections[i].window = None;
-	    CurrentSelections[i].client = NullClient;
-	    CurrentSelections[i].devPrivates = NULL;
-	}
-}
-
-static void
-DeleteClientFromAnySelections(ClientPtr client)
-{
-    int i;
-
-    for (i = 0; i< NumCurrentSelections; i++)
-        if (CurrentSelections[i].client == client)
-        {
-	    if (SelectionCallback)
-	    {
-	        SelectionInfoRec    info;
-
-		info.selection = &CurrentSelections[i];
-		info.kind = SelectionWindowDestroy;
-		CallCallbacks(&SelectionCallback, &info);
-	    }
-	    dixFreePrivates(CurrentSelections[i].devPrivates);
-            CurrentSelections[i].pWin = (WindowPtr)NULL;
-            CurrentSelections[i].window = None;
-	    CurrentSelections[i].client = NullClient;
-	    CurrentSelections[i].devPrivates = NULL;
-	}
-}
-
-void
 MarkClientException(ClientPtr client)
 {
     client->noClientException = -1;
diff --git a/dix/main.c b/dix/main.c
index 068dae9..db43473 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -93,6 +93,7 @@ Equipment Corporation.
 #include "colormap.h"
 #include "colormapst.h"
 #include "cursorstr.h"
+#include "selection.h"
 #include <X11/fonts/font.h>
 #include "opaque.h"
 #include "servermd.h"
@@ -346,6 +347,7 @@ main(int argc, char *argv[], char *envp[])
 
 	InitAtoms();
 	InitEvents();
+	InitSelections();
 	InitGlyphCaching();
 	if (!dixResetPrivates())
 	    FatalError("couldn't init private data storage");
diff --git a/dix/selection.c b/dix/selection.c
new file mode 100644
index 0000000..e2e279a
--- /dev/null
+++ b/dix/selection.c
@@ -0,0 +1,306 @@
+/************************************************************
+
+Copyright 1987, 1989, 1998  The Open Group
+
+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.
+
+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
+OPEN GROUP 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 Open Group 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 Open Group.
+
+
+Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        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 Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL 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.
+
+********************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "windowstr.h"
+#include "dixstruct.h"
+#include "dispatch.h"
+#include "selection.h"
+#include "xace.h"
+
+/*****************************************************************
+ * Selection Stuff
+ *
+ *    dixLookupSelection
+ *
+ *   Selections are global to the server.  The list of selections should
+ *   not be traversed directly.  Instead, use the functions listed above.
+ *
+ *****************************************************************/
+
+_X_EXPORT Selection *CurrentSelections;
+static int NumCurrentSelections;
+CallbackListPtr SelectionCallback;
+
+_X_EXPORT int
+dixLookupSelection(Selection **result, Atom selectionName,
+		   ClientPtr client, Mask access_mode)
+{
+    Selection *pSel = NULL;
+    int i, rc = BadMatch;
+    client->errorValue = selectionName;
+
+    for (i = 0; i < NumCurrentSelections; i++)
+	if (CurrentSelections[i].selection == selectionName) {
+	    pSel = CurrentSelections + i;
+	    rc = XaceHookSelectionAccess(client, selectionName, access_mode);
+	    break;
+	}
+
+    *result = pSel;
+    return rc;
+}
+
+void
+InitSelections(void)
+{
+    Selection *pSel = CurrentSelections;
+
+    for (; pSel - CurrentSelections < NumCurrentSelections; pSel++)
+	dixFreePrivates(pSel->devPrivates);
+
+    xfree(CurrentSelections);
+    CurrentSelections = NULL;
+    NumCurrentSelections = 0;
+}
+
+static _X_INLINE void
+CallSelectionCallback(Selection *pSel, ClientPtr client,
+		      SelectionCallbackKind kind)
+{
+    SelectionInfoRec info = { pSel, client, kind };
+    CallCallbacks(&SelectionCallback, &info);
+}
+
+void
+DeleteWindowFromAnySelections(WindowPtr pWin)
+{
+    Selection *pSel = CurrentSelections;
+
+    for (; pSel - CurrentSelections < NumCurrentSelections; pSel++)
+        if (pSel->pWin == pWin) {
+	    CallSelectionCallback(pSel, NULL, SelectionWindowDestroy);
+
+            pSel->pWin = (WindowPtr)NULL;
+            pSel->window = None;
+	    pSel->client = NullClient;
+	}
+}
+
+void
+DeleteClientFromAnySelections(ClientPtr client)
+{
+    Selection *pSel = CurrentSelections;
+
+    for (; pSel - CurrentSelections < NumCurrentSelections; pSel++)
+        if (pSel->client == client) {
+	    CallSelectionCallback(pSel, NULL, SelectionClientClose);
+
+            pSel->pWin = (WindowPtr)NULL;
+            pSel->window = None;
+	    pSel->client = NullClient;
+	}
+}
+
+int
+ProcSetSelectionOwner(ClientPtr client)
+{
+    WindowPtr pWin = NULL;
+    TimeStamp time;
+    Selection *pSel;
+    int rc;
+
+    REQUEST(xSetSelectionOwnerReq);
+    REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
+
+    UpdateCurrentTime();
+    time = ClientTimeToServerTime(stuff->time);
+
+    /* If the client's time stamp is in the future relative to the server's
+	time stamp, do not set the selection, just return success. */
+    if (CompareTimeStamps(time, currentTime) == LATER)
+    	return Success;
+
+    if (stuff->window != None) {
+	rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess);
+        if (rc != Success)
+            return rc;
+    }
+    if (!ValidAtom(stuff->selection)) {
+	client->errorValue = stuff->selection;
+        return BadAtom;
+    }
+
+    /*
+     * First, see if the selection is already set...
+     */
+    rc = dixLookupSelection(&pSel, stuff->selection, client, DixSetAttrAccess);
+
+    if (rc == Success) {
+	xEvent event;
+
+	/* If the timestamp in client's request is in the past relative
+	   to the time stamp indicating the last time the owner of the
+	   selection was set, do not set the selection, just return 
+	   success. */
+	if (CompareTimeStamps(time, pSel->lastTimeChanged) == EARLIER)
+	    return Success;
+	if (pSel->client && (!pWin || (pSel->client != client)))
+	{
+	    event.u.u.type = SelectionClear;
+	    event.u.selectionClear.time = time.milliseconds;
+	    event.u.selectionClear.window = pSel->window;
+	    event.u.selectionClear.atom = pSel->selection;
+	    TryClientEvents(pSel->client, &event, 1, NoEventMask,
+			    NoEventMask /* CantBeFiltered */, NullGrab);
+	}
+    }
+    else if (rc == BadMatch)
+    {
+	/*
+	 * It doesn't exist, so add it...
+	 */
+	int size = (NumCurrentSelections + 1) * sizeof(Selection);
+	CurrentSelections = xrealloc(CurrentSelections, size);
+	if (!CurrentSelections) {
+	    NumCurrentSelections = 0;
+	    return BadAlloc;
+	}
+	pSel = CurrentSelections + NumCurrentSelections;
+	pSel->selection = stuff->selection;
+	pSel->devPrivates = NULL;
+	pSel->next = NULL;
+	if (NumCurrentSelections > 0)
+	    CurrentSelections[NumCurrentSelections - 1].next = pSel;
+	NumCurrentSelections++;
+    }
+    else
+	return rc;
+
+    pSel->lastTimeChanged = time;
+    pSel->window = stuff->window;
+    pSel->pWin = pWin;
+    pSel->client = (pWin ? client : NullClient);
+
+    CallSelectionCallback(pSel, client, SelectionSetOwner);
+    return client->noClientException;
+}
+
+int
+ProcGetSelectionOwner(ClientPtr client)
+{
+    int rc;
+    Selection *pSel;
+    xGetSelectionOwnerReply reply;
+
+    REQUEST(xResourceReq);
+    REQUEST_SIZE_MATCH(xResourceReq);
+
+    if (!ValidAtom(stuff->id)) {
+	client->errorValue = stuff->id;
+        return BadAtom;
+    }
+
+    reply.type = X_Reply;
+    reply.length = 0;
+    reply.sequenceNumber = client->sequence;
+
+    rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess);
+    if (rc == Success)
+	reply.owner = pSel->window;
+    else if (rc == BadMatch)
+	reply.owner = None;
+    else
+	return rc;
+
+    WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply);
+    return client->noClientException;
+}
+
+int
+ProcConvertSelection(ClientPtr client)
+{
+    Bool paramsOkay;
+    xEvent event;
+    WindowPtr pWin;
+    Selection *pSel;
+    int rc;
+
+    REQUEST(xConvertSelectionReq);
+    REQUEST_SIZE_MATCH(xConvertSelectionReq);
+
+    rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess);
+    if (rc != Success)
+        return rc;
+
+    paramsOkay = ValidAtom(stuff->selection) && ValidAtom(stuff->target);
+    paramsOkay &= (stuff->property == None) || ValidAtom(stuff->property);
+    if (!paramsOkay) {
+	client->errorValue = stuff->property;
+        return BadAtom;
+    }
+
+    rc = dixLookupSelection(&pSel, stuff->selection, client, DixReadAccess);
+
+    if (rc != Success && rc != BadMatch)
+	return rc;
+    else if (rc == Success && pSel->window != None) {
+	event.u.u.type = SelectionRequest;
+	event.u.selectionRequest.owner = pSel->window;
+	event.u.selectionRequest.time = stuff->time;
+	event.u.selectionRequest.requestor = stuff->requestor;
+	event.u.selectionRequest.selection = stuff->selection;
+	event.u.selectionRequest.target = stuff->target;
+	event.u.selectionRequest.property = stuff->property;
+	if (TryClientEvents(pSel->client, &event, 1, NoEventMask,
+			    NoEventMask /* CantBeFiltered */, NullGrab))
+	    return client->noClientException;
+    }
+
+    event.u.u.type = SelectionNotify;
+    event.u.selectionNotify.time = stuff->time;
+    event.u.selectionNotify.requestor = stuff->requestor;
+    event.u.selectionNotify.selection = stuff->selection;
+    event.u.selectionNotify.target = stuff->target;
+    event.u.selectionNotify.property = None;
+    TryClientEvents(client, &event, 1, NoEventMask,
+		    NoEventMask /* CantBeFiltered */, NullGrab);
+    return client->noClientException;
+}
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index e6c37fe..d035c76 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -92,9 +92,6 @@
 extern int XkbDfltRepeatDelay, XkbDfltRepeatInterval;
 #endif
 
-extern Selection *CurrentSelections;
-extern int NumCurrentSelections;
-
 /* DIX things */
 
 _X_HIDDEN void *dixLookupTab[] = {
@@ -150,8 +147,6 @@ _X_HIDDEN void *dixLookupTab[] = {
     SYMVAR(isItTimeToYield)
     SYMVAR(ClientStateCallback)
     SYMVAR(ServerGrabCallback)
-    SYMVAR(CurrentSelections)
-    SYMVAR(NumCurrentSelections)
     /* dixfonts.c */
     SYMFUNC(CloseFont)
     SYMFUNC(FontToXError)
@@ -196,6 +191,9 @@ _X_HIDDEN void *dixLookupTab[] = {
     SYMFUNC(dixLookupProperty)
     SYMFUNC(ChangeWindowProperty)
     SYMFUNC(dixChangeWindowProperty)
+    /* selection.c */
+    SYMFUNC(dixLookupSelection)
+    SYMVAR(CurrentSelections)
     /* extension.c */
     SYMFUNC(AddExtension)
     SYMFUNC(AddExtensionAlias)
diff --git a/include/dix.h b/include/dix.h
index 52212e7..0790f58 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -166,9 +166,6 @@ extern void SendErrorToClient(
     XID /*resId*/,
     int /*errorCode*/);
 
-extern void DeleteWindowFromAnySelections(
-    WindowPtr /*pWin*/);
-
 extern void MarkClientException(
     ClientPtr /*client*/);
 
@@ -556,26 +553,6 @@ typedef struct {
     int count;
 } DeviceEventInfoRec;
 
-/*
- * SelectionCallback stuff
- */
-
-extern CallbackListPtr SelectionCallback;
-
-typedef enum {
-    SelectionSetOwner,
-    SelectionGetOwner,
-    SelectionConvertSelection,
-    SelectionWindowDestroy,
-    SelectionClientClose
-} SelectionCallbackKind;
-
-typedef struct {
-    struct _Selection	    *selection;
-    ClientPtr		    client;
-    SelectionCallbackKind   kind;
-} SelectionInfoRec;
-
 /* strcasecmp.c */
 #if NEED_STRCASECMP
 #define strcasecmp xstrcasecmp
diff --git a/include/selection.h b/include/selection.h
index 859b6a3..dd9b056 100644
--- a/include/selection.h
+++ b/include/selection.h
@@ -1,7 +1,3 @@
-
-#ifndef SELECTION_H
-#define SELECTION_H 1
-
 /***********************************************************
 
 Copyright 1987, 1998  The Open Group
@@ -49,10 +45,13 @@ SOFTWARE.
 
 ******************************************************************/
 
+#ifndef SELECTION_H
+#define SELECTION_H 1
+
 #include "dixstruct.h"
 #include "privates.h"
+
 /*
- *
  *  Selection data structures 
  */
 
@@ -62,11 +61,45 @@ typedef struct _Selection {
     Window window;
     WindowPtr pWin;
     ClientPtr client;
-    ClientPtr alt_client; /* support for redirection */
-    Window alt_window;    /* support for redirection */
+    struct _Selection *next;
     PrivateRec *devPrivates;
 } Selection;
 
+
+/*
+ *  Selection API
+ */
+
+int dixLookupSelection(Selection **result, Atom name,
+		       ClientPtr client, Mask access_mode);
+
+extern Selection *CurrentSelections;
+
+extern CallbackListPtr SelectionCallback;
+
+typedef enum {
+    SelectionSetOwner,
+    SelectionWindowDestroy,
+    SelectionClientClose
+} SelectionCallbackKind;
+
+typedef struct {
+    struct _Selection	    *selection;
+    ClientPtr		    client;
+    SelectionCallbackKind   kind;
+} SelectionInfoRec;
+
+
+/*
+ *  Selection server internals
+ */
+
+void InitSelections(void);
+
+void DeleteWindowFromAnySelections(WindowPtr pWin);
+
+void DeleteClientFromAnySelections(ClientPtr client);
+
 #endif /* SELECTION_H */
 
 
commit d5715f7beaad6816db27b01b67d7a3c69164d106
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Fri Feb 29 16:16:12 2008 -0500

    dix: Refactoring of property code to allow for polyinstantiation.
    Introduces dixLookupProperty() API.

diff --git a/dix/property.c b/dix/property.c
index ce61169..e74becf 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -63,11 +63,10 @@ SOFTWARE.
 /*****************************************************************
  * Property Stuff
  *
- *    ChangeProperty, DeleteProperty, GetProperties,
- *    ListProperties
+ *    dixLookupProperty, dixChangeProperty, DeleteProperty
  *
- *   Properties below to windows.  A allocate slots each time
- *   a property is added.  No fancy searching done.
+ *   Properties belong to windows.  The list of properties should not be
+ *   traversed directly.  Instead, use the three functions listed above.
  *
  *****************************************************************/
 
@@ -91,17 +90,22 @@ PrintPropertys(WindowPtr pWin)
 }
 #endif
 
-static _X_INLINE PropertyPtr
-FindProperty(WindowPtr pWin, Atom propertyName)
+_X_EXPORT int
+dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName,
+		  ClientPtr client, Mask access_mode)
 {
-    PropertyPtr pProp = wUserProps(pWin);
-    while (pProp)
-    {
+    PropertyPtr pProp;
+    int rc = BadMatch;
+    client->errorValue = propertyName;
+
+    for (pProp = wUserProps(pWin); pProp; pProp = pProp->next)
 	if (pProp->propertyName == propertyName)
 	    break;
-	pProp = pProp->next;
-    }
-    return pProp;
+
+    if (pProp)
+	rc = XaceHookPropertyAccess(client, pWin, pProp, access_mode);
+    *result = pProp;
+    return rc;
 }
 
 static void
@@ -125,65 +129,69 @@ ProcRotateProperties(ClientPtr client)
     WindowPtr pWin;
     Atom * atoms;
     PropertyPtr * props;               /* array of pointer */
-    PropertyPtr pProp;
+    PropertyPtr pProp, saved;
 
     REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2);
     UpdateCurrentTime();
     rc = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess);
-    if (rc != Success)
+    if (rc != Success || stuff->nAtoms <= 0)
         return rc;
-    if (!stuff->nAtoms)
-	return(Success);
+
     atoms = (Atom *) & stuff[1];
     props = (PropertyPtr *)xalloc(stuff->nAtoms * sizeof(PropertyPtr));
-    if (!props)
-	return(BadAlloc);
+    saved = (PropertyPtr)xalloc(stuff->nAtoms * sizeof(PropertyRec));
+    if (!props || !saved) {
+	rc = BadAlloc;
+	goto out;
+    }
+
     for (i = 0; i < stuff->nAtoms; i++)
     {
         if (!ValidAtom(atoms[i])) {
-            xfree(props);
+	    rc = BadAtom;
 	    client->errorValue = atoms[i];
-            return BadAtom;
+	    goto out;
         }
         for (j = i + 1; j < stuff->nAtoms; j++)
             if (atoms[j] == atoms[i])
             {
-                xfree(props);
-                return BadMatch;
+		rc = BadMatch;
+		goto out;
             }
-	pProp = FindProperty(pWin, atoms[i]);
-	if (!pProp) {
-	    xfree(props);
-	    return BadMatch;
-	}
-	rc = XaceHookPropertyAccess(client, pWin, pProp,
-				    DixReadAccess|DixWriteAccess);
-	if (rc != Success) {
-	    xfree(props);
-	    client->errorValue = atoms[i];
-            return rc;
-	}
+
+	rc = dixLookupProperty(&pProp, pWin, atoms[i], client,
+			       DixReadAccess|DixWriteAccess);
+	if (rc != Success)
+	    goto out;
+
         props[i] = pProp;
+	saved[i] = *pProp;
     }
     delta = stuff->nPositions;
 
     /* If the rotation is a complete 360 degrees, then moving the properties
 	around and generating PropertyNotify events should be skipped. */
 
-    if ( (stuff->nAtoms != 0) && (abs(delta) % stuff->nAtoms) != 0 ) 
+    if (abs(delta) % stuff->nAtoms)
     {
 	while (delta < 0)                  /* faster if abs value is small */
             delta += stuff->nAtoms;
     	for (i = 0; i < stuff->nAtoms; i++)
  	{
-	    deliverPropertyNotifyEvent(pWin, PropertyNewValue,
-				       props[i]->propertyName);
- 
-            props[i]->propertyName = atoms[(i + delta) % stuff->nAtoms];
+	    j = (i + delta) % stuff->nAtoms;
+	    deliverPropertyNotifyEvent(pWin, PropertyNewValue, atoms[i]);
+
+	    /* Preserve name and devPrivates */
+	    props[j]->type = saved[i].type;
+	    props[j]->format = saved[i].format;
+	    props[j]->size = saved[i].size;
+	    props[j]->data = saved[i].data;
 	}
     }
+out:
+    xfree(saved);
     xfree(props);
-    return Success;
+    return rc;
 }
 
 int 
@@ -253,9 +261,9 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
     totalSize = len * sizeInBytes;
 
     /* first see if property already exists */
-    pProp = FindProperty(pWin, property);
+    rc = dixLookupProperty(&pProp, pWin, property, pClient, DixWriteAccess);
 
-    if (!pProp)   /* just add to list */
+    if (rc == BadMatch)   /* just add to list */
     {
 	if (!pWin->optional && !MakeWindowOptional (pWin))
 	    return(BadAlloc);
@@ -287,13 +295,8 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
         pProp->next = pWin->optional->userProps;
         pWin->optional->userProps = pProp;
     }
-    else
+    else if (rc == Success)
     {
-	rc = XaceHookPropertyAccess(pClient, pWin, pProp, DixWriteAccess);
-	if (rc != Success) {
-	    pClient->errorValue = property;
-	    return rc;
-	}
 	/* To append or prepend to a property the request format and type
 		must match those of the already defined property.  The
 		existing format and type are irrelevant when using the mode
@@ -347,6 +350,8 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
             pProp->size += len;
 	}
     }
+    else
+	return rc;
 
     if (sendevent)
 	deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp->propertyName);
@@ -369,37 +374,29 @@ DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName)
     PropertyPtr pProp, prevProp;
     int rc;
 
-    if (!(pProp = wUserProps (pWin)))
-	return(Success);
-    prevProp = (PropertyPtr)NULL;
-    while (pProp)
-    {
-	if (pProp->propertyName == propName)
-	    break;
-        prevProp = pProp;
-	pProp = pProp->next;
-    }
-    if (pProp) 
-    {		    
-	rc = XaceHookPropertyAccess(client, pWin, pProp, DixDestroyAccess);
-	if (rc != Success)
-	    return rc;
+    rc = dixLookupProperty(&pProp, pWin, propName, client, DixDestroyAccess);
+    if (rc == BadMatch)
+	return Success; /* Succeed if property does not exist */
 
-        if (prevProp == (PropertyPtr)NULL)      /* takes care of head */
-        {
+    if (rc == Success) {
+	if (pWin->optional->userProps == pProp) {
+	    /* Takes care of head */
             if (!(pWin->optional->userProps = pProp->next))
 		CheckWindowOptionalNeed (pWin);
-        }
-	else
-        {
-            prevProp->next = pProp->next;
-        }
+	} else {
+	    /* Need to traverse to find the previous element */
+	    prevProp = pWin->optional->userProps;
+	    while (prevProp->next != pProp)
+		prevProp = prevProp->next;
+	    prevProp->next = pProp->next;
+	}
+
 	deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName);
 	dixFreePrivates(pProp->devPrivates);
 	xfree(pProp->data);
         xfree(pProp);
     }
-    return(Success);
+    return rc;
 }
 
 void
@@ -453,15 +450,16 @@ ProcGetProperty(ClientPtr client)
     int rc;
     WindowPtr pWin;
     xGetPropertyReply reply;
-    Mask access_mode = DixGetPropAccess;
+    Mask win_mode = DixGetPropAccess, prop_mode = DixReadAccess;
     REQUEST(xGetPropertyReq);
 
     REQUEST_SIZE_MATCH(xGetPropertyReq);
     if (stuff->delete) {
 	UpdateCurrentTime();
-	access_mode |= DixSetPropAccess;
+	win_mode |= DixSetPropAccess;
+	prop_mode |= DixDestroyAccess;
     }
-    rc = dixLookupWindow(&pWin, stuff->window, client, access_mode);
+    rc = dixLookupWindow(&pWin, stuff->window, client, win_mode);
     if (rc != Success)
 	return rc;
 
@@ -481,30 +479,14 @@ ProcGetProperty(ClientPtr client)
 	return(BadAtom);
     }
 
-    pProp = wUserProps (pWin);
-    prevProp = (PropertyPtr)NULL;
-    while (pProp)
-    {
-	if (pProp->propertyName == stuff->property) 
-	    break;
-	prevProp = pProp;
-	pProp = pProp->next;
-    }
-
     reply.type = X_Reply;
     reply.sequenceNumber = client->sequence;
-    if (!pProp) 
-	return NullPropertyReply(client, None, 0, &reply);
 
-    access_mode = DixReadAccess;
-    if (stuff->delete)
-	access_mode |= DixDestroyAccess;
-
-    rc = XaceHookPropertyAccess(client, pWin, pProp, access_mode);
-    if (rc != Success) {
-	client->errorValue = stuff->property;
+    rc = dixLookupProperty(&pProp, pWin, stuff->property, client, prop_mode);
+    if (rc == BadMatch)
+	return NullPropertyReply(client, None, 0, &reply);
+    else if (rc != Success)
 	return rc;
-    }
 
     /* If the request type and actual type don't match. Return the
     property information, but not the data. */
@@ -560,15 +542,20 @@ ProcGetProperty(ClientPtr client)
 				 (char *)pProp->data + ind);
     }
 
-    if (stuff->delete && (reply.bytesAfter == 0))
-    { /* delete the Property */
-	if (prevProp == (PropertyPtr)NULL) /* takes care of head */
-	{
-	    if (!(pWin->optional->userProps = pProp->next))
+    if (stuff->delete && (reply.bytesAfter == 0)) {
+	/* Delete the Property */
+	if (pWin->optional->userProps == pProp) {
+	    /* Takes care of head */
+            if (!(pWin->optional->userProps = pProp->next))
 		CheckWindowOptionalNeed (pWin);
-	}
-	else
+	} else {
+	    /* Need to traverse to find the previous element */
+	    prevProp = pWin->optional->userProps;
+	    while (prevProp->next != pProp)
+		prevProp = prevProp->next;
 	    prevProp->next = pProp->next;
+	}
+
 	dixFreePrivates(pProp->devPrivates);
 	xfree(pProp->data);
 	xfree(pProp);
@@ -583,7 +570,7 @@ ProcListProperties(ClientPtr client)
     xListPropertiesReply xlpr;
     int	rc, numProps = 0;
     WindowPtr pWin;
-    PropertyPtr pProp;
+    PropertyPtr pProp, realProp;
     REQUEST(xResourceReq);
 
     REQUEST_SIZE_MATCH(xResourceReq);
@@ -591,34 +578,34 @@ ProcListProperties(ClientPtr client)
     if (rc != Success)
         return rc;
 
-    pProp = wUserProps (pWin);
-    while (pProp)
-    {        
-        pProp = pProp->next;
+    for (pProp = wUserProps(pWin); pProp; pProp = pProp->next)
 	numProps++;
+
+    if (numProps && !(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom))))
+	return BadAlloc;
+
+    numProps = 0;
+    temppAtoms = pAtoms;
+    for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) {
+	realProp = pProp;
+	rc = XaceHookPropertyAccess(client, pWin, pProp, DixGetAttrAccess);
+	if (rc == Success && realProp == pProp) {
+	    *temppAtoms++ = pProp->propertyName;
+	    numProps++;
+	}
     }
-    if (numProps)
-        if(!(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom))))
-            return(BadAlloc);
 
     xlpr.type = X_Reply;
     xlpr.nProperties = numProps;
     xlpr.length = (numProps * sizeof(Atom)) >> 2;
     xlpr.sequenceNumber = client->sequence;
-    pProp = wUserProps (pWin);
-    temppAtoms = pAtoms;
-    while (pProp)
-    {
-	*temppAtoms++ = pProp->propertyName;
-	pProp = pProp->next;
-    }
     WriteReplyToClient(client, sizeof(xGenericReply), &xlpr);
     if (numProps)
     {
         client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
         WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
-        xfree(pAtoms);
     }
+    xfree(pAtoms);
     return(client->noClientException);
 }
 
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 49c7d27..e6c37fe 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -193,6 +193,7 @@ _X_HIDDEN void *dixLookupTab[] = {
     SYMFUNC(XineramaGetCursorScreen)
 #endif
     /* property.c */
+    SYMFUNC(dixLookupProperty)
     SYMFUNC(ChangeWindowProperty)
     SYMFUNC(dixChangeWindowProperty)
     /* extension.c */
diff --git a/include/property.h b/include/property.h
index ba7d226..1207e81 100644
--- a/include/property.h
+++ b/include/property.h
@@ -52,6 +52,13 @@ SOFTWARE.
 
 typedef struct _Property *PropertyPtr;
 
+extern int dixLookupProperty(
+    PropertyPtr * /*result*/,
+    WindowPtr /*pWin*/,
+    Atom /*proprty*/,
+    ClientPtr /*pClient*/,
+    Mask /*access_mode*/);
+
 extern int dixChangeWindowProperty(
     ClientPtr /*pClient*/,
     WindowPtr /*pWin*/,
commit c0e1959f285d7a7df66f42d55912a5a595decd0f
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 29 16:45:11 2008 -0500

    On second thought, revert that, it'll make large pixmaps painfully slow.
    
    Need to just fix the callers.

diff --git a/dix/pixmap.c b/dix/pixmap.c
index d4b4195..82e388c 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -113,7 +113,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
     if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize)
 	return NullPixmap;
     
-    pPixmap = (PixmapPtr)xcalloc(1, pScreen->totalPixmapSize + pixDataSize);
+    pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize);
     if (!pPixmap)
 	return NullPixmap;
 
commit 4a44fe7c8678360d0549cf0e0d63870f3623b1db
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Feb 29 16:43:14 2008 -0500

    Bug #10465: Use calloc() for allocating PixmapRec's.

diff --git a/dix/pixmap.c b/dix/pixmap.c
index 82e388c..d4b4195 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -113,7 +113,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
     if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize)
 	return NullPixmap;
     
-    pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize);
+    pPixmap = (PixmapPtr)xcalloc(1, pScreen->totalPixmapSize + pixDataSize);
     if (!pPixmap)
 	return NullPixmap;
 
commit 5d5fcc7198ca54fa9dc24fe974763eff9fddabee
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Feb 29 16:42:04 2008 -0500

    Bug #10464: Set pixel value to 0 before FindColor()

diff --git a/dix/colormap.c b/dix/colormap.c
index c4c8c8b..8b1bad8 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -1006,6 +1006,7 @@ FakeAllocColor (ColormapPtr pmap, xColorItem *item)
     switch (class) {
     case GrayScale:
     case PseudoColor:
+	temp = 0;
 	item->pixel = 0;
 	if (FindColor(pmap, pmap->red, entries, &rgb, &temp, PSEUDOMAP,
 		      -1, AllComp) == Success) {
commit 8f0a4282f0ac33625eda9466e3db0bcef64e403a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Feb 29 16:39:29 2008 -0500

    Bug #10463: Always initialize reference pixel before AllocColor()

diff --git a/render/miindex.c b/render/miindex.c
index 0e12dca..4e0cf00 100644
--- a/render/miindex.c
+++ b/render/miindex.c
@@ -147,6 +147,7 @@ miBuildRenderColormap (ColormapPtr  pColormap, Pixel *pixels, int *nump)
 	for (g = 0; g < cube; g++)
 	    for (b = 0; b < cube; b++)
 	    {
+		pixel = 0;
 		red = (r * 65535 + (cube-1)/2) / (cube - 1);
 		green = (g * 65535 + (cube-1)/2) / (cube - 1);
 		blue = (b * 65535 + (cube-1)/2) / (cube - 1);
@@ -157,6 +158,7 @@ miBuildRenderColormap (ColormapPtr  pColormap, Pixel *pixels, int *nump)
 	    }
     for (g = 0; g < gray; g++)
     {
+	pixel = 0;
 	red = green = blue = (g * 65535 + (gray-1)/2) / (gray - 1);
 	if (AllocColor (pColormap, &red, &green, &blue, &pixel, 0) != Success)
 	    return FALSE;
commit b7eb92774a58639aff3f26bb28a3dcff910c3fb6
Author: Adam Jackson <ajax at redhat.com>
Date:   Sat Jan 12 01:22:05 2008 -0500

    EDID 1.4: Print additional CVT support data in the log.

diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index d9f18fa..f5442ad 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -27,6 +27,9 @@
 #include <xorg-config.h>
 #endif
 
+/* XXX kinda gross */
+#define _PARSE_EDID_
+
 #include "misc.h"
 #include "xf86.h"
 #include "xf86_OSproc.h"
@@ -350,23 +353,63 @@ print_detailed_monitor_section(int scrnIndex,
 	    xf86DrvMsg(scrnIndex,X_INFO,"Monitor name: %s\n",m[i].section.name);
 	    break;
 	case DS_RANGES:
+	{
+	    struct monitor_ranges *r = &m[i].section.ranges;
 	    xf86DrvMsg(scrnIndex,X_INFO,
-		       "Ranges: V min: %i  V max: %i Hz, H min: %i  H max: %i kHz,",
-		       m[i].section.ranges.min_v, m[i].section.ranges.max_v, 
-		       m[i].section.ranges.min_h, m[i].section.ranges.max_h);
-	    if (m[i].section.ranges.max_clock != 0)
-		xf86ErrorF(" PixClock max %i MHz\n",m[i].section.ranges.max_clock);
-	    else
+		       "Ranges: V min: %i V max: %i Hz, H min: %i H max: %i kHz,",
+		       r->min_v, r->max_v, r->min_h, r->max_h);
+	    if (r->max_clock_khz != 0) {
+		xf86ErrorF(" PixClock max %i kHz\n", r->max_clock_khz);
+		if (r->maxwidth)
+		    xf86DrvMsg(scrnIndex, X_INFO, "Maximum pixel width: %d\n",
+			       r->maxwidth);
+		xf86DrvMsg(scrnIndex, X_INFO, "Supported aspect ratios:");
+		if (r->supported_aspect & SUPPORTED_ASPECT_4_3)
+		    xf86ErrorF(" 4:3%s",
+			r->preferred_aspect == PREFERRED_ASPECT_4_3?"*":"");
+		if (r->supported_aspect & SUPPORTED_ASPECT_16_9)
+		    xf86ErrorF(" 16:9%s",
+			r->preferred_aspect == PREFERRED_ASPECT_16_9?"*":"");
+		if (r->supported_aspect & SUPPORTED_ASPECT_16_10)
+		    xf86ErrorF(" 16:10%s",
+			r->preferred_aspect == PREFERRED_ASPECT_16_10?"*":"");
+		if (r->supported_aspect & SUPPORTED_ASPECT_5_4)
+		    xf86ErrorF(" 5:4%s",
+			r->preferred_aspect == PREFERRED_ASPECT_5_4?"*":"");
+		if (r->supported_aspect & SUPPORTED_ASPECT_15_9)
+		    xf86ErrorF(" 15:9%s",
+			r->preferred_aspect == PREFERRED_ASPECT_15_9?"*":"");
+		xf86ErrorF("\n");
+		xf86DrvMsg(scrnIndex, X_INFO, "Supported blankings:");
+		if (r->supported_blanking & CVT_STANDARD)
+		    xf86ErrorF(" standard");
+		if (r->supported_blanking & CVT_REDUCED)
+		    xf86ErrorF(" reduced");
+		xf86ErrorF("\n");
+		xf86DrvMsg(scrnIndex, X_INFO, "Supported scalings:");
+		if (r->supported_scaling & SCALING_HSHRINK)
+		    xf86ErrorF(" hshrink");
+		if (r->supported_scaling & SCALING_HSTRETCH)
+		    xf86ErrorF(" hstretch");
+		if (r->supported_scaling & SCALING_VSHRINK)
+		    xf86ErrorF(" vshrink");
+		if (r->supported_scaling & SCALING_VSTRETCH)
+		    xf86ErrorF(" vstretch");
 		xf86ErrorF("\n");
-	    if (m[i].section.ranges.gtf_2nd_f > 0)
+		xf86DrvMsg(scrnIndex, X_INFO, "Preferred refresh rate: %d\n",
+			   r->preferred_refresh);
+	    } else if (r->max_clock != 0) {
+		xf86ErrorF(" PixClock max %i MHz\n", r->max_clock);
+	    } else {
+		xf86ErrorF("\n");
+	    }
+	    if (r->gtf_2nd_f > 0)
 		xf86DrvMsg(scrnIndex,X_INFO," 2nd GTF parameters: f: %i kHz "
-			   "c: %i m: %i k %i j %i\n",
-			   m[i].section.ranges.gtf_2nd_f,
-			   m[i].section.ranges.gtf_2nd_c,
-			   m[i].section.ranges.gtf_2nd_m,
-			   m[i].section.ranges.gtf_2nd_k,
-			   m[i].section.ranges.gtf_2nd_j);
+			   "c: %i m: %i k %i j %i\n", r->gtf_2nd_f,
+			   r->gtf_2nd_c, r->gtf_2nd_m, r->gtf_2nd_k,
+			   r->gtf_2nd_j);
 	    break;
+	}
 	case DS_STD_TIMINGS:
 	    for (j = 0; j<5; j++) 
 		xf86DrvMsg(scrnIndex,X_INFO,"#%i: hsize: %i  vsize %i  refresh: %i  "
commit 31014d88aff8dc8a502cf0f26e4cde141e1a92f5
Author: Adam Jackson <ajax at redhat.com>
Date:   Sat Jan 12 01:03:44 2008 -0500

    EDID 1.4: Decode additional CVT support information.
    
    Table 3.28: Display Range Limits & CVT Support Definition

diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index c034276..a4e79da 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -271,6 +271,39 @@
 #define K_2ND_GTF _K_2ND_GTF(c)
 #define _J_2ND_GTF(x) (x[17] / 2)
 #define J_2ND_GTF _J_2ND_GTF(c)
+#define _HAVE_CVT(x) (x[10] == 0x04)
+#define HAVE_CVT _HAVE_CVT(c)
+#define _MAX_CLOCK_KHZ(x) (x[12] >> 2)
+#define MAX_CLOCK_KHZ (MAX_CLOCK * 10000) - (_MAX_CLOCK_KHZ(c) * 250)
+#define _MAXWIDTH(x) ((x[13] == 0 ? 0 : x[13] + ((x[12] & 0x03) << 8)) * 8)
+#define MAXWIDTH _MAXWIDTH(c)
+#define _SUPPORTED_ASPECT(x) x[14]
+#define SUPPORTED_ASPECT _SUPPORTED_ASPECT(c)
+#define  SUPPORTED_ASPECT_4_3   0x80
+#define  SUPPORTED_ASPECT_16_9  0x40
+#define  SUPPORTED_ASPECT_16_10 0x20
+#define  SUPPORTED_ASPECT_5_4   0x10
+#define  SUPPORTED_ASPECT_15_9  0x08
+#define _PREFERRED_ASPECT(x) ((x[15] & 0xe0) >> 5)
+#define PREFERRED_ASPECT _PREFERRED_ASPECT(c)
+#define  PREFERRED_ASPECT_4_3   0
+#define  PREFERRED_ASPECT_16_9  1
+#define  PREFERRED_ASPECT_16_10 2
+#define  PREFERRED_ASPECT_5_4   3
+#define  PREFERRED_ASPECT_15_9  4
+#define _SUPPORTED_BLANKING(x) ((x[15] & 0x18) >> 3)
+#define SUPPORTED_BLANKING _SUPPORTED_BLANKING(c)
+#define  CVT_STANDARD 0x01
+#define  CVT_REDUCED  0x02
+#define _SUPPORTED_SCALING(x) ((x[16] & 0xf0) >> 4)
+#define SUPPORTED_SCALING _SUPPORTED_SCALING(c)
+#define  SCALING_HSHRINK  0x08
+#define  SCALING_HSTRETCH 0x04
+#define  SCALING_VSHRINK  0x02
+#define  SCALING_VSTRETCH 0x01
+#define _PREFERRED_REFRESH(x) x[17]
+#define PREFERRED_REFRESH _PREFERRED_REFRESH(c)
+
 #define MONITOR_NAME 0xFC
 #define ADD_COLOR_POINT 0xFB
 #define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2))
@@ -447,12 +480,19 @@ struct monitor_ranges {
   int max_v;
   int min_h;
   int max_h;
-  int max_clock;
+  int max_clock;    /* in mhz */
   int gtf_2nd_f;
   int gtf_2nd_c;
   int gtf_2nd_m;
   int gtf_2nd_k;
   int gtf_2nd_j;
+  int max_clock_khz;
+  int maxwidth;	    /* in pixels */
+  char supported_aspect;
+  char preferred_aspect;
+  char supported_blanking;
+  char supported_scaling;
+  int preferred_refresh; /* in hz */
 };
 
 struct whitePoints{
@@ -482,7 +522,7 @@ struct detailed_monitor_section {
     Uchar serial[13];
     Uchar ascii_data[13];
     Uchar name[13];
-    struct monitor_ranges ranges;	/* 40 */
+    struct monitor_ranges ranges;	/* 56 */
     struct std_timings std_t[5];	/* 80 */
     struct whitePoints wp[2];		/* 32 */
     /* color management data */
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 14b0fd7..21391dd 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -329,8 +329,21 @@ get_monitor_ranges(Uchar *c, struct monitor_ranges *r)
 	r->gtf_2nd_m = M_2ND_GTF;
 	r->gtf_2nd_k = K_2ND_GTF;
 	r->gtf_2nd_j = J_2ND_GTF;
-    } else
+    } else {
 	r->gtf_2nd_f = 0;
+    }
+    if (HAVE_CVT) {
+	r->max_clock_khz = MAX_CLOCK_KHZ;
+	r->max_clock = r->max_clock_khz / 1000;
+	r->maxwidth = MAXWIDTH;
+	r->supported_aspect = SUPPORTED_ASPECT;
+	r->preferred_aspect = PREFERRED_ASPECT;
+	r->supported_blanking = SUPPORTED_BLANKING;
+	r->supported_scaling = SUPPORTED_SCALING;
+	r->preferred_refresh = PREFERRED_REFRESH;
+    } else {
+	r->max_clock_khz = 0;
+    }
 }
 
 static void
commit d1c48955f80692a32ab6adcee1384e3d298f471a
Author: Adam Jackson <ajax at redhat.com>
Date:   Sat Jan 12 00:30:58 2008 -0500

    Fix CVT abuse in DDCModesFromStandardTiming.
    
    CVT is enough different from GTF that it should not be used on monitors
    that aren't expecting it.  This brings us closer to what the spec says
    the correct behaviour is.

diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index 2496e19..c034276 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -339,6 +339,8 @@
 #define STD_COLOR_SPACE(x) (x & 0x4)
 #define PREFERRED_TIMING_MODE(x) (x & 0x2)
 #define GFT_SUPPORTED(x) (x & 0x1)
+#define GTF_SUPPORTED(x) (x & 0x1)
+#define CVT_SUPPORTED(x) (x & 0x1)
 
 /* detailed timing misc */
 #define IS_INTERLACED(x)  (x) 
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 467f032..a9d6722 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -263,6 +263,22 @@ DDCModesFromEstablished(int scrnIndex, struct established_timings *timing,
     return Modes;
 }
 
+#define LEVEL_DMT 0
+#define LEVEL_GTF 1
+#define LEVEL_CVT 2
+
+static int
+MonitorStandardTimingLevel(xf86MonPtr DDC)
+{
+    if (DDC->ver.revision >= 2) {
+	if (DDC->ver.revision >= 4 && CVT_SUPPORTED(DDC->features.msc)) {
+	    return LEVEL_CVT;
+	}
+	return LEVEL_GTF;
+    }
+    return LEVEL_DMT;
+}
+
 /*
  * This is not really correct.  Appendix B of the EDID 1.4 spec defines
  * the right thing to do here.  If the timing given here matches a mode
@@ -282,16 +298,22 @@ DDCModesFromEstablished(int scrnIndex, struct established_timings *timing,
  * for modes in this section, but does say that CVT is preferred.
  */
 static DisplayModePtr
-DDCModesFromStandardTiming(int scrnIndex, struct std_timings *timing,
-			   ddc_quirk_t quirks)
+DDCModesFromStandardTiming(struct std_timings *timing, ddc_quirk_t quirks,
+			   int timing_level)
 {
     DisplayModePtr Modes = NULL, Mode = NULL;
     int i;
 
     for (i = 0; i < STD_TIMINGS; i++) {
         if (timing[i].hsize && timing[i].vsize && timing[i].refresh) {
-            Mode =  xf86CVTMode(timing[i].hsize, timing[i].vsize,
-                                timing[i].refresh, FALSE, FALSE);
+	    /* XXX check for DMT first, else... */
+	    if (timing_level == LEVEL_CVT)
+		Mode = xf86CVTMode(timing[i].hsize, timing[i].vsize,
+				   timing[i].refresh, FALSE, FALSE);
+	    else
+		Mode = xf86GTFMode(timing[i].hsize, timing[i].vsize,
+				   timing[i].refresh, FALSE, FALSE);
+
 	    Mode->type = M_T_DRIVER;
             Modes = xf86ModesAdd(Modes, Mode);
         }
@@ -565,6 +587,7 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC)
     DisplayModePtr  Modes = NULL, Mode;
     ddc_quirk_t	    quirks;
     Bool	    preferred;
+    int		    timing_level;
 
     xf86DrvMsg (scrnIndex, X_INFO, "EDID vendor \"%s\", prod id %d\n",
 		DDC->vendor.name, DDC->vendor.prod_id);
@@ -579,6 +602,8 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC)
     if (quirks & (DDC_QUIRK_PREFER_LARGE_60 | DDC_QUIRK_PREFER_LARGE_75))
 	preferred = FALSE;
 
+    timing_level = MonitorStandardTimingLevel(DDC);
+
     for (i = 0; i < DET_TIMINGS; i++) {
 	struct detailed_monitor_section *det_mon = &DDC->det_mon[i];
 
@@ -592,9 +617,8 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC)
             Modes = xf86ModesAdd(Modes, Mode);
             break;
         case DS_STD_TIMINGS:
-            Mode = DDCModesFromStandardTiming(scrnIndex,
-					      det_mon->section.std_t,
-					      quirks);
+            Mode = DDCModesFromStandardTiming(det_mon->section.std_t,
+					      quirks, timing_level);
             Modes = xf86ModesAdd(Modes, Mode);
             break;
 	case DS_CVT:
@@ -611,7 +635,7 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC)
     Modes = xf86ModesAdd(Modes, Mode);
 
     /* Add standard timings */
-    Mode = DDCModesFromStandardTiming(scrnIndex, DDC->timings2, quirks);
+    Mode = DDCModesFromStandardTiming(DDC->timings2, quirks, timing_level);
     Modes = xf86ModesAdd(Modes, Mode);
 
     if (quirks & DDC_QUIRK_PREFER_LARGE_60)
commit 26c2e95fa5bf30726356cf4bdd0fea32a771a179
Author: Adam Jackson <ajax at redhat.com>
Date:   Sat Jan 12 00:09:34 2008 -0500

    Nuke a duplicate SYMFUNC(xf86CVTMode)

diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 50a19b9..f86a143 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -348,9 +348,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     SYMFUNC(xf86AllocateEntityPrivateIndex)
     SYMFUNC(xf86GetEntityPrivate)
 
-    /* xf86cvt.c */
-    SYMFUNC(xf86CVTMode)
-
     /* xf86Configure.c */
     SYMFUNC(xf86AddDeviceToConfigure)
 
commit ca5625b911e65fdfd410247b3eff57fedcfc1f79
Author: Adam Jackson <ajax at redhat.com>
Date:   Sat Jan 12 00:08:00 2008 -0500

    Add xf86GTFMode().
    
    This should probably be shared like xf86CVTMode().

diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 754e9c0..50a19b9 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -949,6 +949,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     SYMFUNC(xf86CrtcSetSizeRange)
     SYMFUNC(xf86CrtcScreenInit)
     SYMFUNC(xf86CVTMode)
+    SYMFUNC(xf86GTFMode)
     SYMFUNC(xf86DisableUnusedFunctions)
     SYMFUNC(xf86DPMSSet)
     SYMFUNC(xf86DuplicateMode)
diff --git a/hw/xfree86/modes/Makefile.am b/hw/xfree86/modes/Makefile.am
index 6ee8575..331e406 100644
--- a/hw/xfree86/modes/Makefile.am
+++ b/hw/xfree86/modes/Makefile.am
@@ -5,6 +5,7 @@ libxf86modes_a_SOURCES = \
 	xf86Crtc.h \
 	xf86Cursors.c \
 	xf86cvt.c \
+	xf86gtf.c \
 	xf86DiDGA.c \
 	xf86EdidModes.c \
 	xf86Modes.c \
diff --git a/hw/xfree86/modes/xf86Modes.h b/hw/xfree86/modes/xf86Modes.h
index 9ad5ee6..5d49c93 100644
--- a/hw/xfree86/modes/xf86Modes.h
+++ b/hw/xfree86/modes/xf86Modes.h
@@ -62,6 +62,7 @@ DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new);
 DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
 DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh,
 			   Bool Reduced, Bool Interlaced);
+DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins);
 
 void
 xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
diff --git a/hw/xfree86/modes/xf86gtf.c b/hw/xfree86/modes/xf86gtf.c
new file mode 100644
index 0000000..acbac83
--- /dev/null
+++ b/hw/xfree86/modes/xf86gtf.c
@@ -0,0 +1,384 @@
+/*
+ * gtf.c  Generate mode timings using the GTF Timing Standard
+ *
+ * gcc gtf.c -o gtf -lm -Wall
+ *
+ * Copyright (c) 2001, Andy Ritger  aritger at nvidia.com
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * o Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * o 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.
+ * o Neither the name of NVIDIA 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 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.
+ *
+ * This program is based on the Generalized Timing Formula(GTF TM)
+ * Standard Version: 1.0, Revision: 1.0
+ *
+ * The GTF Document contains the following Copyright information:
+ *
+ * Copyright (c) 1994, 1995, 1996 - Video Electronics Standards
+ * Association. Duplication of this document within VESA member
+ * companies for review purposes is permitted. All other rights
+ * reserved.
+ *
+ * While every precaution has been taken in the preparation
+ * of this standard, the Video Electronics Standards Association and
+ * its contributors assume no responsibility for errors or omissions,
+ * and make no warranties, expressed or implied, of functionality
+ * of suitability for any purpose. The sample code contained within
+ * this standard may be used without restriction.
+ *
+ * 
+ *
+ * The GTF EXCEL(TM) SPREADSHEET, a sample (and the definitive)
+ * implementation of the GTF Timing Standard, is available at:
+ *
+ * ftp://ftp.vesa.org/pub/GTF/GTF_V1R1.xls
+ */
+
+/* Ruthlessly converted to server code by Adam Jackson <ajax at redhat.com> */
+
+#ifdef HAVE_XORG_CONFIG_H
+# include <xorg-config.h>
+#endif
+
+#include "xf86.h"
+#include "xf86Modes.h"
+#include <string.h>
+
+#define MARGIN_PERCENT    1.8   /* % of active vertical image                */
+#define CELL_GRAN         8.0   /* assumed character cell granularity        */
+#define MIN_PORCH         1     /* minimum front porch                       */
+#define V_SYNC_RQD        3     /* width of vsync in lines                   */
+#define H_SYNC_PERCENT    8.0   /* width of hsync as % of total line         */
+#define MIN_VSYNC_PLUS_BP 550.0 /* min time of vsync + back porch (microsec) */
+#define M                 600.0 /* blanking formula gradient                 */
+#define C                 40.0  /* blanking formula offset                   */
+#define K                 128.0 /* blanking formula scaling factor           */
+#define J                 20.0  /* blanking formula scaling factor           */
+
+/* C' and M' are part of the Blanking Duty Cycle computation */
+
+#define C_PRIME           (((C - J) * K/256.0) + J)
+#define M_PRIME           (K/256.0 * M)
+
+
+/*
+ * xf86GTFMode() - as defined by the GTF Timing Standard, compute the
+ * Stage 1 Parameters using the vertical refresh frequency.  In other
+ * words: input a desired resolution and desired refresh rate, and
+ * output the GTF mode timings.
+ *
+ * XXX All the code is in place to compute interlaced modes, but I don't
+ * feel like testing it right now.
+ *
+ * XXX margin computations are implemented but not tested (nor used by
+ * XServer of fbset mode descriptions, from what I can tell).
+ */
+
+_X_EXPORT DisplayModePtr
+xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins)
+{
+    DisplayModeRec *mode = xnfcalloc(1, sizeof(DisplayModeRec));
+
+    float h_pixels_rnd;
+    float v_lines_rnd;
+    float v_field_rate_rqd;
+    float top_margin;
+    float bottom_margin;
+    float interlace;
+    float h_period_est;
+    float vsync_plus_bp;
+    float v_back_porch;
+    float total_v_lines;
+    float v_field_rate_est;
+    float h_period;
+    float v_field_rate;
+    float v_frame_rate;
+    float left_margin;
+    float right_margin;
+    float total_active_pixels;
+    float ideal_duty_cycle;
+    float h_blank;
+    float total_pixels;
+    float pixel_freq;
+    float h_freq;
+
+    float h_sync;
+    float h_front_porch;
+    float v_odd_front_porch_lines;
+
+    /*  1. In order to give correct results, the number of horizontal
+     *  pixels requested is first processed to ensure that it is divisible
+     *  by the character size, by rounding it to the nearest character
+     *  cell boundary:
+     *
+     *  [H PIXELS RND] = ((ROUND([H PIXELS]/[CELL GRAN RND],0))*[CELLGRAN RND])
+     */
+    
+    h_pixels_rnd = rint((float) h_pixels / CELL_GRAN) * CELL_GRAN;
+    
+    /*  2. If interlace is requested, the number of vertical lines assumed
+     *  by the calculation must be halved, as the computation calculates
+     *  the number of vertical lines per field. In either case, the
+     *  number of lines is rounded to the nearest integer.
+     *   
+     *  [V LINES RND] = IF([INT RQD?]="y", ROUND([V LINES]/2,0),
+     *                                     ROUND([V LINES],0))
+     */
+
+    v_lines_rnd = interlaced ?
+            rint((float) v_lines) / 2.0 :
+            rint((float) v_lines);
+    
+    /*  3. Find the frame rate required:
+     *
+     *  [V FIELD RATE RQD] = IF([INT RQD?]="y", [I/P FREQ RQD]*2,
+     *                                          [I/P FREQ RQD])
+     */
+
+    v_field_rate_rqd = interlaced ? (freq * 2.0) : (freq);
+
+    /*  4. Find number of lines in Top margin:
+     *
+     *  [TOP MARGIN (LINES)] = IF([MARGINS RQD?]="Y",
+     *          ROUND(([MARGIN%]/100*[V LINES RND]),0),
+     *          0)
+     */
+
+    top_margin = margins ? rint(MARGIN_PERCENT / 100.0 * v_lines_rnd) : (0.0);
+
+    /*  5. Find number of lines in Bottom margin:
+     *
+     *  [BOT MARGIN (LINES)] = IF([MARGINS RQD?]="Y",
+     *          ROUND(([MARGIN%]/100*[V LINES RND]),0),
+     *          0)
+     */
+
+    bottom_margin = margins ? rint(MARGIN_PERCENT/100.0 * v_lines_rnd) : (0.0);
+
+    /*  6. If interlace is required, then set variable [INTERLACE]=0.5:
+     *   
+     *  [INTERLACE]=(IF([INT RQD?]="y",0.5,0))
+     */
+
+    interlace = interlaced ? 0.5 : 0.0;
+
+    /*  7. Estimate the Horizontal period
+     *
+     *  [H PERIOD EST] = ((1/[V FIELD RATE RQD]) - [MIN VSYNC+BP]/1000000) /
+     *                    ([V LINES RND] + (2*[TOP MARGIN (LINES)]) +
+     *                     [MIN PORCH RND]+[INTERLACE]) * 1000000
+     */
+
+    h_period_est = (((1.0/v_field_rate_rqd) - (MIN_VSYNC_PLUS_BP/1000000.0))
+                    / (v_lines_rnd + (2*top_margin) + MIN_PORCH + interlace)
+                    * 1000000.0);
+
+    /*  8. Find the number of lines in V sync + back porch:
+     *
+     *  [V SYNC+BP] = ROUND(([MIN VSYNC+BP]/[H PERIOD EST]),0)
+     */
+
+    vsync_plus_bp = rint(MIN_VSYNC_PLUS_BP/h_period_est);
+
+    /*  9. Find the number of lines in V back porch alone:
+     *
+     *  [V BACK PORCH] = [V SYNC+BP] - [V SYNC RND]
+     *
+     *  XXX is "[V SYNC RND]" a typo? should be [V SYNC RQD]?
+     */
+    
+    v_back_porch = vsync_plus_bp - V_SYNC_RQD;
+    
+    /*  10. Find the total number of lines in Vertical field period:
+     *
+     *  [TOTAL V LINES] = [V LINES RND] + [TOP MARGIN (LINES)] +
+     *                    [BOT MARGIN (LINES)] + [V SYNC+BP] + [INTERLACE] +
+     *                    [MIN PORCH RND]
+     */
+
+    total_v_lines = v_lines_rnd + top_margin + bottom_margin + vsync_plus_bp +
+        interlace + MIN_PORCH;
+    
+    /*  11. Estimate the Vertical field frequency:
+     *
+     *  [V FIELD RATE EST] = 1 / [H PERIOD EST] / [TOTAL V LINES] * 1000000
+     */
+
+    v_field_rate_est = 1.0 / h_period_est / total_v_lines * 1000000.0;
+    
+    /*  12. Find the actual horizontal period:
+     *
+     *  [H PERIOD] = [H PERIOD EST] / ([V FIELD RATE RQD] / [V FIELD RATE EST])
+     */
+
+    h_period = h_period_est / (v_field_rate_rqd / v_field_rate_est);
+    
+    /*  13. Find the actual Vertical field frequency:
+     *
+     *  [V FIELD RATE] = 1 / [H PERIOD] / [TOTAL V LINES] * 1000000
+     */
+
+    v_field_rate = 1.0 / h_period / total_v_lines * 1000000.0;
+
+    /*  14. Find the Vertical frame frequency:
+     *
+     *  [V FRAME RATE] = (IF([INT RQD?]="y", [V FIELD RATE]/2, [V FIELD RATE]))
+     */
+
+    v_frame_rate = interlaced ? v_field_rate / 2.0 : v_field_rate;
+
+    /*  15. Find number of pixels in left margin:
+     *
+     *  [LEFT MARGIN (PIXELS)] = (IF( [MARGINS RQD?]="Y",
+     *          (ROUND( ([H PIXELS RND] * [MARGIN%] / 100 /
+     *                   [CELL GRAN RND]),0)) * [CELL GRAN RND],
+     *          0))
+     */
+
+    left_margin = margins ?
+        rint(h_pixels_rnd * MARGIN_PERCENT / 100.0 / CELL_GRAN) * CELL_GRAN :
+        0.0;
+    
+    /*  16. Find number of pixels in right margin:
+     *
+     *  [RIGHT MARGIN (PIXELS)] = (IF( [MARGINS RQD?]="Y",
+     *          (ROUND( ([H PIXELS RND] * [MARGIN%] / 100 /
+     *                   [CELL GRAN RND]),0)) * [CELL GRAN RND],
+     *          0))
+     */
+    
+    right_margin = margins ?
+        rint(h_pixels_rnd * MARGIN_PERCENT / 100.0 / CELL_GRAN) * CELL_GRAN :
+        0.0;
+    
+    /*  17. Find total number of active pixels in image and left and right
+     *  margins:
+     *
+     *  [TOTAL ACTIVE PIXELS] = [H PIXELS RND] + [LEFT MARGIN (PIXELS)] +
+     *                          [RIGHT MARGIN (PIXELS)]
+     */
+
+    total_active_pixels = h_pixels_rnd + left_margin + right_margin;
+    
+    /*  18. Find the ideal blanking duty cycle from the blanking duty cycle
+     *  equation:
+     *
+     *  [IDEAL DUTY CYCLE] = [C'] - ([M']*[H PERIOD]/1000)
+     */
+
+    ideal_duty_cycle = C_PRIME - (M_PRIME * h_period / 1000.0);
+    
+    /*  19. Find the number of pixels in the blanking time to the nearest
+     *  double character cell:
+     *
+     *  [H BLANK (PIXELS)] = (ROUND(([TOTAL ACTIVE PIXELS] *
+     *                               [IDEAL DUTY CYCLE] /
+     *                               (100-[IDEAL DUTY CYCLE]) /
+     *                               (2*[CELL GRAN RND])), 0))
+     *                       * (2*[CELL GRAN RND])
+     */
+
+    h_blank = rint(total_active_pixels *
+                   ideal_duty_cycle /
+                   (100.0 - ideal_duty_cycle) /
+                   (2.0 * CELL_GRAN)) * (2.0 * CELL_GRAN);
+    
+    /*  20. Find total number of pixels:
+     *
+     *  [TOTAL PIXELS] = [TOTAL ACTIVE PIXELS] + [H BLANK (PIXELS)]
+     */
+
+    total_pixels = total_active_pixels + h_blank;
+    
+    /*  21. Find pixel clock frequency:
+     *
+     *  [PIXEL FREQ] = [TOTAL PIXELS] / [H PERIOD]
+     */
+    
+    pixel_freq = total_pixels / h_period;
+    
+    /*  22. Find horizontal frequency:
+     *
+     *  [H FREQ] = 1000 / [H PERIOD]
+     */
+
+    h_freq = 1000.0 / h_period;
+    
+
+    /* Stage 1 computations are now complete; I should really pass
+       the results to another function and do the Stage 2
+       computations, but I only need a few more values so I'll just
+       append the computations here for now */
+    
+
+    /*  17. Find the number of pixels in the horizontal sync period:
+     *
+     *  [H SYNC (PIXELS)] =(ROUND(([H SYNC%] / 100 * [TOTAL PIXELS] /
+     *                             [CELL GRAN RND]),0))*[CELL GRAN RND]
+     */
+
+    h_sync = rint(H_SYNC_PERCENT/100.0 * total_pixels / CELL_GRAN) * CELL_GRAN;
+
+    /*  18. Find the number of pixels in the horizontal front porch period:
+     *
+     *  [H FRONT PORCH (PIXELS)] = ([H BLANK (PIXELS)]/2)-[H SYNC (PIXELS)]
+     */
+
+    h_front_porch = (h_blank / 2.0) - h_sync;
+
+    /*  36. Find the number of lines in the odd front porch period:
+     *
+     *  [V ODD FRONT PORCH(LINES)]=([MIN PORCH RND]+[INTERLACE])
+     */
+    
+    v_odd_front_porch_lines = MIN_PORCH + interlace;
+    
+    /* finally, pack the results in the mode struct */
+
+    mode->HDisplay	= (int) (h_pixels_rnd);
+    mode->HSyncStart	= (int) (h_pixels_rnd + h_front_porch);
+    mode->HSyncEnd	= (int) (h_pixels_rnd + h_front_porch + h_sync);
+    mode->HTotal	= (int) (total_pixels);
+    mode->VDisplay	= (int) (v_lines_rnd);
+    mode->VSyncStart	= (int) (v_lines_rnd + v_odd_front_porch_lines);
+    mode->VSyncEnd	= (int) (v_lines_rnd + v_odd_front_porch_lines + V_SYNC_RQD);
+    mode->VTotal	= (int) (total_v_lines);
+
+    mode->Clock	    = (int) (pixel_freq * 1000.0);
+    mode->HSync	    = h_freq;
+    mode->VRefresh  = freq;
+
+    xf86SetModeDefaultName(mode);
+
+    mode->Flags = V_NHSYNC | V_PVSYNC;
+    if (interlaced) {
+	mode->VTotal *= 2;
+	mode->Flags |= V_INTERLACE;
+    }
+
+    return mode;
+}
commit 4cb4817c1072e1d31333db47d95f71d08bf0d1dc
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Jan 11 23:38:48 2008 -0500

    Remove the duplicate copy of xf86cvt.c

diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 4f0a2d6..0f44075 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -30,7 +30,7 @@ BUILT_SOURCES = xf86DefModeSet.c
 
 AM_LDFLAGS = -r
 libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
-                      xf86Cursor.c xf86cvt.c xf86DGA.c xf86DPMS.c \
+                      xf86Cursor.c xf86DGA.c xf86DPMS.c \
                       xf86DoProbe.c xf86Events.c \
                       xf86Globals.c xf86AutoConfig.c \
                       xf86MiscExt.c xf86Option.c \
diff --git a/hw/xfree86/common/xf86cvt.c b/hw/xfree86/common/xf86cvt.c
deleted file mode 100644
index f8185a3..0000000
--- a/hw/xfree86/common/xf86cvt.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Copyright 2005-2006 Luc Verhaegen.
- *
- * 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.
- */
-
-/*
- * The reason for having this function in a file of its own is
- * so that ../utils/cvt/cvt can link to it, and that xf86CVTMode
- * code is shared directly.
- */
-
-#include "xf86.h"
-
-/*
- * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh.
- *
- * These calculations are stolen from the CVT calculation spreadsheet written
- * by Graham Loveridge. He seems to be claiming no copyright and there seems to
- * be no license attached to this. He apparently just wants to see his name
- * mentioned.
- *
- * This file can be found at http://www.vesa.org/Public/CVT/CVTd6r1.xls
- *
- * Comments and structure corresponds to the comments and structure of the xls.
- * This should ease importing of future changes to the standard (not very
- * likely though).
- *
- * About margins; i'm sure that they are to be the bit between HDisplay and
- * HBlankStart, HBlankEnd and HTotal, VDisplay and VBlankStart, VBlankEnd and 
- * VTotal, where the overscan colour is shown. FB seems to call _all_ blanking
- * outside sync "margin" for some reason. Since we prefer seeing proper
- * blanking instead of the overscan colour, and since the Crtc* values will
- * probably get altered after us, we will disable margins altogether. With
- * these calculations, Margins will plainly expand H/VDisplay, and we don't
- * want that. -- libv
- *
- */
-_X_EXPORT DisplayModePtr
-xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
-            Bool Interlaced)
-{
-    DisplayModeRec  *Mode = xnfcalloc(1, sizeof(DisplayModeRec));
-
-    /* 1) top/bottom margin size (% of height) - default: 1.8 */
-#define CVT_MARGIN_PERCENTAGE 1.8    
-
-    /* 2) character cell horizontal granularity (pixels) - default 8 */
-#define CVT_H_GRANULARITY 8
-
-    /* 4) Minimum vertical porch (lines) - default 3 */
-#define CVT_MIN_V_PORCH 3
-
-    /* 4) Minimum number of vertical back porch lines - default 6 */
-#define CVT_MIN_V_BPORCH 6
-
-    /* Pixel Clock step (kHz) */
-#define CVT_CLOCK_STEP 250
-
-    Bool Margins = FALSE;
-    float  VFieldRate, HPeriod;
-    int  HDisplayRnd, HMargin;
-    int  VDisplayRnd, VMargin, VSync;
-    float  Interlace; /* Please rename this */
-
-    /* CVT default is 60.0Hz */
-    if (!VRefresh)
-        VRefresh = 60.0;
-
-    /* 1. Required field rate */
-    if (Interlaced)
-        VFieldRate = VRefresh * 2;
-    else
-        VFieldRate = VRefresh;
-
-    /* 2. Horizontal pixels */
-    HDisplayRnd = HDisplay - (HDisplay % CVT_H_GRANULARITY);
-
-    /* 3. Determine left and right borders */
-    if (Margins) {
-        /* right margin is actually exactly the same as left */
-        HMargin = (((float) HDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0);
-        HMargin -= HMargin % CVT_H_GRANULARITY;
-    } else
-        HMargin = 0;
-
-    /* 4. Find total active pixels */
-    Mode->HDisplay = HDisplayRnd + 2*HMargin;
-
-    /* 5. Find number of lines per field */
-    if (Interlaced)
-        VDisplayRnd = VDisplay / 2;
-    else
-        VDisplayRnd = VDisplay;
-
-    /* 6. Find top and bottom margins */
-    /* nope. */
-    if (Margins)
-        /* top and bottom margins are equal again. */
-        VMargin = (((float) VDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0);
-    else
-        VMargin = 0;
-
-    Mode->VDisplay = VDisplay + 2*VMargin;
-
-    /* 7. Interlace */
-    if (Interlaced)
-        Interlace = 0.5;
-    else
-        Interlace = 0.0;
-
-    /* Determine VSync Width from aspect ratio */
-    if (!(VDisplay % 3) && ((VDisplay * 4 / 3) == HDisplay))
-        VSync = 4;
-    else if (!(VDisplay % 9) && ((VDisplay * 16 / 9) == HDisplay))
-        VSync = 5;
-    else if (!(VDisplay % 10) && ((VDisplay * 16 / 10) == HDisplay))
-        VSync = 6;
-    else if (!(VDisplay % 4) && ((VDisplay * 5 / 4) == HDisplay))
-        VSync = 7;
-    else if (!(VDisplay % 9) && ((VDisplay * 15 / 9) == HDisplay))
-        VSync = 7;
-    else /* Custom */
-        VSync = 10;
-
-    if (!Reduced) { /* simplified GTF calculation */
-
-        /* 4) Minimum time of vertical sync + back porch interval (µs) 
-         * default 550.0 */
-#define CVT_MIN_VSYNC_BP 550.0
-
-        /* 3) Nominal HSync width (% of line period) - default 8 */
-#define CVT_HSYNC_PERCENTAGE 8
-
-        float  HBlankPercentage;
-        int  VSyncAndBackPorch, VBackPorch;
-        int  HBlank;
-
-        /* 8. Estimated Horizontal period */
-        HPeriod = ((float) (1000000.0 / VFieldRate - CVT_MIN_VSYNC_BP)) / 
-            (VDisplayRnd + 2 * VMargin + CVT_MIN_V_PORCH + Interlace);
-
-        /* 9. Find number of lines in sync + backporch */
-        if (((int)(CVT_MIN_VSYNC_BP / HPeriod) + 1) < (VSync + CVT_MIN_V_PORCH))
-            VSyncAndBackPorch = VSync + CVT_MIN_V_PORCH;
-        else
-            VSyncAndBackPorch = (int)(CVT_MIN_VSYNC_BP / HPeriod) + 1;
-
-        /* 10. Find number of lines in back porch */
-        VBackPorch = VSyncAndBackPorch - VSync;
-
-        /* 11. Find total number of lines in vertical field */
-        Mode->VTotal = VDisplayRnd + 2 * VMargin + VSyncAndBackPorch + Interlace
-            + CVT_MIN_V_PORCH;
-
-        /* 5) Definition of Horizontal blanking time limitation */
-        /* Gradient (%/kHz) - default 600 */
-#define CVT_M_FACTOR 600
-
-        /* Offset (%) - default 40 */
-#define CVT_C_FACTOR 40
-
-        /* Blanking time scaling factor - default 128 */
-#define CVT_K_FACTOR 128
-
-        /* Scaling factor weighting - default 20 */
-#define CVT_J_FACTOR 20
-
-#define CVT_M_PRIME CVT_M_FACTOR * CVT_K_FACTOR / 256
-#define CVT_C_PRIME (CVT_C_FACTOR - CVT_J_FACTOR) * CVT_K_FACTOR / 256 + \
-        CVT_J_FACTOR
-
-        /* 12. Find ideal blanking duty cycle from formula */
-        HBlankPercentage = CVT_C_PRIME - CVT_M_PRIME * HPeriod/1000.0;
-
-        /* 13. Blanking time */
-        if (HBlankPercentage < 20)
-            HBlankPercentage = 20;
-
-        HBlank = Mode->HDisplay * HBlankPercentage/(100.0 - HBlankPercentage);
-        HBlank -= HBlank % (2*CVT_H_GRANULARITY);
-        
-        /* 14. Find total number of pixels in a line. */
-        Mode->HTotal = Mode->HDisplay + HBlank;
-
-        /* Fill in HSync values */
-        Mode->HSyncEnd = Mode->HDisplay + HBlank / 2;
-
-        Mode->HSyncStart = Mode->HSyncEnd - 
-            (Mode->HTotal * CVT_HSYNC_PERCENTAGE) / 100;
-        Mode->HSyncStart += CVT_H_GRANULARITY - 
-            Mode->HSyncStart % CVT_H_GRANULARITY;
-
-        /* Fill in VSync values */
-        Mode->VSyncStart = Mode->VDisplay + CVT_MIN_V_PORCH;
-        Mode->VSyncEnd = Mode->VSyncStart + VSync;
-
-    } else { /* Reduced blanking */
-        /* Minimum vertical blanking interval time (µs) - default 460 */
-#define CVT_RB_MIN_VBLANK 460.0
-
-        /* Fixed number of clocks for horizontal sync */
-#define CVT_RB_H_SYNC 32.0
-
-        /* Fixed number of clocks for horizontal blanking */
-#define CVT_RB_H_BLANK 160.0
-
-        /* Fixed number of lines for vertical front porch - default 3 */
-#define CVT_RB_VFPORCH 3
-
-        int  VBILines;
-
-        /* 8. Estimate Horizontal period. */
-        HPeriod = ((float) (1000000.0 / VFieldRate - CVT_RB_MIN_VBLANK)) / 
-            (VDisplayRnd + 2*VMargin);
-
-        /* 9. Find number of lines in vertical blanking */
-        VBILines = ((float) CVT_RB_MIN_VBLANK) / HPeriod + 1;
-
-        /* 10. Check if vertical blanking is sufficient */
-        if (VBILines < (CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH))
-            VBILines = CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH;
-        
-        /* 11. Find total number of lines in vertical field */
-        Mode->VTotal = VDisplayRnd + 2 * VMargin + Interlace + VBILines;
-
-        /* 12. Find total number of pixels in a line */
-        Mode->HTotal = Mode->HDisplay + CVT_RB_H_BLANK;
-
-        /* Fill in HSync values */
-        Mode->HSyncEnd = Mode->HDisplay + CVT_RB_H_BLANK / 2;
-        Mode->HSyncStart = Mode->HSyncEnd - CVT_RB_H_SYNC;
-
-        /* Fill in VSync values */
-        Mode->VSyncStart = Mode->VDisplay + CVT_RB_VFPORCH;
-        Mode->VSyncEnd = Mode->VSyncStart + VSync;
-    }
-
-    /* 15/13. Find pixel clock frequency (kHz for xf86) */
-    Mode->Clock = Mode->HTotal * 1000.0 / HPeriod;
-    Mode->Clock -= Mode->Clock % CVT_CLOCK_STEP;
-
-    /* 16/14. Find actual Horizontal Frequency (kHz) */
-    Mode->HSync = ((float) Mode->Clock) / ((float) Mode->HTotal);
-
-    /* 17/15. Find actual Field rate */
-    Mode->VRefresh = (1000.0 * ((float) Mode->Clock)) / 
-        ((float) (Mode->HTotal * Mode->VTotal));
-
-    /* 18/16. Find actual vertical frame frequency */
-    /* ignore - just set the mode flag for interlaced */
-    if (Interlaced)
-        Mode->VTotal *= 2;
-
-    {
-        char  Name[256];
-        Name[0] = 0;
-
-        snprintf(Name, 256, "%dx%d", HDisplay, VDisplay);
-
-        Mode->name = xnfalloc(strlen(Name) + 1);
-        memcpy(Mode->name, Name, strlen(Name) + 1);
-    }
-
-    if (Reduced)
-        Mode->Flags |= V_PHSYNC | V_NVSYNC;
-    else
-        Mode->Flags |= V_NHSYNC | V_PVSYNC;
-
-    if (Interlaced)
-        Mode->Flags |= V_INTERLACE;
-
-    return Mode;
-}
diff --git a/hw/xfree86/modes/xf86cvt.c b/hw/xfree86/modes/xf86cvt.c
index 68a9462..e9c74aa 100644
--- a/hw/xfree86/modes/xf86cvt.c
+++ b/hw/xfree86/modes/xf86cvt.c
@@ -20,11 +20,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/**
- * @file This is a copy of xf86cvt.c from the X Server, for compatibility with
- * old servers (pre-1.2).
- */
-
 /*
  * The reason for having this function in a file of its own is
  * so that ../utils/cvt/cvt can link to it, and that xf86CVTMode
diff --git a/hw/xfree86/utils/cvt/Makefile.am b/hw/xfree86/utils/cvt/Makefile.am
index 365c6cb..4db175f 100644
--- a/hw/xfree86/utils/cvt/Makefile.am
+++ b/hw/xfree86/utils/cvt/Makefile.am
@@ -28,11 +28,13 @@
 
 bin_PROGRAMS = cvt
 
-INCLUDES = $(XORG_INCS)
+INCLUDES = $(XORG_INCS) \
+	   -I$(top_srcdir)/hw/xfree86/ddc \
+	   -I$(top_srcdir)/hw/xfree86/parser
 DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib
 
 # gah
-cvt_SOURCES = cvt.c $(top_srcdir)/hw/xfree86/common/xf86cvt.c
+cvt_SOURCES = cvt.c $(top_srcdir)/hw/xfree86/modes/xf86cvt.c
 cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
 cvt_LDADD = $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a
 
commit e65e51a99b17a0510782775f010e9820ca567fcb
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Jan 11 23:19:20 2008 -0500

    Constify the built-in mode tables.

diff --git a/hw/xfree86/common/modeline2c.awk b/hw/xfree86/common/modeline2c.awk
index d4b9649..b9ad3cd 100644
--- a/hw/xfree86/common/modeline2c.awk
+++ b/hw/xfree86/common/modeline2c.awk
@@ -44,8 +44,6 @@ BEGIN {
 	flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE"
 	flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE"
 
-	print "/* $" "XFree86$ */"
-	print
 	print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at"
 	print " * modeline2c.awk */"
 	print ""
@@ -68,12 +66,12 @@ BEGIN {
 	print ""
 	print "#include \"globals.h\""
 	print ""
-	print "#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT"
-	print "#define MODESUFFIX       0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0"
+	print "#define MODEPREFIX NULL, NULL, NULL, MODE_OK, M_T_DEFAULT"
+	print "#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0"
 	print ""
-	print "DisplayModeRec xf86DefaultModes [] = {"
+	print "const DisplayModeRec xf86DefaultModes [] = {"
 
-	modeline = "\t{MODEPREFIX(\"%dx%d\"),%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n"
+	modeline = "\t{MODEPREFIX,%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n"
 	modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+"
 }
 
@@ -81,10 +79,10 @@ BEGIN {
 	flags = $0
 	gsub(modeline_data, "", flags)
 	flags = tolower(flags)
-	printf(modeline, $4, $8, $3 * 1000, $4, $5, $6, $7,
+	printf(modeline, $3 * 1000, $4, $5, $6, $7,
 	       $8, $9, $10, $11, flagsdict[flags])
 	# Half-width double scanned modes
-	printf(modeline, $4/2, $8/2, $3 * 500, $4/2, $5/2, $6/2, $7/2,
+	printf(modeline, $3 * 500, $4/2, $5/2, $6/2, $7/2,
 	       $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN")
 }
 
@@ -93,5 +91,5 @@ BEGIN {
 }
 
 END {
-	printf("\t{MODEPREFIX(NULL),0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}\n};\n")
+	printf("\t{MODEPREFIX,0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}\n};\n")
 }
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index fb9ecae..dd8b5a0 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -153,7 +153,7 @@ Bool xf86PathIsSafe(const char *path);
 
 /* xf86DefaultModes */
 
-extern DisplayModeRec xf86DefaultModes [];
+extern const DisplayModeRec xf86DefaultModes[];
 
 /* xf86DoProbe.c */
 void DoProbe(void);
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 47b984d..467f032 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -221,27 +221,27 @@ static const ddc_quirk_map_t ddc_quirks[] = {
  * TODO:
  *  - for those with access to the VESA DMT standard; review please.
  */
-#define MODEPREFIX(name) NULL, NULL, name, 0,M_T_DRIVER
-#define MODESUFFIX   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
-
-static DisplayModeRec DDCEstablishedModes[17] = {
-    { MODEPREFIX("800x600"),    40000,  800,  840,  968, 1056, 0,  600,  601,  605,  628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600 at 60Hz */
-    { MODEPREFIX("800x600"),    36000,  800,  824,  896, 1024, 0,  600,  601,  603,  625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600 at 56Hz */
-    { MODEPREFIX("640x480"),    31500,  640,  656,  720,  840, 0,  480,  481,  484,  500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480 at 75Hz */
-    { MODEPREFIX("640x480"),    31500,  640,  664,  704,  832, 0,  480,  489,  491,  520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480 at 72Hz */
-    { MODEPREFIX("640x480"),    30240,  640,  704,  768,  864, 0,  480,  483,  486,  525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480 at 67Hz */
-    { MODEPREFIX("640x480"),    25200,  640,  656,  752,  800, 0,  480,  490,  492,  525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480 at 60Hz */
-    { MODEPREFIX("720x400"),    35500,  720,  738,  846,  900, 0,  400,  421,  423,  449, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 720x400 at 88Hz */
-    { MODEPREFIX("720x400"),    28320,  720,  738,  846,  900, 0,  400,  412,  414,  449, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400 at 70Hz */
-    { MODEPREFIX("1280x1024"), 135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024 at 75Hz */
-    { MODEPREFIX("1024x768"),   78800, 1024, 1040, 1136, 1312, 0,  768,  769,  772,  800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1024x768 at 75Hz */
-    { MODEPREFIX("1024x768"),   75000, 1024, 1048, 1184, 1328, 0,  768,  771,  777,  806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768 at 70Hz */
-    { MODEPREFIX("1024x768"),   65000, 1024, 1048, 1184, 1344, 0,  768,  771,  777,  806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768 at 60Hz */
-    { MODEPREFIX("1024x768"),   44900, 1024, 1032, 1208, 1264, 0,  768,  768,  776,  817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX }, /* 1024x768 at 43Hz */
-    { MODEPREFIX("832x624"),    57284,  832,  864,  928, 1152, 0,  624,  625,  628,  667, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 832x624 at 75Hz */
-    { MODEPREFIX("800x600"),    49500,  800,  816,  896, 1056, 0,  600,  601,  604,  625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600 at 75Hz */
-    { MODEPREFIX("800x600"),    50000,  800,  856,  976, 1040, 0,  600,  637,  643,  666, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600 at 72Hz */
-    { MODEPREFIX("1152x864"),  108000, 1152, 1216, 1344, 1600, 0,  864,  865,  868,  900, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1152x864 at 75Hz */
+#define MODEPREFIX NULL, NULL, NULL, 0, M_T_DRIVER
+#define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
+
+static const DisplayModeRec DDCEstablishedModes[17] = {
+    { MODEPREFIX,    40000,  800,  840,  968, 1056, 0,  600,  601,  605,  628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600 at 60Hz */
+    { MODEPREFIX,    36000,  800,  824,  896, 1024, 0,  600,  601,  603,  625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600 at 56Hz */
+    { MODEPREFIX,    31500,  640,  656,  720,  840, 0,  480,  481,  484,  500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480 at 75Hz */
+    { MODEPREFIX,    31500,  640,  664,  704,  832, 0,  480,  489,  491,  520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480 at 72Hz */
+    { MODEPREFIX,    30240,  640,  704,  768,  864, 0,  480,  483,  486,  525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480 at 67Hz */
+    { MODEPREFIX,    25200,  640,  656,  752,  800, 0,  480,  490,  492,  525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480 at 60Hz */
+    { MODEPREFIX,    35500,  720,  738,  846,  900, 0,  400,  421,  423,  449, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 720x400 at 88Hz */
+    { MODEPREFIX,    28320,  720,  738,  846,  900, 0,  400,  412,  414,  449, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400 at 70Hz */
+    { MODEPREFIX,   135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024 at 75Hz */
+    { MODEPREFIX,    78800, 1024, 1040, 1136, 1312, 0,  768,  769,  772,  800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1024x768 at 75Hz */
+    { MODEPREFIX,    75000, 1024, 1048, 1184, 1328, 0,  768,  771,  777,  806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768 at 70Hz */
+    { MODEPREFIX,    65000, 1024, 1048, 1184, 1344, 0,  768,  771,  777,  806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768 at 60Hz */
+    { MODEPREFIX,    44900, 1024, 1032, 1208, 1264, 0,  768,  768,  776,  817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX }, /* 1024x768 at 43Hz */
+    { MODEPREFIX,    57284,  832,  864,  928, 1152, 0,  624,  625,  628,  667, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 832x624 at 75Hz */
+    { MODEPREFIX,    49500,  800,  816,  896, 1056, 0,  600,  601,  604,  625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600 at 75Hz */
+    { MODEPREFIX,    50000,  800,  856,  976, 1040, 0,  600,  637,  643,  666, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600 at 72Hz */
+    { MODEPREFIX,   108000, 1152, 1216, 1344, 1600, 0,  864,  865,  868,  900, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1152x864 at 75Hz */
 };
 
 static DisplayModePtr
commit 6828d8fc2b464e0755f46e3fbdeb07be0c38b620
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Jan 11 22:57:42 2008 -0500

    Clean up DisplayModeRec handling in many places.
    
    Use xf86DuplicateMode() instead of rolling our own, and change
    malloc+memset to calloc.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 605c6b3..de3edf6 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2088,8 +2088,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
      */
     cmodep = conf_monitor->mon_modeline_lst;
     while( cmodep ) {
-        mode = xnfalloc(sizeof(DisplayModeRec));
-        memset(mode,'\0',sizeof(DisplayModeRec));
+        mode = xnfcalloc(1, sizeof(DisplayModeRec));
 	mode->type       = 0;
         mode->Clock      = cmodep->ml_clock;
         mode->HDisplay   = cmodep->ml_hdisplay;
@@ -2426,10 +2425,7 @@ addDefaultModes(MonPtr monitorp)
 	if ( ! modeIsPresent(xf86DefaultModes[i].name,monitorp) )
 	    do
 	    {
-		mode = xnfalloc(sizeof(DisplayModeRec));
-		memcpy(mode,&xf86DefaultModes[i],sizeof(DisplayModeRec));
-		if (xf86DefaultModes[i].name)
-		    mode->name = xnfstrdup(xf86DefaultModes[i].name);
+		mode = xf86DuplicateMode(&xf86DefaultModes[i]);
 		if( last ) {
 		    mode->prev = last;
 		    last->next = mode;
diff --git a/hw/xfree86/common/xf86cvt.c b/hw/xfree86/common/xf86cvt.c
index dfb6e71..f8185a3 100644
--- a/hw/xfree86/common/xf86cvt.c
+++ b/hw/xfree86/common/xf86cvt.c
@@ -56,7 +56,7 @@ _X_EXPORT DisplayModePtr
 xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
             Bool Interlaced)
 {
-    DisplayModeRec  *Mode = xnfalloc(sizeof(DisplayModeRec));
+    DisplayModeRec  *Mode = xnfcalloc(1, sizeof(DisplayModeRec));
 
     /* 1) top/bottom margin size (% of height) - default: 1.8 */
 #define CVT_MARGIN_PERCENTAGE 1.8    
@@ -79,8 +79,6 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
     int  VDisplayRnd, VMargin, VSync;
     float  Interlace; /* Please rename this */
 
-    memset(Mode, 0, sizeof(DisplayModeRec));
-
     /* CVT default is 60.0Hz */
     if (!VRefresh)
         VRefresh = 60.0;
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 13be785..a1f6748 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -625,14 +625,11 @@ fbdevHWSetVideoModes(ScrnInfoPtr pScrn)
 			pScrn->virtualY = mode->VDisplay;
 
 		if (NULL == pScrn->modes) {
-			pScrn->modes = xnfalloc(sizeof(DisplayModeRec));
-			this = pScrn->modes;
-			memcpy(this,mode,sizeof(DisplayModeRec));
+			this = pScrn->modes = xf86DuplicateMode(mode);
 			this->next = this;
 			this->prev = this;
 		} else {
-			this = xnfalloc(sizeof(DisplayModeRec));
-			memcpy(this,mode,sizeof(DisplayModeRec));
+			this = xf86DuplicateMode(mode);
 			this->next = pScrn->modes;
 			this->prev = last;
 			last->next = this;
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 3932839..47b984d 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -336,8 +336,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
                     " sync.\n", __func__, timing->h_active, timing->v_active);
     }
 
-    Mode = xnfalloc(sizeof(DisplayModeRec));
-    memset(Mode, 0, sizeof(DisplayModeRec));
+    Mode = xnfcalloc(1, sizeof(DisplayModeRec));
 
     Mode->type = M_T_DRIVER;
     if (preferred)
diff --git a/hw/xfree86/modes/xf86cvt.c b/hw/xfree86/modes/xf86cvt.c
index 69ccc42..68a9462 100644
--- a/hw/xfree86/modes/xf86cvt.c
+++ b/hw/xfree86/modes/xf86cvt.c
@@ -72,7 +72,7 @@ _X_EXPORT DisplayModePtr
 xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
 	    Bool Interlaced)
 {
-    DisplayModeRec  *Mode = xnfalloc(sizeof(DisplayModeRec));
+    DisplayModeRec  *Mode = xnfcalloc(1, sizeof(DisplayModeRec));
 
     /* 1) top/bottom margin size (% of height) - default: 1.8 */
 #define CVT_MARGIN_PERCENTAGE 1.8    
@@ -95,8 +95,6 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
     int  VDisplayRnd, VMargin, VSync;
     float  Interlace; /* Please rename this */
 
-    memset(Mode, 0, sizeof(DisplayModeRec));
-
     /* CVT default is 60.0Hz */
     if (!VRefresh)
         VRefresh = 60.0;
commit 85617b56e5e00e7b8c7d8ce5b49af289056921a7
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Jan 11 22:55:37 2008 -0500

    Remove some #if 0 guarding code duplicated in xf86Modes.c

diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index fb899a1..c1b0a5f 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -636,146 +636,6 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
     return MODE_OK;
 }
 
-
-#if 0
-/*
- * xf86SetModeCrtc
- *
- * Initialises the Crtc parameters for a mode.  The initialisation includes
- * adjustments for interlaced and double scan modes.
- */
-_X_EXPORT void
-xf86SetModeCrtc(DisplayModePtr p, int adjustFlags)
-{
-    if ((p == NULL) || ((p->type & M_T_CRTC_C) == M_T_BUILTIN))
-	return;
-
-    p->CrtcHDisplay             = p->HDisplay;
-    p->CrtcHSyncStart           = p->HSyncStart;
-    p->CrtcHSyncEnd             = p->HSyncEnd;
-    p->CrtcHTotal               = p->HTotal;
-    p->CrtcHSkew                = p->HSkew;
-    p->CrtcVDisplay             = p->VDisplay;
-    p->CrtcVSyncStart           = p->VSyncStart;
-    p->CrtcVSyncEnd             = p->VSyncEnd;
-    p->CrtcVTotal               = p->VTotal;
-    if (p->Flags & V_INTERLACE) {
-	if (adjustFlags & INTERLACE_HALVE_V) {
-	    p->CrtcVDisplay         /= 2;
-	    p->CrtcVSyncStart       /= 2;
-	    p->CrtcVSyncEnd         /= 2;
-	    p->CrtcVTotal           /= 2;
-	}
-	/* Force interlaced modes to have an odd VTotal */
-	/* maybe we should only do this when INTERLACE_HALVE_V is set? */
-	p->CrtcVTotal |= 1;
-    }
-
-    if (p->Flags & V_DBLSCAN) {
-        p->CrtcVDisplay         *= 2;
-        p->CrtcVSyncStart       *= 2;
-        p->CrtcVSyncEnd         *= 2;
-        p->CrtcVTotal           *= 2;
-    }
-    if (p->VScan > 1) {
-        p->CrtcVDisplay         *= p->VScan;
-        p->CrtcVSyncStart       *= p->VScan;
-        p->CrtcVSyncEnd         *= p->VScan;
-        p->CrtcVTotal           *= p->VScan;
-    }
-    p->CrtcVBlankStart = min(p->CrtcVSyncStart, p->CrtcVDisplay);
-    p->CrtcVBlankEnd = max(p->CrtcVSyncEnd, p->CrtcVTotal);
-    p->CrtcHBlankStart = min(p->CrtcHSyncStart, p->CrtcHDisplay);
-    p->CrtcHBlankEnd = max(p->CrtcHSyncEnd, p->CrtcHTotal);
-
-    p->CrtcHAdjusted = FALSE;
-    p->CrtcVAdjusted = FALSE;
-}
-#endif
-
-#if 0
-/**
- * Allocates and returns a copy of pMode, including pointers within pMode.
- */
-_X_EXPORT DisplayModePtr
-xf86DuplicateMode(DisplayModePtr pMode)
-{
-    DisplayModePtr pNew;
-
-    pNew = xnfalloc(sizeof(DisplayModeRec));
-    *pNew = *pMode;
-    pNew->next = NULL;
-    pNew->prev = NULL;
-    if (pNew->name == NULL) {
-	xf86SetModeDefaultName(pMode);
-    } else {
-	pNew->name = xnfstrdup(pMode->name);
-    }
-
-    return pNew;
-}
-
-/**
- * Duplicates every mode in the given list and returns a pointer to the first
- * mode.
- *
- * \param modeList doubly-linked mode list
- */
-_X_EXPORT DisplayModePtr
-xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList)
-{
-    DisplayModePtr first = NULL, last = NULL;
-    DisplayModePtr mode;
-
-    for (mode = modeList; mode != NULL; mode = mode->next) {
-	DisplayModePtr new;
-
-	new = xf86DuplicateMode(mode);
-
-	/* Insert pNew into modeList */
-	if (last) {
-	    last->next = new;
-	    new->prev = last;
-	} else {
-	    first = new;
-	    new->prev = NULL;
-	}
-	new->next = NULL;
-	last = new;
-    }
-
-    return first;
-}
-
-/**
- * Returns true if the given modes should program to the same timings.
- *
- * This doesn't use Crtc values, as it might be used on ModeRecs without the
- * Crtc values set.  So, it's assumed that the other numbers are enough.
- */
-_X_EXPORT Bool
-xf86ModesEqual(DisplayModePtr pMode1, DisplayModePtr pMode2)
-{
-     if (pMode1->Clock == pMode2->Clock &&
-	 pMode1->HDisplay == pMode2->HDisplay &&
-	 pMode1->HSyncStart == pMode2->HSyncStart &&
-	 pMode1->HSyncEnd == pMode2->HSyncEnd &&
-	 pMode1->HTotal == pMode2->HTotal &&
-	 pMode1->HSkew == pMode2->HSkew &&
-	 pMode1->VDisplay == pMode2->VDisplay &&
-	 pMode1->VSyncStart == pMode2->VSyncStart &&
-	 pMode1->VSyncEnd == pMode2->VSyncEnd &&
-	 pMode1->VTotal == pMode2->VTotal &&
-	 pMode1->VScan == pMode2->VScan &&
-	 pMode1->Flags == pMode2->Flags)
-     {
-	return TRUE;
-     } else {
-	return FALSE;
-     }
-}
-#endif
-
 /*
  * xf86CheckModeForMonitor
  *
commit fd41f46ac62033a724bd1f4612f19448a21c1224
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Jan 11 22:38:21 2008 -0500

    Allow xf86DuplicateMode() to work correctly on read-only modes.
    
    Before this it was meaningless to try to mark DisplayModeRec tables
    const, since the mode name would be emitted as a pointer to an
    anonymous string constant, and therefore would have to be fixed up by
    ld.so and so couldn't live in .rodata.  With this change the standard
    mode lists can live in .rodata, and modes duplicated from them will
    have their names filled in on the fly.

diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index 3d222cc..d6aa61a 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -214,10 +214,8 @@ xf86DuplicateMode(DisplayModePtr pMode)
     *pNew = *pMode;
     pNew->next = NULL;
     pNew->prev = NULL;
-    if (pNew->name == NULL) {
-	xf86SetModeDefaultName(pMode);
-    }
-    pNew->name = xnfstrdup(pMode->name);
+    if (pNew->name == NULL)
+	xf86SetModeDefaultName(pNew);
 
     return pNew;
 }
commit 8ac19d16a030ec416e30d3650cf43e024ada167f
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Jan 11 21:58:21 2008 -0500

    Add several comments documenting our EDID failures.

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index a1bdb0b..3932839 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -264,7 +264,22 @@ DDCModesFromEstablished(int scrnIndex, struct established_timings *timing,
 }
 
 /*
+ * This is not really correct.  Appendix B of the EDID 1.4 spec defines
+ * the right thing to do here.  If the timing given here matches a mode
+ * defined in the VESA DMT standard, we _must_ use that.  If the device
+ * supports CVT modes, then we should generate a CVT timing.  If both
+ * of the above fail, use GTF.
  *
+ * There are some wrinkles here.  EDID 1.1 and 1.0 sinks can't really
+ * "support" GTF, since it wasn't a standard yet; so if they ask for a
+ * timing in this section that isn't defined in DMT, returning a GTF mode
+ * may not actually be valid.  EDID 1.3 sinks often report support for
+ * some CVT modes, but they are not required to support CVT timings for
+ * modes in the standard timing descriptor, so we should _not_ treat them
+ * as CVT-compliant (unless specified in an extension block I suppose).
+ *
+ * EDID 1.4 requires that all sink devices support both GTF and CVT timings
+ * for modes in this section, but does say that CVT is preferred.
  */
 static DisplayModePtr
 DDCModesFromStandardTiming(int scrnIndex, struct std_timings *timing,
@@ -405,7 +420,11 @@ DDCModesFromCVT(int scrnIndex, struct cvt_timings *t)
 
 
 /*
- *
+ * This is only valid when the sink claims to be continuous-frequency
+ * but does not supply a detailed range descriptor.  Such sinks are
+ * arguably broken.  Currently the mode validation code isn't aware of
+ * this; the non-RANDR code even punts the decision of optional sync
+ * range checking to the driver.  Loss.
  */
 static void
 DDCGuessRangesFromModes(int scrnIndex, MonPtr Monitor, DisplayModePtr Modes)
@@ -623,10 +642,12 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
     Monitor->widthmm = 10 * DDC->features.hsize;
     Monitor->heightmm = 10 * DDC->features.vsize;
 
-    /* If this is a digital display, then we can use reduced blanking */
+    /*
+     * If this is a digital display, then we can use reduced blanking.
+     * XXX This is a 1.3 heuristic.  1.4 explicitly defines rb support.
+     */
     if (DDC->features.input_type)
         Monitor->reducedblanking = TRUE;
-    /* Allow the user to also enable this through config */
 
     Modes = xf86DDCGetModes(scrnIndex, DDC);
 
commit 13bfa5937d43392f686b76a99ea6331e3dce5987
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Fri Feb 29 15:10:36 2008 -0500

    GLX: Adjust to changes in DRI driver interface.

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index f9b28e4..dc15b0f 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -828,18 +828,38 @@ static void __glXReportDamage(__DRIdrawable *driDraw,
 }
 
 /* Table of functions that we export to the driver. */
-static const __DRIinterfaceMethods interface_methods = {
+static const __DRIcontextModesExtension contextModesExtension = {
+    { __DRI_CONTEXT_MODES, __DRI_CONTEXT_MODES_VERSION },
     _gl_context_modes_create,
     _gl_context_modes_destroy,
+};
 
-    getDrawableInfo,
-
+static const __DRIsystemTimeExtension systemTimeExtension = {
+    { __DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION },
     getUST,
-    NULL, /* glXGetMscRateOML, */
+    NULL,
+};
+
+static const __DRIgetDrawableInfoExtension getDrawableInfoExtension = {
+    { __DRI_GET_DRAWABLE_INFO, __DRI_GET_DRAWABLE_INFO_VERSION },
+    getDrawableInfo
+};
 
+static const __DRIdamageExtension damageExtension = {
+    { __DRI_DAMAGE, __DRI_DAMAGE_VERSION },
     __glXReportDamage,
 };
 
+static const __DRIextension *loader_extensions[] = {
+    &contextModesExtension.base,
+    &systemTimeExtension.base,
+    &getDrawableInfoExtension.base,
+    &damageExtension.base,
+    NULL
+};
+
+
+
 static const char dri_driver_path[] = DRI_DRIVER_PATH;
 
 static Bool
@@ -926,7 +946,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     __DRIframebuffer  framebuffer;
     int   fd = -1;
     int   status;
-    int api_ver = 20070121;
     drm_magic_t magic;
     drmVersionPtr version;
     int newlyopened;
@@ -1091,8 +1110,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
 			   &framebuffer,
 			   pSAREA,
 			   fd,
-			   api_ver,
-			   &interface_methods,
+			   loader_extensions,
 			   &screen->base.fbconfigs);
 
     if (screen->driScreen.private == NULL) {
diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c
index d1c8d41..b0082a0 100644
--- a/GL/glx/glxdri2.c
+++ b/GL/glx/glxdri2.c
@@ -414,18 +414,30 @@ static void __glXReportDamage(__DRIdrawable *driDraw,
 }
 
 /* Table of functions that we export to the driver. */
-static const __DRIinterfaceMethods interface_methods = {
+static const __DRIcontextModesExtension contextModesExtension = {
+    { __DRI_CONTEXT_MODES, __DRI_CONTEXT_MODES_VERSION },
     _gl_context_modes_create,
     _gl_context_modes_destroy,
+};
 
-    NULL,
-
+static const __DRIsystemTimeExtension systemTimeExtension = {
+    { __DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION },
     getUST,
     NULL,
+};
 
+static const __DRIdamageExtension damageExtension = {
+    { __DRI_DAMAGE, __DRI_DAMAGE_VERSION },
     __glXReportDamage,
 };
 
+static const __DRIextension *loader_extensions[] = {
+    &contextModesExtension.base,
+    &systemTimeExtension.base,
+    &damageExtension.base,
+    NULL
+};
+
 static const char dri_driver_path[] = DRI_DRIVER_PATH;
 
 static Bool
@@ -502,10 +514,6 @@ static __GLXscreen *
 __glXDRIscreenProbe(ScreenPtr pScreen)
 {
     __DRI2_CREATE_NEW_SCREEN_FUNC *createNewScreen;
-    __DRIversion   ddx_version;
-    __DRIversion   dri_version;
-    __DRIversion   drm_version;
-    drmVersionPtr version;
     const char *driverName;
     __GLXDRIscreen *screen;
     char filename[128];
@@ -522,9 +530,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
 	!DRI2Connect(pScreen,
 		     &screen->fd,
 		     &driverName,
-		     &ddx_version.major,
-		     &ddx_version.minor,
-		     &ddx_version.patch,
 		     &sareaHandle)) {
 	LogMessage(X_INFO,
 		   "AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum);
@@ -539,24 +544,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
 
     __glXInitExtensionEnableBits(screen->glx_enable_bits);
 
-    /* DRI protocol version. */
-    dri_version.major = XF86DRI_MAJOR_VERSION;
-    dri_version.minor = XF86DRI_MINOR_VERSION;
-    dri_version.patch = XF86DRI_PATCH_VERSION;
-
-    version = drmGetVersion(screen->fd);
-    if (version) {
-	drm_version.major = version->version_major;
-	drm_version.minor = version->version_minor;
-	drm_version.patch = version->version_patchlevel;
-	drmFreeVersion(version);
-    }
-    else {
-	drm_version.major = -1;
-	drm_version.minor = -1;
-	drm_version.patch = -1;
-    }
-
     snprintf(filename, sizeof filename, "%s/%s_dri.so",
              dri_driver_path, driverName);
 
@@ -577,12 +564,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
     screen->driScreen.private =
 	(*createNewScreen)(pScreen->myNum,
 			   &screen->driScreen,
-			   &ddx_version,
-			   &dri_version,
-			   &drm_version,
 			   screen->fd,
 			   sareaHandle,
-			   &interface_methods,
+			   loader_extensions,
 			   &screen->base.fbconfigs);
 
     if (screen->driScreen.private == NULL) {
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 3bc533e..9b4c18c 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -58,9 +58,6 @@ typedef struct _DRI2Screen {
     void			*sarea;
     unsigned int		 sareaSize;
     const char			*driverName;
-    int				 ddxVersionMajor;
-    int				 ddxVersionMinor;
-    int				 ddxVersionPatch;
 
     __DRIEventBuffer		*buffer;
     int				 locked;
@@ -330,7 +327,6 @@ DRI2DestroyDrawable(ScreenPtr pScreen, DrawablePtr pDraw)
 
 Bool
 DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName,
-	    int *ddxMajor, int *ddxMinor, int *ddxPatch,
 	    unsigned int *sareaHandle)
 {
     DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
@@ -340,9 +336,6 @@ DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName,
 
     *fd = ds->fd;
     *driverName = ds->driverName;
-    *ddxMajor = ds->ddxVersionMajor;
-    *ddxMinor = ds->ddxVersionMinor;
-    *ddxPatch = ds->ddxVersionPatch;
     *sareaHandle = ds->sareaBO.handle;
 
     return TRUE;
@@ -406,9 +399,6 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
 
     ds->fd = info->fd;
     ds->driverName		= info->driverName;
-    ds->ddxVersionMajor		= info->ddxVersionMajor;
-    ds->ddxVersionMinor		= info->ddxVersionMinor;
-    ds->ddxVersionPatch		= info->ddxVersionPatch;
 
     ds->getPixmapHandle		= info->getPixmapHandle;
     ds->beginClipNotify		= info->beginClipNotify;
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index c687a93..c848247 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -43,7 +43,6 @@ typedef struct {
     int fd;
     size_t driverSareaSize;
     const char *driverName;
-    int ddxVersionMajor, ddxVersionMinor, ddxVersionPatch;
     DRI2GetPixmapHandleProcPtr getPixmapHandle;
     DRI2BeginClipNotifyProcPtr beginClipNotify;
     DRI2EndClipNotifyProcPtr endClipNotify;
@@ -57,9 +56,6 @@ void DRI2CloseScreen(ScreenPtr pScreen);
 Bool DRI2Connect(ScreenPtr pScreen,
 		 int *fd,
 		 const char **driverName,
-		 int *ddxMajor,
-		 int *ddxMinor,
-		 int *ddxPatch,
 		 unsigned int *sareaHandle);
 
 unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap,
commit d04ea267a4a51c16088d9ef429681a1edde536b1
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 28 21:53:16 2008 -0500

    xselinux: Don't require device "read" permission for XQueryPointer.
    
    These keyboard and pointer state polling calls are a real problem.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 3aa62e2..9adc931 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -532,6 +532,17 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	dsubj->sid = subj->sid;
     }
 
+    /* XXX only check read permission on XQueryKeymap */
+    /* This is to allow the numerous apps that call XQueryPointer to work */
+    if (rec->access_mode & DixReadAccess) {
+	ClientPtr client = rec->client;
+	REQUEST(xReq);
+	if (stuff && stuff->reqType != X_QueryKeymap) {
+	    rec->access_mode &= ~DixReadAccess;
+	    rec->access_mode |= DixGetAttrAccess;
+	}
+    }
+
     rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DEVICE, rec->access_mode,
 			&auditdata);
     if (rc != Success)
commit 3fb17a3e647e926688c91a49a9b5b97f37dbc367
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 28 21:52:57 2008 -0500

    xselinux: Log messages to both libaudit and Xorg.0.log.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 98e1ec5..3aa62e2 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -497,6 +497,7 @@ SELinuxLog(int type, const char *fmt, ...)
     vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap);
     rc = audit_log_user_avc_message(audit_fd, aut, buf, NULL, NULL, NULL, 0);
     va_end(ap);
+    LogMessageVerb(X_WARNING, 0, "%s", buf);
     return 0;
 }
 
commit 4d91b1d5e422c5c460b1b7050baa9487a59b8aa8
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 28 21:52:32 2008 -0500

    XACE: Adjust the location of the COMPOSITE creation hook.
    Avoids incrementing the refcnt if the hook fails.

diff --git a/composite/compext.c b/composite/compext.c
index 97ea6d6..b3433f7 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -289,14 +289,14 @@ ProcCompositeNameWindowPixmap (ClientPtr client)
     if (!pPixmap)
 	return BadMatch;
 
-    ++pPixmap->refcnt;
-    
     /* security creation/labeling check */
     rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP,
 		  pPixmap, RT_WINDOW, pWin, DixCreateAccess);
     if (rc != Success)
 	return rc;
 
+    ++pPixmap->refcnt;
+
     if (!AddResource (stuff->pixmap, RT_PIXMAP, (pointer) pPixmap))
 	return BadAlloc;
 
commit 5675ae1f72145e9b719c613023da525731b42461
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 28 18:12:52 2008 -0500

    XACE: Call the creation hook to properly label COMPOSITE window pixmaps.

diff --git a/composite/compext.c b/composite/compext.c
index 2918556..97ea6d6 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -291,6 +291,12 @@ ProcCompositeNameWindowPixmap (ClientPtr client)
 
     ++pPixmap->refcnt;
     
+    /* security creation/labeling check */
+    rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP,
+		  pPixmap, RT_WINDOW, pWin, DixCreateAccess);
+    if (rc != Success)
+	return rc;
+
     if (!AddResource (stuff->pixmap, RT_PIXMAP, (pointer) pPixmap))
 	return BadAlloc;
 
commit 27bcf40cda1d7c52b189cc76528f1f51cbe1d5eb
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 28 16:43:43 2008 -0500

    XACE: Fix instances of DixUnknownAccess at hook callsites.

diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c
index 21f3206..32d1bc8 100644
--- a/GL/glx/glxcmds.c
+++ b/GL/glx/glxcmds.c
@@ -479,7 +479,7 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
      * resource ID clashes.  Effectively, the X Window is now also a
      * GLXWindow. */
 
-    rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess);
+    rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
     if (rc != Success || pDraw->type != DRAWABLE_WINDOW) {
 	client->errorValue = drawId;
 	*error = __glXError(GLXBadDrawable);
@@ -1086,7 +1086,7 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLcontextModes *c
     DrawablePtr pDraw;
     int err;
 
-    err = dixLookupDrawable(&pDraw, drawableId, client, 0, DixUnknownAccess);
+    err = dixLookupDrawable(&pDraw, drawableId, client, 0, DixAddAccess);
     if (err != Success || pDraw->type != DRAWABLE_PIXMAP) {
 	client->errorValue = drawableId;
 	return BadPixmap;
@@ -1364,7 +1364,7 @@ int __glXDisp_CreateWindow(__GLXclientState *cl, GLbyte *pc)
     if (!validGlxFBConfig(client, pGlxScreen, req->fbconfig, &config, &err))
 	return err;
 
-    err = dixLookupDrawable(&pDraw, req->window, client, 0, DixUnknownAccess);
+    err = dixLookupDrawable(&pDraw, req->window, client, 0, DixAddAccess);
     if (err != Success || pDraw->type != DRAWABLE_WINDOW) {
 	client->errorValue = req->window;
 	return BadWindow;
@@ -2004,7 +2004,7 @@ int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
     int screen, rc;
     __GLXscreen *pGlxScreen;
 
-    rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixUnknownAccess);
+    rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixGetAttrAccess);
     pGlxScreen = glxGetScreen(pDraw->pScreen);
     if (rc == Success && (pDraw->type == DRAWABLE_WINDOW)) {
 	screen = pDraw->pScreen->myNum;
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index d8ec588..f924147 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -919,7 +919,7 @@ ProcPanoramiXGetState(ClientPtr client)
 	register int			n, rc;
 	
 	REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
-	rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+	rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
 	if (rc != Success)
 	    return rc;
 
@@ -946,7 +946,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
 	register int			n, rc;
 
 	REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
-	rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+	rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
 	if (rc != Success)
 	    return rc;
 
@@ -972,7 +972,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
 	register int			n, rc;
 	
 	REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
-	rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+	rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
 	if (rc != Success)
 	    return rc;
 
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index d19b303..30aff74 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -525,7 +525,7 @@ int PanoramiXGetGeometry(ClientPtr client)
     REQUEST(xResourceReq);
 
     REQUEST_SIZE_MATCH(xResourceReq);
-    rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixUnknownAccess);
+    rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixGetAttrAccess);
     if (rc != Success)
 	return rc;
 
@@ -1024,7 +1024,7 @@ int PanoramiXCopyArea(ClientPtr client)
 
 	FOR_NSCREENS(j) {
 	    rc = dixLookupDrawable(drawables+j, src->info[j].id, client, 0,
-				   DixUnknownAccess);
+				   DixGetAttrAccess);
 	    if (rc != Success)
 		return rc;
 	}
@@ -1779,7 +1779,7 @@ int PanoramiXGetImage(ClientPtr client)
 	return (*SavedProcVector[X_GetImage])(client);
 
     rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
-			   DixUnknownAccess);
+			   DixReadAccess);
     if (rc != Success)
 	return rc;
 
@@ -1817,7 +1817,7 @@ int PanoramiXGetImage(ClientPtr client)
     drawables[0] = pDraw;
     for(i = 1; i < PanoramiXNumScreens; i++) {
 	rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
-			       DixUnknownAccess);
+			       DixGetAttrAccess);
 	if (rc != Success)
 	    return rc;
     }
diff --git a/Xext/shm.c b/Xext/shm.c
index a7a1ecf..b2973bf 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -655,7 +655,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
 	return ProcShmGetImage(client);
 
     rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
-			   DixUnknownAccess);
+			   DixReadAccess);
     if (rc != Success)
 	return rc;
 
@@ -692,7 +692,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
     drawables[0] = pDraw;
     for(i = 1; i < PanoramiXNumScreens; i++) {
 	rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0, 
-			       DixUnknownAccess);
+			       DixReadAccess);
 	if (rc != Success)
 	    return rc;
     }
@@ -767,7 +767,7 @@ ProcPanoramiXShmCreatePixmap(
 	return BadImplementation;
     LEGAL_NEW_RESOURCE(stuff->pid, client);
     rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY,
-			   DixUnknownAccess);
+			   DixGetAttrAccess);
     if (rc != Success)
 	return rc;
 
diff --git a/Xext/xprint.c b/Xext/xprint.c
index dba7989..a5d8fcc 100644
--- a/Xext/xprint.c
+++ b/Xext/xprint.c
@@ -1800,7 +1800,7 @@ ProcXpPutDocumentData(ClientPtr client)
 	if (pContext->state & DOC_RAW_STARTED)
 	    return BadDrawable;
 	result = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
-				   DixUnknownAccess);
+				   DixWriteAccess);
 	if (result != Success)
 	    return result;
 	if (pDraw->pScreen->myNum != pContext->screenNum)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index ac6b923..fb84bef 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -833,7 +833,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
 	} else
 	    effectiveFocus = pWin = inputFocus;
     } else
-	dixLookupWindow(&pWin, dest, client, DixUnknownAccess);
+	dixLookupWindow(&pWin, dest, client, DixSendAccess);
     if (!pWin)
 	return BadWindow;
     if ((propagate != xFalse) && (propagate != xTrue)) {
diff --git a/composite/compwindow.c b/composite/compwindow.c
index ee0f7d2..c022027 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -92,7 +92,7 @@ static Bool
 compRepaintBorder (ClientPtr pClient, pointer closure)
 {
     WindowPtr pWindow;
-    int rc = dixLookupWindow(&pWindow, (XID)closure, pClient,DixUnknownAccess);
+    int rc = dixLookupWindow(&pWindow, (XID)closure, pClient, DixWriteAccess);
 
     if (rc == Success) {
 	RegionRec exposed;
diff --git a/config/dbus.c b/config/dbus.c
index 0be42af..cef8ed5 100644
--- a/config/dbus.c
+++ b/config/dbus.c
@@ -213,7 +213,7 @@ remove_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
         MALFORMED_MESSAGE_ERROR();
     }
 
-    dixLookupDevice(&dev, deviceid, serverClient, DixUnknownAccess);
+    dixLookupDevice(&dev, deviceid, serverClient, DixDestroyAccess);
     if (!dev) {
         DebugF("[config/dbus] bogus device id %d given\n", deviceid);
         ret = BadMatch;
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 85e0f87..ab7ee96 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -431,7 +431,7 @@ int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
     __glXWindow *pGlxWindow = NULL;
     int rc;
 
-    rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixUnknownAccess);
+    rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixGetAttrAccess);
     if (rc != Success) {
 	pGlxPixmap = (__GLXpixmap *) LookupIDByType(req->drawable,
 						    __glXPixmapRes);
@@ -461,7 +461,7 @@ int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc)
     __glXWindow *pGlxWindow = NULL;
     int rc;
 
-    rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixUnknownAccess);
+    rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixManageAccess);
     if (rc != Success) {
 	pGlxPixmap = (__GLXpixmap *) LookupIDByType(req->drawable,
 						    __glXPixmapRes);
@@ -481,7 +481,7 @@ int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc)
 
     if (req->member != None) {
 	rc = dixLookupDrawable(&pMember, req->member, client, 0,
-			       DixUnknownAccess);
+			       DixGetAttrAccess);
 	if (rc != Success) {
 	    pGlxPixmap = (__GLXpixmap *) LookupIDByType(req->member,
 							__glXPixmapRes);
@@ -780,7 +780,7 @@ static int MakeCurrent(__GLXclientState *cl,
     }
 
     if (drawId != None) {
-	rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess);
+	rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
 	if (rc == Success) {
 	    if (pDraw->type == DRAWABLE_WINDOW) {
 		/*
@@ -887,7 +887,7 @@ static int MakeCurrent(__GLXclientState *cl,
     }
 
     if (readId != None && readId != drawId ) {
-	rc = dixLookupDrawable(&pReadDraw, readId, client, 0,DixUnknownAccess);
+	rc = dixLookupDrawable(&pReadDraw, readId, client, 0, DixReadAccess);
 	if (rc == Success) {
 	    if (pReadDraw->type == DRAWABLE_WINDOW) {
 		/*
@@ -1645,7 +1645,7 @@ static int CreateGLXPixmap(__GLXclientState *cl,
 #endif
 
     rc = dixLookupDrawable(&pDraw, pixmapId, client, M_DRAWABLE_PIXMAP,
-			   DixUnknownAccess);
+			   DixAddAccess);
     if (rc != Success)
 	return rc;
 
@@ -1779,7 +1779,7 @@ static int CreateGLXPixmap(__GLXclientState *cl,
 #ifdef PANORAMIX
        if (pXinDraw) {
 	   dixLookupDrawable(&pRealDraw, pXinDraw->info[s].id, client, 0,
-			     DixUnknownAccess);
+			     DixAddAccess);
        }
 #endif
 
@@ -1950,7 +1950,7 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
     /*
     ** Check that the GLX drawable is valid.
     */
-    rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess);
+    rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
     if (rc == Success) {
         from_screen = to_screen = pDraw->pScreen->myNum;
 
@@ -2104,7 +2104,7 @@ int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc)
     /*
     ** Check that the GLX drawable is valid.
     */
-    rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess);
+    rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
     if (rc == Success) {
 	if (pDraw->type != DRAWABLE_WINDOW) {
 	    /*
@@ -2893,7 +2893,7 @@ int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
     ** Check if windowId is valid 
     */
     rc = dixLookupDrawable(&pDraw, windowId, client, M_DRAWABLE_WINDOW,
-			   DixUnknownAccess);
+			   DixAddAccess);
     if (rc != Success)
 	return rc;
 
@@ -3277,7 +3277,7 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
 #endif
 
    if (drawId != None) {
-      rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess);
+      rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
       if (rc == Success) {
 	 if (pDraw->type == DRAWABLE_WINDOW) {
 		WindowPtr pWin = (WindowPtr)pDraw;
@@ -3438,7 +3438,7 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
 #endif
 
    if (drawId != None) {
-      rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess);
+      rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
       if (rc == Success) {
 	 if (pDraw->type == DRAWABLE_WINDOW) {
 		WindowPtr pWin = (WindowPtr)pDraw;
diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index 4a9d8e1..49d5eb6 100644
--- a/hw/xquartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -179,7 +179,7 @@ static int ProcPseudoramiXGetState(ClientPtr client)
     register int n, rc;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
-    rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
     if (rc != Success)
 	return rc;
 
@@ -206,7 +206,7 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
     register int n, rc;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
-    rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
     if (rc != Success)
 	return rc;
 
@@ -233,7 +233,7 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
     register int			n, rc;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
-    rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
     if (rc != Success)
 	return rc;
 
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 896f61f..240fca2 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -122,7 +122,7 @@ ProcRRXineramaGetState(ClientPtr client)
     Bool			active = FALSE;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
-    rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
     if(rc != Success)
 	return rc;
 
@@ -184,7 +184,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
     register int			n, rc;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
-    rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
     if (rc != Success)
 	return rc;
     
@@ -211,7 +211,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
     register int			n, rc;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
-    rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
     if (rc != Success)
 	return rc;
 
commit 453661a9e193a511cf5e54e6d330454163817316
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Wed Feb 27 20:43:50 2008 +1030

    Xi: swap the control attached to a ChangeDeviceControl request. Bug #14170
    
    Just swapping the request's data isn't enough, we need to swap the actual
    control as well.
    
    X.Org Bug 14170 <http://bugs.freedesktop.org/show_bug.cgi?id=14170>

diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 30174f4..89410d6 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -77,11 +77,46 @@ int
 SProcXChangeDeviceControl(ClientPtr client)
 {
     char n;
+    xDeviceCtl *ctl;
+    xDeviceAbsCalibCtl *calib;
+    xDeviceAbsAreaCtl *area;
 
     REQUEST(xChangeDeviceControlReq);
     swaps(&stuff->length, n);
     REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
     swaps(&stuff->control, n);
+    ctl = (xDeviceCtl*)&stuff[1];
+    swaps(&ctl->control, n);
+    swaps(&ctl->length, n);
+    switch(stuff->control) {
+        case DEVICE_ABS_CALIB:
+            calib = (xDeviceAbsCalibCtl*)ctl;
+            swaps(&calib->length, n);
+            swapl(&calib->min_x, n);
+            swapl(&calib->max_x, n);
+            swapl(&calib->min_y, n);
+            swapl(&calib->max_y, n);
+            swapl(&calib->flip_x, n);
+            swapl(&calib->flip_y, n);
+            swapl(&calib->rotation, n);
+            swapl(&calib->button_threshold, n);
+            break;
+        case DEVICE_ABS_AREA:
+            area = (xDeviceAbsAreaCtl*)ctl;
+            swapl(&area->offset_x, n);
+            swapl(&area->offset_y, n);
+            swapl(&area->width, n);
+            swapl(&area->height, n);
+            swapl(&area->screen, n);
+            swapl(&area->following, n);
+            break;
+        case DEVICE_CORE:
+        case DEVICE_ENABLE:
+        case DEVICE_RESOLUTION:
+            /* hmm. beer. *drool* */
+            break;
+
+    }
     return (ProcXChangeDeviceControl(client));
 }
 
commit aebd9dc252449747416b23c740a550d914275399
Author: Tiago Vignatti <vignatti at c3sl.ufpr.br>
Date:   Thu Feb 28 01:22:31 2008 -0300

    Oops, there's one more parenthesis.

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index c366a38..a1bdb0b 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -112,7 +112,7 @@ static Bool quirk_detailed_h_in_cm (int scrnIndex, xf86MonPtr DDC)
     /* Bug #12784: "LGPhilipsLCD LP154W01-TLA2" */
     /* Red Hat #435216 "LGPhilipsLCD LP154W01-TLAE" */
     if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
-	(DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00)
+	(DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00))
 	return TRUE;
 
     /* Bug #11603: Funai Electronics PM36B */
commit f616735f17a681e3add866bf199540327c322490
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Wed Feb 27 22:46:14 2008 -0500

    xselinux: Prefix a few remaining error messages with "SELinux".

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 6862bb3..98e1ec5 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -316,7 +316,7 @@ SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj,
 	    return Success; /* DixUnknownAccess requests OK ... for now */
 	if (errno == EACCES)
 	    return BadAccess;
-	ErrorF("ServerPerm: unexpected error %d\n", errno);
+	ErrorF("SELinux: avc_has_perm: unexpected error %d\n", errno);
 	return BadValue;
     }
 
@@ -348,7 +348,7 @@ SELinuxLabelClient(ClientPtr client)
 
 	/* For local clients, can get context from the socket */
 	if (getpeercon(fd, &ctx) < 0)
-	    FatalError("Client %d: couldn't get context from socket\n",
+	    FatalError("SELinux: client %d: couldn't get context from socket\n",
 		       client->index);
 
 	/* Try and determine the client's executable name */
@@ -375,13 +375,12 @@ SELinuxLabelClient(ClientPtr client)
     } else
 	/* For remote clients, need to use a default context */
 	if (selabel_lookup(label_hnd, &ctx, NULL, SELABEL_X_CLIENT) < 0)
-	    FatalError("Client %d: couldn't get default remote context\n",
-		       client->index);
+	    FatalError("SELinux: failed to look up remote-client context\n");
 
 finish:
     /* Get a SID from the context */
     if (avc_context_to_sid(ctx, &subj->sid) < 0)
-	FatalError("Client %d: context_to_sid(%s) failed\n",
+	FatalError("SELinux: client %d: context_to_sid(%s) failed\n",
 		   client->index, ctx);
 
     sidget(subj->sid);
@@ -410,11 +409,11 @@ SELinuxLabelInitial(void)
 
     /* Use the context of the X server process for the serverClient */
     if (getcon(&ctx) < 0)
-	FatalError("Couldn't get context of X server process\n");
+	FatalError("SELinux: couldn't get context of X server process\n");
 
     /* Get a SID from the context */
     if (avc_context_to_sid(ctx, &subj->sid) < 0)
-	FatalError("serverClient: context_to_sid(%s) failed\n", ctx);
+	FatalError("SELinux: serverClient: context_to_sid(%s) failed\n", ctx);
 
     sidget(subj->sid);
     obj->sid = subj->sid;
commit e40cc5305bec656108077ab13fcc8e6e82b3707a
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Wed Feb 27 22:29:15 2008 -0500

    xselinux: Don't throw BadAccess if DixUnknownAccess is passed in to a hook.
    
    The avc will still appear, however, so that the callsite can be fixed.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index d3fe86b..6862bb3 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -312,6 +312,8 @@ SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj,
 
     if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref,
 		     auditdata) < 0) {
+	if (mode == DixUnknownAccess)
+	    return Success; /* DixUnknownAccess requests OK ... for now */
 	if (errno == EACCES)
 	    return BadAccess;
 	ErrorF("ServerPerm: unexpected error %d\n", errno);
commit 3b1df47bd400be9dca34b5e5d1ac2b117f8cc4ed
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Wed Feb 27 22:28:54 2008 -0500

    XACE: Require "manage" permission for XKBSetNames.

diff --git a/xkb/xkb.c b/xkb/xkb.c
index b0d2f0d..07f57a7 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3545,7 +3545,7 @@ ProcXkbSetNames(ClientPtr client)
     if (!(client->xkbClientFlags&_XkbClientInitialized))
 	return BadAccess;
 
-    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixUnknownAccess);
+    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
     CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
 
     xkb = dev->key->xkbInfo->desc;
commit 08afc70513e5496cc5cd8b76c8658c4292119e4b
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Feb 28 10:45:41 2008 +1000

    quirks: another LPL panel with the cm/mm wrong

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index b865727..c366a38 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -110,8 +110,9 @@ static Bool quirk_detailed_h_in_cm (int scrnIndex, xf86MonPtr DDC)
 {
     /* Bug #10304: "LGPhilipsLCD LP154W01-A5" */
     /* Bug #12784: "LGPhilipsLCD LP154W01-TLA2" */
+    /* Red Hat #435216 "LGPhilipsLCD LP154W01-TLAE" */
     if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
-	DDC->vendor.prod_id == 0)
+	(DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00)
 	return TRUE;
 
     /* Bug #11603: Funai Electronics PM36B */
commit f6d51797a523ecc2d4a8f18b2681160fcd5d1d55
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Wed Feb 27 23:44:39 2008 +0100

    EXA: Let the driver decide what repeat/extend types are supported.

diff --git a/exa/exa_render.c b/exa/exa_render.c
index 6df2a23..38e2a04 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -696,8 +696,6 @@ exaComposite(CARD8	op,
 	    pMask->repeat = 0;
 
     if (pExaScr->info->PrepareComposite &&
-	(!pSrc->repeat || pSrc->repeatType == RepeatNormal) &&
-	(!pMask || !pMask->repeat || pMask->repeatType == RepeatNormal) &&
 	!pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap)
     {
 	Bool isSrcSolid;
commit 41aea6194bd29ab34cc166b3fd90eee64299ddf8
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Wed Feb 27 17:06:27 2008 +0000

    More checking for failed contexts/drawables

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 613ac05..f9b28e4 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -653,6 +653,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
 					   &context->driContext);
 
     if (context->driContext.private == NULL) {
+    	__glXenterServer(GL_FALSE);
+	retval = DRIDestroyContext(baseScreen->pScreen, context->hwContextID);
+    	__glXleaveServer(GL_FALSE);
 	xfree(context);
 	return NULL;
     }
@@ -703,6 +706,14 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
 						 &private->driDrawable,
 						 hwDrawable, 0, NULL);
 
+    if (private->driDrawable.private == NULL) {
+	__glXenterServer(GL_FALSE);
+	DRIDestroyDrawable(screen->pScreen, serverClient, pDraw);
+	__glXleaveServer(GL_FALSE);
+	xfree(private);
+	return NULL;
+    }
+
     return &private->base;
 }
 
commit 43e46a654fa7cf69f0c8bcb7f583008d96a98686
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Wed Feb 27 16:58:21 2008 +0000

    Fix context sharing between direct/indirect contexts

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index f51a531..613ac05 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -614,6 +614,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
     else
 	driShare = NULL;
 
+    if (baseShareContext && baseShareContext->isDirect)
+        return NULL;
+
     context = xalloc(sizeof *context);
     if (context == NULL)
 	return NULL;
@@ -649,6 +652,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
 					   hwContext,
 					   &context->driContext);
 
+    if (context->driContext.private == NULL) {
+	xfree(context);
+	return NULL;
+    }
+
     return &context->base;
 }
 
commit d74b0327e8355546e6b41e8ce684f461d65fa9dc
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Wed Feb 27 09:48:10 2008 +0100

    [Xephyr/GL] unbreak the build
    
    Don't touch Xephyr DRI stuff when not compiling in a DRI environment.

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 738704e..e95001d 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -841,6 +841,7 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs =
   ephyrWarpCursor
 };
 
+#ifdef XEPHYR_DRI
 /**
  * find if the remote window denoted by a_remote
  * is paired with an internal Window within the Xephyr server.
@@ -872,6 +873,7 @@ ephyrExposePairedWindow (int a_remote)
     screen->WindowExposures (pair->local, &reg, NullRegion);
     REGION_UNINIT (screen, &reg);
 }
+#endif /*XEPHYR_DRI*/
 
 void
 ephyrPoll(void)
@@ -948,6 +950,7 @@ ephyrPoll(void)
 	  KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE);
 	  break;
 
+#ifdef XEPHYR_DRI
 	case EPHYR_EV_EXPOSE:
 	  /*
 	   * We only receive expose events when the expose event have
@@ -957,6 +960,7 @@ ephyrPoll(void)
 	   */
 	  ephyrExposePairedWindow (ev.data.expose.window);
 	  break;
+#endif /*XEPHYR_DRI*/
 
 	default:
 	  break;
commit 2257e20900460d85254734b595238e7ad5ee55c8
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Wed Feb 27 17:15:28 2008 +1030

    dix: set dev->key to NULL after freeing it in CloseDevice. (Bug #12830)
    
    Otherwise XkbRemoveResourceClient may try to dereference it lateron.
    
    X.Org Bug 12830 <http://bugs.freedesktop.org/show_bug.cgi?id=12830>

diff --git a/dix/devices.c b/dix/devices.c
index bdcca5a..4b20655 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -529,6 +529,7 @@ CloseDevice(DeviceIntPtr dev)
 	xfree(dev->key->curKeySyms.map);
 	xfree(dev->key->modifierKeyMap);
 	xfree(dev->key);
+        dev->key = NULL;
     }
 
     if (dev->valuator) {
commit 3f0681fb0b2d0744c2ef892883ae5359b43a4a9a
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 26 23:14:29 2008 -0500

    xselinux: Stub out selection protocol requests.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 60ec8d4..d3fe86b 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -1283,6 +1283,24 @@ ProcSELinuxGetWindowContext(ClientPtr client)
 }
 
 static int
+ProcSELinuxSetSelectionCreateContext(ClientPtr client)
+{
+    return Success;
+}
+
+static int
+ProcSELinuxGetSelectionCreateContext(ClientPtr client)
+{
+    return Success;
+}
+
+static int
+ProcSELinuxGetSelectionContext(ClientPtr client)
+{
+    return Success;
+}
+
+static int
 ProcSELinuxDispatch(ClientPtr client)
 {
     REQUEST(xReq);
@@ -1313,6 +1331,12 @@ ProcSELinuxDispatch(ClientPtr client)
 	return ProcSELinuxGetWindowCreateContext(client);
     case X_SELinuxGetWindowContext:
 	return ProcSELinuxGetWindowContext(client);
+    case X_SELinuxSetSelectionCreateContext:
+	return ProcSELinuxSetSelectionCreateContext(client);
+    case X_SELinuxGetSelectionCreateContext:
+	return ProcSELinuxGetSelectionCreateContext(client);
+    case X_SELinuxGetSelectionContext:
+	return ProcSELinuxGetSelectionContext(client);
     default:
 	return BadRequest;
     }
@@ -1421,6 +1445,28 @@ SProcSELinuxGetWindowContext(ClientPtr client)
 }
 
 static int
+SProcSELinuxSetSelectionCreateContext(ClientPtr client)
+{
+    REQUEST(SELinuxSetCreateContextReq);
+    int n;
+
+    REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
+    swaps(&stuff->context_len, n);
+    return ProcSELinuxSetSelectionCreateContext(client);
+}
+
+static int
+SProcSELinuxGetSelectionContext(ClientPtr client)
+{
+    REQUEST(SELinuxGetContextReq);
+    int n;
+
+    REQUEST_SIZE_MATCH(SELinuxGetContextReq);
+    swapl(&stuff->id, n);
+    return ProcSELinuxGetSelectionContext(client);
+}
+
+static int
 SProcSELinuxDispatch(ClientPtr client)
 {
     REQUEST(xReq);
@@ -1455,6 +1501,12 @@ SProcSELinuxDispatch(ClientPtr client)
 	return ProcSELinuxGetWindowCreateContext(client);
     case X_SELinuxGetWindowContext:
 	return SProcSELinuxGetWindowContext(client);
+    case X_SELinuxSetSelectionCreateContext:
+	return SProcSELinuxSetSelectionCreateContext(client);
+    case X_SELinuxGetSelectionCreateContext:
+	return ProcSELinuxGetSelectionCreateContext(client);
+    case X_SELinuxGetSelectionContext:
+	return SProcSELinuxGetSelectionContext(client);
     default:
 	return BadRequest;
     }
diff --git a/Xext/xselinux.h b/Xext/xselinux.h
index 7eeea50..4802761 100644
--- a/Xext/xselinux.h
+++ b/Xext/xselinux.h
@@ -43,6 +43,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define X_SELinuxSetWindowCreateContext		10
 #define X_SELinuxGetWindowCreateContext		11
 #define X_SELinuxGetWindowContext		12
+#define X_SELinuxSetSelectionCreateContext	13
+#define X_SELinuxGetSelectionCreateContext	14
+#define X_SELinuxGetSelectionContext		15
 
 typedef struct {
     CARD8   reqType;
commit 4632ea22580c31d44b0786321668d9e78f02900e
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 26 22:00:52 2008 -0500

    xselinux: Rip out the selection code in advance of polyinstantiation support.
    
    This resolves an issue where BadWindow errors were being thrown.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 5aa2ad3..60ec8d4 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -951,42 +951,11 @@ static void
 SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     SelectionInfoRec *rec = calldata;
-    SELinuxSubjectRec *subj;
-    SELinuxObjectRec *obj;
 
     switch (rec->kind) {
     case SelectionSetOwner:
-	/* save off the "real" owner of the selection */
-	rec->selection->alt_client = rec->selection->client;
-	rec->selection->alt_window = rec->selection->window;
-
-	/* figure out the new label for the content */
-	subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
-	obj = dixLookupPrivate(&rec->selection->devPrivates, objectKey);
-	sidput(obj->sid);
-
-	if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SELECTION,
-			       &obj->sid) < 0) {
-	    ErrorF("SELinux: a compute_create call failed!\n");
-	    obj->sid = unlabeled_sid;
-	}
-	break;
-
     case SelectionGetOwner:
-	/* restore the real owner */
-	rec->selection->window = rec->selection->alt_window;
-	break;
-
     case SelectionConvertSelection:
-	/* redirect the convert request if necessary */
-	if (securityManager && securityManager != rec->client) {
-	    rec->selection->client = securityManager;
-	    rec->selection->window = securityWindow;
-	} else {
-	    rec->selection->client = rec->selection->alt_client;
-	    rec->selection->window = rec->selection->alt_window;
-	}
-	break;
     default:
 	break;
     }
commit c8e979b3b800e4c58be454daa0213285d4ee6510
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 26 21:34:22 2008 -0500

    security: Register resource names in the server-side name registry.

diff --git a/Xext/security.c b/Xext/security.c
index 27ef382..cd67120 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -1105,6 +1105,8 @@ SecurityExtensionInit(INITARGS)
 	return;
 
     RTEventClient |= RC_NEVERRETAIN;
+    RegisterResourceName(SecurityAuthorizationResType, "SecurityAuthorization");
+    RegisterResourceName(RTEventClient, "SecurityEventClient");
 
     /* Allocate the private storage */
     if (!dixRequestPrivate(stateKey, sizeof(SecurityStateRec)))
commit d12b7b6632fb4cf41d2e28c7792eaa503f25404a
Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Feb 27 07:08:00 2008 +1000

    xf86Crtc: add higher level modesetting entry point.
    
    For kernel modesetting work we need a bigger stick to beat the modesetting path

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 4ecf4b3..266e081 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -236,6 +236,9 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
     int			saved_x, saved_y;
     Rotation		saved_rotation;
 
+    if (crtc->funcs->set_mode_major)
+	return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y);
+	
     crtc->enabled = xf86CrtcInUse (crtc);
     
     if (!crtc->enabled)
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 62d85bb..cc045b2 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -206,6 +206,13 @@ typedef struct _xf86CrtcFuncs {
      */
     void
     (*destroy) (xf86CrtcPtr	crtc);
+
+    /**
+     * Less fine-grained mode setting entry point for kernel modesetting
+     */
+    Bool
+    (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode,
+		      Rotation rotation, int x, int y);
 } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
 
 struct _xf86Crtc {
commit dcc077c753137f37aa58231f1df3c4adb92b2c4b
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Tue Feb 26 12:13:06 2008 +0100

    AIGLX: Switch to server context for calling DamageDamageRegion().
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=14518 .

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 304fed2..f51a531 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -798,10 +798,14 @@ static void __glXReportDamage(__DRIdrawable *driDraw,
     DrawablePtr pDraw = drawable->base.pDraw;
     RegionRec region;
 
+    __glXenterServer(GL_FALSE);
+
     REGION_INIT(pDraw->pScreen, &region, (BoxPtr) rects, num_rects);
     REGION_TRANSLATE(pScreen, &region, pDraw->x, pDraw->y);
     DamageDamageRegion(pDraw, &region);
     REGION_UNINIT(pDraw->pScreen, &region);
+
+    __glXleaveServer(GL_FALSE);
 }
 
 /* Table of functions that we export to the driver. */
commit c46f7b62d2bf9f35937cfef98325ed904895396a
Author: Tiago Vignatti <vignatti at c3sl.ufpr.br>
Date:   Mon Feb 25 18:14:08 2008 -0300

    Fine, we don't need pciInit() anymore. Nuke, nuke, nuke...

diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index 8b21fad..064533c 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -148,22 +148,6 @@ _X_EXPORT int            pciNumBuses = 0;     /* Actual number of PCI buses */
 int            pciMaxBusNum = MAX_PCI_BUSES;
 
 
-/*
- * pciInit - choose correct platform/OS specific PCI init routine
- */
-static void
-pciInit(void)
-{
-	/* XXX */
-#if defined(DEBUGPCI)
-	if (DEBUGPCI >= xf86Verbose) {
-	    xf86Verbose = DEBUGPCI;
-	}
-#endif
-
-	ARCH_PCI_INIT();
-}
-
 _X_EXPORT ADDRESS
 pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
 {
@@ -194,7 +178,16 @@ xf86scanpci(void)
     Bool  success = FALSE;
 
     success = (pci_system_init() == 0);
-    pciInit();
+
+	/* XXX */
+#if defined(DEBUGPCI)
+	if (DEBUGPCI >= xf86Verbose) {
+	    xf86Verbose = DEBUGPCI;
+	}
+#endif
+
+    /* choose correct platform/OS specific PCI init routine */
+	ARCH_PCI_INIT();
 
     return success;
 }
commit a9050d54249ed9f54c6fe59143b846c9c7548f59
Author: Tiago Vignatti <vignatti at c3sl.ufpr.br>
Date:   Mon Feb 25 18:10:18 2008 -0300

    Jesus, pciInit() was called 32 times in my machine without need!
    
    xf86scanpci() will always call pciInit() before any other function, so
    there's no need to guarantee it after.

diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index 2d3f748..8b21fad 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -154,11 +154,6 @@ int            pciMaxBusNum = MAX_PCI_BUSES;
 static void
 pciInit(void)
 {
-    static int pciInitialized = 0;
-
-    if (!pciInitialized) {
-	pciInitialized = 1;
-
 	/* XXX */
 #if defined(DEBUGPCI)
 	if (DEBUGPCI >= xf86Verbose) {
@@ -167,7 +162,6 @@ pciInit(void)
 #endif
 
 	ARCH_PCI_INIT();
-    }
 }
 
 _X_EXPORT ADDRESS
@@ -175,8 +169,6 @@ pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
 {
   int bus = PCI_BUS_FROM_TAG(tag);
 
-  pciInit();
-
   if ((bus >= 0) && (bus < pciNumBuses) && pciBusInfo[bus] &&
 	pciBusInfo[bus]->funcs->pciAddrBusToHost)
 	  return (*pciBusInfo[bus]->funcs->pciAddrBusToHost)(tag, type, addr);
commit 81272f7ec9a3465e1d102c2ce627a45f92268857
Author: Tiago Vignatti <vignatti at c3sl.ufpr.br>
Date:   Mon Feb 25 17:39:33 2008 -0300

    Some doc clean up:
        clean up legacy things in os-support/bus/Pci.c.
    
        Put InitOutput() comment to its right place.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 7121b02..d1603c0 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -198,13 +198,6 @@ xf86CreateRootWindow(WindowPtr pWin)
 }
 
 
-/*
- * InitOutput --
- *	Initialize screenInfo for all actually accessible framebuffers.
- *      That includes vt-manager setup, querying all possible devices and
- *      collecting the pixmap formats.
- */
-
 static void
 PostConfigInit(void)
 {
@@ -467,7 +460,12 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only )
     return foundScreen;
 }
 
-
+/*
+ * InitOutput --
+ *	Initialize screenInfo for all actually accessible framebuffers.
+ *      That includes vt-manager setup, querying all possible devices and
+ *      collecting the pixmap formats.
+ */
 void
 InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
 {
diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index 1ca0bd0..2d3f748 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -1,65 +1,4 @@
 /*
- * Pci.c - New server PCI access functions
- *
- * The XFree86 server PCI access functions have been reimplemented as a
- * framework that allows each supported platform/OS to have their own
- * platform/OS specific pci driver.
- *
- * All of the public PCI access functions exported to the other parts of
- * the server are declared in Pci.h and defined herein.  These include:
- *	pciInit()              - Initialize PCI access functions
- *	pciReadLong()          - Read a 32 bit value from a device's cfg space
- *	pciReadWord()          - Read a 16 bit value from a device's cfg space
- *	pciReadByte()          - Read an 8 bit value from a device's cfg space
- *	pciWriteLong()         - Write a 32 bit value to a device's cfg space
- *	pciWriteWord()         - Write a 16 bit value to a device's cfg space
- *	pciWriteByte()         - Write an 8 bit value to a device's cfg space
- *	pciSetBitsLong()       - Write a 32 bit value against a mask
- *	pciSetBitsByte()       - Write an 8 bit value against a mask
- *	pciTag()               - Return tag for a given PCI bus, device, &
- *                               function
- *	pciBusAddrToHostAddr() - Convert a PCI address to a host address
- *	xf86scanpci()          - Return info about all PCI devices
- *	xf86MapDomainMemory()  - Like xf86MapPciMem() but can handle
- *                               domain/host address translation
- *	xf86MapLegacyIO()      - Maps PCI I/O spaces
- *
- * The actual PCI backend driver is selected by the pciInit() function
- * (see below)  using either compile time definitions, run-time checks,
- * or both.
- *
- * Certain generic functions are provided that make the implementation
- * of certain well behaved platforms (e.g. those supporting PCI config
- * mechanism 1 or some thing close to it) very easy.
- *
- * Less well behaved platforms/OS's can roll their own functions.
- *
- * To add support for another platform/OS, add a call to fooPciInit() within
- * pciInit() below under the correct compile time definition or run-time
- * conditional.
- *
- * The fooPciInit() procedure must do three things:
- *	1) Initialize the pciBusTable[] for all primary PCI buses including
- *	   the per domain PCI access functions (readLong, writeLong,
- *	   addrBusToHost, and addrHostToBus).
- *
- *	2) Add entries to pciBusTable[] for configured secondary buses.  This
- *	   step may be skipped if a platform is using the generic findFirst/
- *	   findNext functions because these procedures will automatically
- *	   discover and add secondary buses dynamically.
- *
- *      3) Overide default settings for global PCI access functions if
- *	   required. These include pciFindFirstFP, pciFindNextFP,
- *	   Of course, if you choose not to use one of the generic
- *	   functions, you will need to provide a platform specifc replacement.
- *
- * 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
@@ -197,14 +136,6 @@
 
 #include <pciaccess.h>
 
-#if 0
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#endif
-
 #define PCI_MFDEV_SUPPORT   1 /* Include PCI multifunction device support */
 #define PCI_BRIDGE_SUPPORT  1 /* Include support for PCI-to-PCI bridges */
 
commit 7c582dd6de27d2f4fedf73319d2dea2bfb240efa
Author: Tiago Vignatti <vignatti at c3sl.ufpr.br>
Date:   Mon Feb 25 17:31:37 2008 -0300

    remove lnxPciInit() unused function.

diff --git a/hw/xfree86/os-support/linux/lnx_pci.c b/hw/xfree86/os-support/linux/lnx_pci.c
index 53818f2..8eedfa4 100644
--- a/hw/xfree86/os-support/linux/lnx_pci.c
+++ b/hw/xfree86/os-support/linux/lnx_pci.c
@@ -25,8 +25,6 @@
 #define PCIADDR_FMT		"%lx"
 #endif
 
-int lnxPciInit(void);
-
 struct pci_dev {
     unsigned int domain;
     unsigned int bus;
@@ -139,14 +137,6 @@ static struct pci_dev *xf86OSLinuxGetPciDevs(void) {
     return ret;
 }
 
-/* not to be confused with linuxPciInit (i.e. ARCH_PCI_INIT), found in
- * os-support/bus/linuxPci.c. */
-int lnxPciInit(void) {
-    if (!xf86OSLinuxPCIDevs)
-        xf86OSLinuxPCIDevs = xf86OSLinuxGetPciDevs();
-    return xf86OSLinuxNumPciDevs;
-}
-
 /* Query the kvirt address (64bit) of a BAR range from size for a given TAG */
 unsigned long
 xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base)
commit 9727db88d57089be6483104de435626cdbad883a
Author: Tiago Vignatti <vignatti at c3sl.ufpr.br>
Date:   Mon Feb 25 17:08:07 2008 -0300

    No more "-scanpci" given that we already have it in libpciaccess.
    
    (Yeah, lets nuke dead code!)

diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index c060b73..4f0a2d6 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -31,7 +31,7 @@ BUILT_SOURCES = xf86DefModeSet.c
 AM_LDFLAGS = -r
 libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
                       xf86Cursor.c xf86cvt.c xf86DGA.c xf86DPMS.c \
-                      xf86DoProbe.c xf86DoScanPci.c xf86Events.c \
+                      xf86DoProbe.c xf86Events.c \
                       xf86Globals.c xf86AutoConfig.c \
                       xf86MiscExt.c xf86Option.c \
                       xf86VidMode.c xf86fbman.c xf86cmap.c \
diff --git a/hw/xfree86/common/xf86DoScanPci.c b/hw/xfree86/common/xf86DoScanPci.c
deleted file mode 100644
index 51892f0..0000000
--- a/hw/xfree86/common/xf86DoScanPci.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1999-2002 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).
- */
-
-/*
- * Finish setting up the server.
- * Call the functions from the scanpci module.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <X11/X.h>
-#include <X11/Xmd.h>
-#include <pciaccess.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86Pci.h"
-#include "Pci.h"
-#include "xf86_OSproc.h"
-
-static void ScanPciDisplayPCICardInfo(void);
-
-void
-ScanPciDisplayPCICardInfo(void)
-{
-    struct pci_id_match   match;
-    struct pci_device_iterator *iter;
-    const struct pci_device *dev;
-
-    xf86EnableIO();
-
-    if (! xf86scanpci()) {
-        xf86MsgVerb(X_NONE, 0, "No PCI info available\n");
-	return;
-    }
-    xf86MsgVerb(X_NONE, 0,
-		"Probing for PCI devices (Bus:Device:Function)\n\n");
-
-    iter = pci_id_match_iterator_create(NULL);
-    while ((dev = pci_device_next(iter)) != NULL) {
-	const char *svendorname = NULL, *subsysname = NULL;
-	const char *vendorname = NULL, *devicename = NULL;
-
-
-	xf86MsgVerb(X_NONE, 0, "(%d:%d:%d) ",
-		    PCI_MAKE_BUS(dev->domain, dev->bus), dev->dev, dev->func);
-
-	/*
-	 * Lookup as much as we can about the device.
-	 */
-	match.vendor_id = dev->vendor_id;
-	match.device_id = dev->device_id;
-	match.subvendor_id = (dev->subvendor_id != 0)
-	  ? dev->subvendor_id : PCI_MATCH_ANY;
-	match.subdevice_id = (dev->subdevice_id != 0)
-	  ? dev->subdevice_id : PCI_MATCH_ANY;
-	match.device_class = 0;
-	match.device_class_mask = 0;
-
-	pci_get_strings(& match, & vendorname, & devicename,
-			& svendorname, & subsysname);
-
-	if ((dev->subvendor_id != 0) || (dev->subdevice_id != 0)) {
-	    xf86MsgVerb(X_NONE, 0, "%s %s (0x%04x / 0x%04x) using ",
-			(svendorname == NULL) ? "unknown vendor" : svendorname,
-			(subsysname == NULL) ? "unknown card" : subsysname,
-			dev->subvendor_id, dev->subdevice_id);
-	}
-
-	xf86MsgVerb(X_NONE, 0, "%s %s (0x%04x / 0x%04x)\n",
-		    (vendorname == NULL) ? "unknown vendor" : vendorname,
-		    (devicename == NULL) ? "unknown chip" : devicename,
-		    dev->vendor_id, dev->device_id);
-    }
-
-    pci_iterator_destroy(iter);
-}
-
-
-void DoScanPci(int argc, char **argv, int i)
-{
-  int j,skip,globalVerbose;
-
-  /*
-   * first we need to finish setup of the OS so that we can call other
-   * functions in the server
-   */
-  OsInit();
-
-  /*
-   * The old verbosity processing that was here isn't useful anymore, but
-   * for compatibility purposes, ignore verbosity changes after the -scanpci
-   * flag.
-   */
-  globalVerbose = xf86Verbose;
-
-  /*
-   * next we process the arguments that are remaining on the command line,
-   * so that things like the module path can be set there
-   */
-  for ( j = i+1; j < argc; j++ ) {
-    if ((skip = ddxProcessArgument(argc, argv, j)))
-	j += (skip - 1);
-  } 
-
-  /*
-   * Was the verbosity level increased?  If so, set it back.
-   */
-  if (xf86Verbose > globalVerbose)
-    xf86SetVerbosity(globalVerbose);
-
-  ScanPciDisplayPCICardInfo();
-
-  /*
-   * That's it; we really should clean things up, but a simple
-   * exit seems to be all we need.
-   */
-  exit(0);
-}
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 41cf1d1..7121b02 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1668,10 +1668,6 @@ ddxProcessArgument(int argc, char **argv, int i)
     return 1;
   }
 #endif
-  if (!strcmp(argv[i], "-scanpci"))
-  {
-    DoScanPci(argc, argv, i);
-  }
   if (!strcmp(argv[i], "-probe"))
   {
     xf86DoProbe = TRUE;
@@ -1734,7 +1730,6 @@ ddxUseMsg()
   ErrorF("-config file           specify a configuration file, relative to the\n");
   ErrorF("                       "__XCONFIGFILE__" search path, only root can use absolute\n");
   ErrorF("-probeonly             probe for devices, then exit\n");
-  ErrorF("-scanpci               execute the scanpci module and exit\n");
   ErrorF("-verbose [n]           verbose startup messages\n");
   ErrorF("-logverbose [n]        verbose log messages\n");
   ErrorF("-quiet                 minimal startup messages\n");
diff --git a/hw/xfree86/common/xf86PciInfo.h b/hw/xfree86/common/xf86PciInfo.h
index 0630cfa..356c7db 100644
--- a/hw/xfree86/common/xf86PciInfo.h
+++ b/hw/xfree86/common/xf86PciInfo.h
@@ -40,9 +40,8 @@
  * or for non-video devices unless they're needed by a driver or elsewhere.
  * A comprehensive set of PCI vendor, device and subsystem data is
  * auto-generated from the ../etc/pci.ids file using the pciids2c.pl script,
- * and is used in both the scanpci module and the scanpci utility.  Don't
- * modify the pci.ids file.  If new/corrected entries are required, add them
- * to ../etc/extrapci.ids.
+ * and is used in scanpci utility.  Don't modify the pci.ids file.  If 
+ * new/corrected entries are required, add them to ../etc/extrapci.ids.
  */
 
 #ifndef _XF86_PCIINFO_H
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 32801cb..fb9ecae 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -155,10 +155,6 @@ Bool xf86PathIsSafe(const char *path);
 
 extern DisplayModeRec xf86DefaultModes [];
 
-/* xf86DoScanPci.c */
-
-void DoScanPci(int argc, char **argv, int i);
-
 /* xf86DoProbe.c */
 void DoProbe(void);
 void DoConfigure(void);
diff --git a/hw/xfree86/doc/devel/Registry b/hw/xfree86/doc/devel/Registry
index d766221..1fec230 100644
--- a/hw/xfree86/doc/devel/Registry
+++ b/hw/xfree86/doc/devel/Registry
@@ -75,7 +75,6 @@ rendition
 s3
 s3virge
 savage
-scanpci
 shadow
 shadowfb
 siliconmotion
diff --git a/hw/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre
index c950e32..405efda 100644
--- a/hw/xfree86/doc/man/Xorg.man.pre
+++ b/hw/xfree86/doc/man/Xorg.man.pre
@@ -378,13 +378,6 @@ and
 .B \-ggamma
 options.
 .TP 8
-.B \-scanpci
-When this option is specified, the
-.B __xservername__
-server scans the PCI bus, and prints out some information about each
-device that was detected.  See also scanpci(__appmansuffix__) 
-and pcitweak(__appmansuffix__).
-.TP 8
 .BI \-screen " screen-name"
 Use the __xconfigfile__(__filemansuffix__) file
 .B Screen
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 96f30c4..9f39808 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -994,10 +994,8 @@ In multi-head configurations, or when using a secondary graphics card in a
 single-head configuration, this entry is mandatory.
 Its main purpose is to make an unambiguous connection between the device
 section and the hardware it is representing.
-This information can usually be found by running the __xservername__ server
-with the
-.B \-scanpci
-command line option.
+This information can usually be found by running the pciaccess tool
+scanpci.
 .TP 7
 .BI "Screen  " number
 This option is mandatory for cards where a single PCI entity can drive more
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
index ad3f1ea..85a1d03 100644
--- a/hw/xfree86/dummylib/Makefile.am
+++ b/hw/xfree86/dummylib/Makefile.am
@@ -1,6 +1,6 @@
 # libdummy.a contains just those bits used in the server itself
 # libdummy-nonserver.a contains additional routines normally found in the
-# server for use in building the utilities like scanpci & the config tools
+# server for use in building the utilities like config tools
 
 noinst_LIBRARIES = libdummy-nonserver.a
 
diff --git a/hw/xfree86/modes/Makefile.am b/hw/xfree86/modes/Makefile.am
index 1f82068..6ee8575 100644
--- a/hw/xfree86/modes/Makefile.am
+++ b/hw/xfree86/modes/Makefile.am
@@ -16,7 +16,7 @@ libxf86modes_a_SOURCES = \
 
 INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
 	   -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \
-           -I$(srcdir)/../scanpci -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
+	   -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
 	   -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \
 	   -I$(srcdir)/../dixmods/extmod
 
diff --git a/hw/xgl/glx/xglxorg.c b/hw/xgl/glx/xglxorg.c
index 984c50e..1d6fc9a 100644
--- a/hw/xgl/glx/xglxorg.c
+++ b/hw/xgl/glx/xglxorg.c
@@ -253,8 +253,6 @@ xglxArgRec xorgUidArgs[] = {
 xglxArgRec xorgArgs[] = {
     ARG (xglxProcessXorgWaitExitArgument, "-probeonly",
 	 "             probe for devices, then exit"),
-    ARG (xglxProcessXorgWaitExitArgument, "-scanpci",
-	 "               execute the scanpci module and exit"),
     XORG_UARG ("-verbose", " [n]           verbose startup messages", 2),
     XORG_UARG ("-logverbose", " [n]        verbose log messages", 2),
     XORG_UARG ("-quiet", "                 minimal startup messages", 1),
commit f19f7b8e53ed6609fc1fdd272de5521417946209
Author: Tiago Vignatti <vignatti at c3sl.ufpr.br>
Date:   Mon Feb 25 17:07:07 2008 -0300

    Clean some garbage caused when pciaccess was merged:
    
        FindPCIVideoInfo() function isn't need anymore.
    
        xf86scanpci() is being called only once so we don't need permanent
        (static) variables there.
    
        restorePciState() is not used for now (until we find why multiple
        cards aren't working).

diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 13e13e9..d5ae75b 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -107,127 +107,6 @@ xf86FormatPciBusNumber(int busnum, char *buffer)
 	sprintf(buffer, "%d@%d", busnum & 0x00ff, busnum >> 8);
 }
 
-static void
-FindPCIVideoInfo(void)
-{
-    int i = 0, k;
-    int num = 0;
-    struct pci_device *info;
-    struct pci_device_iterator *iter;
-
-
-    if (!xf86scanpci()) {
-	xf86PciVideoInfo = NULL;
-	return;
-    }
-
-    iter = pci_slot_match_iterator_create(& xf86IsolateDevice);
-    while ((info = pci_device_next(iter)) != NULL) {
-	if (PCIINFOCLASSES(info->device_class)) {
-	    num++;
-	    xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo,
-					  (sizeof(struct pci_device *)
-					   * (num + 1)));
-	    xf86PciVideoInfo[num] = NULL;
-	    xf86PciVideoInfo[num - 1] = info;
-
-	    pci_device_probe(info);
-	    info->user_data = 0;
-	}
-    }
-
-
-    /* If we haven't found a primary device try a different heuristic */
-    if (primaryBus.type == BUS_NONE && num) {
-	for (i = 0; i < num; i++) {
-	    uint16_t  command;
-
-	    info = xf86PciVideoInfo[i];
-	    pci_device_cfg_read_u16(info, & command, 4);
-
-	    if ((command & PCI_CMD_MEM_ENABLE) 
-		&& ((num == 1) || IS_VGA(info->device_class))) {
-		if (primaryBus.type == BUS_NONE) {
-		    primaryBus.type = BUS_PCI;
-		    primaryBus.id.pci = info;
-		} else {
-		    xf86Msg(X_NOTICE,
-			    "More than one possible primary device found\n");
-		    primaryBus.type ^= (BusType)(-1);
-		}
-	    }
-	}
-    }
-    
-    /* Print a summary of the video devices found */
-    for (k = 0; k < num; k++) {
-	const char *vendorname = NULL, *chipname = NULL;
-	const char *prim = " ";
-	Bool memdone = FALSE, iodone = FALSE;
-
-
-	info = xf86PciVideoInfo[k];
-
-	vendorname = pci_device_get_vendor_name( info );
-	chipname = pci_device_get_device_name( info );
-
-	if ((!vendorname || !chipname) &&
-	    !PCIALWAYSPRINTCLASSES(info->device_class))
-	    continue;
-
-	if (xf86IsPrimaryPci(info))
-	    prim = "*";
-
-	xf86Msg( X_PROBED, "PCI:%s(%u@%u:%u:%u) ", prim, info->domain,
-		 info->bus, info->dev, info->func );
-
-	if (vendorname)
-	    xf86ErrorF("%s ", vendorname);
-	else
-	    xf86ErrorF("unknown vendor (0x%04x) ", info->vendor_id);
-
-	if (chipname)
-	    xf86ErrorF("%s ", chipname);
-	else
-	    xf86ErrorF("unknown chipset (0x%04x) ", info->device_id);
-
-	xf86ErrorF("rev %d", info->revision);
-
-	for (i = 0; i < 6; i++) {
-	    struct pci_mem_region * r = & info->regions[i];
-
-	    if ( r->size && ! r->is_IO ) {
-		if (!memdone) {
-		    xf86ErrorF(", Mem @ ");
-		    memdone = TRUE;
-		} else
-		    xf86ErrorF(", ");
-		xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size);
-	    }
-	}
-
-	for (i = 0; i < 6; i++) {
-	    struct pci_mem_region * r = & info->regions[i];
-
-	    if ( r->size && r->is_IO ) {
-		if (!iodone) {
-		    xf86ErrorF(", I/O @ ");
-		    iodone = TRUE;
-		} else
-		    xf86ErrorF(", ");
-		xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size);
-	    }
-	}
-
-	if ( info->rom_size ) {
-	    xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size);
-	}
-
-	xf86ErrorF("\n");
-    }
-}
-
-
 /*
  * IO enable/disable related routines for PCI
  */
@@ -401,10 +280,10 @@ savePciState( struct pci_device * dev, pciSavePtr ptr )
 }
 
 /* move to OS layer */
+#if 0
 static void
 restorePciState( struct pci_device * dev, pciSavePtr ptr)
 {
-#if 0
     int i;
     
     /* disable card before setting anything */
@@ -419,8 +298,8 @@ restorePciState( struct pci_device * dev, pciSavePtr ptr)
     }
 
     pci_device_cfg_write_u32(dev, ptr->command, PCI_CMD_STAT_REG);
-#endif
 }
+#endif
 
 /* move to OS layer */
 static void
@@ -470,7 +349,121 @@ restorePciBusState(BusAccPtr ptr)
 void
 xf86PciProbe(void)
 {
-    FindPCIVideoInfo();
+    int i = 0, k;
+    int num = 0;
+    struct pci_device *info;
+    struct pci_device_iterator *iter;
+
+
+    if (!xf86scanpci()) {
+	xf86PciVideoInfo = NULL;
+	return;
+    }
+
+    iter = pci_slot_match_iterator_create(& xf86IsolateDevice);
+    while ((info = pci_device_next(iter)) != NULL) {
+	if (PCIINFOCLASSES(info->device_class)) {
+	    num++;
+	    xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo,
+					  (sizeof(struct pci_device *)
+					   * (num + 1)));
+	    xf86PciVideoInfo[num] = NULL;
+	    xf86PciVideoInfo[num - 1] = info;
+
+	    pci_device_probe(info);
+	    info->user_data = 0;
+	}
+    }
+
+
+    /* If we haven't found a primary device try a different heuristic */
+    if (primaryBus.type == BUS_NONE && num) {
+	for (i = 0; i < num; i++) {
+	    uint16_t  command;
+
+	    info = xf86PciVideoInfo[i];
+	    pci_device_cfg_read_u16(info, & command, 4);
+
+	    if ((command & PCI_CMD_MEM_ENABLE) 
+		&& ((num == 1) || IS_VGA(info->device_class))) {
+		if (primaryBus.type == BUS_NONE) {
+		    primaryBus.type = BUS_PCI;
+		    primaryBus.id.pci = info;
+		} else {
+		    xf86Msg(X_NOTICE,
+			    "More than one possible primary device found\n");
+		    primaryBus.type ^= (BusType)(-1);
+		}
+	    }
+	}
+    }
+    
+    /* Print a summary of the video devices found */
+    for (k = 0; k < num; k++) {
+	const char *vendorname = NULL, *chipname = NULL;
+	const char *prim = " ";
+	Bool memdone = FALSE, iodone = FALSE;
+
+
+	info = xf86PciVideoInfo[k];
+
+	vendorname = pci_device_get_vendor_name( info );
+	chipname = pci_device_get_device_name( info );
+
+	if ((!vendorname || !chipname) &&
+	    !PCIALWAYSPRINTCLASSES(info->device_class))
+	    continue;
+
+	if (xf86IsPrimaryPci(info))
+	    prim = "*";
+
+	xf86Msg( X_PROBED, "PCI:%s(%u@%u:%u:%u) ", prim, info->domain,
+		 info->bus, info->dev, info->func );
+
+	if (vendorname)
+	    xf86ErrorF("%s ", vendorname);
+	else
+	    xf86ErrorF("unknown vendor (0x%04x) ", info->vendor_id);
+
+	if (chipname)
+	    xf86ErrorF("%s ", chipname);
+	else
+	    xf86ErrorF("unknown chipset (0x%04x) ", info->device_id);
+
+	xf86ErrorF("rev %d", info->revision);
+
+	for (i = 0; i < 6; i++) {
+	    struct pci_mem_region * r = & info->regions[i];
+
+	    if ( r->size && ! r->is_IO ) {
+		if (!memdone) {
+		    xf86ErrorF(", Mem @ ");
+		    memdone = TRUE;
+		} else
+		    xf86ErrorF(", ");
+		xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size);
+	    }
+	}
+
+	for (i = 0; i < 6; i++) {
+	    struct pci_mem_region * r = & info->regions[i];
+
+	    if ( r->size && r->is_IO ) {
+		if (!iodone) {
+		    xf86ErrorF(", I/O @ ");
+		    iodone = TRUE;
+		} else
+		    xf86ErrorF(", ");
+		xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size);
+	    }
+	}
+
+	if ( info->rom_size ) {
+	    xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size);
+	}
+
+	xf86ErrorF("\n");
+    }
 }
 
 void
diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index a34ed99..1ca0bd0 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -268,18 +268,7 @@ pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS addr)
 _X_EXPORT Bool
 xf86scanpci(void)
 {
-    static Bool  done = FALSE;
-    static Bool  success = FALSE;
-
-    /*
-     * if we haven't found PCI devices checking for pci_devp may
-     * result in an endless recursion if platform/OS specific PCI
-     * bus probing code calls this function from with in it.
-     */
-    if (done)
-	return success;
-
-    done = TRUE;
+    Bool  success = FALSE;
 
     success = (pci_system_init() == 0);
     pciInit();
commit 4b50e71bf127c8e0f289e3b76c786f0398effe65
Author: Adam Jackson <ajax at redhat.com>
Date:   Sun Feb 24 20:25:13 2008 -0500

    Bug #13736: Fix %bx in VBEGetPixelClock to match spec.
    
    Reported by Yannick Henault.

diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 06559bb..8af1727 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -1019,7 +1019,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock)
     /*
     Input:
 	AX := 4F0Bh VBE Get Pixel Clock
-	BL := 01h Get Pixel Clock
+	BL := 00h Get Pixel Clock
 	ECX := pixel clock in units of Hz
         DX := mode number
      
@@ -1030,7 +1030,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock)
 
     pVbe->pInt10->num = 0x10;
     pVbe->pInt10->ax = 0x4f0b;
-    pVbe->pInt10->bx = 0x01;
+    pVbe->pInt10->bx = 0x00;
     pVbe->pInt10->cx = clock;
     pVbe->pInt10->dx = mode;
     xf86ExecX86int10(pVbe->pInt10);
commit 6dc369028d3ca741de57ad78febf2f5f82e0696e
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Sat Feb 23 00:01:02 2008 -0800

    XQuartz: Quit now properly warns the user
    (cherry picked from commit ed3d7b3959c2a0cb63e37210455bcc6cf195b807)

diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
index b5cfcf6..ea3a0da 100644
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
@@ -2,14 +2,14 @@
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
 	<data>
 		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">9B18</string>
+		<string key="IBDocument.SystemVersion">9C31</string>
 		<string key="IBDocument.InterfaceBuilderVersion">639</string>
-		<string key="IBDocument.AppKitVersion">949</string>
-		<string key="IBDocument.HIToolboxVersion">343.00</string>
+		<string key="IBDocument.AppKitVersion">949.26</string>
+		<string key="IBDocument.HIToolboxVersion">352.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
+			<integer value="57"/>
 			<integer value="285"/>
-			<integer value="29"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -448,7 +448,7 @@
 			<object class="NSWindowTemplate" id="124913468">
 				<int key="NSWindowStyleMask">3</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{479, 459}, {481, 345}}</string>
+				<string key="NSWindowRect">{{319, 294}, {481, 345}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Preferences</string>
 				<string key="NSWindowClass">NSPanel</string>
@@ -993,7 +993,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					</object>
 					<string key="NSFrameSize">{481, 345}</string>
 				</object>
-				<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
 				<string key="NSMinSize">{213, 129}</string>
 				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSFrameAutosaveName">x11_prefs</string>
@@ -1001,7 +1001,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 			<object class="NSWindowTemplate" id="604417141">
 				<int key="NSWindowStyleMask">11</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{537, 554}, {454, 311}}</string>
+				<string key="NSWindowRect">{{361, 362}, {454, 311}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Application Menu</string>
 				<string key="NSWindowClass">NSPanel</string>
@@ -1355,7 +1355,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string key="NSFrameSize">{454, 311}</string>
 					<reference key="NSSuperview"/>
 				</object>
-				<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
 				<string key="NSMinSize">{320, 262}</string>
 				<string key="NSFrameAutosaveName">x11_apps</string>
 			</object>
@@ -1866,14 +1866,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<int key="connectionID">300332</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">quit:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="274138642"/>
-					</object>
-					<int key="connectionID">300333</int>
-				</object>
-				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">menu</string>
 						<reference key="source" ref="815810918"/>
@@ -1881,6 +1873,14 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					</object>
 					<int key="connectionID">300334</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">terminate:</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="274138642"/>
+					</object>
+					<int key="connectionID">300336</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
@@ -3075,6 +3075,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>545.ImportedFromIB2</string>
 					<string>56.IBPluginDependency</string>
 					<string>56.ImportedFromIB2</string>
+					<string>57.IBEditorWindowLastContentRect</string>
 					<string>57.IBPluginDependency</string>
 					<string>57.ImportedFromIB2</string>
 					<string>57.editorWindowContentRectSynchronizationRect</string>
@@ -3168,11 +3169,11 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>{{100, 746}, {155, 33}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<string>{{537, 554}, {454, 311}}</string>
+					<string>{{537, 545}, {454, 311}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<reference ref="9"/>
-					<string>{{537, 554}, {454, 311}}</string>
+					<string>{{537, 545}, {454, 311}}</string>
 					<reference ref="9"/>
 					<string>{{433, 406}, {486, 327}}</string>
 					<object class="NSDictionary">
@@ -3194,7 +3195,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>{320, 240}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<string>{{0, 1114}, {336, 20}}</string>
+					<string>{{0, 836}, {336, 20}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{67, 819}, {336, 20}}</string>
@@ -3319,6 +3320,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
+					<string>{{12, 633}, {218, 203}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{79, 616}, {218, 203}}</string>
@@ -3354,7 +3356,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">300334</int>
+			<int key="maxID">300336</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index 5223c9a..f60dcba 100644
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib differ
commit e6a4cde16dc99ea02ac93da1d1b9517b1073d159
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 22 18:36:29 2008 -0500

    Use the client-side XKB headers for the config utilities

diff --git a/hw/xfree86/utils/xorgcfg/text-mode.c b/hw/xfree86/utils/xorgcfg/text-mode.c
index c1fa67e..0b6e654 100644
--- a/hw/xfree86/utils/xorgcfg/text-mode.c
+++ b/hw/xfree86/utils/xorgcfg/text-mode.c
@@ -39,7 +39,7 @@
 #endif
 #include <ctype.h>
 #include <X11/Xlib.h>
-#include "xkbstr.h"
+#include <X11/extensions/XKBstr.h>
 #include <X11/extensions/XKBrules.h>
 #include "cards.h"
 #include "config.h"
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index d537aba..30eb831 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -106,7 +106,7 @@
 #include <sys/stat.h>
 
 #include <X11/Xlib.h>
-#include "xkbstr.h"
+#include <X11/extensions/XKBstr.h>
 #include <X11/extensions/XKBrules.h>
 #define MAX_XKBOPTIONS	5
 
commit 347db49ebe4596db16455ea8a1a608cfa826c5c7
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 22 16:05:33 2008 -0500

    s/via/openchrome/ in the autoconfig logic.
    
    Xorg's via driver is effectively dead anyway.

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index c6e1972..da6c3f3 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -184,7 +184,7 @@ videoPtrToDriverName(struct pci_device *dev)
 	case 0x3d3d:		    return "glint";
 	case 0x1023:		    return "trident";
 	case 0x100c:		    return "tseng";
-	case 0x1106:		    return "via";
+	case 0x1106:		    return "openchrome";
 	case 0x15ad:		    return "vmware";
 	default: break;
     }
commit 69f782676797744815ff76b8a11b11178066f501
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 22 16:04:35 2008 -0500

    Match Xephyr DRI definitions to the ones in xf86dri.h

diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c
index c11da06..506d7be 100644
--- a/hw/kdrive/ephyr/XF86dri.c
+++ b/hw/kdrive/ephyr/XF86dri.c
@@ -385,7 +385,7 @@ Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
 					   context, hHWContext );
 }
 
-Bool XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context)
+GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context)
 {
     Display * const dpy = (Display *) ndpy;
     XExtDisplayInfo *info = find_display (dpy);
@@ -406,7 +406,7 @@ Bool XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid conte
     return True;
 }
 
-Bool
+GLboolean
 XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen,
                        __DRIid drawable, drm_drawable_t * hHWDrawable)
 {
@@ -437,7 +437,7 @@ XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen,
     return True;
 }
 
-Bool XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
+GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
     __DRIid drawable )
 {
     Display * const dpy = (Display *) ndpy;
commit 060a66b6e2feddba43ed207b6fcf2cf1f7fe39fd
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Dec 24 15:55:58 2007 -0500

    Normalize swapped dispatch for Fixes{ChangeSaveSet,SelectSelectionInput}

diff --git a/xfixes/saveset.c b/xfixes/saveset.c
index e6e2976..31664ab 100755
--- a/xfixes/saveset.c
+++ b/xfixes/saveset.c
@@ -72,5 +72,5 @@ SProcXFixesChangeSaveSet(ClientPtr client)
 
     swaps(&stuff->length, n);
     swapl(&stuff->window, n);
-    return ProcXFixesChangeSaveSet(client);
+    return (*ProcXFixesVector[stuff->xfixesReqType])(client);
 }
diff --git a/xfixes/select.c b/xfixes/select.c
index 415257e..12a165f 100755
--- a/xfixes/select.c
+++ b/xfixes/select.c
@@ -224,7 +224,7 @@ SProcXFixesSelectSelectionInput (ClientPtr client)
     swapl(&stuff->window, n);
     swapl(&stuff->selection, n);
     swapl(&stuff->eventMask, n);
-    return ProcXFixesSelectSelectionInput(client);
+    return (*ProcXFixesVector[stuff->xfixesReqType])(client);
 }
     
 void
commit 24bebdded44a9e184455b4fee7800257fee81efb
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Dec 24 15:07:49 2007 -0500

    fbFillRegionTiled() is now dead code.
    
    Only ever called from the old PaintWindow* screen hooks, but those are
    gone now.  As a pleasant side effect, fb loses its #ifdef PANORAMIX.

diff --git a/fb/fb.h b/fb/fb.h
index 5b56d96..01000d7 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -2087,11 +2087,6 @@ fbFillRegionSolid (DrawablePtr	pDrawable,
 		   FbBits	and,
 		   FbBits	xor);
 
-void
-fbFillRegionTiled (DrawablePtr	pDrawable,
-		   RegionPtr	pRegion,
-		   PixmapPtr	pTile);
-
 pixman_image_t *image_from_pict (PicturePtr pict,
 				 Bool       has_clip);
 void free_pixman_pict (PicturePtr, pixman_image_t *);
diff --git a/fb/fbwindow.c b/fb/fbwindow.c
index 89f601f..f6fe8aa 100644
--- a/fb/fbwindow.c
+++ b/fb/fbwindow.c
@@ -250,68 +250,3 @@ fbFillRegionSolid (DrawablePtr	pDrawable,
     
     fbFinishAccess (pDrawable);
 }
-
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
-#endif
-
-void
-fbFillRegionTiled (DrawablePtr	pDrawable,
-		   RegionPtr	pRegion,
-		   PixmapPtr	pTile)
-{
-    FbBits	*dst;
-    FbStride	dstStride;
-    int		dstBpp;
-    int		dstXoff, dstYoff;
-    FbBits	*tile;
-    FbStride	tileStride;
-    int		tileBpp;
-    int		tileXoff, tileYoff; /* XXX assumed to be zero */
-    int		tileWidth, tileHeight;
-    int		n = REGION_NUM_RECTS(pRegion);
-    BoxPtr	pbox = REGION_RECTS(pRegion);
-    int		xRot = pDrawable->x;
-    int		yRot = pDrawable->y;
-    
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension) 
-    {
-	int index = pDrawable->pScreen->myNum;
-	if(&WindowTable[index]->drawable == pDrawable) 
-	{
-	    xRot -= panoramiXdataPtr[index].x;
-	    yRot -= panoramiXdataPtr[index].y;
-	}
-    }
-#endif
-    fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
-    fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff);
-    tileWidth = pTile->drawable.width;
-    tileHeight = pTile->drawable.height;
-    xRot += dstXoff;
-    yRot += dstYoff;
-    
-    while (n--)
-    {
-	fbTile (dst + (pbox->y1 + dstYoff) * dstStride,
-		dstStride,
-		(pbox->x1 + dstXoff) * dstBpp,
-		(pbox->x2 - pbox->x1) * dstBpp,
-		pbox->y2 - pbox->y1,
-		tile,
-		tileStride,
-		tileWidth * dstBpp,
-		tileHeight,
-		GXcopy,
-		FB_ALLONES,
-		dstBpp,
-		xRot * dstBpp,
-		yRot - (pbox->y1 + dstYoff));
-	pbox++;
-    }
-
-    fbFinishAccess (&pTile->drawable);
-    fbFinishAccess (pDrawable);
-}
diff --git a/fb/wfbrename.h b/fb/wfbrename.h
index 9382244..dc05285 100644
--- a/fb/wfbrename.h
+++ b/fb/wfbrename.h
@@ -79,7 +79,6 @@
 #define fbExpandDirectColors wfbExpandDirectColors
 #define fbFill wfbFill
 #define fbFillRegionSolid wfbFillRegionSolid
-#define fbFillRegionTiled wfbFillRegionTiled
 #define fbFillSpans wfbFillSpans
 #define fbFixCoordModePrevious wfbFixCoordModePrevious
 #define fbGCFuncs wfbGCFuncs
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c
index e75b083..db09e9d 100644
--- a/hw/kdrive/src/kaa.c
+++ b/hw/kdrive/src/kaa.c
@@ -996,18 +996,6 @@ kaaFillRegionSolid (DrawablePtr	pDrawable,
     kaaDrawableDirty (pDrawable);
 }
 
-#if 0
-static void
-kaaFillRegionTiled (DrawablePtr pDrawable,
-		    RegionPtr	pRegion,
-		    Pixmap	pTile)
-{
-    else
-    {
-	kaaWaitSync
-}
-#endif
-
 Bool
 kaaDrawInit (ScreenPtr		pScreen,
 	     KaaScreenInfoPtr	pScreenInfo)
commit ee21aba6be0078949204e315ddfffd99de60c2f1
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Dec 24 13:13:19 2007 -0500

    Fix Xinerama's consolidated visual handling.
    
    Formerly the code claimed it could only handle up to 256 visuals, which
    was true.  Also true, but not explicitly stated, was that it could only
    handle visuals with VID < 256.  If you have enough screens, and subsystems
    that add lots of visuals, you can easily run off the end.  (Made worse
    because we allocate visual IDs from the same pool as XIDs.)  If your app
    then chooses a visual > 256, then the Xinerama code would throw BadMatch
    on CreateColormap and your app wouldn't start.
    
    With this change, PanoramiXVisualTable is gone.  Other subsystems that
    were using it as a translation table between each screen's visuals now
    use a PanoramiXTranslateVisual() helper.

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 75277be..d8ec588 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -81,9 +81,6 @@ static DepthPtr		PanoramiXDepths;
 static int		PanoramiXNumVisuals;
 static VisualPtr	PanoramiXVisuals;
 
-/* We support at most 256 visuals */
-_X_EXPORT XID		*PanoramiXVisualTable = NULL;
-
 _X_EXPORT unsigned long XRC_DRAWABLE;
 _X_EXPORT unsigned long XRT_WINDOW;
 _X_EXPORT unsigned long XRT_PIXMAP;
@@ -702,143 +699,133 @@ Bool PanoramiXCreateConnectionBlock(void)
     return TRUE;
 }
 
-extern
-void PanoramiXConsolidate(void)
+/*
+ * This isn't just memcmp(), bitsPerRGBValue is skipped.  markv made that
+ * change way back before xf86 4.0, but the comment for _why_ is a bit
+ * opaque, so I'm not going to question it for now.
+ *
+ * This is probably better done as a screen hook so DBE/EVI/GLX can add
+ * their own tests, and adding privates to VisualRec so they don't have to
+ * do their own back-mapping.
+ */
+static Bool
+VisualsEqual(VisualPtr a, VisualPtr b)
 {
-    int 	i, j, k;
-    VisualPtr   pVisual, pVisual2;
-    ScreenPtr   pScreen, pScreen2;
-    DepthPtr    pDepth, pDepth2;
-    PanoramiXRes *root, *defmap, *saver;
-    Bool        foundDepth, missingDepth;
-
-    if(!PanoramiXVisualTable)
-	PanoramiXVisualTable = xcalloc(256 * MAXSCREENS, sizeof(XID));
-
-    pScreen = screenInfo.screens[0];
-    pVisual = pScreen->visuals; 
-    pDepth  = pScreen->allowedDepths;
+    return ((a->class == b->class) &&
+	(a->ColormapEntries == b->ColormapEntries) &&
+	(a->nplanes == b->nplanes) &&
+	(a->redMask == b->redMask) &&
+	(a->greenMask == b->greenMask) &&
+	(a->blueMask == b->blueMask) &&
+	(a->offsetRed == b->offsetRed) &&
+	(a->offsetGreen == b->offsetGreen) &&
+	(a->offsetBlue == b->offsetBlue));
+}
 
-    PanoramiXNumDepths = 0;
-    PanoramiXDepths = xcalloc(pScreen->numDepths,sizeof(DepthRec));
-    PanoramiXNumVisuals = 0;
-    PanoramiXVisuals = xcalloc(pScreen->numVisuals,sizeof(VisualRec));
-
-    for (i = 0; i < pScreen->numDepths; i++, pDepth++) {
-        missingDepth = FALSE;
-        for (j = 1; j < PanoramiXNumScreens; j++) {
-             pScreen2 = screenInfo.screens[j];
-             pDepth2 = pScreen2->allowedDepths;
-
-             foundDepth = FALSE;
-             for (k = 0; k < pScreen2->numDepths; k++, pDepth2++) {
-                 if(pDepth2->depth == pDepth->depth) {
-                     foundDepth = TRUE;
-                     break;
-                 }
-             }
-
-             if(!foundDepth) {
-                missingDepth = TRUE;
-                break;
-             }
-        }
-          
-        if(!missingDepth) {
-            PanoramiXDepths[PanoramiXNumDepths].depth = pDepth->depth;
-            PanoramiXDepths[PanoramiXNumDepths].numVids = 0;
-            if(pDepth->numVids)
-                PanoramiXDepths[PanoramiXNumDepths].vids = 
-                      xalloc(sizeof(VisualID) * pDepth->numVids);      
-            else
-                PanoramiXDepths[PanoramiXNumDepths].vids = NULL;
-            PanoramiXNumDepths++;
-        }
+static void
+PanoramiXMaybeAddDepth(DepthPtr pDepth)
+{
+    ScreenPtr pScreen;
+    int j, k;
+    Bool found = FALSE;
+
+    for (j = 1; j < PanoramiXNumScreens; j++) {
+	pScreen = screenInfo.screens[j];
+	for (k = 0; k < pScreen->numDepths; k++) {
+	    if (pScreen->allowedDepths[k].depth == pDepth->depth) {
+		found = TRUE;
+		break;
+	    }
+	}
     }
 
-    for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
-	PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = pVisual->vid;
+    if (!found)
+	return;
 
-	/* check if the visual exists on all screens */
-	for (j = 1; j < PanoramiXNumScreens; j++) {
-	    pScreen2 = screenInfo.screens[j];
+    j = PanoramiXNumDepths;
+    PanoramiXNumDepths++;
+    PanoramiXDepths = xrealloc(PanoramiXDepths,
+	    PanoramiXNumDepths * sizeof(DepthRec));
+    PanoramiXDepths[j].depth = pDepth->depth;
+    PanoramiXDepths[j].numVids = 0;
+    /* XXX suboptimal, should grow these dynamically */
+    if(pDepth->numVids)
+	PanoramiXDepths[j].vids = xalloc(sizeof(VisualID) * pDepth->numVids);
+    else
+	PanoramiXDepths[j].vids = NULL;
+}
 
+static void
+PanoramiXMaybeAddVisual(VisualPtr pVisual)
+{
+    ScreenPtr pScreen;
+    VisualPtr candidate = NULL;
+    int j, k;
+    Bool found = FALSE;
+
+    for (j = 1; j < PanoramiXNumScreens; j++) {
+	pScreen = screenInfo.screens[j];
+	found = FALSE;
+
+	candidate = pScreen->visuals;
+	for (k = 0; k < pScreen->numVisuals; k++) {
+	    candidate++;
+	    if (VisualsEqual(pVisual, candidate)
 #ifdef GLXPROXY
-	    pVisual2 = glxMatchVisual(pScreen, pVisual, pScreen2);
-	    if (pVisual2) {
-		PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] =
-		    pVisual2->vid;
-		continue;
-	    } else if (glxMatchVisual(pScreen, pVisual, pScreen)) {
-		PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = 0;
-		break;
-	    }
+		&& glxMatchVisual(screenInfo.screens[0], pVisual, pScreen)
 #endif
-	    pVisual2 = pScreen2->visuals;
-
-	    for (k = 0; k < pScreen2->numVisuals; k++, pVisual2++) {
-		if ((pVisual->class == pVisual2->class) &&
-		    (pVisual->ColormapEntries == pVisual2->ColormapEntries) &&
-		    (pVisual->nplanes == pVisual2->nplanes) &&
-		    (pVisual->redMask == pVisual2->redMask) &&
-		    (pVisual->greenMask == pVisual2->greenMask) &&
-		    (pVisual->blueMask == pVisual2->blueMask) &&
-		    (pVisual->offsetRed == pVisual2->offsetRed) &&
-		    (pVisual->offsetGreen == pVisual2->offsetGreen) &&
-		    (pVisual->offsetBlue == pVisual2->offsetBlue))
-		{
-                /* We merely assign the first visual that matches.  OpenGL
-                   will need to get involved at some point if you want
-                   match GLX visuals */
-			PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] =
-					 pVisual2->vid;
-			break;
-		}
-	    }
-	}
-	
-	/* if it doesn't exist on all screens we can't use it */
-	for (j = 0; j < PanoramiXNumScreens; j++) {
-	    if (!PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j]) {
-		PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = 0;
+		    ) {
+		found = TRUE;
 		break;
 	    }
 	}
 
-	/* if it does, make sure it's in the list of supported depths and visuals */
-	if(PanoramiXVisualTable[pVisual->vid * MAXSCREENS]) {
-	    PanoramiXVisuals[PanoramiXNumVisuals].vid = pVisual->vid;
-	    PanoramiXVisuals[PanoramiXNumVisuals].class = pVisual->class;
-	    PanoramiXVisuals[PanoramiXNumVisuals].bitsPerRGBValue = pVisual->bitsPerRGBValue;
-	    PanoramiXVisuals[PanoramiXNumVisuals].ColormapEntries = pVisual->ColormapEntries;
-	    PanoramiXVisuals[PanoramiXNumVisuals].nplanes = pVisual->nplanes;
-	    PanoramiXVisuals[PanoramiXNumVisuals].redMask = pVisual->redMask;
-	    PanoramiXVisuals[PanoramiXNumVisuals].greenMask = pVisual->greenMask;
-	    PanoramiXVisuals[PanoramiXNumVisuals].blueMask = pVisual->blueMask;
-	    PanoramiXVisuals[PanoramiXNumVisuals].offsetRed = pVisual->offsetRed;
-	    PanoramiXVisuals[PanoramiXNumVisuals].offsetGreen = pVisual->offsetGreen;
-	    PanoramiXVisuals[PanoramiXNumVisuals].offsetBlue = pVisual->offsetBlue;
-	    PanoramiXNumVisuals++;	
-
-	    for (j = 0; j < PanoramiXNumDepths; j++) {
-	        if (PanoramiXDepths[j].depth == pVisual->nplanes) {
-		    PanoramiXDepths[j].vids[PanoramiXDepths[j].numVids] = pVisual->vid;
-		    PanoramiXDepths[j].numVids++;
-		    break;
-		}	
-	    }   
-	}
-    } 
+	if (!found)
+	    return;
+    }
+
+    /* found a matching visual on all screens, add it to the subset list */
+    j = PanoramiXNumVisuals;
+    PanoramiXNumVisuals++;
+    PanoramiXVisuals = xrealloc(PanoramiXVisuals,
+	    PanoramiXNumVisuals * sizeof(VisualRec));
+
+    memcpy(&PanoramiXVisuals[j], pVisual, sizeof(VisualRec));
+
+    for (k = 0; k < PanoramiXNumDepths; k++) {
+	if (PanoramiXDepths[k].depth == pVisual->nplanes) {
+	    PanoramiXDepths[k].vids[PanoramiXDepths[k].numVids] = pVisual->vid;
+	    PanoramiXDepths[k].numVids++;
+	    break;
+	}	
+    }   
+}
+
+extern void
+PanoramiXConsolidate(void)
+{
+    int 	i;
+    PanoramiXRes *root, *defmap, *saver;
+    ScreenPtr   pScreen = screenInfo.screens[0];
+    DepthPtr    pDepth = pScreen->allowedDepths;
+    VisualPtr   pVisual = pScreen->visuals;
+
+    PanoramiXNumDepths = 0;
+    PanoramiXNumVisuals = 0;
 
+    for (i = 0; i < pScreen->numDepths; i++)
+	PanoramiXMaybeAddDepth(pDepth++);
 
-    root = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes));
+    for (i = 0; i < pScreen->numVisuals; i++)
+	PanoramiXMaybeAddVisual(pVisual++);
+
+    root = xalloc(sizeof(PanoramiXRes));
     root->type = XRT_WINDOW;
-    defmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes));
+    defmap = xalloc(sizeof(PanoramiXRes));
     defmap->type = XRT_COLORMAP;
-    saver = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes));
+    saver = xalloc(sizeof(PanoramiXRes));
     saver->type = XRT_WINDOW;
 
-
     for (i =  0; i < PanoramiXNumScreens; i++) {
 	root->info[i].id = WindowTable[i]->drawable.id;
 	root->u.win.class = InputOutput;
@@ -854,6 +841,31 @@ void PanoramiXConsolidate(void)
     AddResource(defmap->info[0].id, XRT_COLORMAP, defmap);
 }
 
+_X_EXPORT VisualID
+PanoramiXTranslateVisualID(int screen, VisualID orig)
+{
+    VisualPtr pVisual = NULL;
+    int i, j;
+
+    for (i = 0; i < PanoramiXNumVisuals; i++) {
+	if (orig == PanoramiXVisuals[i].vid) {
+	    pVisual = &PanoramiXVisuals[i];
+	    break;
+	}
+    }
+
+    if (!pVisual)
+	return 0;
+
+    /* found the original, now translate it relative to the backend screen */
+    for (i = 0; i < PanoramiXNumScreens; i++)
+	for (j = 0; j < screenInfo.screens[i]->numVisuals; j++)
+	    if (VisualsEqual(pVisual, &screenInfo.screens[i]->visuals[j]))
+		return screenInfo.screens[i]->visuals[j].vid;
+    
+    return 0;
+}
+
 
 /*
  *	PanoramiXResetProc()
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index f9a5796..d19b303 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -150,7 +150,7 @@ int PanoramiXCreateWindow(ClientPtr client)
 	if (cmap)
 	    *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id;
 	if ( orig_visual != CopyFromParent ) 
-	    stuff->visual = PanoramiXVisualTable[(orig_visual*MAXSCREENS) + j];
+	    stuff->visual = PanoramiXTranslateVisualID(j, orig_visual);
         result = (*SavedProcVector[X_CreateWindow])(client);
         if(result != Success) break;
     }
@@ -2077,9 +2077,6 @@ int PanoramiXCreateColormap(ClientPtr client)
 		client, stuff->window, XRT_WINDOW, DixReadAccess)))
 	return BadWindow;    
 
-    if(!stuff->visual || (stuff->visual > 255)) 
-	return BadValue;
-
     if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes))))
         return BadAlloc;
 
@@ -2092,7 +2089,7 @@ int PanoramiXCreateColormap(ClientPtr client)
     FOR_NSCREENS_BACKWARD(j){
 	stuff->mid = newCmap->info[j].id;
 	stuff->window = win->info[j].id;
-	stuff->visual = PanoramiXVisualTable[(orig_visual * MAXSCREENS) + j];
+	stuff->visual = PanoramiXTranslateVisualID(j, orig_visual);
 	result = (* SavedProcVector[X_CreateColormap])(client);
 	if(result != Success) break;
     }
diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h
index ae90244..6d556e9 100644
--- a/Xext/panoramiXsrv.h
+++ b/Xext/panoramiXsrv.h
@@ -12,8 +12,8 @@ extern int PanoramiXNumScreens;
 extern PanoramiXData *panoramiXdataPtr;
 extern int PanoramiXPixWidth;
 extern int PanoramiXPixHeight;
-extern XID *PanoramiXVisualTable;
 
+extern VisualID PanoramiXTranslateVisualID(int screen, VisualID orig);
 extern void PanoramiXConsolidate(void);
 extern Bool PanoramiXCreateConnectionBlock(void);
 extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
diff --git a/Xext/saver.c b/Xext/saver.c
index 9a6dd77..feab972 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -1346,8 +1346,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
              *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[i].id;
 
           if (orig_visual != CopyFromParent) 
-            stuff->visualID = 
-                     PanoramiXVisualTable[(orig_visual*MAXSCREENS) + i];
+            stuff->visualID = PanoramiXTranslateVisualID(i, orig_visual);
 
           status = ScreenSaverSetAttributes(client);
        }
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 6771cf1..85e0f87 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -66,7 +66,6 @@
 
 #ifdef PANORAMIX
 #include "panoramiXsrv.h"
-extern XID *PanoramiXVisualTable;
 #endif
 
 extern __GLXFBConfig **__glXFBConfigs;
@@ -2824,14 +2823,8 @@ int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
 #ifdef PANORAMIX
 	   else if (!noPanoramiXExtension) {
 	      /* convert the associated visualId to the panoramix one */
-              for (v=0; v<255; v++) {
-		 if ( PanoramiXVisualTable[ v * MAXSCREENS + screen ] ==
-		      associatedVisualId ) {
-		    associatedVisualId = v;
-		    break;
-		 } 
-	      }
-	      pFBConfig->associatedVisualId = associatedVisualId;
+	      pFBConfig->associatedVisualId =
+		  PanoramiXTranslateVisualID(screen, v);
 	   }
 #endif
 	}
diff --git a/hw/xfree86/loader/extsym.c b/hw/xfree86/loader/extsym.c
index e09e9c0..1bdff94 100644
--- a/hw/xfree86/loader/extsym.c
+++ b/hw/xfree86/loader/extsym.c
@@ -44,7 +44,6 @@ extern RESTYPE ShmSegType, ShmPixType;
 extern Bool noPanoramiXExtension;
 extern int PanoramiXNumScreens;
 extern PanoramiXData *panoramiXdataPtr;
-extern XID *PanoramiXVisualTable;
 extern unsigned long XRT_WINDOW;
 extern unsigned long XRT_PIXMAP;
 extern unsigned long XRT_GC;
@@ -69,7 +68,6 @@ _X_HIDDEN void *extLookupTab[] = {
     SYMFUNC(XineramaDeleteResource)
     SYMVAR(PanoramiXNumScreens)
     SYMVAR(panoramiXdataPtr)
-    SYMVAR(PanoramiXVisualTable)
     SYMVAR(XRT_WINDOW)
     SYMVAR(XRT_PIXMAP)
     SYMVAR(XRT_GC)
commit a4202b898f07dd733590ae5adb21e48775369781
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Feb 22 18:22:58 2008 +0100

    XKB: Actually use the keymap we compile at startup
    
    During XkbInitKeyboardDevice, we compiled a keymap and promptly threw it away;
    brief inspection revealed the embarassingly simple problem.  Sorry.

diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 37dd940..2b5f1fb 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -138,6 +138,8 @@ static char *		XkbLayoutUsed=	NULL;
 static char *		XkbVariantUsed=	NULL;
 static char *		XkbOptionsUsed=	NULL;
 
+static XkbDescPtr       xkb_cached_map = NULL;
+
 _X_EXPORT Bool		noXkbExtension=		XKB_DFLT_DISABLED;
 static Bool		XkbWantRulesProp=	XKB_DFLT_RULES_PROP;
 
@@ -284,6 +286,9 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout,
 static Bool
 XkbInitKeyTypes(XkbDescPtr xkb)
 {
+    if (xkb->defined & XkmTypesMask)
+        return True;
+
     initTypeNames(NULL);
     if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_dflt_types)!=Success)
 	return False;
@@ -310,6 +315,9 @@ XkbInitCompatStructs(XkbDescPtr xkb)
 register int 	i;
 XkbCompatMapPtr	compat;
 
+    if (xkb->defined & XkmCompatMapMask)
+        return True;
+
     if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_dfltSI)!=Success)
 	return BadAlloc;
     compat = xkb->compat;
@@ -358,28 +366,33 @@ Atom		unknown;
     if (names->symbols==None)		names->symbols= unknown;
     if (names->types==None)		names->types= unknown;
     if (names->compat==None)		names->compat= unknown;
-    if (names->vmods[vmod_NumLock]==None)
-        names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock");
-    if (names->vmods[vmod_Alt]==None)
-        names->vmods[vmod_Alt]= CREATE_ATOM("Alt");
-    if (names->vmods[vmod_AltGr]==None)
-        names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch");
-
-    initIndicatorNames(NULL,xkb);
-    if (names->indicators[LED_CAPS-1]==None)
-        names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock");
-    if (names->indicators[LED_NUM-1]==None)
-        names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock");
-    if (names->indicators[LED_SCROLL-1]==None)
-        names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock");
+    if (!(xkb->defined & XkmVirtualModsMask)) {
+        if (names->vmods[vmod_NumLock]==None)
+            names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock");
+        if (names->vmods[vmod_Alt]==None)
+            names->vmods[vmod_Alt]= CREATE_ATOM("Alt");
+        if (names->vmods[vmod_AltGr]==None)
+            names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch");
+    }
+
+    if (!(xkb->defined & XkmIndicatorsMask)) {
+        initIndicatorNames(NULL,xkb);
+        if (names->indicators[LED_CAPS-1]==None)
+            names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock");
+        if (names->indicators[LED_NUM-1]==None)
+            names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock");
+        if (names->indicators[LED_SCROLL-1]==None)
+            names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock");
 #ifdef LED_COMPOSE
-    if (names->indicators[LED_COMPOSE-1]==None)
-        names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose");
+        if (names->indicators[LED_COMPOSE-1]==None)
+            names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose");
 #endif
+    }
 
     if (xkb->geom!=NULL)
 	 names->geometry= xkb->geom->name;
     else names->geometry= unknown;
+
     return Success;
 }
 
@@ -393,27 +406,31 @@ XkbSrvLedInfoPtr	sli;
     xkb= xkbi->desc;
     if (XkbAllocIndicatorMaps(xkb)!=Success)
 	return BadAlloc;
-    map= xkb->indicators;
-    map->phys_indicators = PHYS_LEDS;
-    map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit;
-    map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked;
-    map->maps[LED_CAPS-1].mods.mask= LockMask;
-    map->maps[LED_CAPS-1].mods.real_mods= LockMask;
-
-    map->maps[LED_NUM-1].flags= XkbIM_NoExplicit;
-    map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked;
-    map->maps[LED_NUM-1].mods.mask= 0;
-    map->maps[LED_NUM-1].mods.real_mods= 0;
-    map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask;
-
-    map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit;
-    map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked;
-    map->maps[LED_SCROLL-1].mods.mask= Mod3Mask;
-    map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask;
+
+    if (!(xkb->defined & XkmIndicatorsMask)) {
+        map= xkb->indicators;
+        map->phys_indicators = PHYS_LEDS;
+        map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit;
+        map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked;
+        map->maps[LED_CAPS-1].mods.mask= LockMask;
+        map->maps[LED_CAPS-1].mods.real_mods= LockMask;
+
+        map->maps[LED_NUM-1].flags= XkbIM_NoExplicit;
+        map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked;
+        map->maps[LED_NUM-1].mods.mask= 0;
+        map->maps[LED_NUM-1].mods.real_mods= 0;
+        map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask;
+
+        map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit;
+        map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked;
+        map->maps[LED_SCROLL-1].mods.mask= Mod3Mask;
+        map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask;
+    }
 
     sli= XkbFindSrvLedInfo(xkbi->device,XkbDfltXIClass,XkbDfltXIId,0);
     if (sli)
 	XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask);
+
     return Success;
 }
 
@@ -428,7 +445,8 @@ XkbControlsPtr	ctrls;
     if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success)
 	FatalError("Couldn't allocate keyboard controls\n");
     ctrls= xkb->ctrls;
-    ctrls->num_groups = 1;
+    if (!(xkb->defined & XkmSymbolsMask))
+        ctrls->num_groups = 1;
     ctrls->groups_wrap = XkbSetGroupInfo(1,XkbWrapIntoRange,0);
     ctrls->internal.mask = 0;
     ctrls->internal.real_mods = 0;
@@ -458,11 +476,18 @@ XkbEventCauseRec	cause;
     pXDev->key->xkbInfo= xkbi= _XkbTypedCalloc(1,XkbSrvInfoRec);
     if ( xkbi ) {
 	XkbDescPtr	xkb;
-        xkbi->desc= XkbAllocKeyboard();
-	if (!xkbi->desc)
-	    FatalError("Couldn't allocate keyboard description\n");
-	xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode;
-	xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode;
+
+        if (xkb_cached_map) {
+            xkbi->desc = xkb_cached_map;
+            xkb_cached_map = NULL;
+        }
+        else {
+            xkbi->desc= XkbAllocKeyboard();
+            if (!xkbi->desc)
+                FatalError("Couldn't allocate keyboard description\n");
+            xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode;
+            xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode;
+        }
 	xkb= xkbi->desc;
 	if (xkb->min_key_code == 0)
 	    xkb->min_key_code = pXDev->key->curKeySyms.minKeyCode;
@@ -494,14 +519,23 @@ XkbEventCauseRec	cause;
 
 	XkbInitControls(pXDev,xkbi);
 
-        memcpy(xkb->map->modmap,pXDev->key->modifierMap,xkb->max_key_code+1);
+        if (xkb->defined & XkmSymbolsMask)
+            memcpy(pXDev->key->modifierMap, xkb->map->modmap,
+                   xkb->max_key_code + 1);
+        else
+            memcpy(xkb->map->modmap, pXDev->key->modifierMap,
+                   xkb->max_key_code + 1);
 
 	XkbInitIndicatorMap(xkbi);
 
 	XkbDDXInitDevice(pXDev);
 
-        XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb),
-                                  &changes);
+        if (xkb->defined & XkmSymbolsMask)
+            XkbUpdateKeyTypesFromCore(pXDev, xkb->min_key_code,
+                                      XkbNumKeys(xkb), &changes);
+        else
+            XkbUpdateCoreDescription(pXDev, True);
+
 	XkbSetCauseUnknown(&cause);
 	XkbUpdateActions(pXDev,xkb->min_key_code, XkbNumKeys(xkb),&changes,
 								&check,&cause);
@@ -632,11 +666,15 @@ XkbDescPtr              xkb;
 		pMods= tmpMods;
 	    }
 	}
+        /* Store the map here so we can pick it back up in XkbInitDevice.
+         * Sigh. */
+        xkb_cached_map = xkb;
     }
     else {
 	LogMessage(X_WARNING, "Couldn't load XKB keymap, falling back to pre-XKB keymap\n");
     }
     ok= InitKeyboardDeviceStruct((DevicePtr)dev,pSyms,pMods,bellProc,ctrlProc);
+    xkb_cached_map = NULL;
     if ((pSyms==&tmpSyms)&&(pSyms->map!=NULL)) {
 	_XkbFree(pSyms->map);
 	pSyms->map= NULL;
commit c14fd2a5cb3f45d5c4502e09f55f5e3732c5e698
Author: Dodji Seketeli <dodji at seketeli.org>
Date:   Thu Feb 21 15:33:02 2008 +0100

    [Xephyr/GL] properly route expose event on GL drawables
    
    When an expose event happens on an host GL window paired with an
    internal drawable, route that expose event to the clients listening
    to the expose event on the internal drawable.

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 6ec95d6..738704e 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -841,6 +841,37 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs =
   ephyrWarpCursor
 };
 
+/**
+ * find if the remote window denoted by a_remote
+ * is paired with an internal Window within the Xephyr server.
+ * If the remove window is paired with an internal window, send an
+ * expose event to the client insterested in the internal window expose event.
+ *
+ * Pairing happens when a drawable inside Xephyr is associated with
+ * a GL surface in a DRI environment.
+ * Look at the function ProcXF86DRICreateDrawable in ephyrdriext.c to
+ * know a paired window is created.
+ *
+ * This is useful to make GL drawables (only windows for now) handle
+ * expose events and send those events to clients.
+ */
+static void
+ephyrExposePairedWindow (int a_remote)
+{
+    EphyrWindowPair *pair = NULL;
+    RegionRec reg;
+    ScreenPtr screen;
+
+    if (!findWindowPairFromRemote (a_remote, &pair)) {
+	EPHYR_LOG ("did not find a pair for this window\n");
+	return;
+    }
+    screen = pair->local->drawable.pScreen;
+    REGION_NULL (screen, &reg);
+    REGION_COPY (screen, &reg, &pair->local->clipList);
+    screen->WindowExposures (pair->local, &reg, NullRegion);
+    REGION_UNINIT (screen, &reg);
+}
 
 void
 ephyrPoll(void)
@@ -861,9 +892,13 @@ ephyrPoll(void)
             if (ephyrCurScreen != ev.data.mouse_motion.screen)
               {
                   EPHYR_LOG ("warping mouse cursor:%d\n", ephyrCurScreen) ;
-                  ephyrWarpCursor(screenInfo.screens[ev.data.mouse_motion.screen],
-                                   ev.data.mouse_motion.x,
-                                   ev.data.mouse_motion.y );
+                  if (ev.data.mouse_motion.screen >= 0)
+                    {
+                      ephyrWarpCursor
+                            (screenInfo.screens[ev.data.mouse_motion.screen],
+                             ev.data.mouse_motion.x,
+                             ev.data.mouse_motion.y );
+                    }
               }
             else
               {
@@ -913,6 +948,16 @@ ephyrPoll(void)
 	  KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE);
 	  break;
 
+	case EPHYR_EV_EXPOSE:
+	  /*
+	   * We only receive expose events when the expose event have
+	   * be generated for a drawable that is a host X window managed
+	   * by Xephyr. Host X windows managed by Xephyr exists for instance
+	   * when Xephyr is asked to create a GL drawable in a DRI environment.
+	   */
+	  ephyrExposePairedWindow (ev.data.expose.window);
+	  break;
+
 	default:
 	  break;
 	}
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 1b9dce5..fafe56d 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -59,10 +59,6 @@
 #define _HAVE_XALLOC_DECLS
 #include "ephyrlog.h"
 
-typedef struct {
-    WindowPtr local ;
-    int remote ;
-} EphyrWindowPair;
 
 typedef struct {
     int foo;
@@ -950,6 +946,26 @@ findWindowPairFromLocal (WindowPtr a_local,
     return FALSE ;
 }
 
+Bool
+findWindowPairFromRemote (int a_remote,
+                          EphyrWindowPair **a_pair)
+{
+    int i=0 ;
+
+    EPHYR_RETURN_VAL_IF_FAIL (a_pair, FALSE) ;
+
+    for (i=0; i < NUM_WINDOW_PAIRS; i++) {
+        if (window_pairs[i].remote == a_remote) {
+            *a_pair = &window_pairs[i] ;
+            EPHYR_LOG ("found (%p, %d)\n",
+                       (*a_pair)->local,
+                       (*a_pair)->remote) ;
+            return TRUE ;
+        }
+    }
+    return FALSE ;
+}
+
 static Bool
 createHostPeerWindow (const WindowPtr a_win,
                       int *a_peer_win)
diff --git a/hw/kdrive/ephyr/ephyrdriext.h b/hw/kdrive/ephyr/ephyrdriext.h
index 66af833..01c9421 100644
--- a/hw/kdrive/ephyr/ephyrdriext.h
+++ b/hw/kdrive/ephyr/ephyrdriext.h
@@ -27,6 +27,16 @@
  */
 #ifndef __EPHYRDRIEXT_H__
 #define __EPHYRDRIEXT_H__
+
+typedef struct {
+    WindowPtr local ;
+    int remote ;
+} EphyrWindowPair;
+
 Bool ephyrDRIExtensionInit (ScreenPtr a_screen) ;
+
+Bool findWindowPairFromRemote (int a_remote,
+			       EphyrWindowPair **a_pair);
+
 #endif /*__EPHYRDRIEXT_H__*/
 
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index a5413b8..ae1bb4b 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -839,16 +839,38 @@ hostx_load_keymap(void)
 static struct EphyrHostScreen *
 host_screen_from_window (Window w)
 {
-  int index;
+  int index = 0;
+  struct EphyrHostScreen *result  = NULL;
+#if 0
+  unsigned int num_children = 0;
+  Window root = None, parent = None, *children = NULL;
+#endif
 
   for (index = 0 ; index < HostX.n_screens ; index++)
     {
       if (HostX.screens[index].win == w)
         {
-          return &HostX.screens[index];
+          result = &HostX.screens[index];
+          goto out;
         }
     }
-  return NULL;
+#if 0
+  XQueryTree (hostx_get_display (), w, &root, &parent,
+              &children, &num_children);
+  if (parent == root || parent == None)
+      goto out;
+  result = host_screen_from_window (parent);
+#endif
+
+out:
+#if 0
+  if (children)
+      {
+        XFree (children);
+        children = NULL;
+      }
+#endif
+  return result;
 }
 
 int
@@ -870,9 +892,19 @@ hostx_get_event(EphyrHostXEvent *ev)
 	  {
 	    struct EphyrHostScreen *host_screen =
                 host_screen_from_window (xev.xexpose.window);
-	    hostx_paint_rect (host_screen->info, 0, 0, 0, 0,
-                              host_screen->win_width,
-                              host_screen->win_height);
+            if (host_screen)
+              {
+                hostx_paint_rect (host_screen->info, 0, 0, 0, 0,
+                                  host_screen->win_width,
+                                  host_screen->win_height);
+              }
+            else
+              {
+                EPHYR_LOG_ERROR ("failed to get host screen\n");
+                ev->type = EPHYR_EV_EXPOSE;
+                ev->data.expose.window = xev.xexpose.window;
+                return 1;
+              }
 	  }
 	  return 0;
 
@@ -1113,12 +1145,18 @@ hostx_create_window (int a_screen_number,
                                                   visual_info->screen),
                                       visual_info->visual,
                                       AllocNone) ;
-    winmask = CWColormap;
+    attrs.event_mask = ButtonPressMask
+                       |ButtonReleaseMask
+                       |PointerMotionMask
+                       |KeyPressMask
+                       |KeyReleaseMask
+                       |ExposureMask;
+    winmask = CWColormap|CWEventMask;
 
     win = XCreateWindow (dpy, hostx_get_window (a_screen_number),
                          a_geometry->x, a_geometry->y,
                          a_geometry->width, a_geometry->height, 0,
-                         visual_info->depth, InputOutput,
+                         visual_info->depth, CopyFromParent,
                          visual_info->visual, winmask, &attrs) ;
     if (win == None) {
         EPHYR_LOG_ERROR ("failed to create peer window\n") ;
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index 3caa466..f72cfe7 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -47,7 +47,8 @@ typedef enum EphyrHostXEventType
   EPHYR_EV_MOUSE_PRESS,
   EPHYR_EV_MOUSE_RELEASE,
   EPHYR_EV_KEY_PRESS,
-  EPHYR_EV_KEY_RELEASE
+  EPHYR_EV_KEY_RELEASE,
+  EPHYR_EV_EXPOSE
 } 
 EphyrHostXEventType;
 
@@ -87,6 +88,10 @@ struct EphyrHostXEvent
       int scancode;
     } key_down;
 
+    struct expose {
+      int window;
+    } expose;
+
   } data;
 
   int key_state;
commit 437c78ef9ff1177e04b3d6781b5805d89b2ab81a
Author: Dodji Seketeli <dodji at seketeli.org>
Date:   Thu Feb 21 15:29:27 2008 +0100

    [Xephyr/GL] don't crash when the host returns a NULL server string

diff --git a/hw/kdrive/ephyr/ephyrglxext.c b/hw/kdrive/ephyr/ephyrglxext.c
index 381c9d7..43a634d 100644
--- a/hw/kdrive/ephyr/ephyrglxext.c
+++ b/hw/kdrive/ephyr/ephyrglxext.c
@@ -362,7 +362,7 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc)
     ClientPtr client = a_cl->client;
     xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) a_pc;
     xGLXQueryServerStringReply reply;
-    char *server_string=NULL ;
+    char *server_string=NULL, *buf=NULL;
     int length=0 ;
 
     EPHYR_LOG ("enter\n") ;
@@ -379,9 +379,15 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc)
     reply.sequenceNumber = client->sequence ;
     reply.length = __GLX_PAD (length) >> 2 ;
     reply.n = length ;
+    buf = xcalloc (reply.length << 2, 1);
+    if (!buf) {
+        EPHYR_LOG_ERROR ("failed to allocate string\n;");
+        return BadAlloc;
+    }
+    memcpy (buf, server_string, length);
 
     WriteToClient(client, sz_xGLXQueryServerStringReply, (char*)&reply);
-    WriteToClient(client, (int)length, server_string);
+    WriteToClient(client, (int)(reply.length << 2), server_string);
 
     res = Success ;
 
@@ -391,6 +397,10 @@ out:
         xfree (server_string) ;
         server_string = NULL;
     }
+    if (buf) {
+        xfree (buf);
+        buf = NULL;
+    }
     return res ;
 }
 
diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c
index 5d9a482..f5db5be 100644
--- a/hw/kdrive/ephyr/ephyrhostglx.c
+++ b/hw/kdrive/ephyr/ephyrhostglx.c
@@ -151,6 +151,7 @@ ephyrHostGLXGetStringFromServer (int a_screen_number,
 {
     Bool is_ok=FALSE ;
     Display *dpy = hostx_get_display () ;
+    int default_screen = DefaultScreen (dpy);
     xGLXGenericGetStringReq *req=NULL;
     xGLXSingleReply reply;
     int length=0, numbytes=0, major_opcode=0, get_string_op=0;
@@ -188,13 +189,17 @@ ephyrHostGLXGetStringFromServer (int a_screen_number,
     GetReq (GLXGenericGetString, req);
     req->reqType = major_opcode;
     req->glxCode = get_string_op;
-    req->for_whom = DefaultScreen (dpy);
+    req->for_whom = default_screen;
     req->name = a_string_name;
 
     _XReply (dpy, (xReply *)&reply, 0, False);
 
     length = reply.length * 4;
-    numbytes = reply.size;
+    if (!length) {
+        numbytes = 0;
+    } else {
+        numbytes = reply.size;
+    }
     EPHYR_LOG ("going to get a string of size:%d\n", numbytes) ;
 
     *a_string = (char *) Xmalloc (numbytes +1);
commit f343265a289724c81017f089c024a7618267c4e3
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Fri Feb 15 19:53:45 2008 -0500

    XACE: Make the default window background state configurable per-window.
    
    To recap: the original XC-SECURITY extension disallowed background "None" if
    the window was untrusted.  XACE 1.0 preserved this check as a hook function.
    XACE pre-2.0 removed the hook and first abolished background "None entirely,
    then restored it as a global on/off switch in response to Bug #13683.
    Now it's back to being per-window, via a flag instead of a hook function.

diff --git a/Xext/security.c b/Xext/security.c
index a3cde2c..27ef382 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -810,6 +810,11 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
     obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey);
 
+    /* disable background None for untrusted windows */
+    if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW))
+	if (subj->haveState && subj->trustLevel != XSecurityClientTrusted)
+	    ((WindowPtr)rec->res)->forcedBG = TRUE;
+
     /* special checks for server-owned resources */
     if (cid == 0) {
 	if (rec->rtype & RC_DRAWABLE)
diff --git a/Xext/xace.h b/Xext/xace.h
index 2016ca3..1f07d9f 100644
--- a/Xext/xace.h
+++ b/Xext/xace.h
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "property.h"
 
 /* Default window background */
-#define XaceBackgroundNoneState		None
+#define XaceBackgroundNoneState(w) ((w)->forcedBG ? BackgroundPixel : None)
 
 /* security hooks */
 /* Constants used to identify the available security hooks
@@ -100,7 +100,7 @@ extern void XaceCensorImage(
 #else /* XACE */
 
 /* Default window background */
-#define XaceBackgroundNoneState		None
+#define XaceBackgroundNoneState(w)		None
 
 /* Define calls away when XACE is not being built. */
 
diff --git a/dix/window.c b/dix/window.c
index 70e32fb..9975b5e 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -291,6 +291,7 @@ SetWindowToDefaults(WindowPtr pWin)
     pWin->dontPropagate = 0;
     pWin->forcedBS = FALSE;
     pWin->redirectDraw = RedirectDrawNone;
+    pWin->forcedBG = FALSE;
 }
 
 static void
@@ -702,8 +703,8 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
 	return NullWindow;
     }
 
-    pWin->backgroundState = XaceBackgroundNoneState;
-    pWin->background.pixel = 0;
+    pWin->backgroundState = XaceBackgroundNoneState(pWin);
+    pWin->background.pixel = pScreen->whitePixel;
 
     pWin->borderIsPixel = pParent->borderIsPixel;
     pWin->border = pParent->border;
@@ -1014,8 +1015,8 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
 		if (!pWin->parent)
 		    MakeRootTile(pWin);
 		else {
-		    pWin->backgroundState = XaceBackgroundNoneState;
-		    pWin->background.pixel = 0;
+		    pWin->backgroundState = XaceBackgroundNoneState(pWin);
+		    pWin->background.pixel = pScreen->whitePixel;
 		}
 	    }
 	    else if (pixID == ParentRelative)
diff --git a/include/windowstr.h b/include/windowstr.h
index a161324..e06a2f1 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -159,6 +159,7 @@ typedef struct _Window {
     unsigned		dontPropagate:3;/* index into DontPropagateMasks */
     unsigned		forcedBS:1;	/* system-supplied backingStore */
     unsigned		redirectDraw:2;	/* COMPOSITE rendering redirect */
+    unsigned		forcedBG:1;	/* must have an opaque background */
 } WindowRec;
 
 /*
commit 7c2f0a8befb310707ea923dbcdfde84521e52c88
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Fri Feb 15 19:17:40 2008 -0500

    Remove COMPOSITE ifdefs around WindowRec bitfield as it has no ABI effect.

diff --git a/dix/window.c b/dix/window.c
index b896ef7..70e32fb 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -290,9 +290,7 @@ SetWindowToDefaults(WindowPtr pWin)
     pWin->deliverableEvents = 0;
     pWin->dontPropagate = 0;
     pWin->forcedBS = FALSE;
-#ifdef COMPOSITE
     pWin->redirectDraw = RedirectDrawNone;
-#endif
 }
 
 static void
diff --git a/include/windowstr.h b/include/windowstr.h
index 4359481..a161324 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -158,9 +158,7 @@ typedef struct _Window {
     unsigned		viewable:1;	/* realized && InputOutput */
     unsigned		dontPropagate:3;/* index into DontPropagateMasks */
     unsigned		forcedBS:1;	/* system-supplied backingStore */
-#ifdef COMPOSITE
-    unsigned		redirectDraw:2;	/* rendering is redirected from here */
-#endif
+    unsigned		redirectDraw:2;	/* COMPOSITE rendering redirect */
 } WindowRec;
 
 /*
commit 5cb9e15562a32c1f102d94d5e15d5fd298baff3f
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Feb 20 10:36:06 2008 -0800

    EXA: Fix Render acceleration in copy and tiling cases.
    
    Code shuffling in a634c9b03494ba80aeec28be19662ac96657cc23 broke this by
    leaving pSrcPixmap = NULL.

diff --git a/exa/exa_render.c b/exa/exa_render.c
index a510e54..6df2a23 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -587,7 +587,6 @@ exaComposite(CARD8	op,
     int ret = -1;
     Bool saveSrcRepeat = pSrc->repeat;
     Bool saveMaskRepeat = pMask ? pMask->repeat : 0;
-    PixmapPtr pSrcPixmap = NULL;
     RegionRec region;
 
     /* We currently don't support acceleration of gradients, or other pictures
@@ -624,7 +623,9 @@ exaComposite(CARD8	op,
 		if (ret == 1)
 		    goto done;
 	    }
-	    else if (pSrcPixmap && !pSrc->repeat && !pSrc->transform)
+	    else if (pSrc->pDrawable != NULL &&
+		     !pSrc->repeat &&
+		     !pSrc->transform)
 	    {
 		xDst += pDst->pDrawable->x;
 		yDst += pDst->pDrawable->y;
@@ -644,7 +645,9 @@ exaComposite(CARD8	op,
 		REGION_UNINIT(pDst->pDrawable->pScreen, &region);
 		goto done;
 	    }
-	    else if (pSrcPixmap && !pSrc->transform &&
+	    else if (pSrc->pDrawable != NULL &&
+		     pSrc->pDrawable->type == DRAWABLE_PIXMAP &&
+		     !pSrc->transform &&
 		     pSrc->repeatType == RepeatNormal)
 	    {
 		DDXPointRec srcOrg;
@@ -671,10 +674,11 @@ exaComposite(CARD8	op,
 					       width, height))
 		    goto done;
 
-		srcOrg.x = (xSrc - xDst) % pSrcPixmap->drawable.width;
-		srcOrg.y = (ySrc - yDst) % pSrcPixmap->drawable.height;
+		srcOrg.x = (xSrc - xDst) % pSrc->pDrawable->width;
+		srcOrg.y = (ySrc - yDst) % pSrc->pDrawable->height;
 
-		ret = exaFillRegionTiled(pDst->pDrawable, &region, pSrcPixmap,
+		ret = exaFillRegionTiled(pDst->pDrawable, &region,
+					 (PixmapPtr)pSrc->pDrawable,
 					 &srcOrg, FB_ALLONES, GXcopy);
 
 		REGION_UNINIT(pDst->pDrawable->pScreen, &region);
commit 67a78e84a81571cedaf7fd214a21ce1bbdc4fb3b
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Tue Feb 19 21:31:50 2008 +1030

    Revert "xfree86: plug a memory leak in xf86LoadModules."
    
    This reverts commit 3abce3ea2b1f43bd111664d4a57e5ccd282acab0 and
    6cbaf15e6109ba77819c4070f5b46c78237ec460.
    
    The memory returned to xf86LoadModule was allocated in doLoadModule, which
    calls the respective module's PreInit. As it turns out, input and output
    drivers store a pointer to the module elswhere, so freeing it in
    xf86LoadModule is a bad idea.
    
    For further reference: hw/xfree86/common/xf86Helper.c
        Input drivers: xf86InputDriverList[blah]->module = module;
        Output drivers: xf86DriverList[blah]->module = module;
    
    Unloading the module would not look pretty then.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 7bcfdff..41cf1d1 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1922,7 +1922,6 @@ xf86LoadModules(char **list, pointer *optlist)
     int i;
     char *name;
     Bool failed = FALSE;
-    ModuleDescPtr desc;
 
     if (!list)
 	return TRUE;
@@ -1946,14 +1945,9 @@ xf86LoadModules(char **list, pointer *optlist)
 	else
 	    opt = NULL;
 
-	desc = LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj,
-		&errmin);
-	if (!desc) {
+        if (!LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin)) {
 	    LoaderErrorMsg(NULL, name, errmaj, errmin);
 	    failed = TRUE;
-	} else {
-	    xfree(desc->name);
-	    xfree(desc);
 	}
 	xfree(name);
     }
commit 5f5ec5db35e82ddd9659763875e5d6c63cf1b691
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Tue Feb 19 00:00:11 2008 -0800

    XQuartz: unsetenv("DISPLAY") before startx if X11.app can't connect to it.
    Also fix casting to silence warning.
    (cherry picked from commit a5cbf78471ec6e6ad672dc00118fc7edbd6ddc7c)

diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c
index 54d0136..e97770a 100644
--- a/hw/xquartz/bundle/bundle-main.c
+++ b/hw/xquartz/bundle/bundle-main.c
@@ -45,6 +45,7 @@ static char *command_from_prefs(const char *key, const char *default_value);
 
 int main(int argc, char **argv) {
     Display *display;
+    const char *s;
 
     size_t i;
     fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
@@ -72,7 +73,12 @@ int main(int argc, char **argv) {
     }
 
     /* Start the server */
-    fprintf(stderr, "X11.app: Could not connect to server.  Starting X server.");
+    if(s = getenv("DISPLAY")) {
+        fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting).  Starting X server.\n", s);
+        unsetenv("DISPLAY");
+    } else {
+        fprintf(stderr, "X11.app: Could not connect to server (DISPLAY is not set).  Starting X server.\n");
+    }
     return execute(command_from_prefs("startx_script", DEFAULT_STARTX));
 }
 
@@ -93,7 +99,7 @@ static int execute(const char *command) {
         fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s);
     }
 
-    execvp (newargv[0], (const char **) newargv);
+    execvp (newargv[0], (char * const *) newargv);
     perror ("X11.app: Couldn't exec.");
     return(1);
 }
commit 6cbaf15e6109ba77819c4070f5b46c78237ec460
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Tue Feb 19 12:02:22 2008 +1030

    xfree86: guard against NULL-pointer dereferences in xf86LoadModules.
    
    Should have been part of 3abce3ea2b1f43bd111664d4a57e5ccd282acab0, but I
    forgot to git-update-index before I committed.
    
    Thanks to Bill Crawford for pointing it out.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 0d90b9d..7bcfdff 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1951,10 +1951,11 @@ xf86LoadModules(char **list, pointer *optlist)
 	if (!desc) {
 	    LoaderErrorMsg(NULL, name, errmaj, errmin);
 	    failed = TRUE;
+	} else {
+	    xfree(desc->name);
+	    xfree(desc);
 	}
 	xfree(name);
-	xfree(desc->name);
-	xfree(desc);
     }
     return !failed;
 }
commit 3abce3ea2b1f43bd111664d4a57e5ccd282acab0
Author: Arjan van de Ven <arjan at infradead.org>
Date:   Mon Feb 18 18:13:10 2008 +1030

    xfree86: plug a memory leak in xf86LoadModules.
    
    LoadModule() returns the only reference to a fresh piece of memory (a
    ModuleDescPtr). Sadly, xf86LoadModules dropped the return value on the floor
    leaking memory for each module it loaded.
    
    Signed-off-by: Peter Hutterer <peter at cs.unisa.edu.au>

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 41cf1d1..0d90b9d 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1922,6 +1922,7 @@ xf86LoadModules(char **list, pointer *optlist)
     int i;
     char *name;
     Bool failed = FALSE;
+    ModuleDescPtr desc;
 
     if (!list)
 	return TRUE;
@@ -1945,11 +1946,15 @@ xf86LoadModules(char **list, pointer *optlist)
 	else
 	    opt = NULL;
 
-        if (!LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin)) {
+	desc = LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj,
+		&errmin);
+	if (!desc) {
 	    LoaderErrorMsg(NULL, name, errmaj, errmin);
 	    failed = TRUE;
 	}
 	xfree(name);
+	xfree(desc->name);
+	xfree(desc);
     }
     return !failed;
 }
commit 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3
Author: Arjan van de Ven <arjan at infradead.org>
Date:   Mon Feb 18 17:52:37 2008 +1030

    xfree86: plug memory leak in InitPathList.
    
    All the failure paths were very diligent in freeing the "fullpath" temporary
    string, but the success case was not. All the content only got strdup()d, so
    it's not live memory anymore.
    
    Signed-off-by: Peter Hutterer <peter at cs.unisa.edu.au>

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 650dcf3..7f3bbe4 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -177,6 +177,7 @@ InitPathList(const char *path)
     }
     if (list)
 	list[n] = NULL;
+    xfree(fullpath);
     return list;
 }
 
commit 1bec6ad8977cefa49cc297a310f5eb0b7cd0b8bc
Author: Arjan van de Ven <arjan at infradead.org>
Date:   Mon Feb 18 17:46:04 2008 +1030

    xfree86: plug memory leak in xf86LogInit()
    
    xf86LogInit allocates a piece of memory, stores it in lf. LogInit() will then
    effectively strdup it, but lf is never freed again.
    
    Signed-off-by: Peter Hutterer <peter at cs.unisa.edu.au>

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1368d04..0d2471a 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1353,7 +1353,7 @@ xf86ErrorF(const char *format, ...)
 void
 xf86LogInit()
 {
-    char *lf;
+    char *lf = NULL;
 
 #define LOGSUFFIX ".log"
 #define LOGOLDSUFFIX ".old"
@@ -1377,6 +1377,8 @@ xf86LogInit()
 
 #undef LOGSUFFIX
 #undef LOGOLDSUFFIX
+
+    free(lf);
 }
 
 void
commit 45d00433e7bfbab476dd02ec92a9fbee40af5dad
Author: Dan Nicholson <dbn.lists at gmail.com>
Date:   Tue Jan 15 19:43:16 2008 -0800

    glx: Use glapi sources from the mesa tree
    
    With recent mesa HEAD, the glapi sources used only in the xserver glx
    module are carried in the mesa tree. Previously, these were generated
    separately and committed to the xserver tree.
    
    The build is changed to symlink these files like the other mesa sources.
    This reduces the chance for mismatches between mesa's glX API and the
    xserver's glX API.

diff --git a/GL/glx/.gitignore b/GL/glx/.gitignore
index 5cf6f0a..c49b54d 100644
--- a/GL/glx/.gitignore
+++ b/GL/glx/.gitignore
@@ -1,5 +1,13 @@
-indirect_size.h
+glapi.c
 glcontextmodes.c
 glcontextmodes.h
-glapi.c
 glthread.c
+indirect_dispatch.c
+indirect_dispatch.h
+indirect_dispatch_swap.c
+indirect_reqsize.c
+indirect_reqsize.h
+indirect_size.h
+indirect_size_get.c
+indirect_size_get.h
+indirect_table.c
diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am
index e37e499..377d760 100644
--- a/GL/glx/Makefile.am
+++ b/GL/glx/Makefile.am
@@ -33,7 +33,15 @@ nodist_libglx_la_SOURCES = indirect_size.h \
 			   glapi.c \
 			   glcontextmodes.c \
 			   glcontextmode.h \
-			   glthread.c
+			   glthread.c \
+			   indirect_dispatch.c \
+			   indirect_dispatch.h \
+			   indirect_dispatch_swap.c \
+			   indirect_reqsize.c \
+			   indirect_reqsize.h \
+			   indirect_size_get.c \
+			   indirect_size_get.h \
+			   indirect_table.c
 
 libglxdri_la_SOURCES = \
         glxdri.c \
@@ -56,15 +64,7 @@ libglx_la_SOURCES = \
         glxserver.h \
         glxutil.c \
         glxutil.h \
-        indirect_dispatch.c \
-        indirect_dispatch.h \
-        indirect_dispatch_swap.c \
         indirect_program.c \
-        indirect_reqsize.c \
-        indirect_reqsize.h \
-        indirect_size_get.c \
-        indirect_size_get.h \
-        indirect_table.c \
         indirect_table.h \
         indirect_texture_compression.c \
         indirect_util.c \
diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c
deleted file mode 100644
index 2afd3eb..0000000
--- a/GL/glx/indirect_dispatch.c
+++ /dev/null
@@ -1,5889 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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, 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
- * 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.
- */
-
-#include <X11/Xmd.h>
-#include <GL/gl.h>
-#include <GL/glxproto.h>
-#include <inttypes.h>
-#include "indirect_size.h"
-#include "indirect_size_get.h"
-#include "indirect_dispatch.h"
-#include "glxserver.h"
-#include "glxbyteorder.h"
-#include "indirect_util.h"
-#include "singlesize.h"
-#include "glapitable.h"
-#include "glapi.h"
-#include "glthread.h"
-#include "dispatch.h"
-
-#define __GLX_PAD(x)  (((x) + 3) & ~3)
-
-typedef struct {
-    __GLX_PIXEL_3D_HDR;
-} __GLXpixel3DHeader;
-
-extern GLboolean __glXErrorOccured( void );
-extern void __glXClearErrorOccured( void );
-
-static const unsigned dummy_answer[2] = {0, 0};
-
-int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_NewList( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            *(GLenum   *)(pc +  4)
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_EndList( GET_DISPATCH(), () );
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_CallList(GLbyte * pc)
-{
-    CALL_CallList( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_CallLists(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  0);
-    const GLenum type = *(GLenum   *)(pc +  4);
-    const GLvoid * lists =  (const GLvoid *)(pc +  8);
-
-    lists = (const GLvoid *) (pc + 8);
-
-    CALL_CallLists( GET_DISPATCH(), (
-        n,
-        type,
-        lists
-    ) );
-}
-
-int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_DeleteLists( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            *(GLsizei  *)(pc +  4)
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLuint retval;
-        retval = CALL_GenLists( GET_DISPATCH(), (
-            *(GLsizei  *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_ListBase(GLbyte * pc)
-{
-    CALL_ListBase( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Begin(GLbyte * pc)
-{
-    CALL_Begin( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Bitmap(GLbyte * pc)
-{
-    const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_Bitmap( GET_DISPATCH(), (
-        *(GLsizei  *)(pc + 20),
-        *(GLsizei  *)(pc + 24),
-        *(GLfloat  *)(pc + 28),
-        *(GLfloat  *)(pc + 32),
-        *(GLfloat  *)(pc + 36),
-        *(GLfloat  *)(pc + 40),
-        bitmap
-    ) );
-}
-
-void __glXDisp_Color3bv(GLbyte * pc)
-{
-    CALL_Color3bv( GET_DISPATCH(), (
-         (const GLbyte *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Color3dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color3fv(GLbyte * pc)
-{
-    CALL_Color3fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color3iv(GLbyte * pc)
-{
-    CALL_Color3iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color3sv(GLbyte * pc)
-{
-    CALL_Color3sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color3ubv(GLbyte * pc)
-{
-    CALL_Color3ubv( GET_DISPATCH(), (
-         (const GLubyte *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color3uiv(GLbyte * pc)
-{
-    CALL_Color3uiv( GET_DISPATCH(), (
-         (const GLuint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color3usv(GLbyte * pc)
-{
-    CALL_Color3usv( GET_DISPATCH(), (
-         (const GLushort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color4bv(GLbyte * pc)
-{
-    CALL_Color4bv( GET_DISPATCH(), (
-         (const GLbyte *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Color4dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color4fv(GLbyte * pc)
-{
-    CALL_Color4fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color4iv(GLbyte * pc)
-{
-    CALL_Color4iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color4sv(GLbyte * pc)
-{
-    CALL_Color4sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color4ubv(GLbyte * pc)
-{
-    CALL_Color4ubv( GET_DISPATCH(), (
-         (const GLubyte *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color4uiv(GLbyte * pc)
-{
-    CALL_Color4uiv( GET_DISPATCH(), (
-         (const GLuint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Color4usv(GLbyte * pc)
-{
-    CALL_Color4usv( GET_DISPATCH(), (
-         (const GLushort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_EdgeFlagv(GLbyte * pc)
-{
-    CALL_EdgeFlagv( GET_DISPATCH(), (
-         (const GLboolean *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_End(GLbyte * pc)
-{
-    CALL_End( GET_DISPATCH(), () );
-}
-
-void __glXDisp_Indexdv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Indexdv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Indexfv(GLbyte * pc)
-{
-    CALL_Indexfv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Indexiv(GLbyte * pc)
-{
-    CALL_Indexiv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Indexsv(GLbyte * pc)
-{
-    CALL_Indexsv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Normal3bv(GLbyte * pc)
-{
-    CALL_Normal3bv( GET_DISPATCH(), (
-         (const GLbyte *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Normal3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Normal3dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Normal3fv(GLbyte * pc)
-{
-    CALL_Normal3fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Normal3iv(GLbyte * pc)
-{
-    CALL_Normal3iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Normal3sv(GLbyte * pc)
-{
-    CALL_Normal3sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_RasterPos2dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos2fv(GLbyte * pc)
-{
-    CALL_RasterPos2fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos2iv(GLbyte * pc)
-{
-    CALL_RasterPos2iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos2sv(GLbyte * pc)
-{
-    CALL_RasterPos2sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_RasterPos3dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos3fv(GLbyte * pc)
-{
-    CALL_RasterPos3fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos3iv(GLbyte * pc)
-{
-    CALL_RasterPos3iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos3sv(GLbyte * pc)
-{
-    CALL_RasterPos3sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_RasterPos4dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos4fv(GLbyte * pc)
-{
-    CALL_RasterPos4fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos4iv(GLbyte * pc)
-{
-    CALL_RasterPos4iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_RasterPos4sv(GLbyte * pc)
-{
-    CALL_RasterPos4sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Rectdv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Rectdv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0),
-         (const GLdouble *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_Rectfv(GLbyte * pc)
-{
-    CALL_Rectfv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0),
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Rectiv(GLbyte * pc)
-{
-    CALL_Rectiv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0),
-         (const GLint *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Rectsv(GLbyte * pc)
-{
-    CALL_Rectsv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_TexCoord1dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexCoord1dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord1fv(GLbyte * pc)
-{
-    CALL_TexCoord1fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord1iv(GLbyte * pc)
-{
-    CALL_TexCoord1iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord1sv(GLbyte * pc)
-{
-    CALL_TexCoord1sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexCoord2dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord2fv(GLbyte * pc)
-{
-    CALL_TexCoord2fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord2iv(GLbyte * pc)
-{
-    CALL_TexCoord2iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord2sv(GLbyte * pc)
-{
-    CALL_TexCoord2sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexCoord3dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord3fv(GLbyte * pc)
-{
-    CALL_TexCoord3fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord3iv(GLbyte * pc)
-{
-    CALL_TexCoord3iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord3sv(GLbyte * pc)
-{
-    CALL_TexCoord3sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexCoord4dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord4fv(GLbyte * pc)
-{
-    CALL_TexCoord4fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord4iv(GLbyte * pc)
-{
-    CALL_TexCoord4iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexCoord4sv(GLbyte * pc)
-{
-    CALL_TexCoord4sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Vertex2dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex2fv(GLbyte * pc)
-{
-    CALL_Vertex2fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex2iv(GLbyte * pc)
-{
-    CALL_Vertex2iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex2sv(GLbyte * pc)
-{
-    CALL_Vertex2sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Vertex3dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex3fv(GLbyte * pc)
-{
-    CALL_Vertex3fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex3iv(GLbyte * pc)
-{
-    CALL_Vertex3iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex3sv(GLbyte * pc)
-{
-    CALL_Vertex3sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Vertex4dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex4fv(GLbyte * pc)
-{
-    CALL_Vertex4fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex4iv(GLbyte * pc)
-{
-    CALL_Vertex4iv( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Vertex4sv(GLbyte * pc)
-{
-    CALL_Vertex4sv( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ClipPlane(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 36);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ClipPlane( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 32),
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ColorMaterial(GLbyte * pc)
-{
-    CALL_ColorMaterial( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_CullFace(GLbyte * pc)
-{
-    CALL_CullFace( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Fogf(GLbyte * pc)
-{
-    CALL_Fogf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLfloat  *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_Fogfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  0);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 4);
-
-    CALL_Fogfv( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_Fogi(GLbyte * pc)
-{
-    CALL_Fogi( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_Fogiv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  0);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 4);
-
-    CALL_Fogiv( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_FrontFace(GLbyte * pc)
-{
-    CALL_FrontFace( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Hint(GLbyte * pc)
-{
-    CALL_Hint( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_Lightf(GLbyte * pc)
-{
-    CALL_Lightf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Lightfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 8);
-
-    CALL_Lightfv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_Lighti(GLbyte * pc)
-{
-    CALL_Lighti( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Lightiv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 8);
-
-    CALL_Lightiv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_LightModelf(GLbyte * pc)
-{
-    CALL_LightModelf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLfloat  *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_LightModelfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  0);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 4);
-
-    CALL_LightModelfv( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_LightModeli(GLbyte * pc)
-{
-    CALL_LightModeli( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_LightModeliv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  0);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 4);
-
-    CALL_LightModeliv( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_LineStipple(GLbyte * pc)
-{
-    CALL_LineStipple( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0),
-        *(GLushort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_LineWidth(GLbyte * pc)
-{
-    CALL_LineWidth( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Materialf(GLbyte * pc)
-{
-    CALL_Materialf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Materialfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 8);
-
-    CALL_Materialfv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_Materiali(GLbyte * pc)
-{
-    CALL_Materiali( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Materialiv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 8);
-
-    CALL_Materialiv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_PointSize(GLbyte * pc)
-{
-    CALL_PointSize( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_PolygonMode(GLbyte * pc)
-{
-    CALL_PolygonMode( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_PolygonStipple(GLbyte * pc)
-{
-    const GLubyte * const mask = (const GLubyte *) (pc + 20);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_PolygonStipple( GET_DISPATCH(), (
-        mask
-    ) );
-}
-
-void __glXDisp_Scissor(GLbyte * pc)
-{
-    CALL_Scissor( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLsizei  *)(pc +  8),
-        *(GLsizei  *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_ShadeModel(GLbyte * pc)
-{
-    CALL_ShadeModel( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexParameterf(GLbyte * pc)
-{
-    CALL_TexParameterf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_TexParameterfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 8);
-
-    CALL_TexParameterfv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_TexParameteri(GLbyte * pc)
-{
-    CALL_TexParameteri( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_TexParameteriv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 8);
-
-    CALL_TexParameteriv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_TexImage1D(GLbyte * pc)
-{
-    const GLvoid * const pixels = (const GLvoid *) (pc + 52);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_TexImage1D( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 20),
-        *(GLint    *)(pc + 24),
-        *(GLint    *)(pc + 28),
-        *(GLsizei  *)(pc + 32),
-        *(GLint    *)(pc + 40),
-        *(GLenum   *)(pc + 44),
-        *(GLenum   *)(pc + 48),
-        pixels
-    ) );
-}
-
-void __glXDisp_TexImage2D(GLbyte * pc)
-{
-    const GLvoid * const pixels = (const GLvoid *) (pc + 52);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_TexImage2D( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 20),
-        *(GLint    *)(pc + 24),
-        *(GLint    *)(pc + 28),
-        *(GLsizei  *)(pc + 32),
-        *(GLsizei  *)(pc + 36),
-        *(GLint    *)(pc + 40),
-        *(GLenum   *)(pc + 44),
-        *(GLenum   *)(pc + 48),
-        pixels
-    ) );
-}
-
-void __glXDisp_TexEnvf(GLbyte * pc)
-{
-    CALL_TexEnvf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_TexEnvfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 8);
-
-    CALL_TexEnvfv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_TexEnvi(GLbyte * pc)
-{
-    CALL_TexEnvi( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_TexEnviv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 8);
-
-    CALL_TexEnviv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_TexGend(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexGend( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  8),
-        *(GLenum   *)(pc + 12),
-        *(GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexGendv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLdouble * params;
-
-#ifdef __GLX_ALIGN64
-    const GLuint compsize = __glTexGendv_size(pname);
-    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    params = (const GLdouble *) (pc + 8);
-
-    CALL_TexGendv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_TexGenf(GLbyte * pc)
-{
-    CALL_TexGenf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_TexGenfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 8);
-
-    CALL_TexGenfv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_TexGeni(GLbyte * pc)
-{
-    CALL_TexGeni( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_TexGeniv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 8);
-
-    CALL_TexGeniv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_InitNames(GLbyte * pc)
-{
-    CALL_InitNames( GET_DISPATCH(), () );
-}
-
-void __glXDisp_LoadName(GLbyte * pc)
-{
-    CALL_LoadName( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_PassThrough(GLbyte * pc)
-{
-    CALL_PassThrough( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_PopName(GLbyte * pc)
-{
-    CALL_PopName( GET_DISPATCH(), () );
-}
-
-void __glXDisp_PushName(GLbyte * pc)
-{
-    CALL_PushName( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_DrawBuffer(GLbyte * pc)
-{
-    CALL_DrawBuffer( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Clear(GLbyte * pc)
-{
-    CALL_Clear( GET_DISPATCH(), (
-        *(GLbitfield *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ClearAccum(GLbyte * pc)
-{
-    CALL_ClearAccum( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0),
-        *(GLfloat  *)(pc +  4),
-        *(GLfloat  *)(pc +  8),
-        *(GLfloat  *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_ClearIndex(GLbyte * pc)
-{
-    CALL_ClearIndex( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ClearColor(GLbyte * pc)
-{
-    CALL_ClearColor( GET_DISPATCH(), (
-        *(GLclampf *)(pc +  0),
-        *(GLclampf *)(pc +  4),
-        *(GLclampf *)(pc +  8),
-        *(GLclampf *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_ClearStencil(GLbyte * pc)
-{
-    CALL_ClearStencil( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ClearDepth(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ClearDepth( GET_DISPATCH(), (
-        *(GLclampd *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_StencilMask(GLbyte * pc)
-{
-    CALL_StencilMask( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ColorMask(GLbyte * pc)
-{
-    CALL_ColorMask( GET_DISPATCH(), (
-        *(GLboolean *)(pc +  0),
-        *(GLboolean *)(pc +  1),
-        *(GLboolean *)(pc +  2),
-        *(GLboolean *)(pc +  3)
-    ) );
-}
-
-void __glXDisp_DepthMask(GLbyte * pc)
-{
-    CALL_DepthMask( GET_DISPATCH(), (
-        *(GLboolean *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_IndexMask(GLbyte * pc)
-{
-    CALL_IndexMask( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Accum(GLbyte * pc)
-{
-    CALL_Accum( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLfloat  *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_Disable(GLbyte * pc)
-{
-    CALL_Disable( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Enable(GLbyte * pc)
-{
-    CALL_Enable( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_PopAttrib(GLbyte * pc)
-{
-    CALL_PopAttrib( GET_DISPATCH(), () );
-}
-
-void __glXDisp_PushAttrib(GLbyte * pc)
-{
-    CALL_PushAttrib( GET_DISPATCH(), (
-        *(GLbitfield *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MapGrid1d(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 20);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MapGrid1d( GET_DISPATCH(), (
-        *(GLint    *)(pc + 16),
-        *(GLdouble *)(pc +  0),
-        *(GLdouble *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_MapGrid1f(GLbyte * pc)
-{
-    CALL_MapGrid1f( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0),
-        *(GLfloat  *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_MapGrid2d(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 40);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MapGrid2d( GET_DISPATCH(), (
-        *(GLint    *)(pc + 32),
-        *(GLdouble *)(pc +  0),
-        *(GLdouble *)(pc +  8),
-        *(GLint    *)(pc + 36),
-        *(GLdouble *)(pc + 16),
-        *(GLdouble *)(pc + 24)
-    ) );
-}
-
-void __glXDisp_MapGrid2f(GLbyte * pc)
-{
-    CALL_MapGrid2f( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0),
-        *(GLfloat  *)(pc +  4),
-        *(GLfloat  *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLfloat  *)(pc + 16),
-        *(GLfloat  *)(pc + 20)
-    ) );
-}
-
-void __glXDisp_EvalCoord1dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_EvalCoord1dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_EvalCoord1fv(GLbyte * pc)
-{
-    CALL_EvalCoord1fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_EvalCoord2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_EvalCoord2dv( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_EvalCoord2fv(GLbyte * pc)
-{
-    CALL_EvalCoord2fv( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_EvalMesh1(GLbyte * pc)
-{
-    CALL_EvalMesh1( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLint    *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_EvalPoint1(GLbyte * pc)
-{
-    CALL_EvalPoint1( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_EvalMesh2(GLbyte * pc)
-{
-    CALL_EvalMesh2( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLint    *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_EvalPoint2(GLbyte * pc)
-{
-    CALL_EvalPoint2( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0),
-        *(GLint    *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_AlphaFunc(GLbyte * pc)
-{
-    CALL_AlphaFunc( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLclampf *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_BlendFunc(GLbyte * pc)
-{
-    CALL_BlendFunc( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_LogicOp(GLbyte * pc)
-{
-    CALL_LogicOp( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_StencilFunc(GLbyte * pc)
-{
-    CALL_StencilFunc( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLuint   *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_StencilOp(GLbyte * pc)
-{
-    CALL_StencilOp( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLenum   *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_DepthFunc(GLbyte * pc)
-{
-    CALL_DepthFunc( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_PixelZoom(GLbyte * pc)
-{
-    CALL_PixelZoom( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0),
-        *(GLfloat  *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_PixelTransferf(GLbyte * pc)
-{
-    CALL_PixelTransferf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLfloat  *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_PixelTransferi(GLbyte * pc)
-{
-    CALL_PixelTransferi( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4)
-    ) );
-}
-
-int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_PixelStoref( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLfloat  *)(pc +  4)
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_PixelStorei( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLint    *)(pc +  4)
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_PixelMapfv(GLbyte * pc)
-{
-    const GLsizei mapsize = *(GLsizei  *)(pc +  4);
-
-    CALL_PixelMapfv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        mapsize,
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_PixelMapuiv(GLbyte * pc)
-{
-    const GLsizei mapsize = *(GLsizei  *)(pc +  4);
-
-    CALL_PixelMapuiv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        mapsize,
-         (const GLuint *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_PixelMapusv(GLbyte * pc)
-{
-    const GLsizei mapsize = *(GLsizei  *)(pc +  4);
-
-    CALL_PixelMapusv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        mapsize,
-         (const GLushort *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_ReadBuffer(GLbyte * pc)
-{
-    CALL_ReadBuffer( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_CopyPixels(GLbyte * pc)
-{
-    CALL_CopyPixels( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLsizei  *)(pc +  8),
-        *(GLsizei  *)(pc + 12),
-        *(GLenum   *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_DrawPixels(GLbyte * pc)
-{
-    const GLvoid * const pixels = (const GLvoid *) (pc + 36);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_DrawPixels( GET_DISPATCH(), (
-        *(GLsizei  *)(pc + 20),
-        *(GLsizei  *)(pc + 24),
-        *(GLenum   *)(pc + 28),
-        *(GLenum   *)(pc + 32),
-        pixels
-    ) );
-}
-
-int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  0);
-
-        const GLuint compsize = __glGetBooleanv_size(pname);
-        GLboolean answerBuffer[200];
-        GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetBooleanv( GET_DISPATCH(), (
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLdouble equation[4];
-        CALL_GetClipPlane( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            equation
-        ) );
-        __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  0);
-
-        const GLuint compsize = __glGetDoublev_size(pname);
-        GLdouble answerBuffer[200];
-        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetDoublev( GET_DISPATCH(), (
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLenum retval;
-        retval = CALL_GetError( GET_DISPATCH(), () );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  0);
-
-        const GLuint compsize = __glGetFloatv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetFloatv( GET_DISPATCH(), (
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  0);
-
-        const GLuint compsize = __glGetIntegerv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetIntegerv( GET_DISPATCH(), (
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetLightfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetLightfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetLightiv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetLightiv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum target = *(GLenum   *)(pc +  0);
-        const GLenum query = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMapdv_size(target,query);
-        GLdouble answerBuffer[200];
-        GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (v == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMapdv( GET_DISPATCH(), (
-            target,
-            query,
-            v
-        ) );
-        __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum target = *(GLenum   *)(pc +  0);
-        const GLenum query = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMapfv_size(target,query);
-        GLfloat answerBuffer[200];
-        GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (v == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMapfv( GET_DISPATCH(), (
-            target,
-            query,
-            v
-        ) );
-        __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum target = *(GLenum   *)(pc +  0);
-        const GLenum query = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMapiv_size(target,query);
-        GLint answerBuffer[200];
-        GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (v == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMapiv( GET_DISPATCH(), (
-            target,
-            query,
-            v
-        ) );
-        __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMaterialfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMaterialfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMaterialiv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMaterialiv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum map = *(GLenum   *)(pc +  0);
-
-        const GLuint compsize = __glGetPixelMapfv_size(map);
-        GLfloat answerBuffer[200];
-        GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (values == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetPixelMapfv( GET_DISPATCH(), (
-            map,
-            values
-        ) );
-        __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum map = *(GLenum   *)(pc +  0);
-
-        const GLuint compsize = __glGetPixelMapuiv_size(map);
-        GLuint answerBuffer[200];
-        GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (values == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetPixelMapuiv( GET_DISPATCH(), (
-            map,
-            values
-        ) );
-        __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum map = *(GLenum   *)(pc +  0);
-
-        const GLuint compsize = __glGetPixelMapusv_size(map);
-        GLushort answerBuffer[200];
-        GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2);
-
-        if (values == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetPixelMapusv( GET_DISPATCH(), (
-            map,
-            values
-        ) );
-        __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetTexEnvfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexEnvfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetTexEnviv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexEnviv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetTexGendv_size(pname);
-        GLdouble answerBuffer[200];
-        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexGendv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetTexGenfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexGenfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetTexGeniv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexGeniv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetTexParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetTexParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  8);
-
-        const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexLevelParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLint    *)(pc +  4),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  8);
-
-        const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexLevelParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLint    *)(pc +  4),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsEnabled( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsList( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_DepthRange(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_DepthRange( GET_DISPATCH(), (
-        *(GLclampd *)(pc +  0),
-        *(GLclampd *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Frustum(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 48);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Frustum( GET_DISPATCH(), (
-        *(GLdouble *)(pc +  0),
-        *(GLdouble *)(pc +  8),
-        *(GLdouble *)(pc + 16),
-        *(GLdouble *)(pc + 24),
-        *(GLdouble *)(pc + 32),
-        *(GLdouble *)(pc + 40)
-    ) );
-}
-
-void __glXDisp_LoadIdentity(GLbyte * pc)
-{
-    CALL_LoadIdentity( GET_DISPATCH(), () );
-}
-
-void __glXDisp_LoadMatrixf(GLbyte * pc)
-{
-    CALL_LoadMatrixf( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_LoadMatrixd(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 128);
-        pc -= 4;
-    }
-#endif
-
-    CALL_LoadMatrixd( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MatrixMode(GLbyte * pc)
-{
-    CALL_MatrixMode( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MultMatrixf(GLbyte * pc)
-{
-    CALL_MultMatrixf( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MultMatrixd(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 128);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultMatrixd( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_Ortho(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 48);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Ortho( GET_DISPATCH(), (
-        *(GLdouble *)(pc +  0),
-        *(GLdouble *)(pc +  8),
-        *(GLdouble *)(pc + 16),
-        *(GLdouble *)(pc + 24),
-        *(GLdouble *)(pc + 32),
-        *(GLdouble *)(pc + 40)
-    ) );
-}
-
-void __glXDisp_PopMatrix(GLbyte * pc)
-{
-    CALL_PopMatrix( GET_DISPATCH(), () );
-}
-
-void __glXDisp_PushMatrix(GLbyte * pc)
-{
-    CALL_PushMatrix( GET_DISPATCH(), () );
-}
-
-void __glXDisp_Rotated(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Rotated( GET_DISPATCH(), (
-        *(GLdouble *)(pc +  0),
-        *(GLdouble *)(pc +  8),
-        *(GLdouble *)(pc + 16),
-        *(GLdouble *)(pc + 24)
-    ) );
-}
-
-void __glXDisp_Rotatef(GLbyte * pc)
-{
-    CALL_Rotatef( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0),
-        *(GLfloat  *)(pc +  4),
-        *(GLfloat  *)(pc +  8),
-        *(GLfloat  *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_Scaled(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Scaled( GET_DISPATCH(), (
-        *(GLdouble *)(pc +  0),
-        *(GLdouble *)(pc +  8),
-        *(GLdouble *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_Scalef(GLbyte * pc)
-{
-    CALL_Scalef( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0),
-        *(GLfloat  *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Translated(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Translated( GET_DISPATCH(), (
-        *(GLdouble *)(pc +  0),
-        *(GLdouble *)(pc +  8),
-        *(GLdouble *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_Translatef(GLbyte * pc)
-{
-    CALL_Translatef( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0),
-        *(GLfloat  *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_Viewport(GLbyte * pc)
-{
-    CALL_Viewport( GET_DISPATCH(), (
-        *(GLint    *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLsizei  *)(pc +  8),
-        *(GLsizei  *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_BindTexture(GLbyte * pc)
-{
-    CALL_BindTexture( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_Indexubv(GLbyte * pc)
-{
-    CALL_Indexubv( GET_DISPATCH(), (
-         (const GLubyte *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_PolygonOffset(GLbyte * pc)
-{
-    CALL_PolygonOffset( GET_DISPATCH(), (
-        *(GLfloat  *)(pc +  0),
-        *(GLfloat  *)(pc +  4)
-    ) );
-}
-
-int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLboolean retval;
-        GLboolean answerBuffer[200];
-        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
-        retval = CALL_AreTexturesResident( GET_DISPATCH(), (
-            n,
-             (const GLuint *)(pc +  4),
-            residences
-        ) );
-        __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLboolean retval;
-        GLboolean answerBuffer[200];
-        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
-        retval = CALL_AreTexturesResident( GET_DISPATCH(), (
-            n,
-             (const GLuint *)(pc +  4),
-            residences
-        ) );
-        __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_CopyTexImage1D(GLbyte * pc)
-{
-    CALL_CopyTexImage1D( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLint    *)(pc + 16),
-        *(GLsizei  *)(pc + 20),
-        *(GLint    *)(pc + 24)
-    ) );
-}
-
-void __glXDisp_CopyTexImage2D(GLbyte * pc)
-{
-    CALL_CopyTexImage2D( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLint    *)(pc + 16),
-        *(GLsizei  *)(pc + 20),
-        *(GLsizei  *)(pc + 24),
-        *(GLint    *)(pc + 28)
-    ) );
-}
-
-void __glXDisp_CopyTexSubImage1D(GLbyte * pc)
-{
-    CALL_CopyTexSubImage1D( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLint    *)(pc + 16),
-        *(GLsizei  *)(pc + 20)
-    ) );
-}
-
-void __glXDisp_CopyTexSubImage2D(GLbyte * pc)
-{
-    CALL_CopyTexSubImage2D( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLint    *)(pc + 16),
-        *(GLint    *)(pc + 20),
-        *(GLsizei  *)(pc + 24),
-        *(GLsizei  *)(pc + 28)
-    ) );
-}
-
-int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        CALL_DeleteTextures( GET_DISPATCH(), (
-            n,
-             (const GLuint *)(pc +  4)
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        CALL_DeleteTextures( GET_DISPATCH(), (
-            n,
-             (const GLuint *)(pc +  4)
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLuint answerBuffer[200];
-        GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenTextures( GET_DISPATCH(), (
-            n,
-            textures
-        ) );
-        __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLuint answerBuffer[200];
-        GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenTextures( GET_DISPATCH(), (
-            n,
-            textures
-        ) );
-        __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsTexture( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsTexture( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_PrioritizeTextures(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  0);
-
-    CALL_PrioritizeTextures( GET_DISPATCH(), (
-        n,
-         (const GLuint *)(pc +  4),
-         (const GLclampf *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_TexSubImage1D(GLbyte * pc)
-{
-    const CARD32 ptr_is_null = *(CARD32 *)(pc + 52);
-    const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_TexSubImage1D( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 20),
-        *(GLint    *)(pc + 24),
-        *(GLint    *)(pc + 28),
-        *(GLsizei  *)(pc + 36),
-        *(GLenum   *)(pc + 44),
-        *(GLenum   *)(pc + 48),
-        pixels
-    ) );
-}
-
-void __glXDisp_TexSubImage2D(GLbyte * pc)
-{
-    const CARD32 ptr_is_null = *(CARD32 *)(pc + 52);
-    const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_TexSubImage2D( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 20),
-        *(GLint    *)(pc + 24),
-        *(GLint    *)(pc + 28),
-        *(GLint    *)(pc + 32),
-        *(GLsizei  *)(pc + 36),
-        *(GLsizei  *)(pc + 40),
-        *(GLenum   *)(pc + 44),
-        *(GLenum   *)(pc + 48),
-        pixels
-    ) );
-}
-
-void __glXDisp_BlendColor(GLbyte * pc)
-{
-    CALL_BlendColor( GET_DISPATCH(), (
-        *(GLclampf *)(pc +  0),
-        *(GLclampf *)(pc +  4),
-        *(GLclampf *)(pc +  8),
-        *(GLclampf *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_BlendEquation(GLbyte * pc)
-{
-    CALL_BlendEquation( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ColorTable(GLbyte * pc)
-{
-    const GLvoid * const table = (const GLvoid *) (pc + 40);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_ColorTable( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 20),
-        *(GLenum   *)(pc + 24),
-        *(GLsizei  *)(pc + 28),
-        *(GLenum   *)(pc + 32),
-        *(GLenum   *)(pc + 36),
-        table
-    ) );
-}
-
-void __glXDisp_ColorTableParameterfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 8);
-
-    CALL_ColorTableParameterfv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_ColorTableParameteriv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 8);
-
-    CALL_ColorTableParameteriv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_CopyColorTable(GLbyte * pc)
-{
-    CALL_CopyColorTable( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLsizei  *)(pc + 16)
-    ) );
-}
-
-int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetColorTableParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetColorTableParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetColorTableParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetColorTableParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetColorTableParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetColorTableParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetColorTableParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetColorTableParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_ColorSubTable(GLbyte * pc)
-{
-    const GLvoid * const data = (const GLvoid *) (pc + 40);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_ColorSubTable( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 20),
-        *(GLsizei  *)(pc + 24),
-        *(GLsizei  *)(pc + 28),
-        *(GLenum   *)(pc + 32),
-        *(GLenum   *)(pc + 36),
-        data
-    ) );
-}
-
-void __glXDisp_CopyColorSubTable(GLbyte * pc)
-{
-    CALL_CopyColorSubTable( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLsizei  *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLsizei  *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_ConvolutionFilter1D(GLbyte * pc)
-{
-    const GLvoid * const image = (const GLvoid *) (pc + 44);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_ConvolutionFilter1D( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 20),
-        *(GLenum   *)(pc + 24),
-        *(GLsizei  *)(pc + 28),
-        *(GLenum   *)(pc + 36),
-        *(GLenum   *)(pc + 40),
-        image
-    ) );
-}
-
-void __glXDisp_ConvolutionFilter2D(GLbyte * pc)
-{
-    const GLvoid * const image = (const GLvoid *) (pc + 44);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_ConvolutionFilter2D( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 20),
-        *(GLenum   *)(pc + 24),
-        *(GLsizei  *)(pc + 28),
-        *(GLsizei  *)(pc + 32),
-        *(GLenum   *)(pc + 36),
-        *(GLenum   *)(pc + 40),
-        image
-    ) );
-}
-
-void __glXDisp_ConvolutionParameterf(GLbyte * pc)
-{
-    CALL_ConvolutionParameterf( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLfloat  *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_ConvolutionParameterfv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 8);
-
-    CALL_ConvolutionParameterfv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_ConvolutionParameteri(GLbyte * pc)
-{
-    CALL_ConvolutionParameteri( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_ConvolutionParameteriv(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  4);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 8);
-
-    CALL_ConvolutionParameteriv( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc)
-{
-    CALL_CopyConvolutionFilter1D( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLsizei  *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc)
-{
-    CALL_CopyConvolutionFilter2D( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLsizei  *)(pc + 16),
-        *(GLsizei  *)(pc + 20)
-    ) );
-}
-
-int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetHistogramParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetHistogramParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetHistogramParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetHistogramParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetHistogramParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetHistogramParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetHistogramParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetHistogramParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_Histogram(GLbyte * pc)
-{
-    CALL_Histogram( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLsizei  *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLboolean *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_Minmax(GLbyte * pc)
-{
-    CALL_Minmax( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLboolean *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_ResetHistogram(GLbyte * pc)
-{
-    CALL_ResetHistogram( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ResetMinmax(GLbyte * pc)
-{
-    CALL_ResetMinmax( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_TexImage3D(GLbyte * pc)
-{
-    const CARD32 ptr_is_null = *(CARD32 *)(pc + 76);
-    const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80);
-    __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES,  (GLint) hdr->skipImages) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_TexImage3D( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 36),
-        *(GLint    *)(pc + 40),
-        *(GLint    *)(pc + 44),
-        *(GLsizei  *)(pc + 48),
-        *(GLsizei  *)(pc + 52),
-        *(GLsizei  *)(pc + 56),
-        *(GLint    *)(pc + 64),
-        *(GLenum   *)(pc + 68),
-        *(GLenum   *)(pc + 72),
-        pixels
-    ) );
-}
-
-void __glXDisp_TexSubImage3D(GLbyte * pc)
-{
-    const CARD32 ptr_is_null = *(CARD32 *)(pc + 84);
-    const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88);
-    __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) hdr->rowLength) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) hdr->skipRows) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES,  (GLint) hdr->skipImages) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) hdr->skipPixels) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) hdr->alignment) );
-
-    CALL_TexSubImage3D( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 36),
-        *(GLint    *)(pc + 40),
-        *(GLint    *)(pc + 44),
-        *(GLint    *)(pc + 48),
-        *(GLint    *)(pc + 52),
-        *(GLsizei  *)(pc + 60),
-        *(GLsizei  *)(pc + 64),
-        *(GLsizei  *)(pc + 68),
-        *(GLenum   *)(pc + 76),
-        *(GLenum   *)(pc + 80),
-        pixels
-    ) );
-}
-
-void __glXDisp_CopyTexSubImage3D(GLbyte * pc)
-{
-    CALL_CopyTexSubImage3D( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLint    *)(pc + 16),
-        *(GLint    *)(pc + 20),
-        *(GLint    *)(pc + 24),
-        *(GLsizei  *)(pc + 28),
-        *(GLsizei  *)(pc + 32)
-    ) );
-}
-
-void __glXDisp_ActiveTextureARB(GLbyte * pc)
-{
-    CALL_ActiveTextureARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 12);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultiTexCoord1dvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  8),
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord1fvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord1ivARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord1svARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord1svARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 20);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultiTexCoord2dvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 16),
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord2fvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord2ivARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord2svARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord2svARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 28);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultiTexCoord3dvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 24),
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord3fvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord3ivARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord3svARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord3svARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 36);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultiTexCoord4dvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc + 32),
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord4fvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord4ivARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_MultiTexCoord4svARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord4svARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_SampleCoverageARB(GLbyte * pc)
-{
-    CALL_SampleCoverageARB( GET_DISPATCH(), (
-        *(GLclampf *)(pc +  0),
-        *(GLboolean *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_CompressedTexImage1DARB(GLbyte * pc)
-{
-    const GLsizei imageSize = *(GLsizei  *)(pc + 20);
-
-    CALL_CompressedTexImage1DARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLsizei  *)(pc + 12),
-        *(GLint    *)(pc + 16),
-        imageSize,
-         (const GLvoid *)(pc + 24)
-    ) );
-}
-
-void __glXDisp_CompressedTexImage2DARB(GLbyte * pc)
-{
-    const GLsizei imageSize = *(GLsizei  *)(pc + 24);
-
-    CALL_CompressedTexImage2DARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLsizei  *)(pc + 12),
-        *(GLsizei  *)(pc + 16),
-        *(GLint    *)(pc + 20),
-        imageSize,
-         (const GLvoid *)(pc + 28)
-    ) );
-}
-
-void __glXDisp_CompressedTexImage3DARB(GLbyte * pc)
-{
-    const GLsizei imageSize = *(GLsizei  *)(pc + 28);
-
-    CALL_CompressedTexImage3DARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLsizei  *)(pc + 12),
-        *(GLsizei  *)(pc + 16),
-        *(GLsizei  *)(pc + 20),
-        *(GLint    *)(pc + 24),
-        imageSize,
-         (const GLvoid *)(pc + 32)
-    ) );
-}
-
-void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc)
-{
-    const GLsizei imageSize = *(GLsizei  *)(pc + 20);
-
-    CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLsizei  *)(pc + 12),
-        *(GLenum   *)(pc + 16),
-        imageSize,
-         (const GLvoid *)(pc + 24)
-    ) );
-}
-
-void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc)
-{
-    const GLsizei imageSize = *(GLsizei  *)(pc + 28);
-
-    CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLsizei  *)(pc + 16),
-        *(GLsizei  *)(pc + 20),
-        *(GLenum   *)(pc + 24),
-        imageSize,
-         (const GLvoid *)(pc + 32)
-    ) );
-}
-
-void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc)
-{
-    const GLsizei imageSize = *(GLsizei  *)(pc + 36);
-
-    CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4),
-        *(GLint    *)(pc +  8),
-        *(GLint    *)(pc + 12),
-        *(GLint    *)(pc + 16),
-        *(GLsizei  *)(pc + 20),
-        *(GLsizei  *)(pc + 24),
-        *(GLsizei  *)(pc + 28),
-        *(GLenum   *)(pc + 32),
-        imageSize,
-         (const GLvoid *)(pc + 40)
-    ) );
-}
-
-int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLdouble params[4];
-        CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLuint   *)(pc +  4),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLfloat params[4];
-        CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLuint   *)(pc +  4),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLdouble params[4];
-        CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLuint   *)(pc +  4),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLfloat params[4];
-        CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLuint   *)(pc +  4),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetProgramivARB_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetProgramivARB( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetVertexAttribdvARB_size(pname);
-        GLdouble answerBuffer[200];
-        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribdvARB( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetVertexAttribfvARB_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribfvARB( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetVertexAttribivARB_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribivARB( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 40);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-         (const GLdouble *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc)
-{
-    CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 40);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-         (const GLdouble *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc)
-{
-    CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_ProgramStringARB(GLbyte * pc)
-{
-    const GLsizei len = *(GLsizei  *)(pc +  8);
-
-    CALL_ProgramStringARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        len,
-         (const GLvoid *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_VertexAttrib1dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 12);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib1dvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLdouble *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib1fvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib1fvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib1svARB(GLbyte * pc)
-{
-    CALL_VertexAttrib1svARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib2dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 20);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib2dvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLdouble *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib2fvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib2fvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib2svARB(GLbyte * pc)
-{
-    CALL_VertexAttrib2svARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib3dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 28);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib3dvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLdouble *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib3fvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib3fvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib3svARB(GLbyte * pc)
-{
-    CALL_VertexAttrib3svARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NbvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLbyte *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4NivARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NivARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NsvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NubvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLubyte *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NuivARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLuint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NusvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLushort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4bvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4bvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLbyte *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 36);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib4dvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLdouble *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4fvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4fvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4ivARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4ivARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4svARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4svARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4ubvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLubyte *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4uivARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4uivARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLuint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4usvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4usvARB( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLushort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_BeginQueryARB(GLbyte * pc)
-{
-    CALL_BeginQueryARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4)
-    ) );
-}
-
-int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        CALL_DeleteQueriesARB( GET_DISPATCH(), (
-            n,
-             (const GLuint *)(pc +  4)
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_EndQueryARB(GLbyte * pc)
-{
-    CALL_EndQueryARB( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLuint answerBuffer[200];
-        GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenQueriesARB( GET_DISPATCH(), (
-            n,
-            ids
-        ) );
-        __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetQueryObjectivARB_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetQueryObjectivARB( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetQueryObjectuivARB_size(pname);
-        GLuint answerBuffer[200];
-        GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetQueryObjectuivARB( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetQueryivARB_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetQueryivARB( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsQueryARB( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_DrawBuffersARB(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  0);
-
-    CALL_DrawBuffersARB( GET_DISPATCH(), (
-        n,
-         (const GLenum *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_SampleMaskSGIS(GLbyte * pc)
-{
-    CALL_SampleMaskSGIS( GET_DISPATCH(), (
-        *(GLclampf *)(pc +  0),
-        *(GLboolean *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_SamplePatternSGIS(GLbyte * pc)
-{
-    CALL_SamplePatternSGIS( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_PointParameterfEXT(GLbyte * pc)
-{
-    CALL_PointParameterfEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLfloat  *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_PointParameterfvEXT(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  0);
-    const GLfloat * params;
-
-    params = (const GLfloat *) (pc + 4);
-
-    CALL_PointParameterfvEXT( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3bvEXT( GET_DISPATCH(), (
-         (const GLbyte *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_SecondaryColor3dvEXT( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3fvEXT( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3ivEXT( GET_DISPATCH(), (
-         (const GLint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_SecondaryColor3svEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3svEXT( GET_DISPATCH(), (
-         (const GLshort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), (
-         (const GLubyte *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3uivEXT( GET_DISPATCH(), (
-         (const GLuint *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3usvEXT( GET_DISPATCH(), (
-         (const GLushort *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_FogCoorddvEXT(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_FogCoorddvEXT( GET_DISPATCH(), (
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_FogCoordfvEXT(GLbyte * pc)
-{
-    CALL_FogCoordfvEXT( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc)
-{
-    CALL_BlendFuncSeparateEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLenum   *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_WindowPos3fvMESA(GLbyte * pc)
-{
-    CALL_WindowPos3fvMESA( GET_DISPATCH(), (
-         (const GLfloat *)(pc +  0)
-    ) );
-}
-
-int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLboolean retval;
-        GLboolean answerBuffer[200];
-        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
-        retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), (
-            n,
-             (const GLuint *)(pc +  4),
-            residences
-        ) );
-        __glXSendReply(cl->client, residences, n, 1, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_BindProgramNV(GLbyte * pc)
-{
-    CALL_BindProgramNV( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4)
-    ) );
-}
-
-int __glXDisp_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        CALL_DeleteProgramsNV( GET_DISPATCH(), (
-            n,
-             (const GLuint *)(pc +  4)
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_ExecuteProgramNV(GLbyte * pc)
-{
-    CALL_ExecuteProgramNV( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-int __glXDisp_GenProgramsNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLuint answerBuffer[200];
-        GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenProgramsNV( GET_DISPATCH(), (
-            n,
-            programs
-        ) );
-        __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLdouble params[4];
-        CALL_GetProgramParameterdvNV( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLuint   *)(pc +  4),
-            *(GLenum   *)(pc +  8),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLfloat params[4];
-        CALL_GetProgramParameterfvNV( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLuint   *)(pc +  4),
-            *(GLenum   *)(pc +  8),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetProgramivNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetProgramivNV_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetProgramivNV( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLint params[1];
-        CALL_GetTrackMatrixivNV( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLuint   *)(pc +  4),
-            *(GLenum   *)(pc +  8),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetVertexAttribdvNV_size(pname);
-        GLdouble answerBuffer[200];
-        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribdvNV( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetVertexAttribfvNV_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribfvNV( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname = *(GLenum   *)(pc +  4);
-
-        const GLuint compsize = __glGetVertexAttribivNV_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribivNV( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            pname,
-            params
-        ) );
-        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_IsProgramNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsProgramNV( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_LoadProgramNV(GLbyte * pc)
-{
-    const GLsizei len = *(GLsizei  *)(pc +  8);
-
-    CALL_LoadProgramNV( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-        len,
-         (const GLubyte *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_ProgramParameters4dvNV(GLbyte * pc)
-{
-    const GLuint num = *(GLuint   *)(pc +  8);
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ProgramParameters4dvNV( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-        num,
-         (const GLdouble *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_ProgramParameters4fvNV(GLbyte * pc)
-{
-    const GLuint num = *(GLuint   *)(pc +  8);
-
-    CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-        num,
-         (const GLfloat *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_RequestResidentProgramsNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  0);
-
-    CALL_RequestResidentProgramsNV( GET_DISPATCH(), (
-        n,
-         (const GLuint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_TrackMatrixNV(GLbyte * pc)
-{
-    CALL_TrackMatrixNV( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLenum   *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_VertexAttrib1dvNV(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 12);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib1dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLdouble *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib1fvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib1fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib1svNV(GLbyte * pc)
-{
-    CALL_VertexAttrib1svNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib2dvNV(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 20);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib2dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLdouble *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib2fvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib2fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib2svNV(GLbyte * pc)
-{
-    CALL_VertexAttrib2svNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib3dvNV(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 28);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib3dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLdouble *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib3fvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib3fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib3svNV(GLbyte * pc)
-{
-    CALL_VertexAttrib3svNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4dvNV(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 36);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib4dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLdouble *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4fvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib4fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLfloat *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4svNV(GLbyte * pc)
-{
-    CALL_VertexAttrib4svNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLshort *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib4ubvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-         (const GLubyte *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_VertexAttribs1dvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttribs1dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLdouble *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs1fvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs1fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs1svNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs1svNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLshort *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs2dvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttribs2dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLdouble *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs2fvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs2fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs2svNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs2svNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLshort *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs3dvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttribs3dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLdouble *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs3fvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs3fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs3svNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs3svNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLshort *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs4dvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttribs4dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLdouble *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs4fvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs4fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs4svNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs4svNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLshort *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  4);
-
-    CALL_VertexAttribs4ubvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        n,
-         (const GLubyte *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_PointParameteriNV(GLbyte * pc)
-{
-    CALL_PointParameteriNV( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLint    *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_PointParameterivNV(GLbyte * pc)
-{
-    const GLenum pname = *(GLenum   *)(pc +  0);
-    const GLint * params;
-
-    params = (const GLint *) (pc + 4);
-
-    CALL_PointParameterivNV( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc)
-{
-    CALL_ActiveStencilFaceEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei len = *(GLsizei  *)(pc +  4);
-
-        GLdouble params[4];
-        CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            len,
-             (const GLubyte *)(pc +  8),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei len = *(GLsizei  *)(pc +  4);
-
-        GLfloat params[4];
-        CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0),
-            len,
-             (const GLubyte *)(pc +  8),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 4, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc)
-{
-    const GLsizei len = *(GLsizei  *)(pc + 36);
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 44 + __GLX_PAD(len) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc + 32),
-        len,
-         (const GLubyte *)(pc + 40),
-         (const GLdouble *)(pc +  0)
-    ) );
-}
-
-void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc)
-{
-    const GLsizei len = *(GLsizei  *)(pc +  4);
-
-    CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), (
-        *(GLuint   *)(pc +  0),
-        len,
-         (const GLubyte *)(pc + 24),
-         (const GLfloat *)(pc +  8)
-    ) );
-}
-
-void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc)
-{
-    CALL_BlendEquationSeparateEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_BindFramebufferEXT(GLbyte * pc)
-{
-    CALL_BindFramebufferEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_BindRenderbufferEXT(GLbyte * pc)
-{
-    CALL_BindRenderbufferEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLuint   *)(pc +  4)
-    ) );
-}
-
-int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLenum retval;
-        retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  0);
-
-    CALL_DeleteFramebuffersEXT( GET_DISPATCH(), (
-        n,
-         (const GLuint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc)
-{
-    const GLsizei n = *(GLsizei  *)(pc +  0);
-
-    CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), (
-        n,
-         (const GLuint *)(pc +  4)
-    ) );
-}
-
-void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc)
-{
-    CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLuint   *)(pc + 12)
-    ) );
-}
-
-void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc)
-{
-    CALL_FramebufferTexture1DEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLuint   *)(pc + 12),
-        *(GLint    *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc)
-{
-    CALL_FramebufferTexture2DEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLuint   *)(pc + 12),
-        *(GLint    *)(pc + 16)
-    ) );
-}
-
-void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc)
-{
-    CALL_FramebufferTexture3DEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLenum   *)(pc +  8),
-        *(GLuint   *)(pc + 12),
-        *(GLint    *)(pc + 16),
-        *(GLint    *)(pc + 20)
-    ) );
-}
-
-int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLuint answerBuffer[200];
-        GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenFramebuffersEXT( GET_DISPATCH(), (
-            n,
-            framebuffers
-        ) );
-        __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n = *(GLsizei  *)(pc +  0);
-
-        GLuint answerBuffer[200];
-        GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenRenderbuffersEXT( GET_DISPATCH(), (
-            n,
-            renderbuffers
-        ) );
-        __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_GenerateMipmapEXT(GLbyte * pc)
-{
-    CALL_GenerateMipmapEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0)
-    ) );
-}
-
-int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLint params[1];
-        CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLenum   *)(pc +  4),
-            *(GLenum   *)(pc +  8),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLint params[1];
-        CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), (
-            *(GLenum   *)(pc +  0),
-            *(GLenum   *)(pc +  4),
-            params
-        ) );
-        __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsFramebufferEXT( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), (
-            *(GLuint   *)(pc +  0)
-        ) );
-        __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDisp_RenderbufferStorageEXT(GLbyte * pc)
-{
-    CALL_RenderbufferStorageEXT( GET_DISPATCH(), (
-        *(GLenum   *)(pc +  0),
-        *(GLenum   *)(pc +  4),
-        *(GLsizei  *)(pc +  8),
-        *(GLsizei  *)(pc + 12)
-    ) );
-}
-
diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h
deleted file mode 100644
index e81c382..0000000
--- a/GL/glx/indirect_dispatch.h
+++ /dev/null
@@ -1,1047 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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, 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
- * 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.
- */
-
-#if !defined( _INDIRECT_DISPATCH_H_ )
-#  define _INDIRECT_DISPATCH_H_
-
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
-#    define HIDDEN  __attribute__((visibility("hidden")))
-#  else
-#    define HIDDEN
-#  endif
-struct __GLXclientStateRec;
-
-extern HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc);
-extern HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc);
-extern HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc);
-extern HIDDEN void __glXDisp_SampleCoverageARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SampleCoverageARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc);
-extern HIDDEN void __glXDisp_BeginQueryARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BeginQueryARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PointParameteriNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PointParameteriNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Histogram(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Histogram(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc);
-extern HIDDEN void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Color3uiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc);
-extern HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc);
-extern HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Indexubv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc);
-extern HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexImage3D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc);
-extern HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Color3ubv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_LightModeliv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib1svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc);
-extern HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc);
-extern HIDDEN void __glXDisp_BlendColor(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc);
-extern HIDDEN void __glXDisp_Scalef(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc);
-extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc);
-extern HIDDEN void __glXDisp_Viewport(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc);
-extern HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexImage3DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc);
-extern HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Color3fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PointSize(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PointSize(GLbyte * pc);
-extern HIDDEN void __glXDisp_PopName(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PopName(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexEnvi(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Scaled(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Scaled(GLbyte * pc);
-extern HIDDEN void __glXDisp_CallLists(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc);
-extern HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexImage1DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_Rotated(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc);
-extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc);
-extern HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_GenerateMipmapEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc);
-extern HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc);
-extern HIDDEN void __glXDisp_Scissor(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Scissor(GLbyte * pc);
-extern HIDDEN void __glXDisp_Fogf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Fogf(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color4usv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Fogi(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Fogi(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc);
-extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc);
-extern HIDDEN void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_RenderbufferStorageEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorTable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc);
-extern HIDDEN void __glXDisp_Accum(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Accum(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc);
-extern HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_ClearStencil(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib3dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ClearIndex(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc);
-extern HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc);
-extern HIDDEN void __glXDisp_PushMatrix(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc);
-extern HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_LoadProgramNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LoadProgramNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc);
-extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4ivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_End(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_End(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_BlendEquation(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Indexdv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PushName(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PushName(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MultiTexCoord1svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_EndQueryARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EndQueryARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_DepthMask(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc);
-extern HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color4bv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc);
-extern HIDDEN void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc);
-extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc);
-extern HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc);
-extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc);
-extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PointParameterivNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PointParameterivNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_BlendFunc(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc);
-extern HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Color4uiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_BindFramebufferEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BindFramebufferEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_PushAttrib(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc);
-extern HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc);
-extern HIDDEN void __glXDisp_WindowPos3fvMESA(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc);
-extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Frustum(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexEnvf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc);
-extern HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_Lightfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ClearDepth(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color4fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Lightiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib2dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Rectdv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_Materialiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc);
-extern HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexGeni(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexGenf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexGend(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexGend(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Color4sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc);
-extern HIDDEN int __glXDisp_IsProgramNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsProgramNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_PixelZoom(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc);
-extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_SamplePatternSGIS(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SamplePatternSGIS(GLbyte * pc);
-extern HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc);
-extern HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexImage1D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc);
-extern HIDDEN void __glXDisp_FrontFace(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc);
-extern HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib4dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc);
-extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Lightf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Lightf(GLbyte * pc);
-extern HIDDEN void __glXDisp_MatrixMode(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc);
-extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Lighti(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Lighti(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_TrackMatrixNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TrackMatrixNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ClearColor(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc);
-extern HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc);
-extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_Map1d(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Map1d(GLbyte * pc);
-extern HIDDEN void __glXDisp_Map1f(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Map1f(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexImage2DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexImage2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramParameters4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Fogiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc);
-extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Clear(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc);
-extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc);
-extern HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc);
-extern HIDDEN void __glXDisp_Ortho(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc);
-extern HIDDEN void __glXDisp_ListBase(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ListBase(GLbyte * pc);
-extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_CallList(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Rectiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc);
-extern HIDDEN void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc);
-extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_LineWidth(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc);
-extern HIDDEN void __glXDisp_Materialfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color3iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramParameters4dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc);
-extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc);
-extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc);
-extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Map2d(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Map2d(GLbyte * pc);
-extern HIDDEN void __glXDisp_Map2f(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_Materialf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Materialf(GLbyte * pc);
-extern HIDDEN void __glXDisp_Materiali(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Materiali(GLbyte * pc);
-extern HIDDEN void __glXDisp_Indexsv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord4svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_LightModelfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Translated(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Translated(GLbyte * pc);
-extern HIDDEN void __glXDisp_Translatef(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Translatef(GLbyte * pc);
-extern HIDDEN void __glXDisp_StencilMask(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc);
-extern HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_LoadName(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LoadName(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc);
-extern HIDDEN void __glXDisp_CullFace(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CullFace(GLbyte * pc);
-extern HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_StencilFunc(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyPixels(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc);
-extern HIDDEN void __glXDisp_Rectsv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc);
-extern HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc);
-extern HIDDEN void __glXDisp_BindProgramNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BindProgramNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PopAttrib(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc);
-extern HIDDEN void __glXDisp_Fogfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_InitNames(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_InitNames(GLbyte * pc);
-extern HIDDEN void __glXDisp_Normal3sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Minmax(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Minmax(GLbyte * pc);
-extern HIDDEN void __glXDisp_FogCoorddvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FogCoorddvEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Hint(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Hint(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color4dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib2svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Begin(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Begin(GLbyte * pc);
-extern HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Rectfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_LightModelf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Disable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Disable(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_ColorMask(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Enable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Enable(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc);
-
-#  undef HIDDEN
-
-#endif /* !defined( _INDIRECT_DISPATCH_H_ ) */
diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c
deleted file mode 100644
index f137cbe..0000000
--- a/GL/glx/indirect_dispatch_swap.c
+++ /dev/null
@@ -1,6051 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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, 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
- * 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.
- */
-
-#include <X11/Xmd.h>
-#include <GL/gl.h>
-#include <GL/glxproto.h>
-#include <inttypes.h>
-#include "indirect_size.h"
-#include "indirect_size_get.h"
-#include "indirect_dispatch.h"
-#include "glxserver.h"
-#include "glxbyteorder.h"
-#include "indirect_util.h"
-#include "singlesize.h"
-#include "glapitable.h"
-#include "glapi.h"
-#include "glthread.h"
-#include "dispatch.h"
-
-#define __GLX_PAD(x)  (((x) + 3) & ~3)
-
-typedef struct {
-    __GLX_PIXEL_3D_HDR;
-} __GLXpixel3DHeader;
-
-extern GLboolean __glXErrorOccured( void );
-extern void __glXClearErrorOccured( void );
-
-static const unsigned dummy_answer[2] = {0, 0};
-
-static GLsizei
-bswap_CARD32( const void * src )
-{
-    union { uint32_t dst; GLsizei ret; } x;
-    x.dst = bswap_32( *(uint32_t *) src );
-    return x.ret;
-}
-
-static GLshort
-bswap_CARD16( const void * src )
-{
-    union { uint16_t dst; GLshort ret; } x;
-    x.dst = bswap_16( *(uint16_t *) src );
-    return x.ret;
-}
-
-static GLenum
-bswap_ENUM( const void * src )
-{
-    union { uint32_t dst; GLenum ret; } x;
-    x.dst = bswap_32( *(uint32_t *) src );
-    return x.ret;
-}
-
-static GLdouble
-bswap_FLOAT64( const void * src )
-{
-    union { uint64_t dst; GLdouble ret; } x;
-    x.dst = bswap_64( *(uint64_t *) src );
-    return x.ret;
-}
-
-static GLfloat
-bswap_FLOAT32( const void * src )
-{
-    union { uint32_t dst; GLfloat ret; } x;
-    x.dst = bswap_32( *(uint32_t *) src );
-    return x.ret;
-}
-
-static void *
-bswap_16_array( uint16_t * src, unsigned count )
-{
-    unsigned  i;
-
-    for ( i = 0 ; i < count ; i++ ) {
-        uint16_t temp = bswap_16( src[i] );
-        src[i] = temp;
-    }
-
-    return src;
-}
-
-static void *
-bswap_32_array( uint32_t * src, unsigned count )
-{
-    unsigned  i;
-
-    for ( i = 0 ; i < count ; i++ ) {
-        uint32_t temp = bswap_32( src[i] );
-        src[i] = temp;
-    }
-
-    return src;
-}
-
-static void *
-bswap_64_array( uint64_t * src, unsigned count )
-{
-    unsigned  i;
-
-    for ( i = 0 ; i < count ; i++ ) {
-        uint64_t temp = bswap_64( src[i] );
-        src[i] = temp;
-    }
-
-    return src;
-}
-
-int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_NewList( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-             (GLenum  )bswap_ENUM   ( pc +  4 )
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_EndList( GET_DISPATCH(), () );
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_CallList(GLbyte * pc)
-{
-    CALL_CallList( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_CallLists(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-    const GLenum type =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLvoid * lists;
-
-    switch(type) {
-    case GL_BYTE:
-    case GL_UNSIGNED_BYTE:
-    case GL_2_BYTES:
-    case GL_3_BYTES:
-    case GL_4_BYTES:
-        lists = (const GLvoid *) (pc + 8); break;
-    case GL_SHORT:
-    case GL_UNSIGNED_SHORT:
-        lists = (const GLvoid *) bswap_16_array( (uint16_t *) (pc + 8), n ); break;
-    case GL_INT:
-    case GL_UNSIGNED_INT:
-    case GL_FLOAT:
-        lists = (const GLvoid *) bswap_32_array( (uint32_t *) (pc + 8), n ); break;
-    default:
-        return;
-    }
-
-    CALL_CallLists( GET_DISPATCH(), (
-        n,
-        type,
-        lists
-    ) );
-}
-
-int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_DeleteLists( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-             (GLsizei )bswap_CARD32 ( pc +  4 )
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLuint retval;
-        retval = CALL_GenLists( GET_DISPATCH(), (
-             (GLsizei )bswap_CARD32 ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_ListBase(GLbyte * pc)
-{
-    CALL_ListBase( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_Begin(GLbyte * pc)
-{
-    CALL_Begin( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_Bitmap(GLbyte * pc)
-{
-    const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_Bitmap( GET_DISPATCH(), (
-         (GLsizei )bswap_CARD32 ( pc + 20 ),
-         (GLsizei )bswap_CARD32 ( pc + 24 ),
-         (GLfloat )bswap_FLOAT32( pc + 28 ),
-         (GLfloat )bswap_FLOAT32( pc + 32 ),
-         (GLfloat )bswap_FLOAT32( pc + 36 ),
-         (GLfloat )bswap_FLOAT32( pc + 40 ),
-        bitmap
-    ) );
-}
-
-void __glXDispSwap_Color3bv(GLbyte * pc)
-{
-    CALL_Color3bv( GET_DISPATCH(), (
-         (const GLbyte *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_Color3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Color3dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Color3fv(GLbyte * pc)
-{
-    CALL_Color3fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Color3iv(GLbyte * pc)
-{
-    CALL_Color3iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Color3sv(GLbyte * pc)
-{
-    CALL_Color3sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Color3ubv(GLbyte * pc)
-{
-    CALL_Color3ubv( GET_DISPATCH(), (
-         (const GLubyte *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_Color3uiv(GLbyte * pc)
-{
-    CALL_Color3uiv( GET_DISPATCH(), (
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Color3usv(GLbyte * pc)
-{
-    CALL_Color3usv( GET_DISPATCH(), (
-         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Color4bv(GLbyte * pc)
-{
-    CALL_Color4bv( GET_DISPATCH(), (
-         (const GLbyte *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_Color4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Color4dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Color4fv(GLbyte * pc)
-{
-    CALL_Color4fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Color4iv(GLbyte * pc)
-{
-    CALL_Color4iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Color4sv(GLbyte * pc)
-{
-    CALL_Color4sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Color4ubv(GLbyte * pc)
-{
-    CALL_Color4ubv( GET_DISPATCH(), (
-         (const GLubyte *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_Color4uiv(GLbyte * pc)
-{
-    CALL_Color4uiv( GET_DISPATCH(), (
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Color4usv(GLbyte * pc)
-{
-    CALL_Color4usv( GET_DISPATCH(), (
-         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_EdgeFlagv(GLbyte * pc)
-{
-    CALL_EdgeFlagv( GET_DISPATCH(), (
-         (const GLboolean *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_End(GLbyte * pc)
-{
-    CALL_End( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_Indexdv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Indexdv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_Indexfv(GLbyte * pc)
-{
-    CALL_Indexfv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_Indexiv(GLbyte * pc)
-{
-    CALL_Indexiv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_Indexsv(GLbyte * pc)
-{
-    CALL_Indexsv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_Normal3bv(GLbyte * pc)
-{
-    CALL_Normal3bv( GET_DISPATCH(), (
-         (const GLbyte *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_Normal3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Normal3dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Normal3fv(GLbyte * pc)
-{
-    CALL_Normal3fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Normal3iv(GLbyte * pc)
-{
-    CALL_Normal3iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Normal3sv(GLbyte * pc)
-{
-    CALL_Normal3sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_RasterPos2dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos2fv(GLbyte * pc)
-{
-    CALL_RasterPos2fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos2iv(GLbyte * pc)
-{
-    CALL_RasterPos2iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos2sv(GLbyte * pc)
-{
-    CALL_RasterPos2sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_RasterPos3dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos3fv(GLbyte * pc)
-{
-    CALL_RasterPos3fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos3iv(GLbyte * pc)
-{
-    CALL_RasterPos3iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos3sv(GLbyte * pc)
-{
-    CALL_RasterPos3sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_RasterPos4dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos4fv(GLbyte * pc)
-{
-    CALL_RasterPos4fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos4iv(GLbyte * pc)
-{
-    CALL_RasterPos4iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_RasterPos4sv(GLbyte * pc)
-{
-    CALL_RasterPos4sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Rectdv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Rectdv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 16), 2 )
-    ) );
-}
-
-void __glXDispSwap_Rectfv(GLbyte * pc)
-{
-    CALL_Rectfv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 2 )
-    ) );
-}
-
-void __glXDispSwap_Rectiv(GLbyte * pc)
-{
-    CALL_Rectiv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 2 ),
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  8), 2 )
-    ) );
-}
-
-void __glXDispSwap_Rectsv(GLbyte * pc)
-{
-    CALL_Rectsv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 2 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord1dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexCoord1dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord1fv(GLbyte * pc)
-{
-    CALL_TexCoord1fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord1iv(GLbyte * pc)
-{
-    CALL_TexCoord1iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord1sv(GLbyte * pc)
-{
-    CALL_TexCoord1sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexCoord2dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord2fv(GLbyte * pc)
-{
-    CALL_TexCoord2fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord2iv(GLbyte * pc)
-{
-    CALL_TexCoord2iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord2sv(GLbyte * pc)
-{
-    CALL_TexCoord2sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexCoord3dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord3fv(GLbyte * pc)
-{
-    CALL_TexCoord3fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord3iv(GLbyte * pc)
-{
-    CALL_TexCoord3iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord3sv(GLbyte * pc)
-{
-    CALL_TexCoord3sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexCoord4dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord4fv(GLbyte * pc)
-{
-    CALL_TexCoord4fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord4iv(GLbyte * pc)
-{
-    CALL_TexCoord4iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_TexCoord4sv(GLbyte * pc)
-{
-    CALL_TexCoord4sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Vertex2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Vertex2dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_Vertex2fv(GLbyte * pc)
-{
-    CALL_Vertex2fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_Vertex2iv(GLbyte * pc)
-{
-    CALL_Vertex2iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_Vertex2sv(GLbyte * pc)
-{
-    CALL_Vertex2sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_Vertex3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Vertex3dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Vertex3fv(GLbyte * pc)
-{
-    CALL_Vertex3fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Vertex3iv(GLbyte * pc)
-{
-    CALL_Vertex3iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Vertex3sv(GLbyte * pc)
-{
-    CALL_Vertex3sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_Vertex4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Vertex4dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Vertex4fv(GLbyte * pc)
-{
-    CALL_Vertex4fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Vertex4iv(GLbyte * pc)
-{
-    CALL_Vertex4iv( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_Vertex4sv(GLbyte * pc)
-{
-    CALL_Vertex4sv( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_ClipPlane(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 36);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ClipPlane( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 32 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_ColorMaterial(GLbyte * pc)
-{
-    CALL_ColorMaterial( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_CullFace(GLbyte * pc)
-{
-    CALL_CullFace( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_Fogf(GLbyte * pc)
-{
-    CALL_Fogf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_Fogfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) );
-
-    CALL_Fogfv( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_Fogi(GLbyte * pc)
-{
-    CALL_Fogi( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_Fogiv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) );
-
-    CALL_Fogiv( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_FrontFace(GLbyte * pc)
-{
-    CALL_FrontFace( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_Hint(GLbyte * pc)
-{
-    CALL_Hint( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_Lightf(GLbyte * pc)
-{
-    CALL_Lightf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_Lightfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) );
-
-    CALL_Lightfv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_Lighti(GLbyte * pc)
-{
-    CALL_Lighti( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_Lightiv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) );
-
-    CALL_Lightiv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_LightModelf(GLbyte * pc)
-{
-    CALL_LightModelf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_LightModelfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) );
-
-    CALL_LightModelfv( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_LightModeli(GLbyte * pc)
-{
-    CALL_LightModeli( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_LightModeliv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) );
-
-    CALL_LightModeliv( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_LineStipple(GLbyte * pc)
-{
-    CALL_LineStipple( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 ),
-         (GLushort)bswap_CARD16 ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_LineWidth(GLbyte * pc)
-{
-    CALL_LineWidth( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_Materialf(GLbyte * pc)
-{
-    CALL_Materialf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_Materialfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) );
-
-    CALL_Materialfv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_Materiali(GLbyte * pc)
-{
-    CALL_Materiali( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_Materialiv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) );
-
-    CALL_Materialiv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_PointSize(GLbyte * pc)
-{
-    CALL_PointSize( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_PolygonMode(GLbyte * pc)
-{
-    CALL_PolygonMode( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_PolygonStipple(GLbyte * pc)
-{
-    const GLubyte * const mask = (const GLubyte *) (pc + 20);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_PolygonStipple( GET_DISPATCH(), (
-        mask
-    ) );
-}
-
-void __glXDispSwap_Scissor(GLbyte * pc)
-{
-    CALL_Scissor( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLsizei )bswap_CARD32 ( pc +  8 ),
-         (GLsizei )bswap_CARD32 ( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_ShadeModel(GLbyte * pc)
-{
-    CALL_ShadeModel( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_TexParameterf(GLbyte * pc)
-{
-    CALL_TexParameterf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_TexParameterfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) );
-
-    CALL_TexParameterfv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_TexParameteri(GLbyte * pc)
-{
-    CALL_TexParameteri( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_TexParameteriv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) );
-
-    CALL_TexParameteriv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_TexImage1D(GLbyte * pc)
-{
-    const GLvoid * const pixels = (const GLvoid *) (pc + 52);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_TexImage1D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 20 ),
-         (GLint   )bswap_CARD32 ( pc + 24 ),
-         (GLint   )bswap_CARD32 ( pc + 28 ),
-         (GLsizei )bswap_CARD32 ( pc + 32 ),
-         (GLint   )bswap_CARD32 ( pc + 40 ),
-         (GLenum  )bswap_ENUM   ( pc + 44 ),
-         (GLenum  )bswap_ENUM   ( pc + 48 ),
-        pixels
-    ) );
-}
-
-void __glXDispSwap_TexImage2D(GLbyte * pc)
-{
-    const GLvoid * const pixels = (const GLvoid *) (pc + 52);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_TexImage2D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 20 ),
-         (GLint   )bswap_CARD32 ( pc + 24 ),
-         (GLint   )bswap_CARD32 ( pc + 28 ),
-         (GLsizei )bswap_CARD32 ( pc + 32 ),
-         (GLsizei )bswap_CARD32 ( pc + 36 ),
-         (GLint   )bswap_CARD32 ( pc + 40 ),
-         (GLenum  )bswap_ENUM   ( pc + 44 ),
-         (GLenum  )bswap_ENUM   ( pc + 48 ),
-        pixels
-    ) );
-}
-
-void __glXDispSwap_TexEnvf(GLbyte * pc)
-{
-    CALL_TexEnvf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_TexEnvfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) );
-
-    CALL_TexEnvfv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_TexEnvi(GLbyte * pc)
-{
-    CALL_TexEnvi( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_TexEnviv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) );
-
-    CALL_TexEnviv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_TexGend(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_TexGend( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLenum  )bswap_ENUM   ( pc + 12 ),
-         (GLdouble)bswap_FLOAT64( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_TexGendv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLdouble * params;
-
-#ifdef __GLX_ALIGN64
-    const GLuint compsize = __glTexGendv_size(pname);
-    const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) );
-
-    CALL_TexGendv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_TexGenf(GLbyte * pc)
-{
-    CALL_TexGenf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_TexGenfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) );
-
-    CALL_TexGenfv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_TexGeni(GLbyte * pc)
-{
-    CALL_TexGeni( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_TexGeniv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) );
-
-    CALL_TexGeniv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_InitNames(GLbyte * pc)
-{
-    CALL_InitNames( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_LoadName(GLbyte * pc)
-{
-    CALL_LoadName( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_PassThrough(GLbyte * pc)
-{
-    CALL_PassThrough( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_PopName(GLbyte * pc)
-{
-    CALL_PopName( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_PushName(GLbyte * pc)
-{
-    CALL_PushName( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_DrawBuffer(GLbyte * pc)
-{
-    CALL_DrawBuffer( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_Clear(GLbyte * pc)
-{
-    CALL_Clear( GET_DISPATCH(), (
-         (GLbitfield)bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_ClearAccum(GLbyte * pc)
-{
-    CALL_ClearAccum( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 ),
-         (GLfloat )bswap_FLOAT32( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_ClearIndex(GLbyte * pc)
-{
-    CALL_ClearIndex( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_ClearColor(GLbyte * pc)
-{
-    CALL_ClearColor( GET_DISPATCH(), (
-         (GLclampf)bswap_FLOAT32( pc +  0 ),
-         (GLclampf)bswap_FLOAT32( pc +  4 ),
-         (GLclampf)bswap_FLOAT32( pc +  8 ),
-         (GLclampf)bswap_FLOAT32( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_ClearStencil(GLbyte * pc)
-{
-    CALL_ClearStencil( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_ClearDepth(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ClearDepth( GET_DISPATCH(), (
-         (GLclampd)bswap_FLOAT64( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_StencilMask(GLbyte * pc)
-{
-    CALL_StencilMask( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_ColorMask(GLbyte * pc)
-{
-    CALL_ColorMask( GET_DISPATCH(), (
-        *(GLboolean *)(pc +  0),
-        *(GLboolean *)(pc +  1),
-        *(GLboolean *)(pc +  2),
-        *(GLboolean *)(pc +  3)
-    ) );
-}
-
-void __glXDispSwap_DepthMask(GLbyte * pc)
-{
-    CALL_DepthMask( GET_DISPATCH(), (
-        *(GLboolean *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_IndexMask(GLbyte * pc)
-{
-    CALL_IndexMask( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_Accum(GLbyte * pc)
-{
-    CALL_Accum( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_Disable(GLbyte * pc)
-{
-    CALL_Disable( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_Enable(GLbyte * pc)
-{
-    CALL_Enable( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_PopAttrib(GLbyte * pc)
-{
-    CALL_PopAttrib( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_PushAttrib(GLbyte * pc)
-{
-    CALL_PushAttrib( GET_DISPATCH(), (
-         (GLbitfield)bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_MapGrid1d(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 20);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MapGrid1d( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-         (GLdouble)bswap_FLOAT64( pc +  0 ),
-         (GLdouble)bswap_FLOAT64( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_MapGrid1f(GLbyte * pc)
-{
-    CALL_MapGrid1f( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_MapGrid2d(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 40);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MapGrid2d( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc + 32 ),
-         (GLdouble)bswap_FLOAT64( pc +  0 ),
-         (GLdouble)bswap_FLOAT64( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 36 ),
-         (GLdouble)bswap_FLOAT64( pc + 16 ),
-         (GLdouble)bswap_FLOAT64( pc + 24 )
-    ) );
-}
-
-void __glXDispSwap_MapGrid2f(GLbyte * pc)
-{
-    CALL_MapGrid2f( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLfloat )bswap_FLOAT32( pc + 16 ),
-         (GLfloat )bswap_FLOAT32( pc + 20 )
-    ) );
-}
-
-void __glXDispSwap_EvalCoord1dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_EvalCoord1dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_EvalCoord1fv(GLbyte * pc)
-{
-    CALL_EvalCoord1fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_EvalCoord2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_EvalCoord2dv( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_EvalCoord2fv(GLbyte * pc)
-{
-    CALL_EvalCoord2fv( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_EvalMesh1(GLbyte * pc)
-{
-    CALL_EvalMesh1( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_EvalPoint1(GLbyte * pc)
-{
-    CALL_EvalPoint1( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_EvalMesh2(GLbyte * pc)
-{
-    CALL_EvalMesh2( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 )
-    ) );
-}
-
-void __glXDispSwap_EvalPoint2(GLbyte * pc)
-{
-    CALL_EvalPoint2( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_AlphaFunc(GLbyte * pc)
-{
-    CALL_AlphaFunc( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLclampf)bswap_FLOAT32( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_BlendFunc(GLbyte * pc)
-{
-    CALL_BlendFunc( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_LogicOp(GLbyte * pc)
-{
-    CALL_LogicOp( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_StencilFunc(GLbyte * pc)
-{
-    CALL_StencilFunc( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLuint  )bswap_CARD32 ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_StencilOp(GLbyte * pc)
-{
-    CALL_StencilOp( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_DepthFunc(GLbyte * pc)
-{
-    CALL_DepthFunc( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_PixelZoom(GLbyte * pc)
-{
-    CALL_PixelZoom( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_PixelTransferf(GLbyte * pc)
-{
-    CALL_PixelTransferf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_PixelTransferi(GLbyte * pc)
-{
-    CALL_PixelTransferi( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_PixelStoref( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLfloat )bswap_FLOAT32( pc +  4 )
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        CALL_PixelStorei( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLint   )bswap_CARD32 ( pc +  4 )
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_PixelMapfv(GLbyte * pc)
-{
-    const GLsizei mapsize =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_PixelMapfv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        mapsize,
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_PixelMapuiv(GLbyte * pc)
-{
-    const GLsizei mapsize =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_PixelMapuiv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        mapsize,
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_PixelMapusv(GLbyte * pc)
-{
-    const GLsizei mapsize =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_PixelMapusv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        mapsize,
-         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_ReadBuffer(GLbyte * pc)
-{
-    CALL_ReadBuffer( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_CopyPixels(GLbyte * pc)
-{
-    CALL_CopyPixels( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLsizei )bswap_CARD32 ( pc +  8 ),
-         (GLsizei )bswap_CARD32 ( pc + 12 ),
-         (GLenum  )bswap_ENUM   ( pc + 16 )
-    ) );
-}
-
-void __glXDispSwap_DrawPixels(GLbyte * pc)
-{
-    const GLvoid * const pixels = (const GLvoid *) (pc + 36);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_DrawPixels( GET_DISPATCH(), (
-         (GLsizei )bswap_CARD32 ( pc + 20 ),
-         (GLsizei )bswap_CARD32 ( pc + 24 ),
-         (GLenum  )bswap_ENUM   ( pc + 28 ),
-         (GLenum  )bswap_ENUM   ( pc + 32 ),
-        pixels
-    ) );
-}
-
-int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-
-        const GLuint compsize = __glGetBooleanv_size(pname);
-        GLboolean answerBuffer[200];
-        GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetBooleanv( GET_DISPATCH(), (
-            pname,
-            params
-        ) );
-        __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLdouble equation[4];
-        CALL_GetClipPlane( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            equation
-        ) );
-        (void) bswap_64_array( (uint64_t *) equation, 4 );
-        __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-
-        const GLuint compsize = __glGetDoublev_size(pname);
-        GLdouble answerBuffer[200];
-        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetDoublev( GET_DISPATCH(), (
-            pname,
-            params
-        ) );
-        (void) bswap_64_array( (uint64_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLenum retval;
-        retval = CALL_GetError( GET_DISPATCH(), () );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-
-        const GLuint compsize = __glGetFloatv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetFloatv( GET_DISPATCH(), (
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-
-        const GLuint compsize = __glGetIntegerv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetIntegerv( GET_DISPATCH(), (
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetLightfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetLightfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetLightiv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetLightiv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum target =  (GLenum  )bswap_ENUM   ( pc +  0 );
-        const GLenum query =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMapdv_size(target,query);
-        GLdouble answerBuffer[200];
-        GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (v == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMapdv( GET_DISPATCH(), (
-            target,
-            query,
-            v
-        ) );
-        (void) bswap_64_array( (uint64_t *) v, compsize );
-        __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum target =  (GLenum  )bswap_ENUM   ( pc +  0 );
-        const GLenum query =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMapfv_size(target,query);
-        GLfloat answerBuffer[200];
-        GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (v == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMapfv( GET_DISPATCH(), (
-            target,
-            query,
-            v
-        ) );
-        (void) bswap_32_array( (uint32_t *) v, compsize );
-        __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum target =  (GLenum  )bswap_ENUM   ( pc +  0 );
-        const GLenum query =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMapiv_size(target,query);
-        GLint answerBuffer[200];
-        GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (v == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMapiv( GET_DISPATCH(), (
-            target,
-            query,
-            v
-        ) );
-        (void) bswap_32_array( (uint32_t *) v, compsize );
-        __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMaterialfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMaterialfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMaterialiv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMaterialiv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum map =  (GLenum  )bswap_ENUM   ( pc +  0 );
-
-        const GLuint compsize = __glGetPixelMapfv_size(map);
-        GLfloat answerBuffer[200];
-        GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (values == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetPixelMapfv( GET_DISPATCH(), (
-            map,
-            values
-        ) );
-        (void) bswap_32_array( (uint32_t *) values, compsize );
-        __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum map =  (GLenum  )bswap_ENUM   ( pc +  0 );
-
-        const GLuint compsize = __glGetPixelMapuiv_size(map);
-        GLuint answerBuffer[200];
-        GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (values == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetPixelMapuiv( GET_DISPATCH(), (
-            map,
-            values
-        ) );
-        (void) bswap_32_array( (uint32_t *) values, compsize );
-        __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum map =  (GLenum  )bswap_ENUM   ( pc +  0 );
-
-        const GLuint compsize = __glGetPixelMapusv_size(map);
-        GLushort answerBuffer[200];
-        GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2);
-
-        if (values == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetPixelMapusv( GET_DISPATCH(), (
-            map,
-            values
-        ) );
-        (void) bswap_16_array( (uint16_t *) values, compsize );
-        __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetTexEnvfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexEnvfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetTexEnviv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexEnviv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetTexGendv_size(pname);
-        GLdouble answerBuffer[200];
-        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexGendv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_64_array( (uint64_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetTexGenfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexGenfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetTexGeniv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexGeniv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetTexParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetTexParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  8 );
-
-        const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexLevelParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLint   )bswap_CARD32 ( pc +  4 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  8 );
-
-        const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetTexLevelParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLint   )bswap_CARD32 ( pc +  4 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsEnabled( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsList( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_DepthRange(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 16);
-        pc -= 4;
-    }
-#endif
-
-    CALL_DepthRange( GET_DISPATCH(), (
-         (GLclampd)bswap_FLOAT64( pc +  0 ),
-         (GLclampd)bswap_FLOAT64( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_Frustum(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 48);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Frustum( GET_DISPATCH(), (
-         (GLdouble)bswap_FLOAT64( pc +  0 ),
-         (GLdouble)bswap_FLOAT64( pc +  8 ),
-         (GLdouble)bswap_FLOAT64( pc + 16 ),
-         (GLdouble)bswap_FLOAT64( pc + 24 ),
-         (GLdouble)bswap_FLOAT64( pc + 32 ),
-         (GLdouble)bswap_FLOAT64( pc + 40 )
-    ) );
-}
-
-void __glXDispSwap_LoadIdentity(GLbyte * pc)
-{
-    CALL_LoadIdentity( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_LoadMatrixf(GLbyte * pc)
-{
-    CALL_LoadMatrixf( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 16 )
-    ) );
-}
-
-void __glXDispSwap_LoadMatrixd(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 128);
-        pc -= 4;
-    }
-#endif
-
-    CALL_LoadMatrixd( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 16 )
-    ) );
-}
-
-void __glXDispSwap_MatrixMode(GLbyte * pc)
-{
-    CALL_MatrixMode( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_MultMatrixf(GLbyte * pc)
-{
-    CALL_MultMatrixf( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 16 )
-    ) );
-}
-
-void __glXDispSwap_MultMatrixd(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 128);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultMatrixd( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 16 )
-    ) );
-}
-
-void __glXDispSwap_Ortho(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 48);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Ortho( GET_DISPATCH(), (
-         (GLdouble)bswap_FLOAT64( pc +  0 ),
-         (GLdouble)bswap_FLOAT64( pc +  8 ),
-         (GLdouble)bswap_FLOAT64( pc + 16 ),
-         (GLdouble)bswap_FLOAT64( pc + 24 ),
-         (GLdouble)bswap_FLOAT64( pc + 32 ),
-         (GLdouble)bswap_FLOAT64( pc + 40 )
-    ) );
-}
-
-void __glXDispSwap_PopMatrix(GLbyte * pc)
-{
-    CALL_PopMatrix( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_PushMatrix(GLbyte * pc)
-{
-    CALL_PushMatrix( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_Rotated(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 32);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Rotated( GET_DISPATCH(), (
-         (GLdouble)bswap_FLOAT64( pc +  0 ),
-         (GLdouble)bswap_FLOAT64( pc +  8 ),
-         (GLdouble)bswap_FLOAT64( pc + 16 ),
-         (GLdouble)bswap_FLOAT64( pc + 24 )
-    ) );
-}
-
-void __glXDispSwap_Rotatef(GLbyte * pc)
-{
-    CALL_Rotatef( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 ),
-         (GLfloat )bswap_FLOAT32( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_Scaled(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Scaled( GET_DISPATCH(), (
-         (GLdouble)bswap_FLOAT64( pc +  0 ),
-         (GLdouble)bswap_FLOAT64( pc +  8 ),
-         (GLdouble)bswap_FLOAT64( pc + 16 )
-    ) );
-}
-
-void __glXDispSwap_Scalef(GLbyte * pc)
-{
-    CALL_Scalef( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_Translated(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_Translated( GET_DISPATCH(), (
-         (GLdouble)bswap_FLOAT64( pc +  0 ),
-         (GLdouble)bswap_FLOAT64( pc +  8 ),
-         (GLdouble)bswap_FLOAT64( pc + 16 )
-    ) );
-}
-
-void __glXDispSwap_Translatef(GLbyte * pc)
-{
-    CALL_Translatef( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_Viewport(GLbyte * pc)
-{
-    CALL_Viewport( GET_DISPATCH(), (
-         (GLint   )bswap_CARD32 ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLsizei )bswap_CARD32 ( pc +  8 ),
-         (GLsizei )bswap_CARD32 ( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_BindTexture(GLbyte * pc)
-{
-    CALL_BindTexture( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_Indexubv(GLbyte * pc)
-{
-    CALL_Indexubv( GET_DISPATCH(), (
-         (const GLubyte *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_PolygonOffset(GLbyte * pc)
-{
-    CALL_PolygonOffset( GET_DISPATCH(), (
-         (GLfloat )bswap_FLOAT32( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 )
-    ) );
-}
-
-int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLboolean retval;
-        GLboolean answerBuffer[200];
-        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
-        retval = CALL_AreTexturesResident( GET_DISPATCH(), (
-            n,
-             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 ),
-            residences
-        ) );
-        __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLboolean retval;
-        GLboolean answerBuffer[200];
-        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
-        retval = CALL_AreTexturesResident( GET_DISPATCH(), (
-            n,
-             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 ),
-            residences
-        ) );
-        __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_CopyTexImage1D(GLbyte * pc)
-{
-    CALL_CopyTexImage1D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-         (GLsizei )bswap_CARD32 ( pc + 20 ),
-         (GLint   )bswap_CARD32 ( pc + 24 )
-    ) );
-}
-
-void __glXDispSwap_CopyTexImage2D(GLbyte * pc)
-{
-    CALL_CopyTexImage2D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-         (GLsizei )bswap_CARD32 ( pc + 20 ),
-         (GLsizei )bswap_CARD32 ( pc + 24 ),
-         (GLint   )bswap_CARD32 ( pc + 28 )
-    ) );
-}
-
-void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc)
-{
-    CALL_CopyTexSubImage1D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-         (GLsizei )bswap_CARD32 ( pc + 20 )
-    ) );
-}
-
-void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
-{
-    CALL_CopyTexSubImage2D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-         (GLint   )bswap_CARD32 ( pc + 20 ),
-         (GLsizei )bswap_CARD32 ( pc + 24 ),
-         (GLsizei )bswap_CARD32 ( pc + 28 )
-    ) );
-}
-
-int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        CALL_DeleteTextures( GET_DISPATCH(), (
-            n,
-             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        CALL_DeleteTextures( GET_DISPATCH(), (
-            n,
-             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLuint answerBuffer[200];
-        GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenTextures( GET_DISPATCH(), (
-            n,
-            textures
-        ) );
-        (void) bswap_32_array( (uint32_t *) textures, n );
-        __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLuint answerBuffer[200];
-        GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenTextures( GET_DISPATCH(), (
-            n,
-            textures
-        ) );
-        (void) bswap_32_array( (uint32_t *) textures, n );
-        __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsTexture( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsTexture( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_PrioritizeTextures(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-    CALL_PrioritizeTextures( GET_DISPATCH(), (
-        n,
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 ),
-         (const GLclampf *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-    ) );
-}
-
-void __glXDispSwap_TexSubImage1D(GLbyte * pc)
-{
-    const CARD32 ptr_is_null = *(CARD32 *)(pc + 52);
-    const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_TexSubImage1D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 20 ),
-         (GLint   )bswap_CARD32 ( pc + 24 ),
-         (GLint   )bswap_CARD32 ( pc + 28 ),
-         (GLsizei )bswap_CARD32 ( pc + 36 ),
-         (GLenum  )bswap_ENUM   ( pc + 44 ),
-         (GLenum  )bswap_ENUM   ( pc + 48 ),
-        pixels
-    ) );
-}
-
-void __glXDispSwap_TexSubImage2D(GLbyte * pc)
-{
-    const CARD32 ptr_is_null = *(CARD32 *)(pc + 52);
-    const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_TexSubImage2D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 20 ),
-         (GLint   )bswap_CARD32 ( pc + 24 ),
-         (GLint   )bswap_CARD32 ( pc + 28 ),
-         (GLint   )bswap_CARD32 ( pc + 32 ),
-         (GLsizei )bswap_CARD32 ( pc + 36 ),
-         (GLsizei )bswap_CARD32 ( pc + 40 ),
-         (GLenum  )bswap_ENUM   ( pc + 44 ),
-         (GLenum  )bswap_ENUM   ( pc + 48 ),
-        pixels
-    ) );
-}
-
-void __glXDispSwap_BlendColor(GLbyte * pc)
-{
-    CALL_BlendColor( GET_DISPATCH(), (
-         (GLclampf)bswap_FLOAT32( pc +  0 ),
-         (GLclampf)bswap_FLOAT32( pc +  4 ),
-         (GLclampf)bswap_FLOAT32( pc +  8 ),
-         (GLclampf)bswap_FLOAT32( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_BlendEquation(GLbyte * pc)
-{
-    CALL_BlendEquation( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_ColorTable(GLbyte * pc)
-{
-    const GLvoid * const table = (const GLvoid *) (pc + 40);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_ColorTable( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 20 ),
-         (GLenum  )bswap_ENUM   ( pc + 24 ),
-         (GLsizei )bswap_CARD32 ( pc + 28 ),
-         (GLenum  )bswap_ENUM   ( pc + 32 ),
-         (GLenum  )bswap_ENUM   ( pc + 36 ),
-        table
-    ) );
-}
-
-void __glXDispSwap_ColorTableParameterfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) );
-
-    CALL_ColorTableParameterfv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_ColorTableParameteriv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) );
-
-    CALL_ColorTableParameteriv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_CopyColorTable(GLbyte * pc)
-{
-    CALL_CopyColorTable( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLsizei )bswap_CARD32 ( pc + 16 )
-    ) );
-}
-
-int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetColorTableParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetColorTableParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetColorTableParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetColorTableParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetColorTableParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetColorTableParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetColorTableParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetColorTableParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_ColorSubTable(GLbyte * pc)
-{
-    const GLvoid * const data = (const GLvoid *) (pc + 40);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_ColorSubTable( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 20 ),
-         (GLsizei )bswap_CARD32 ( pc + 24 ),
-         (GLsizei )bswap_CARD32 ( pc + 28 ),
-         (GLenum  )bswap_ENUM   ( pc + 32 ),
-         (GLenum  )bswap_ENUM   ( pc + 36 ),
-        data
-    ) );
-}
-
-void __glXDispSwap_CopyColorSubTable(GLbyte * pc)
-{
-    CALL_CopyColorSubTable( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLsizei )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLsizei )bswap_CARD32 ( pc + 16 )
-    ) );
-}
-
-void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
-{
-    const GLvoid * const image = (const GLvoid *) (pc + 44);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_ConvolutionFilter1D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 20 ),
-         (GLenum  )bswap_ENUM   ( pc + 24 ),
-         (GLsizei )bswap_CARD32 ( pc + 28 ),
-         (GLenum  )bswap_ENUM   ( pc + 36 ),
-         (GLenum  )bswap_ENUM   ( pc + 40 ),
-        image
-    ) );
-}
-
-void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
-{
-    const GLvoid * const image = (const GLvoid *) (pc + 44);
-    __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_ConvolutionFilter2D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 20 ),
-         (GLenum  )bswap_ENUM   ( pc + 24 ),
-         (GLsizei )bswap_CARD32 ( pc + 28 ),
-         (GLsizei )bswap_CARD32 ( pc + 32 ),
-         (GLenum  )bswap_ENUM   ( pc + 36 ),
-         (GLenum  )bswap_ENUM   ( pc + 40 ),
-        image
-    ) );
-}
-
-void __glXDispSwap_ConvolutionParameterf(GLbyte * pc)
-{
-    CALL_ConvolutionParameterf( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLfloat )bswap_FLOAT32( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) );
-
-    CALL_ConvolutionParameterfv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_ConvolutionParameteri(GLbyte * pc)
-{
-    CALL_ConvolutionParameteri( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 )
-    ) );
-}
-
-void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) );
-
-    CALL_ConvolutionParameteriv( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc)
-{
-    CALL_CopyConvolutionFilter1D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLsizei )bswap_CARD32 ( pc + 16 )
-    ) );
-}
-
-void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc)
-{
-    CALL_CopyConvolutionFilter2D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLsizei )bswap_CARD32 ( pc + 16 ),
-         (GLsizei )bswap_CARD32 ( pc + 20 )
-    ) );
-}
-
-int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetHistogramParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetHistogramParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetHistogramParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetHistogramParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetHistogramParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetHistogramParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetHistogramParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetHistogramParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_Histogram(GLbyte * pc)
-{
-    CALL_Histogram( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLsizei )bswap_CARD32 ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-        *(GLboolean *)(pc + 12)
-    ) );
-}
-
-void __glXDispSwap_Minmax(GLbyte * pc)
-{
-    CALL_Minmax( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-        *(GLboolean *)(pc +  8)
-    ) );
-}
-
-void __glXDispSwap_ResetHistogram(GLbyte * pc)
-{
-    CALL_ResetHistogram( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_ResetMinmax(GLbyte * pc)
-{
-    CALL_ResetMinmax( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_TexImage3D(GLbyte * pc)
-{
-    const CARD32 ptr_is_null = *(CARD32 *)(pc + 76);
-    const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80);
-    __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES,  (GLint) bswap_CARD32( & hdr->skipImages )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_TexImage3D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 36 ),
-         (GLint   )bswap_CARD32 ( pc + 40 ),
-         (GLint   )bswap_CARD32 ( pc + 44 ),
-         (GLsizei )bswap_CARD32 ( pc + 48 ),
-         (GLsizei )bswap_CARD32 ( pc + 52 ),
-         (GLsizei )bswap_CARD32 ( pc + 56 ),
-         (GLint   )bswap_CARD32 ( pc + 64 ),
-         (GLenum  )bswap_ENUM   ( pc + 68 ),
-         (GLenum  )bswap_ENUM   ( pc + 72 ),
-        pixels
-    ) );
-}
-
-void __glXDispSwap_TexSubImage3D(GLbyte * pc)
-{
-    const CARD32 ptr_is_null = *(CARD32 *)(pc + 84);
-    const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88);
-    __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
-
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,   (GLint) bswap_CARD32( & hdr->rowLength )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,    (GLint) bswap_CARD32( & hdr->skipRows )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES,  (GLint) bswap_CARD32( & hdr->skipImages )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,  (GLint) bswap_CARD32( & hdr->skipPixels )) );
-    CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT,    (GLint) bswap_CARD32( & hdr->alignment )) );
-
-    CALL_TexSubImage3D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 36 ),
-         (GLint   )bswap_CARD32 ( pc + 40 ),
-         (GLint   )bswap_CARD32 ( pc + 44 ),
-         (GLint   )bswap_CARD32 ( pc + 48 ),
-         (GLint   )bswap_CARD32 ( pc + 52 ),
-         (GLsizei )bswap_CARD32 ( pc + 60 ),
-         (GLsizei )bswap_CARD32 ( pc + 64 ),
-         (GLsizei )bswap_CARD32 ( pc + 68 ),
-         (GLenum  )bswap_ENUM   ( pc + 76 ),
-         (GLenum  )bswap_ENUM   ( pc + 80 ),
-        pixels
-    ) );
-}
-
-void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc)
-{
-    CALL_CopyTexSubImage3D( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-         (GLint   )bswap_CARD32 ( pc + 20 ),
-         (GLint   )bswap_CARD32 ( pc + 24 ),
-         (GLsizei )bswap_CARD32 ( pc + 28 ),
-         (GLsizei )bswap_CARD32 ( pc + 32 )
-    ) );
-}
-
-void __glXDispSwap_ActiveTextureARB(GLbyte * pc)
-{
-    CALL_ActiveTextureARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 12);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultiTexCoord1dvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord1fvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord1ivARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord1svARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 20);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultiTexCoord2dvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 16 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 2 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord2fvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord2ivARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord2svARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 28);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultiTexCoord3dvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 24 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord3fvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord3ivARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord3svARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 36);
-        pc -= 4;
-    }
-#endif
-
-    CALL_MultiTexCoord4dvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc + 32 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord4fvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord4ivARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc)
-{
-    CALL_MultiTexCoord4svARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_SampleCoverageARB(GLbyte * pc)
-{
-    CALL_SampleCoverageARB( GET_DISPATCH(), (
-         (GLclampf)bswap_FLOAT32( pc +  0 ),
-        *(GLboolean *)(pc +  4)
-    ) );
-}
-
-void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc)
-{
-    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 20 );
-
-    CALL_CompressedTexImage1DARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLsizei )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-        imageSize,
-         (const GLvoid *)(pc + 24)
-    ) );
-}
-
-void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc)
-{
-    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 24 );
-
-    CALL_CompressedTexImage2DARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLsizei )bswap_CARD32 ( pc + 12 ),
-         (GLsizei )bswap_CARD32 ( pc + 16 ),
-         (GLint   )bswap_CARD32 ( pc + 20 ),
-        imageSize,
-         (const GLvoid *)(pc + 28)
-    ) );
-}
-
-void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc)
-{
-    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 28 );
-
-    CALL_CompressedTexImage3DARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLsizei )bswap_CARD32 ( pc + 12 ),
-         (GLsizei )bswap_CARD32 ( pc + 16 ),
-         (GLsizei )bswap_CARD32 ( pc + 20 ),
-         (GLint   )bswap_CARD32 ( pc + 24 ),
-        imageSize,
-         (const GLvoid *)(pc + 32)
-    ) );
-}
-
-void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc)
-{
-    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 20 );
-
-    CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLsizei )bswap_CARD32 ( pc + 12 ),
-         (GLenum  )bswap_ENUM   ( pc + 16 ),
-        imageSize,
-         (const GLvoid *)(pc + 24)
-    ) );
-}
-
-void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc)
-{
-    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 28 );
-
-    CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLsizei )bswap_CARD32 ( pc + 16 ),
-         (GLsizei )bswap_CARD32 ( pc + 20 ),
-         (GLenum  )bswap_ENUM   ( pc + 24 ),
-        imageSize,
-         (const GLvoid *)(pc + 32)
-    ) );
-}
-
-void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc)
-{
-    const GLsizei imageSize =  (GLsizei )bswap_CARD32 ( pc + 36 );
-
-    CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 ),
-         (GLint   )bswap_CARD32 ( pc +  8 ),
-         (GLint   )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-         (GLsizei )bswap_CARD32 ( pc + 20 ),
-         (GLsizei )bswap_CARD32 ( pc + 24 ),
-         (GLsizei )bswap_CARD32 ( pc + 28 ),
-         (GLenum  )bswap_ENUM   ( pc + 32 ),
-        imageSize,
-         (const GLvoid *)(pc + 40)
-    ) );
-}
-
-int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLdouble params[4];
-        CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLuint  )bswap_CARD32 ( pc +  4 ),
-            params
-        ) );
-        (void) bswap_64_array( (uint64_t *) params, 4 );
-        __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLfloat params[4];
-        CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLuint  )bswap_CARD32 ( pc +  4 ),
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, 4 );
-        __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLdouble params[4];
-        CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLuint  )bswap_CARD32 ( pc +  4 ),
-            params
-        ) );
-        (void) bswap_64_array( (uint64_t *) params, 4 );
-        __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLfloat params[4];
-        CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLuint  )bswap_CARD32 ( pc +  4 ),
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, 4 );
-        __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetProgramivARB_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetProgramivARB( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetVertexAttribdvARB_size(pname);
-        GLdouble answerBuffer[200];
-        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribdvARB( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_64_array( (uint64_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetVertexAttribfvARB_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribfvARB( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetVertexAttribivARB_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribivARB( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 40);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 4 )
-    ) );
-}
-
-void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc)
-{
-    CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 4 )
-    ) );
-}
-
-void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 40);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 4 )
-    ) );
-}
-
-void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc)
-{
-    CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 4 )
-    ) );
-}
-
-void __glXDispSwap_ProgramStringARB(GLbyte * pc)
-{
-    const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  8 );
-
-    CALL_ProgramStringARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-        len,
-         (const GLvoid *)(pc + 12)
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 12);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib1dvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib1fvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc)
-{
-    CALL_VertexAttrib1svARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 20);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib2dvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib2fvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc)
-{
-    CALL_VertexAttrib2svARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 28);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib3dvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib3fvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc)
-{
-    CALL_VertexAttrib3svARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NbvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLbyte *)(pc +  4)
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NivARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NsvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NubvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLubyte *)(pc +  4)
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NuivARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4NusvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4bvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLbyte *)(pc +  4)
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 36);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib4dvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4fvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4ivARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4svARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4ubvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLubyte *)(pc +  4)
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4uivARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc)
-{
-    CALL_VertexAttrib4usvARB( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_BeginQueryARB(GLbyte * pc)
-{
-    CALL_BeginQueryARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        CALL_DeleteQueriesARB( GET_DISPATCH(), (
-            n,
-             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_EndQueryARB(GLbyte * pc)
-{
-    CALL_EndQueryARB( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLuint answerBuffer[200];
-        GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenQueriesARB( GET_DISPATCH(), (
-            n,
-            ids
-        ) );
-        (void) bswap_32_array( (uint32_t *) ids, n );
-        __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetQueryObjectivARB_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetQueryObjectivARB( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetQueryObjectuivARB_size(pname);
-        GLuint answerBuffer[200];
-        GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetQueryObjectuivARB( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetQueryivARB_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetQueryivARB( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXSingleReq * const req = (xGLXSingleReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_SINGLE_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsQueryARB( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_DrawBuffersARB(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-    CALL_DrawBuffersARB( GET_DISPATCH(), (
-        n,
-         (const GLenum *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-    ) );
-}
-
-void __glXDispSwap_SampleMaskSGIS(GLbyte * pc)
-{
-    CALL_SampleMaskSGIS( GET_DISPATCH(), (
-         (GLclampf)bswap_FLOAT32( pc +  0 ),
-        *(GLboolean *)(pc +  4)
-    ) );
-}
-
-void __glXDispSwap_SamplePatternSGIS(GLbyte * pc)
-{
-    CALL_SamplePatternSGIS( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-void __glXDispSwap_PointParameterfEXT(GLbyte * pc)
-{
-    CALL_PointParameterfEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLfloat )bswap_FLOAT32( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_PointParameterfvEXT(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-    const GLfloat * params;
-
-    params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfvEXT_size(pname) );
-
-    CALL_PointParameterfvEXT( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3bvEXT( GET_DISPATCH(), (
-         (const GLbyte *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 24);
-        pc -= 4;
-    }
-#endif
-
-    CALL_SecondaryColor3dvEXT( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3fvEXT( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3ivEXT( GET_DISPATCH(), (
-         (const GLint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3svEXT( GET_DISPATCH(), (
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), (
-         (const GLubyte *)(pc +  0)
-    ) );
-}
-
-void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3uivEXT( GET_DISPATCH(), (
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc)
-{
-    CALL_SecondaryColor3usvEXT( GET_DISPATCH(), (
-         (const GLushort *)bswap_16_array( (uint16_t *) (pc +  0), 3 )
-    ) );
-}
-
-void __glXDispSwap_FogCoorddvEXT(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 8);
-        pc -= 4;
-    }
-#endif
-
-    CALL_FogCoorddvEXT( GET_DISPATCH(), (
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_FogCoordfvEXT(GLbyte * pc)
-{
-    CALL_FogCoordfvEXT( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 1 )
-    ) );
-}
-
-void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc)
-{
-    CALL_BlendFuncSeparateEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLenum  )bswap_ENUM   ( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc)
-{
-    CALL_WindowPos3fvMESA( GET_DISPATCH(), (
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  0), 3 )
-    ) );
-}
-
-int __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLboolean retval;
-        GLboolean answerBuffer[200];
-        GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
-        retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), (
-            n,
-             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 ),
-            residences
-        ) );
-        __glXSendReplySwap(cl->client, residences, n, 1, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_BindProgramNV(GLbyte * pc)
-{
-    CALL_BindProgramNV( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-int __glXDispSwap_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        CALL_DeleteProgramsNV( GET_DISPATCH(), (
-            n,
-             (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-        ) );
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_ExecuteProgramNV(GLbyte * pc)
-{
-    CALL_ExecuteProgramNV( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 4 )
-    ) );
-}
-
-int __glXDispSwap_GenProgramsNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLuint answerBuffer[200];
-        GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenProgramsNV( GET_DISPATCH(), (
-            n,
-            programs
-        ) );
-        (void) bswap_32_array( (uint32_t *) programs, n );
-        __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLdouble params[4];
-        CALL_GetProgramParameterdvNV( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLuint  )bswap_CARD32 ( pc +  4 ),
-             (GLenum  )bswap_ENUM   ( pc +  8 ),
-            params
-        ) );
-        (void) bswap_64_array( (uint64_t *) params, 4 );
-        __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLfloat params[4];
-        CALL_GetProgramParameterfvNV( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLuint  )bswap_CARD32 ( pc +  4 ),
-             (GLenum  )bswap_ENUM   ( pc +  8 ),
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, 4 );
-        __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetProgramivNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetProgramivNV_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetProgramivNV( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLint params[1];
-        CALL_GetTrackMatrixivNV( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLuint  )bswap_CARD32 ( pc +  4 ),
-             (GLenum  )bswap_ENUM   ( pc +  8 ),
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, 1 );
-        __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetVertexAttribdvNV_size(pname);
-        GLdouble answerBuffer[200];
-        GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribdvNV( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_64_array( (uint64_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetVertexAttribfvNV_size(pname);
-        GLfloat answerBuffer[200];
-        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribfvNV( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  4 );
-
-        const GLuint compsize = __glGetVertexAttribivNV_size(pname);
-        GLint answerBuffer[200];
-        GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
-        if (params == NULL) return BadAlloc;
-        __glXClearErrorOccured();
-
-        CALL_GetVertexAttribivNV( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            pname,
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, compsize );
-        __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_IsProgramNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsProgramNV( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_LoadProgramNV(GLbyte * pc)
-{
-    const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  8 );
-
-    CALL_LoadProgramNV( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-        len,
-         (const GLubyte *)(pc + 12)
-    ) );
-}
-
-void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc)
-{
-    const GLuint num =  (GLuint  )bswap_CARD32 ( pc +  8 );
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ProgramParameters4dvNV( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-        num,
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 12), 0 )
-    ) );
-}
-
-void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc)
-{
-    const GLuint num =  (GLuint  )bswap_CARD32 ( pc +  8 );
-
-    CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-        num,
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 12), 0 )
-    ) );
-}
-
-void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-    CALL_RequestResidentProgramsNV( GET_DISPATCH(), (
-        n,
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-    ) );
-}
-
-void __glXDispSwap_TrackMatrixNV(GLbyte * pc)
-{
-    CALL_TrackMatrixNV( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLenum  )bswap_ENUM   ( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 12);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib1dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib1fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc)
-{
-    CALL_VertexAttrib1svNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 1 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 20);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib2dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib2fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc)
-{
-    CALL_VertexAttrib2svNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 2 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 28);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib3dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib3fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc)
-{
-    CALL_VertexAttrib3svNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 3 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, 36);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttrib4dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib4fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc)
-{
-    CALL_VertexAttrib4svNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  4), 4 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc)
-{
-    CALL_VertexAttrib4ubvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-         (const GLubyte *)(pc +  4)
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttribs1dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs1fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs1svNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttribs2dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs2fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs2svNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttribs3dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs3fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs3svNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_VertexAttribs4dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs4fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs4svNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLshort *)bswap_16_array( (uint16_t *) (pc +  8), 0 )
-    ) );
-}
-
-void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_VertexAttribs4ubvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        n,
-         (const GLubyte *)(pc +  8)
-    ) );
-}
-
-void __glXDispSwap_PointParameteriNV(GLbyte * pc)
-{
-    CALL_PointParameteriNV( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLint   )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_PointParameterivNV(GLbyte * pc)
-{
-    const GLenum pname =  (GLenum  )bswap_ENUM   ( pc +  0 );
-    const GLint * params;
-
-    params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterivNV_size(pname) );
-
-    CALL_PointParameterivNV( GET_DISPATCH(), (
-        pname,
-        params
-    ) );
-}
-
-void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc)
-{
-    CALL_ActiveStencilFaceEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-        GLdouble params[4];
-        CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            len,
-             (const GLubyte *)(pc +  8),
-            params
-        ) );
-        (void) bswap_64_array( (uint64_t *) params, 4 );
-        __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-        GLfloat params[4];
-        CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 ),
-            len,
-             (const GLubyte *)(pc +  8),
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, 4 );
-        __glXSendReplySwap(cl->client, params, 4, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc)
-{
-    const GLsizei len =  (GLsizei )bswap_CARD32 ( pc + 36 );
-
-#ifdef __GLX_ALIGN64
-    const GLuint cmdlen = 44 + __GLX_PAD(len) - 4;
-    if ((unsigned long)(pc) & 7) {
-        (void) memmove(pc-4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-
-    CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc + 32 ),
-        len,
-         (const GLubyte *)(pc + 40),
-         (const GLdouble *)bswap_64_array( (uint64_t *) (pc +  0), 4 )
-    ) );
-}
-
-void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc)
-{
-    const GLsizei len =  (GLsizei )bswap_CARD32 ( pc +  4 );
-
-    CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), (
-         (GLuint  )bswap_CARD32 ( pc +  0 ),
-        len,
-         (const GLubyte *)(pc + 24),
-         (const GLfloat *)bswap_32_array( (uint32_t *) (pc +  8), 4 )
-    ) );
-}
-
-void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc)
-{
-    CALL_BlendEquationSeparateEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_BindFramebufferEXT(GLbyte * pc)
-{
-    CALL_BindFramebufferEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc)
-{
-    CALL_BindRenderbufferEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLuint  )bswap_CARD32 ( pc +  4 )
-    ) );
-}
-
-int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLenum retval;
-        retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-    CALL_DeleteFramebuffersEXT( GET_DISPATCH(), (
-        n,
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-    ) );
-}
-
-void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc)
-{
-    const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-    CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), (
-        n,
-         (const GLuint *)bswap_32_array( (uint32_t *) (pc +  4), 0 )
-    ) );
-}
-
-void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc)
-{
-    CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLuint  )bswap_CARD32 ( pc + 12 )
-    ) );
-}
-
-void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc)
-{
-    CALL_FramebufferTexture1DEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLuint  )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 )
-    ) );
-}
-
-void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc)
-{
-    CALL_FramebufferTexture2DEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLuint  )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 )
-    ) );
-}
-
-void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc)
-{
-    CALL_FramebufferTexture3DEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLenum  )bswap_ENUM   ( pc +  8 ),
-         (GLuint  )bswap_CARD32 ( pc + 12 ),
-         (GLint   )bswap_CARD32 ( pc + 16 ),
-         (GLint   )bswap_CARD32 ( pc + 20 )
-    ) );
-}
-
-int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLuint answerBuffer[200];
-        GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenFramebuffersEXT( GET_DISPATCH(), (
-            n,
-            framebuffers
-        ) );
-        (void) bswap_32_array( (uint32_t *) framebuffers, n );
-        __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        const GLsizei n =  (GLsizei )bswap_CARD32 ( pc +  0 );
-
-        GLuint answerBuffer[200];
-        GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
-        CALL_GenRenderbuffersEXT( GET_DISPATCH(), (
-            n,
-            renderbuffers
-        ) );
-        (void) bswap_32_array( (uint32_t *) renderbuffers, n );
-        __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc)
-{
-    CALL_GenerateMipmapEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 )
-    ) );
-}
-
-int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLint params[1];
-        CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLenum  )bswap_ENUM   ( pc +  4 ),
-             (GLenum  )bswap_ENUM   ( pc +  8 ),
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, 1 );
-        __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLint params[1];
-        CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), (
-             (GLenum  )bswap_ENUM   ( pc +  0 ),
-             (GLenum  )bswap_ENUM   ( pc +  4 ),
-            params
-        ) );
-        (void) bswap_32_array( (uint32_t *) params, 1 );
-        __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsFramebufferEXT( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-int __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc)
-{
-    xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
-    int error;
-    __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
-    pc += __GLX_VENDPRIV_HDR_SIZE;
-    if ( cx != NULL ) {
-        GLboolean retval;
-        retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), (
-             (GLuint  )bswap_CARD32 ( pc +  0 )
-        ) );
-        __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
-        error = Success;
-    }
-
-    return error;
-}
-
-void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc)
-{
-    CALL_RenderbufferStorageEXT( GET_DISPATCH(), (
-         (GLenum  )bswap_ENUM   ( pc +  0 ),
-         (GLenum  )bswap_ENUM   ( pc +  4 ),
-         (GLsizei )bswap_CARD32 ( pc +  8 ),
-         (GLsizei )bswap_CARD32 ( pc + 12 )
-    ) );
-}
-
diff --git a/GL/glx/indirect_reqsize.c b/GL/glx/indirect_reqsize.c
deleted file mode 100644
index 954eecd..0000000
--- a/GL/glx/indirect_reqsize.c
+++ /dev/null
@@ -1,832 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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, 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
- * 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.
- */
-
-
-#include <GL/gl.h>
-#include "glxserver.h"
-#include "glxbyteorder.h"
-#include "indirect_size.h"
-#include "indirect_reqsize.h"
-
-#define __GLX_PAD(x)  (((x) + 3) & ~3)
-
-#if defined(__CYGWIN__) || defined(__MINGW32__)
-#  undef HAVE_ALIAS
-#endif
-#ifdef HAVE_ALIAS
-#  define ALIAS2(from,to) \
-    GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
-        __attribute__ ((alias( # to )));
-#  define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
-#else
-#  define ALIAS(from,to) \
-    GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
-    { return __glX ## to ## ReqSize( pc, swap ); }
-#endif
-
-
-int
-__glXCallListsReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 0);
-    GLenum type = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        n = bswap_32(n);
-        type = bswap_32(type);
-    }
-
-    compsize = __glCallLists_size(type);
-    return __GLX_PAD((compsize * n));
-}
-
-int
-__glXBitmapReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLsizei width = *(GLsizei *) (pc + 20);
-    GLsizei height = *(GLsizei *) (pc + 24);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        width = bswap_32(width);
-        height = bswap_32(height);
-    }
-
-    return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXFogfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 0);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glFogfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXLightfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glLightfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 0);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glLightModelfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glMaterialfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-    }
-
-    return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glTexParameterfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLenum target = *(GLenum *) (pc + 20);
-    GLsizei width = *(GLsizei *) (pc + 32);
-    GLenum format = *(GLenum *) (pc + 44);
-    GLenum type = *(GLenum *) (pc + 48);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, 1, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLenum target = *(GLenum *) (pc + 20);
-    GLsizei width = *(GLsizei *) (pc + 32);
-    GLsizei height = *(GLsizei *) (pc + 36);
-    GLenum format = *(GLenum *) (pc + 44);
-    GLenum type = *(GLenum *) (pc + 48);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        height = bswap_32(height);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, height, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glTexEnvfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXTexGendvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glTexGendv_size(pname);
-    return __GLX_PAD((compsize * 8));
-}
-
-int
-__glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glTexGenfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei mapsize = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        mapsize = bswap_32(mapsize);
-    }
-
-    return __GLX_PAD((mapsize * 4));
-}
-
-int
-__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei mapsize = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        mapsize = bswap_32(mapsize);
-    }
-
-    return __GLX_PAD((mapsize * 2));
-}
-
-int
-__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLsizei width = *(GLsizei *) (pc + 20);
-    GLsizei height = *(GLsizei *) (pc + 24);
-    GLenum format = *(GLenum *) (pc + 28);
-    GLenum type = *(GLenum *) (pc + 32);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        width = bswap_32(width);
-        height = bswap_32(height);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, 0, width, height, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 0);
-
-    if (swap) {
-        n = bswap_32(n);
-    }
-
-    return __GLX_PAD((n * 4) + (n * 4));
-}
-
-int
-__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLenum target = *(GLenum *) (pc + 20);
-    GLsizei width = *(GLsizei *) (pc + 36);
-    GLenum format = *(GLenum *) (pc + 44);
-    GLenum type = *(GLenum *) (pc + 48);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, 1, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLenum target = *(GLenum *) (pc + 20);
-    GLsizei width = *(GLsizei *) (pc + 36);
-    GLsizei height = *(GLsizei *) (pc + 40);
-    GLenum format = *(GLenum *) (pc + 44);
-    GLenum type = *(GLenum *) (pc + 48);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        height = bswap_32(height);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, height, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXColorTableReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLenum target = *(GLenum *) (pc + 20);
-    GLsizei width = *(GLsizei *) (pc + 28);
-    GLenum format = *(GLenum *) (pc + 32);
-    GLenum type = *(GLenum *) (pc + 36);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, 1, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glColorTableParameterfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLenum target = *(GLenum *) (pc + 20);
-    GLsizei count = *(GLsizei *) (pc + 28);
-    GLenum format = *(GLenum *) (pc + 32);
-    GLenum type = *(GLenum *) (pc + 36);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        count = bswap_32(count);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, count, 1, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLenum target = *(GLenum *) (pc + 20);
-    GLsizei width = *(GLsizei *) (pc + 28);
-    GLenum format = *(GLenum *) (pc + 36);
-    GLenum type = *(GLenum *) (pc + 40);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, 1, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = 0;
-    GLint skip_images = 0;
-    GLint skip_rows = *(GLint *) (pc + 8);
-    GLint alignment = *(GLint *) (pc + 16);
-    GLenum target = *(GLenum *) (pc + 20);
-    GLsizei width = *(GLsizei *) (pc + 28);
-    GLsizei height = *(GLsizei *) (pc + 32);
-    GLenum format = *(GLenum *) (pc + 36);
-    GLenum type = *(GLenum *) (pc + 40);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        skip_rows = bswap_32(skip_rows);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        height = bswap_32(height);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, height, 1,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 4);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glConvolutionParameterfv_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = *(GLint *) (pc + 8);
-    GLint skip_rows = *(GLint *) (pc + 16);
-    GLint skip_images = *(GLint *) (pc + 20);
-    GLint alignment = *(GLint *) (pc + 32);
-    GLenum target = *(GLenum *) (pc + 36);
-    GLsizei width = *(GLsizei *) (pc + 48);
-    GLsizei height = *(GLsizei *) (pc + 52);
-    GLsizei depth = *(GLsizei *) (pc + 56);
-    GLenum format = *(GLenum *) (pc + 68);
-    GLenum type = *(GLenum *) (pc + 72);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        image_height = bswap_32(image_height);
-        skip_rows = bswap_32(skip_rows);
-        skip_images = bswap_32(skip_images);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        height = bswap_32(height);
-        depth = bswap_32(depth);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, height, depth,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
-{
-    GLint row_length = *(GLint *) (pc + 4);
-    GLint image_height = *(GLint *) (pc + 8);
-    GLint skip_rows = *(GLint *) (pc + 16);
-    GLint skip_images = *(GLint *) (pc + 20);
-    GLint alignment = *(GLint *) (pc + 32);
-    GLenum target = *(GLenum *) (pc + 36);
-    GLsizei width = *(GLsizei *) (pc + 60);
-    GLsizei height = *(GLsizei *) (pc + 64);
-    GLsizei depth = *(GLsizei *) (pc + 68);
-    GLenum format = *(GLenum *) (pc + 76);
-    GLenum type = *(GLenum *) (pc + 80);
-
-    if (swap) {
-        row_length = bswap_32(row_length);
-        image_height = bswap_32(image_height);
-        skip_rows = bswap_32(skip_rows);
-        skip_images = bswap_32(skip_images);
-        alignment = bswap_32(alignment);
-        target = bswap_32(target);
-        width = bswap_32(width);
-        height = bswap_32(height);
-        depth = bswap_32(depth);
-        format = bswap_32(format);
-        type = bswap_32(type);
-    }
-
-    return __glXImageSize(format, type, target, width, height, depth,
-                          image_height, row_length, skip_images,
-                          skip_rows, alignment);
-}
-
-int
-__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei imageSize = *(GLsizei *) (pc + 20);
-
-    if (swap) {
-        imageSize = bswap_32(imageSize);
-    }
-
-    return __GLX_PAD(imageSize);
-}
-
-int
-__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei imageSize = *(GLsizei *) (pc + 24);
-
-    if (swap) {
-        imageSize = bswap_32(imageSize);
-    }
-
-    return __GLX_PAD(imageSize);
-}
-
-int
-__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei imageSize = *(GLsizei *) (pc + 28);
-
-    if (swap) {
-        imageSize = bswap_32(imageSize);
-    }
-
-    return __GLX_PAD(imageSize);
-}
-
-int
-__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei imageSize = *(GLsizei *) (pc + 36);
-
-    if (swap) {
-        imageSize = bswap_32(imageSize);
-    }
-
-    return __GLX_PAD(imageSize);
-}
-
-int
-__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei len = *(GLsizei *) (pc + 8);
-
-    if (swap) {
-        len = bswap_32(len);
-    }
-
-    return __GLX_PAD(len);
-}
-
-int
-__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 0);
-
-    if (swap) {
-        n = bswap_32(n);
-    }
-
-    return __GLX_PAD((n * 4));
-}
-
-int
-__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
-{
-    GLenum pname = *(GLenum *) (pc + 0);
-    GLsizei compsize;
-
-    if (swap) {
-        pname = bswap_32(pname);
-    }
-
-    compsize = __glPointParameterfvEXT_size(pname);
-    return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLuint num = *(GLuint *) (pc + 8);
-
-    if (swap) {
-        num = bswap_32(num);
-    }
-
-    return __GLX_PAD((num * 32));
-}
-
-int
-__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLuint num = *(GLuint *) (pc + 8);
-
-    if (swap) {
-        num = bswap_32(num);
-    }
-
-    return __GLX_PAD((num * 16));
-}
-
-int
-__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        n = bswap_32(n);
-    }
-
-    return __GLX_PAD((n * 8));
-}
-
-int
-__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        n = bswap_32(n);
-    }
-
-    return __GLX_PAD((n * 16));
-}
-
-int
-__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        n = bswap_32(n);
-    }
-
-    return __GLX_PAD((n * 24));
-}
-
-int
-__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        n = bswap_32(n);
-    }
-
-    return __GLX_PAD((n * 12));
-}
-
-int
-__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        n = bswap_32(n);
-    }
-
-    return __GLX_PAD((n * 6));
-}
-
-int
-__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei n = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        n = bswap_32(n);
-    }
-
-    return __GLX_PAD((n * 32));
-}
-
-int
-__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap)
-{
-    GLsizei len = *(GLsizei *) (pc + 4);
-
-    if (swap) {
-        len = bswap_32(len);
-    }
-
-    return __GLX_PAD(len);
-}
-
-ALIAS(Fogiv, Fogfv)
-    ALIAS(Lightiv, Lightfv)
-    ALIAS(LightModeliv, LightModelfv)
-    ALIAS(Materialiv, Materialfv)
-    ALIAS(TexParameteriv, TexParameterfv)
-    ALIAS(TexEnviv, TexEnvfv)
-    ALIAS(TexGeniv, TexGenfv)
-    ALIAS(PixelMapuiv, PixelMapfv)
-    ALIAS(ColorTableParameteriv, ColorTableParameterfv)
-    ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
-    ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB)
-    ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB)
-    ALIAS(LoadProgramNV, ProgramStringARB)
-    ALIAS(RequestResidentProgramsNV, DrawBuffersARB)
-    ALIAS(VertexAttribs1fvNV, PixelMapfv)
-    ALIAS(VertexAttribs1svNV, PixelMapusv)
-    ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV)
-    ALIAS(VertexAttribs2svNV, PixelMapfv)
-    ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV)
-    ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV)
-    ALIAS(VertexAttribs4ubvNV, PixelMapfv)
-    ALIAS(PointParameterivNV, PointParameterfvEXT)
-    ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB)
-    ALIAS(DeleteFramebuffersEXT, DrawBuffersARB)
-    ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB)
diff --git a/GL/glx/indirect_reqsize.h b/GL/glx/indirect_reqsize.h
deleted file mode 100644
index 26211ee..0000000
--- a/GL/glx/indirect_reqsize.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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, 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
- * 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.
- */
-
-#if !defined( _INDIRECT_REQSIZE_H_ )
-#  define _INDIRECT_REQSIZE_H_
-
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
-#    define HIDDEN  __attribute__((visibility("hidden")))
-#  else
-#    define HIDDEN
-#  endif
-
-#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-#    define PURE __attribute__((pure))
-#  else
-#    define PURE
-#  endif
-
-extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap);
-
-#  undef HIDDEN
-#  undef PURE
-
-#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */
diff --git a/GL/glx/indirect_size_get.c b/GL/glx/indirect_size_get.c
deleted file mode 100644
index e7eaf97..0000000
--- a/GL/glx/indirect_size_get.c
+++ /dev/null
@@ -1,1206 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2004
- * 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, 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
- * 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.
- */
-
-
-#include <GL/gl.h>
-#include "indirect_size_get.h"
-#include "glxserver.h"
-#include "indirect_util.h"
-#include "indirect_size.h"
-
-#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-#    define PURE __attribute__((pure))
-#  else
-#    define PURE
-#  endif
-
-#  if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#    define FASTCALL __attribute__((fastcall))
-#  else
-#    define FASTCALL
-#  endif
-
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
-#    define INTERNAL  __attribute__((visibility("internal")))
-#  else
-#    define INTERNAL
-#  endif
-
-
-#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
-#  undef HAVE_ALIAS
-#endif
-#ifdef HAVE_ALIAS
-#  define ALIAS2(from,to) \
-    INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
-        __attribute__ ((alias( # to )));
-#  define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size )
-#else
-#  define ALIAS(from,to) \
-    INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
-    { return __gl ## to ## _size( e ); }
-#endif
-
-
-INTERNAL PURE FASTCALL GLint
-__glCallLists_size(GLenum e)
-{
-    switch (e) {
-    case GL_BYTE:
-    case GL_UNSIGNED_BYTE:
-        return 1;
-    case GL_SHORT:
-    case GL_UNSIGNED_SHORT:
-    case GL_2_BYTES:
-        return 2;
-    case GL_3_BYTES:
-        return 3;
-    case GL_INT:
-    case GL_UNSIGNED_INT:
-    case GL_FLOAT:
-    case GL_4_BYTES:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glFogfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_FOG_INDEX:
-    case GL_FOG_DENSITY:
-    case GL_FOG_START:
-    case GL_FOG_END:
-    case GL_FOG_MODE:
-    case GL_FOG_OFFSET_VALUE_SGIX:
-    case GL_FOG_DISTANCE_MODE_NV:
-        return 1;
-    case GL_FOG_COLOR:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glLightfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_SPOT_EXPONENT:
-    case GL_SPOT_CUTOFF:
-    case GL_CONSTANT_ATTENUATION:
-    case GL_LINEAR_ATTENUATION:
-    case GL_QUADRATIC_ATTENUATION:
-        return 1;
-    case GL_SPOT_DIRECTION:
-        return 3;
-    case GL_AMBIENT:
-    case GL_DIFFUSE:
-    case GL_SPECULAR:
-    case GL_POSITION:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glLightModelfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_LIGHT_MODEL_LOCAL_VIEWER:
-    case GL_LIGHT_MODEL_TWO_SIDE:
-    case GL_LIGHT_MODEL_COLOR_CONTROL:
-/*      case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/
-        return 1;
-    case GL_LIGHT_MODEL_AMBIENT:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glMaterialfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_SHININESS:
-        return 1;
-    case GL_COLOR_INDEXES:
-        return 3;
-    case GL_AMBIENT:
-    case GL_DIFFUSE:
-    case GL_SPECULAR:
-    case GL_EMISSION:
-    case GL_AMBIENT_AND_DIFFUSE:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glTexParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_TEXTURE_MAG_FILTER:
-    case GL_TEXTURE_MIN_FILTER:
-    case GL_TEXTURE_WRAP_S:
-    case GL_TEXTURE_WRAP_T:
-    case GL_TEXTURE_PRIORITY:
-    case GL_TEXTURE_WRAP_R:
-    case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
-/*      case GL_SHADOW_AMBIENT_SGIX:*/
-    case GL_TEXTURE_MIN_LOD:
-    case GL_TEXTURE_MAX_LOD:
-    case GL_TEXTURE_BASE_LEVEL:
-    case GL_TEXTURE_MAX_LEVEL:
-    case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
-    case GL_TEXTURE_LOD_BIAS_S_SGIX:
-    case GL_TEXTURE_LOD_BIAS_T_SGIX:
-    case GL_TEXTURE_LOD_BIAS_R_SGIX:
-    case GL_GENERATE_MIPMAP:
-/*      case GL_GENERATE_MIPMAP_SGIS:*/
-    case GL_TEXTURE_COMPARE_SGIX:
-    case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
-    case GL_TEXTURE_MAX_CLAMP_S_SGIX:
-    case GL_TEXTURE_MAX_CLAMP_T_SGIX:
-    case GL_TEXTURE_MAX_CLAMP_R_SGIX:
-    case GL_TEXTURE_MAX_ANISOTROPY_EXT:
-    case GL_TEXTURE_LOD_BIAS:
-/*      case GL_TEXTURE_LOD_BIAS_EXT:*/
-    case GL_DEPTH_TEXTURE_MODE:
-/*      case GL_DEPTH_TEXTURE_MODE_ARB:*/
-    case GL_TEXTURE_COMPARE_MODE:
-/*      case GL_TEXTURE_COMPARE_MODE_ARB:*/
-    case GL_TEXTURE_COMPARE_FUNC:
-/*      case GL_TEXTURE_COMPARE_FUNC_ARB:*/
-    case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
-        return 1;
-    case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
-    case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
-        return 2;
-    case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
-        return 3;
-    case GL_TEXTURE_BORDER_COLOR:
-    case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
-    case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glTexEnvfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_ALPHA_SCALE:
-    case GL_TEXTURE_ENV_MODE:
-    case GL_TEXTURE_LOD_BIAS:
-    case GL_COMBINE_RGB:
-    case GL_COMBINE_ALPHA:
-    case GL_RGB_SCALE:
-    case GL_SOURCE0_RGB:
-    case GL_SOURCE1_RGB:
-    case GL_SOURCE2_RGB:
-    case GL_SOURCE3_RGB_NV:
-    case GL_SOURCE0_ALPHA:
-    case GL_SOURCE1_ALPHA:
-    case GL_SOURCE2_ALPHA:
-    case GL_SOURCE3_ALPHA_NV:
-    case GL_OPERAND0_RGB:
-    case GL_OPERAND1_RGB:
-    case GL_OPERAND2_RGB:
-    case GL_OPERAND3_RGB_NV:
-    case GL_OPERAND0_ALPHA:
-    case GL_OPERAND1_ALPHA:
-    case GL_OPERAND2_ALPHA:
-    case GL_OPERAND3_ALPHA_NV:
-    case GL_COORD_REPLACE_ARB:
-/*      case GL_COORD_REPLACE_NV:*/
-        return 1;
-    case GL_TEXTURE_ENV_COLOR:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glTexGendv_size(GLenum e)
-{
-    switch (e) {
-    case GL_TEXTURE_GEN_MODE:
-        return 1;
-    case GL_OBJECT_PLANE:
-    case GL_EYE_PLANE:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glMap1d_size(GLenum e)
-{
-    switch (e) {
-    case GL_MAP1_INDEX:
-    case GL_MAP1_TEXTURE_COORD_1:
-        return 1;
-    case GL_MAP1_TEXTURE_COORD_2:
-        return 2;
-    case GL_MAP1_NORMAL:
-    case GL_MAP1_TEXTURE_COORD_3:
-    case GL_MAP1_VERTEX_3:
-        return 3;
-    case GL_MAP1_COLOR_4:
-    case GL_MAP1_TEXTURE_COORD_4:
-    case GL_MAP1_VERTEX_4:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glMap2d_size(GLenum e)
-{
-    switch (e) {
-    case GL_MAP2_INDEX:
-    case GL_MAP2_TEXTURE_COORD_1:
-        return 1;
-    case GL_MAP2_TEXTURE_COORD_2:
-        return 2;
-    case GL_MAP2_NORMAL:
-    case GL_MAP2_TEXTURE_COORD_3:
-    case GL_MAP2_VERTEX_3:
-        return 3;
-    case GL_MAP2_COLOR_4:
-    case GL_MAP2_TEXTURE_COORD_4:
-    case GL_MAP2_VERTEX_4:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetBooleanv_size(GLenum e)
-{
-    switch (e) {
-    case GL_CURRENT_INDEX:
-    case GL_CURRENT_RASTER_INDEX:
-    case GL_CURRENT_RASTER_POSITION_VALID:
-    case GL_CURRENT_RASTER_DISTANCE:
-    case GL_POINT_SMOOTH:
-    case GL_POINT_SIZE:
-    case GL_SMOOTH_POINT_SIZE_GRANULARITY:
-    case GL_LINE_SMOOTH:
-    case GL_LINE_WIDTH:
-    case GL_LINE_WIDTH_GRANULARITY:
-    case GL_LINE_STIPPLE:
-    case GL_LINE_STIPPLE_PATTERN:
-    case GL_LINE_STIPPLE_REPEAT:
-    case GL_LIST_MODE:
-    case GL_MAX_LIST_NESTING:
-    case GL_LIST_BASE:
-    case GL_LIST_INDEX:
-    case GL_POLYGON_SMOOTH:
-    case GL_POLYGON_STIPPLE:
-    case GL_EDGE_FLAG:
-    case GL_CULL_FACE:
-    case GL_CULL_FACE_MODE:
-    case GL_FRONT_FACE:
-    case GL_LIGHTING:
-    case GL_LIGHT_MODEL_LOCAL_VIEWER:
-    case GL_LIGHT_MODEL_TWO_SIDE:
-    case GL_SHADE_MODEL:
-    case GL_COLOR_MATERIAL_FACE:
-    case GL_COLOR_MATERIAL_PARAMETER:
-    case GL_COLOR_MATERIAL:
-    case GL_FOG:
-    case GL_FOG_INDEX:
-    case GL_FOG_DENSITY:
-    case GL_FOG_START:
-    case GL_FOG_END:
-    case GL_FOG_MODE:
-    case GL_DEPTH_TEST:
-    case GL_DEPTH_WRITEMASK:
-    case GL_DEPTH_CLEAR_VALUE:
-    case GL_DEPTH_FUNC:
-    case GL_STENCIL_TEST:
-    case GL_STENCIL_CLEAR_VALUE:
-    case GL_STENCIL_FUNC:
-    case GL_STENCIL_VALUE_MASK:
-    case GL_STENCIL_FAIL:
-    case GL_STENCIL_PASS_DEPTH_FAIL:
-    case GL_STENCIL_PASS_DEPTH_PASS:
-    case GL_STENCIL_REF:
-    case GL_STENCIL_WRITEMASK:
-    case GL_MATRIX_MODE:
-    case GL_NORMALIZE:
-    case GL_MODELVIEW_STACK_DEPTH:
-    case GL_PROJECTION_STACK_DEPTH:
-    case GL_TEXTURE_STACK_DEPTH:
-    case GL_ATTRIB_STACK_DEPTH:
-    case GL_CLIENT_ATTRIB_STACK_DEPTH:
-    case GL_ALPHA_TEST:
-    case GL_ALPHA_TEST_FUNC:
-    case GL_ALPHA_TEST_REF:
-    case GL_DITHER:
-    case GL_BLEND_DST:
-    case GL_BLEND_SRC:
-    case GL_BLEND:
-    case GL_LOGIC_OP_MODE:
-    case GL_LOGIC_OP:
-    case GL_AUX_BUFFERS:
-    case GL_DRAW_BUFFER:
-    case GL_READ_BUFFER:
-    case GL_SCISSOR_TEST:
-    case GL_INDEX_CLEAR_VALUE:
-    case GL_INDEX_WRITEMASK:
-    case GL_INDEX_MODE:
-    case GL_RGBA_MODE:
-    case GL_DOUBLEBUFFER:
-    case GL_STEREO:
-    case GL_RENDER_MODE:
-    case GL_PERSPECTIVE_CORRECTION_HINT:
-    case GL_POINT_SMOOTH_HINT:
-    case GL_LINE_SMOOTH_HINT:
-    case GL_POLYGON_SMOOTH_HINT:
-    case GL_FOG_HINT:
-    case GL_TEXTURE_GEN_S:
-    case GL_TEXTURE_GEN_T:
-    case GL_TEXTURE_GEN_R:
-    case GL_TEXTURE_GEN_Q:
-    case GL_PIXEL_MAP_I_TO_I:
-    case GL_PIXEL_MAP_I_TO_I_SIZE:
-    case GL_PIXEL_MAP_S_TO_S_SIZE:
-    case GL_PIXEL_MAP_I_TO_R_SIZE:
-    case GL_PIXEL_MAP_I_TO_G_SIZE:
-    case GL_PIXEL_MAP_I_TO_B_SIZE:
-    case GL_PIXEL_MAP_I_TO_A_SIZE:
-    case GL_PIXEL_MAP_R_TO_R_SIZE:
-    case GL_PIXEL_MAP_G_TO_G_SIZE:
-    case GL_PIXEL_MAP_B_TO_B_SIZE:
-    case GL_PIXEL_MAP_A_TO_A_SIZE:
-    case GL_UNPACK_SWAP_BYTES:
-    case GL_UNPACK_LSB_FIRST:
-    case GL_UNPACK_ROW_LENGTH:
-    case GL_UNPACK_SKIP_ROWS:
-    case GL_UNPACK_SKIP_PIXELS:
-    case GL_UNPACK_ALIGNMENT:
-    case GL_PACK_SWAP_BYTES:
-    case GL_PACK_LSB_FIRST:
-    case GL_PACK_ROW_LENGTH:
-    case GL_PACK_SKIP_ROWS:
-    case GL_PACK_SKIP_PIXELS:
-    case GL_PACK_ALIGNMENT:
-    case GL_MAP_COLOR:
-    case GL_MAP_STENCIL:
-    case GL_INDEX_SHIFT:
-    case GL_INDEX_OFFSET:
-    case GL_RED_SCALE:
-    case GL_RED_BIAS:
-    case GL_ZOOM_X:
-    case GL_ZOOM_Y:
-    case GL_GREEN_SCALE:
-    case GL_GREEN_BIAS:
-    case GL_BLUE_SCALE:
-    case GL_BLUE_BIAS:
-    case GL_ALPHA_SCALE:
-    case GL_ALPHA_BIAS:
-    case GL_DEPTH_SCALE:
-    case GL_DEPTH_BIAS:
-    case GL_MAX_EVAL_ORDER:
-    case GL_MAX_LIGHTS:
-    case GL_MAX_CLIP_PLANES:
-    case GL_MAX_TEXTURE_SIZE:
-    case GL_MAX_PIXEL_MAP_TABLE:
-    case GL_MAX_ATTRIB_STACK_DEPTH:
-    case GL_MAX_MODELVIEW_STACK_DEPTH:
-    case GL_MAX_NAME_STACK_DEPTH:
-    case GL_MAX_PROJECTION_STACK_DEPTH:
-    case GL_MAX_TEXTURE_STACK_DEPTH:
-    case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
-    case GL_SUBPIXEL_BITS:
-    case GL_INDEX_BITS:
-    case GL_RED_BITS:
-    case GL_GREEN_BITS:
-    case GL_BLUE_BITS:
-    case GL_ALPHA_BITS:
-    case GL_DEPTH_BITS:
-    case GL_STENCIL_BITS:
-    case GL_ACCUM_RED_BITS:
-    case GL_ACCUM_GREEN_BITS:
-    case GL_ACCUM_BLUE_BITS:
-    case GL_ACCUM_ALPHA_BITS:
-    case GL_NAME_STACK_DEPTH:
-    case GL_AUTO_NORMAL:
-    case GL_MAP1_COLOR_4:
-    case GL_MAP1_INDEX:
-    case GL_MAP1_NORMAL:
-    case GL_MAP1_TEXTURE_COORD_1:
-    case GL_MAP1_TEXTURE_COORD_2:
-    case GL_MAP1_TEXTURE_COORD_3:
-    case GL_MAP1_TEXTURE_COORD_4:
-    case GL_MAP1_VERTEX_3:
-    case GL_MAP1_VERTEX_4:
-    case GL_MAP2_COLOR_4:
-    case GL_MAP2_INDEX:
-    case GL_MAP2_NORMAL:
-    case GL_MAP2_TEXTURE_COORD_1:
-    case GL_MAP2_TEXTURE_COORD_2:
-    case GL_MAP2_TEXTURE_COORD_3:
-    case GL_MAP2_TEXTURE_COORD_4:
-    case GL_MAP2_VERTEX_3:
-    case GL_MAP2_VERTEX_4:
-    case GL_MAP1_GRID_SEGMENTS:
-    case GL_TEXTURE_1D:
-    case GL_TEXTURE_2D:
-    case GL_POLYGON_OFFSET_UNITS:
-    case GL_CLIP_PLANE0:
-    case GL_CLIP_PLANE1:
-    case GL_CLIP_PLANE2:
-    case GL_CLIP_PLANE3:
-    case GL_CLIP_PLANE4:
-    case GL_CLIP_PLANE5:
-    case GL_LIGHT0:
-    case GL_LIGHT1:
-    case GL_LIGHT2:
-    case GL_LIGHT3:
-    case GL_LIGHT4:
-    case GL_LIGHT5:
-    case GL_LIGHT6:
-    case GL_LIGHT7:
-    case GL_BLEND_EQUATION:
-/*      case GL_BLEND_EQUATION_EXT:*/
-    case GL_CONVOLUTION_1D:
-    case GL_CONVOLUTION_2D:
-    case GL_SEPARABLE_2D:
-    case GL_MAX_CONVOLUTION_WIDTH:
-/*      case GL_MAX_CONVOLUTION_WIDTH_EXT:*/
-    case GL_MAX_CONVOLUTION_HEIGHT:
-/*      case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/
-    case GL_POST_CONVOLUTION_RED_SCALE:
-/*      case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/
-    case GL_POST_CONVOLUTION_GREEN_SCALE:
-/*      case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/
-    case GL_POST_CONVOLUTION_BLUE_SCALE:
-/*      case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/
-    case GL_POST_CONVOLUTION_ALPHA_SCALE:
-/*      case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/
-    case GL_POST_CONVOLUTION_RED_BIAS:
-/*      case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/
-    case GL_POST_CONVOLUTION_GREEN_BIAS:
-/*      case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/
-    case GL_POST_CONVOLUTION_BLUE_BIAS:
-/*      case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/
-    case GL_POST_CONVOLUTION_ALPHA_BIAS:
-/*      case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/
-    case GL_HISTOGRAM:
-    case GL_MINMAX:
-    case GL_POLYGON_OFFSET_FACTOR:
-    case GL_RESCALE_NORMAL:
-/*      case GL_RESCALE_NORMAL_EXT:*/
-    case GL_TEXTURE_BINDING_1D:
-    case GL_TEXTURE_BINDING_2D:
-    case GL_TEXTURE_BINDING_3D:
-    case GL_PACK_SKIP_IMAGES:
-    case GL_PACK_IMAGE_HEIGHT:
-    case GL_UNPACK_SKIP_IMAGES:
-    case GL_UNPACK_IMAGE_HEIGHT:
-    case GL_TEXTURE_3D:
-    case GL_MAX_3D_TEXTURE_SIZE:
-    case GL_VERTEX_ARRAY:
-    case GL_NORMAL_ARRAY:
-    case GL_COLOR_ARRAY:
-    case GL_INDEX_ARRAY:
-    case GL_TEXTURE_COORD_ARRAY:
-    case GL_EDGE_FLAG_ARRAY:
-    case GL_VERTEX_ARRAY_SIZE:
-    case GL_VERTEX_ARRAY_TYPE:
-    case GL_VERTEX_ARRAY_STRIDE:
-    case GL_NORMAL_ARRAY_TYPE:
-    case GL_NORMAL_ARRAY_STRIDE:
-    case GL_COLOR_ARRAY_SIZE:
-    case GL_COLOR_ARRAY_TYPE:
-    case GL_COLOR_ARRAY_STRIDE:
-    case GL_INDEX_ARRAY_TYPE:
-    case GL_INDEX_ARRAY_STRIDE:
-    case GL_TEXTURE_COORD_ARRAY_SIZE:
-    case GL_TEXTURE_COORD_ARRAY_TYPE:
-    case GL_TEXTURE_COORD_ARRAY_STRIDE:
-    case GL_EDGE_FLAG_ARRAY_STRIDE:
-    case GL_MULTISAMPLE:
-/*      case GL_MULTISAMPLE_ARB:*/
-    case GL_SAMPLE_ALPHA_TO_COVERAGE:
-/*      case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/
-    case GL_SAMPLE_ALPHA_TO_ONE:
-/*      case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/
-    case GL_SAMPLE_COVERAGE:
-/*      case GL_SAMPLE_COVERAGE_ARB:*/
-    case GL_SAMPLE_BUFFERS:
-/*      case GL_SAMPLE_BUFFERS_ARB:*/
-    case GL_SAMPLES:
-/*      case GL_SAMPLES_ARB:*/
-    case GL_SAMPLE_COVERAGE_VALUE:
-/*      case GL_SAMPLE_COVERAGE_VALUE_ARB:*/
-    case GL_SAMPLE_COVERAGE_INVERT:
-/*      case GL_SAMPLE_COVERAGE_INVERT_ARB:*/
-    case GL_COLOR_MATRIX_STACK_DEPTH:
-    case GL_MAX_COLOR_MATRIX_STACK_DEPTH:
-    case GL_POST_COLOR_MATRIX_RED_SCALE:
-    case GL_POST_COLOR_MATRIX_GREEN_SCALE:
-    case GL_POST_COLOR_MATRIX_BLUE_SCALE:
-    case GL_POST_COLOR_MATRIX_ALPHA_SCALE:
-    case GL_POST_COLOR_MATRIX_RED_BIAS:
-    case GL_POST_COLOR_MATRIX_GREEN_BIAS:
-    case GL_POST_COLOR_MATRIX_BLUE_BIAS:
-    case GL_POST_COLOR_MATRIX_ALPHA_BIAS:
-    case GL_BLEND_DST_RGB:
-    case GL_BLEND_SRC_RGB:
-    case GL_BLEND_DST_ALPHA:
-    case GL_BLEND_SRC_ALPHA:
-    case GL_COLOR_TABLE:
-    case GL_POST_CONVOLUTION_COLOR_TABLE:
-    case GL_POST_COLOR_MATRIX_COLOR_TABLE:
-    case GL_MAX_ELEMENTS_VERTICES:
-    case GL_MAX_ELEMENTS_INDICES:
-    case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
-    case GL_OCCLUSION_TEST_HP:
-    case GL_OCCLUSION_TEST_RESULT_HP:
-    case GL_LIGHT_MODEL_COLOR_CONTROL:
-    case GL_CURRENT_FOG_COORD:
-    case GL_FOG_COORDINATE_ARRAY_TYPE:
-    case GL_FOG_COORDINATE_ARRAY_STRIDE:
-    case GL_FOG_COORD_ARRAY:
-    case GL_COLOR_SUM_ARB:
-    case GL_SECONDARY_COLOR_ARRAY_SIZE:
-    case GL_SECONDARY_COLOR_ARRAY_TYPE:
-    case GL_SECONDARY_COLOR_ARRAY_STRIDE:
-    case GL_SECONDARY_COLOR_ARRAY:
-    case GL_ACTIVE_TEXTURE:
-/*      case GL_ACTIVE_TEXTURE_ARB:*/
-    case GL_CLIENT_ACTIVE_TEXTURE:
-/*      case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/
-    case GL_MAX_TEXTURE_UNITS:
-/*      case GL_MAX_TEXTURE_UNITS_ARB:*/
-    case GL_MAX_RENDERBUFFER_SIZE_EXT:
-    case GL_TEXTURE_COMPRESSION_HINT:
-/*      case GL_TEXTURE_COMPRESSION_HINT_ARB:*/
-    case GL_TEXTURE_RECTANGLE_ARB:
-/*      case GL_TEXTURE_RECTANGLE_NV:*/
-    case GL_TEXTURE_BINDING_RECTANGLE_ARB:
-/*      case GL_TEXTURE_BINDING_RECTANGLE_NV:*/
-    case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB:
-/*      case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/
-    case GL_MAX_TEXTURE_LOD_BIAS:
-    case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
-    case GL_MAX_SHININESS_NV:
-    case GL_MAX_SPOT_EXPONENT_NV:
-    case GL_TEXTURE_CUBE_MAP:
-/*      case GL_TEXTURE_CUBE_MAP_ARB:*/
-    case GL_TEXTURE_BINDING_CUBE_MAP:
-/*      case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/
-    case GL_MAX_CUBE_MAP_TEXTURE_SIZE:
-/*      case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/
-    case GL_MULTISAMPLE_FILTER_HINT_NV:
-    case GL_FOG_DISTANCE_MODE_NV:
-    case GL_VERTEX_PROGRAM_ARB:
-    case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
-    case GL_MAX_PROGRAM_MATRICES_ARB:
-    case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
-    case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
-    case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
-    case GL_PROGRAM_ERROR_POSITION_ARB:
-    case GL_DEPTH_CLAMP_NV:
-    case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
-/*      case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/
-    case GL_MAX_VERTEX_UNITS_ARB:
-    case GL_ACTIVE_VERTEX_UNITS_ARB:
-    case GL_WEIGHT_SUM_UNITY_ARB:
-    case GL_VERTEX_BLEND_ARB:
-    case GL_CURRENT_WEIGHT_ARB:
-    case GL_WEIGHT_ARRAY_TYPE_ARB:
-    case GL_WEIGHT_ARRAY_STRIDE_ARB:
-    case GL_WEIGHT_ARRAY_SIZE_ARB:
-    case GL_WEIGHT_ARRAY_ARB:
-    case GL_PACK_INVERT_MESA:
-    case GL_STENCIL_BACK_FUNC_ATI:
-    case GL_STENCIL_BACK_FAIL_ATI:
-    case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI:
-    case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI:
-    case GL_FRAGMENT_PROGRAM_ARB:
-    case GL_MAX_DRAW_BUFFERS_ARB:
-/*      case GL_MAX_DRAW_BUFFERS_ATI:*/
-    case GL_DRAW_BUFFER0_ARB:
-/*      case GL_DRAW_BUFFER0_ATI:*/
-    case GL_DRAW_BUFFER1_ARB:
-/*      case GL_DRAW_BUFFER1_ATI:*/
-    case GL_DRAW_BUFFER2_ARB:
-/*      case GL_DRAW_BUFFER2_ATI:*/
-    case GL_DRAW_BUFFER3_ARB:
-/*      case GL_DRAW_BUFFER3_ATI:*/
-    case GL_DRAW_BUFFER4_ARB:
-/*      case GL_DRAW_BUFFER4_ATI:*/
-    case GL_DRAW_BUFFER5_ARB:
-/*      case GL_DRAW_BUFFER5_ATI:*/
-    case GL_DRAW_BUFFER6_ARB:
-/*      case GL_DRAW_BUFFER6_ATI:*/
-    case GL_DRAW_BUFFER7_ARB:
-/*      case GL_DRAW_BUFFER7_ATI:*/
-    case GL_DRAW_BUFFER8_ARB:
-/*      case GL_DRAW_BUFFER8_ATI:*/
-    case GL_DRAW_BUFFER9_ARB:
-/*      case GL_DRAW_BUFFER9_ATI:*/
-    case GL_DRAW_BUFFER10_ARB:
-/*      case GL_DRAW_BUFFER10_ATI:*/
-    case GL_DRAW_BUFFER11_ARB:
-/*      case GL_DRAW_BUFFER11_ATI:*/
-    case GL_DRAW_BUFFER12_ARB:
-/*      case GL_DRAW_BUFFER12_ATI:*/
-    case GL_DRAW_BUFFER13_ARB:
-/*      case GL_DRAW_BUFFER13_ATI:*/
-    case GL_DRAW_BUFFER14_ARB:
-/*      case GL_DRAW_BUFFER14_ATI:*/
-    case GL_DRAW_BUFFER15_ARB:
-/*      case GL_DRAW_BUFFER15_ATI:*/
-    case GL_BLEND_EQUATION_ALPHA_EXT:
-    case GL_MATRIX_PALETTE_ARB:
-    case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB:
-    case GL_MAX_PALETTE_MATRICES_ARB:
-    case GL_CURRENT_PALETTE_MATRIX_ARB:
-    case GL_MATRIX_INDEX_ARRAY_ARB:
-    case GL_CURRENT_MATRIX_INDEX_ARB:
-    case GL_MATRIX_INDEX_ARRAY_SIZE_ARB:
-    case GL_MATRIX_INDEX_ARRAY_TYPE_ARB:
-    case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB:
-    case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT:
-    case GL_POINT_SPRITE_ARB:
-/*      case GL_POINT_SPRITE_NV:*/
-    case GL_POINT_SPRITE_R_MODE_NV:
-    case GL_MAX_VERTEX_ATTRIBS_ARB:
-    case GL_MAX_TEXTURE_COORDS_ARB:
-    case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
-    case GL_DEPTH_BOUNDS_TEST_EXT:
-    case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
-    case GL_STENCIL_TEST_TWO_SIDE_EXT:
-    case GL_ACTIVE_STENCIL_FACE_EXT:
-    case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
-    case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
-    case GL_DRAW_FRAMEBUFFER_BINDING_EXT:
-    case GL_RENDERBUFFER_BINDING_EXT:
-    case GL_READ_FRAMEBUFFER_BINDING_EXT:
-    case GL_MAX_COLOR_ATTACHMENTS_EXT:
-    case GL_RASTER_POSITION_UNCLIPPED_IBM:
-        return 1;
-    case GL_SMOOTH_POINT_SIZE_RANGE:
-    case GL_LINE_WIDTH_RANGE:
-    case GL_POLYGON_MODE:
-    case GL_DEPTH_RANGE:
-    case GL_MAX_VIEWPORT_DIMS:
-    case GL_MAP1_GRID_DOMAIN:
-    case GL_MAP2_GRID_SEGMENTS:
-    case GL_ALIASED_POINT_SIZE_RANGE:
-    case GL_ALIASED_LINE_WIDTH_RANGE:
-    case GL_DEPTH_BOUNDS_EXT:
-        return 2;
-    case GL_CURRENT_NORMAL:
-        return 3;
-    case GL_CURRENT_COLOR:
-    case GL_CURRENT_TEXTURE_COORDS:
-    case GL_CURRENT_RASTER_COLOR:
-    case GL_CURRENT_RASTER_TEXTURE_COORDS:
-    case GL_CURRENT_RASTER_POSITION:
-    case GL_LIGHT_MODEL_AMBIENT:
-    case GL_FOG_COLOR:
-    case GL_ACCUM_CLEAR_VALUE:
-    case GL_VIEWPORT:
-    case GL_SCISSOR_BOX:
-    case GL_COLOR_CLEAR_VALUE:
-    case GL_COLOR_WRITEMASK:
-    case GL_MAP2_GRID_DOMAIN:
-    case GL_BLEND_COLOR:
-/*      case GL_BLEND_COLOR_EXT:*/
-    case GL_CURRENT_SECONDARY_COLOR:
-        return 4;
-    case GL_MODELVIEW_MATRIX:
-    case GL_PROJECTION_MATRIX:
-    case GL_TEXTURE_MATRIX:
-    case GL_MODELVIEW0_ARB:
-    case GL_COLOR_MATRIX:
-    case GL_MODELVIEW1_ARB:
-    case GL_CURRENT_MATRIX_ARB:
-    case GL_MODELVIEW2_ARB:
-    case GL_MODELVIEW3_ARB:
-    case GL_MODELVIEW4_ARB:
-    case GL_MODELVIEW5_ARB:
-    case GL_MODELVIEW6_ARB:
-    case GL_MODELVIEW7_ARB:
-    case GL_MODELVIEW8_ARB:
-    case GL_MODELVIEW9_ARB:
-    case GL_MODELVIEW10_ARB:
-    case GL_MODELVIEW11_ARB:
-    case GL_MODELVIEW12_ARB:
-    case GL_MODELVIEW13_ARB:
-    case GL_MODELVIEW14_ARB:
-    case GL_MODELVIEW15_ARB:
-    case GL_MODELVIEW16_ARB:
-    case GL_MODELVIEW17_ARB:
-    case GL_MODELVIEW18_ARB:
-    case GL_MODELVIEW19_ARB:
-    case GL_MODELVIEW20_ARB:
-    case GL_MODELVIEW21_ARB:
-    case GL_MODELVIEW22_ARB:
-    case GL_MODELVIEW23_ARB:
-    case GL_MODELVIEW24_ARB:
-    case GL_MODELVIEW25_ARB:
-    case GL_MODELVIEW26_ARB:
-    case GL_MODELVIEW27_ARB:
-    case GL_MODELVIEW28_ARB:
-    case GL_MODELVIEW29_ARB:
-    case GL_MODELVIEW30_ARB:
-    case GL_MODELVIEW31_ARB:
-    case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
-        return 16;
-    case GL_FOG_COORDINATE_SOURCE:
-    case GL_COMPRESSED_TEXTURE_FORMATS:
-        return __glGetBooleanv_variable_size(e);
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetTexParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_TEXTURE_MAG_FILTER:
-    case GL_TEXTURE_MIN_FILTER:
-    case GL_TEXTURE_WRAP_S:
-    case GL_TEXTURE_WRAP_T:
-    case GL_TEXTURE_PRIORITY:
-    case GL_TEXTURE_RESIDENT:
-    case GL_TEXTURE_WRAP_R:
-    case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
-/*      case GL_SHADOW_AMBIENT_SGIX:*/
-    case GL_TEXTURE_MIN_LOD:
-    case GL_TEXTURE_MAX_LOD:
-    case GL_TEXTURE_BASE_LEVEL:
-    case GL_TEXTURE_MAX_LEVEL:
-    case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
-    case GL_TEXTURE_LOD_BIAS_S_SGIX:
-    case GL_TEXTURE_LOD_BIAS_T_SGIX:
-    case GL_TEXTURE_LOD_BIAS_R_SGIX:
-    case GL_GENERATE_MIPMAP:
-/*      case GL_GENERATE_MIPMAP_SGIS:*/
-    case GL_TEXTURE_COMPARE_SGIX:
-    case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
-    case GL_TEXTURE_MAX_CLAMP_S_SGIX:
-    case GL_TEXTURE_MAX_CLAMP_T_SGIX:
-    case GL_TEXTURE_MAX_CLAMP_R_SGIX:
-    case GL_TEXTURE_MAX_ANISOTROPY_EXT:
-    case GL_TEXTURE_LOD_BIAS:
-/*      case GL_TEXTURE_LOD_BIAS_EXT:*/
-    case GL_DEPTH_TEXTURE_MODE:
-/*      case GL_DEPTH_TEXTURE_MODE_ARB:*/
-    case GL_TEXTURE_COMPARE_MODE:
-/*      case GL_TEXTURE_COMPARE_MODE_ARB:*/
-    case GL_TEXTURE_COMPARE_FUNC:
-/*      case GL_TEXTURE_COMPARE_FUNC_ARB:*/
-    case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
-        return 1;
-    case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
-    case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
-        return 2;
-    case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
-        return 3;
-    case GL_TEXTURE_BORDER_COLOR:
-    case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
-    case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetTexLevelParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_TEXTURE_WIDTH:
-    case GL_TEXTURE_HEIGHT:
-    case GL_TEXTURE_COMPONENTS:
-    case GL_TEXTURE_BORDER:
-    case GL_TEXTURE_RED_SIZE:
-/*      case GL_TEXTURE_RED_SIZE_EXT:*/
-    case GL_TEXTURE_GREEN_SIZE:
-/*      case GL_TEXTURE_GREEN_SIZE_EXT:*/
-    case GL_TEXTURE_BLUE_SIZE:
-/*      case GL_TEXTURE_BLUE_SIZE_EXT:*/
-    case GL_TEXTURE_ALPHA_SIZE:
-/*      case GL_TEXTURE_ALPHA_SIZE_EXT:*/
-    case GL_TEXTURE_LUMINANCE_SIZE:
-/*      case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/
-    case GL_TEXTURE_INTENSITY_SIZE:
-/*      case GL_TEXTURE_INTENSITY_SIZE_EXT:*/
-    case GL_TEXTURE_DEPTH:
-    case GL_TEXTURE_INDEX_SIZE_EXT:
-    case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
-/*      case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/
-    case GL_TEXTURE_COMPRESSED:
-/*      case GL_TEXTURE_COMPRESSED_ARB:*/
-    case GL_TEXTURE_DEPTH_SIZE:
-/*      case GL_TEXTURE_DEPTH_SIZE_ARB:*/
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glColorTableParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_COLOR_TABLE_SCALE:
-    case GL_COLOR_TABLE_BIAS:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetColorTableParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_COLOR_TABLE_FORMAT:
-/*      case GL_COLOR_TABLE_FORMAT_EXT:*/
-    case GL_COLOR_TABLE_WIDTH:
-/*      case GL_COLOR_TABLE_WIDTH_EXT:*/
-    case GL_COLOR_TABLE_RED_SIZE:
-/*      case GL_COLOR_TABLE_RED_SIZE_EXT:*/
-    case GL_COLOR_TABLE_GREEN_SIZE:
-/*      case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/
-    case GL_COLOR_TABLE_BLUE_SIZE:
-/*      case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/
-    case GL_COLOR_TABLE_ALPHA_SIZE:
-/*      case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/
-    case GL_COLOR_TABLE_LUMINANCE_SIZE:
-/*      case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/
-    case GL_COLOR_TABLE_INTENSITY_SIZE:
-/*      case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/
-        return 1;
-    case GL_COLOR_TABLE_SCALE:
-    case GL_COLOR_TABLE_BIAS:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glConvolutionParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_CONVOLUTION_BORDER_MODE:
-/*      case GL_CONVOLUTION_BORDER_MODE_EXT:*/
-        return 1;
-    case GL_CONVOLUTION_FILTER_SCALE:
-/*      case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
-    case GL_CONVOLUTION_FILTER_BIAS:
-/*      case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
-    case GL_CONVOLUTION_BORDER_COLOR:
-/*      case GL_CONVOLUTION_BORDER_COLOR_HP:*/
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetConvolutionParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_CONVOLUTION_BORDER_MODE:
-/*      case GL_CONVOLUTION_BORDER_MODE_EXT:*/
-    case GL_CONVOLUTION_FORMAT:
-/*      case GL_CONVOLUTION_FORMAT_EXT:*/
-    case GL_CONVOLUTION_WIDTH:
-/*      case GL_CONVOLUTION_WIDTH_EXT:*/
-    case GL_CONVOLUTION_HEIGHT:
-/*      case GL_CONVOLUTION_HEIGHT_EXT:*/
-    case GL_MAX_CONVOLUTION_WIDTH:
-/*      case GL_MAX_CONVOLUTION_WIDTH_EXT:*/
-    case GL_MAX_CONVOLUTION_HEIGHT:
-/*      case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/
-        return 1;
-    case GL_CONVOLUTION_FILTER_SCALE:
-/*      case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
-    case GL_CONVOLUTION_FILTER_BIAS:
-/*      case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
-    case GL_CONVOLUTION_BORDER_COLOR:
-/*      case GL_CONVOLUTION_BORDER_COLOR_HP:*/
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetHistogramParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_HISTOGRAM_WIDTH:
-    case GL_HISTOGRAM_FORMAT:
-    case GL_HISTOGRAM_RED_SIZE:
-    case GL_HISTOGRAM_GREEN_SIZE:
-    case GL_HISTOGRAM_BLUE_SIZE:
-    case GL_HISTOGRAM_ALPHA_SIZE:
-    case GL_HISTOGRAM_LUMINANCE_SIZE:
-    case GL_HISTOGRAM_SINK:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetMinmaxParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_MINMAX_FORMAT:
-    case GL_MINMAX_SINK:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetProgramivARB_size(GLenum e)
-{
-    switch (e) {
-    case GL_PROGRAM_LENGTH_ARB:
-    case GL_PROGRAM_BINDING_ARB:
-    case GL_PROGRAM_ALU_INSTRUCTIONS_ARB:
-    case GL_PROGRAM_TEX_INSTRUCTIONS_ARB:
-    case GL_PROGRAM_TEX_INDIRECTIONS_ARB:
-    case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
-    case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
-    case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
-    case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB:
-    case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB:
-    case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB:
-    case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
-    case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
-    case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
-    case GL_PROGRAM_FORMAT_ARB:
-    case GL_PROGRAM_INSTRUCTIONS_ARB:
-    case GL_MAX_PROGRAM_INSTRUCTIONS_ARB:
-    case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
-    case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
-    case GL_PROGRAM_TEMPORARIES_ARB:
-    case GL_MAX_PROGRAM_TEMPORARIES_ARB:
-    case GL_PROGRAM_NATIVE_TEMPORARIES_ARB:
-    case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB:
-    case GL_PROGRAM_PARAMETERS_ARB:
-    case GL_MAX_PROGRAM_PARAMETERS_ARB:
-    case GL_PROGRAM_NATIVE_PARAMETERS_ARB:
-    case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB:
-    case GL_PROGRAM_ATTRIBS_ARB:
-    case GL_MAX_PROGRAM_ATTRIBS_ARB:
-    case GL_PROGRAM_NATIVE_ATTRIBS_ARB:
-    case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB:
-    case GL_PROGRAM_ADDRESS_REGISTERS_ARB:
-    case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB:
-    case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
-    case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
-    case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB:
-    case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB:
-    case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB:
-    case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV:
-    case GL_MAX_PROGRAM_CALL_DEPTH_NV:
-    case GL_MAX_PROGRAM_IF_DEPTH_NV:
-    case GL_MAX_PROGRAM_LOOP_DEPTH_NV:
-    case GL_MAX_PROGRAM_LOOP_COUNT_NV:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetVertexAttribdvARB_size(GLenum e)
-{
-    switch (e) {
-    case GL_VERTEX_PROGRAM_ARB:
-    case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB:
-    case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB:
-    case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB:
-    case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
-    case GL_CURRENT_VERTEX_ATTRIB_ARB:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetQueryObjectivARB_size(GLenum e)
-{
-    switch (e) {
-    case GL_QUERY_RESULT_ARB:
-    case GL_QUERY_RESULT_AVAILABLE_ARB:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetQueryivARB_size(GLenum e)
-{
-    switch (e) {
-    case GL_QUERY_COUNTER_BITS_ARB:
-    case GL_CURRENT_QUERY_ARB:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glPointParameterfvEXT_size(GLenum e)
-{
-    switch (e) {
-    case GL_POINT_SIZE_MIN:
-/*      case GL_POINT_SIZE_MIN_ARB:*/
-/*      case GL_POINT_SIZE_MIN_SGIS:*/
-    case GL_POINT_SIZE_MAX:
-/*      case GL_POINT_SIZE_MAX_ARB:*/
-/*      case GL_POINT_SIZE_MAX_SGIS:*/
-    case GL_POINT_FADE_THRESHOLD_SIZE:
-/*      case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/
-/*      case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/
-    case GL_POINT_SPRITE_R_MODE_NV:
-    case GL_POINT_SPRITE_COORD_ORIGIN:
-        return 1;
-    case GL_POINT_DISTANCE_ATTENUATION:
-/*      case GL_POINT_DISTANCE_ATTENUATION_ARB:*/
-/*      case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
-        return 3;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetProgramivNV_size(GLenum e)
-{
-    switch (e) {
-    case GL_PROGRAM_LENGTH_NV:
-    case GL_PROGRAM_TARGET_NV:
-    case GL_PROGRAM_RESIDENT_NV:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetVertexAttribdvNV_size(GLenum e)
-{
-    switch (e) {
-    case GL_ATTRIB_ARRAY_SIZE_NV:
-    case GL_ATTRIB_ARRAY_STRIDE_NV:
-    case GL_ATTRIB_ARRAY_TYPE_NV:
-    case GL_CURRENT_ATTRIB_NV:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetFramebufferAttachmentParameterivEXT_size(GLenum e)
-{
-    switch (e) {
-    case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
-    case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:
-    case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:
-    case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
-    case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-ALIAS(Fogiv, Fogfv)
-    ALIAS(Lightiv, Lightfv)
-    ALIAS(LightModeliv, LightModelfv)
-    ALIAS(Materialiv, Materialfv)
-    ALIAS(TexParameteriv, TexParameterfv)
-    ALIAS(TexEnviv, TexEnvfv)
-    ALIAS(TexGenfv, TexGendv)
-    ALIAS(TexGeniv, TexGendv)
-    ALIAS(Map1f, Map1d)
-    ALIAS(Map2f, Map2d)
-    ALIAS(GetDoublev, GetBooleanv)
-    ALIAS(GetFloatv, GetBooleanv)
-    ALIAS(GetIntegerv, GetBooleanv)
-    ALIAS(GetLightfv, Lightfv)
-    ALIAS(GetLightiv, Lightfv)
-    ALIAS(GetMaterialfv, Materialfv)
-    ALIAS(GetMaterialiv, Materialfv)
-    ALIAS(GetTexEnvfv, TexEnvfv)
-    ALIAS(GetTexEnviv, TexEnvfv)
-    ALIAS(GetTexGendv, TexGendv)
-    ALIAS(GetTexGenfv, TexGendv)
-    ALIAS(GetTexGeniv, TexGendv)
-    ALIAS(GetTexParameteriv, GetTexParameterfv)
-    ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv)
-    ALIAS(ColorTableParameteriv, ColorTableParameterfv)
-    ALIAS(GetColorTableParameteriv, GetColorTableParameterfv)
-    ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
-    ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv)
-    ALIAS(GetHistogramParameteriv, GetHistogramParameterfv)
-    ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv)
-    ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB)
-    ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB)
-    ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB)
-    ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV)
-    ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV)
-    ALIAS(PointParameterivNV, PointParameterfvEXT)
-#  undef PURE
-#  undef FASTCALL
-#  undef INTERNAL
diff --git a/GL/glx/indirect_size_get.h b/GL/glx/indirect_size_get.h
deleted file mode 100644
index 4fcb55b..0000000
--- a/GL/glx/indirect_size_get.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2004
- * 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, 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
- * 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.
- */
-
-#if !defined( _INDIRECT_SIZE_GET_H_ )
-#  define _INDIRECT_SIZE_GET_H_
-
-/**
- * \file
- * Prototypes for functions used to determine the number of data elements in
- * various GLX protocol messages.
- *
- * \author Ian Romanick <idr at us.ibm.com>
- */
-
-#  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-#    define PURE __attribute__((pure))
-#  else
-#    define PURE
-#  endif
-
-#  if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#    define FASTCALL __attribute__((fastcall))
-#  else
-#    define FASTCALL
-#  endif
-
-#  if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
-#    define INTERNAL  __attribute__((visibility("internal")))
-#  else
-#    define INTERNAL
-#  endif
-
-extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint
-__glGetConvolutionParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint
-__glGetConvolutionParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint
-__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
-
-#  undef PURE
-#  undef FASTCALL
-#  undef INTERNAL
-
-#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */
diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c
deleted file mode 100644
index cb32026..0000000
--- a/GL/glx/indirect_table.c
+++ /dev/null
@@ -1,1596 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005, 2006
- * 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, 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
- * 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.
- */
-
-#include <inttypes.h>
-#include "glxserver.h"
-#include "glxext.h"
-#include "indirect_dispatch.h"
-#include "indirect_reqsize.h"
-#include "g_disptab.h"
-#include "indirect_table.h"
-
-/*****************************************************************/
-/* tree depth = 3 */
-static const int_fast16_t Single_dispatch_tree[24] = {
-    /* [0] -> opcode range [0, 256], node depth 1 */
-    2,
-    5,
-    13,
-    16,
-    EMPTY_LEAF,
-
-    /* [5] -> opcode range [0, 64], node depth 2 */
-    2,
-    LEAF(0),
-    LEAF(16),
-    10,
-    EMPTY_LEAF,
-
-    /* [10] -> opcode range [32, 48], node depth 3 */
-    1,
-    LEAF(32),
-    EMPTY_LEAF,
-
-    /* [13] -> opcode range [64, 128], node depth 2 */
-    1,
-    EMPTY_LEAF,
-    LEAF(40),
-
-    /* [16] -> opcode range [128, 192], node depth 2 */
-    2,
-    LEAF(72),
-    LEAF(88),
-    21,
-    EMPTY_LEAF,
-
-    /* [21] -> opcode range [160, 176], node depth 3 */
-    1,
-    LEAF(104),
-    EMPTY_LEAF,
-
-};
-
-static const void *Single_function_table[112][2] = {
-    /* [  0] =     0 */ {NULL, NULL},
-    /* [  1] =     1 */ {__glXDisp_Render, __glXDispSwap_Render},
-    /* [  2] =     2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge},
-    /* [  3] =     3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext},
-    /* [  4] =     4 */ {__glXDisp_DestroyContext, __glXDispSwap_DestroyContext},
-    /* [  5] =     5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent},
-    /* [  6] =     6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect},
-    /* [  7] =     7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion},
-    /* [  8] =     8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL},
-    /* [  9] =     9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX},
-    /* [ 10] =    10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext},
-    /* [ 11] =    11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers},
-    /* [ 12] =    12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont},
-    /* [ 13] =    13 */ {__glXDisp_CreateGLXPixmap, __glXDispSwap_CreateGLXPixmap},
-    /* [ 14] =    14 */ {__glXDisp_GetVisualConfigs, __glXDispSwap_GetVisualConfigs},
-    /* [ 15] =    15 */ {__glXDisp_DestroyGLXPixmap, __glXDispSwap_DestroyGLXPixmap},
-    /* [ 16] =    16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate},
-    /* [ 17] =    17 */ {__glXDisp_VendorPrivateWithReply, __glXDispSwap_VendorPrivateWithReply},
-    /* [ 18] =    18 */ {__glXDisp_QueryExtensionsString, __glXDispSwap_QueryExtensionsString},
-    /* [ 19] =    19 */ {__glXDisp_QueryServerString, __glXDispSwap_QueryServerString},
-    /* [ 20] =    20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo},
-    /* [ 21] =    21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs},
-    /* [ 22] =    22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap},
-    /* [ 23] =    23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap},
-    /* [ 24] =    24 */ {__glXDisp_CreateNewContext, __glXDispSwap_CreateNewContext},
-    /* [ 25] =    25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext},
-    /* [ 26] =    26 */ {__glXDisp_MakeContextCurrent, __glXDispSwap_MakeContextCurrent},
-    /* [ 27] =    27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer},
-    /* [ 28] =    28 */ {__glXDisp_DestroyPbuffer, __glXDispSwap_DestroyPbuffer},
-    /* [ 29] =    29 */ {__glXDisp_GetDrawableAttributes, __glXDispSwap_GetDrawableAttributes},
-    /* [ 30] =    30 */ {__glXDisp_ChangeDrawableAttributes, __glXDispSwap_ChangeDrawableAttributes},
-    /* [ 31] =    31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow},
-    /* [ 32] =    32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow},
-    /* [ 33] =    33 */ {NULL, NULL},
-    /* [ 34] =    34 */ {NULL, NULL},
-    /* [ 35] =    35 */ {NULL, NULL},
-    /* [ 36] =    36 */ {NULL, NULL},
-    /* [ 37] =    37 */ {NULL, NULL},
-    /* [ 38] =    38 */ {NULL, NULL},
-    /* [ 39] =    39 */ {NULL, NULL},
-    /* [ 40] =    96 */ {NULL, NULL},
-    /* [ 41] =    97 */ {NULL, NULL},
-    /* [ 42] =    98 */ {NULL, NULL},
-    /* [ 43] =    99 */ {NULL, NULL},
-    /* [ 44] =   100 */ {NULL, NULL},
-    /* [ 45] =   101 */ {__glXDisp_NewList, __glXDispSwap_NewList},
-    /* [ 46] =   102 */ {__glXDisp_EndList, __glXDispSwap_EndList},
-    /* [ 47] =   103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists},
-    /* [ 48] =   104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists},
-    /* [ 49] =   105 */ {__glXDisp_FeedbackBuffer, __glXDispSwap_FeedbackBuffer},
-    /* [ 50] =   106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer},
-    /* [ 51] =   107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode},
-    /* [ 52] =   108 */ {__glXDisp_Finish, __glXDispSwap_Finish},
-    /* [ 53] =   109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref},
-    /* [ 54] =   110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei},
-    /* [ 55] =   111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels},
-    /* [ 56] =   112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv},
-    /* [ 57] =   113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane},
-    /* [ 58] =   114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev},
-    /* [ 59] =   115 */ {__glXDisp_GetError, __glXDispSwap_GetError},
-    /* [ 60] =   116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv},
-    /* [ 61] =   117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv},
-    /* [ 62] =   118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv},
-    /* [ 63] =   119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv},
-    /* [ 64] =   120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv},
-    /* [ 65] =   121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv},
-    /* [ 66] =   122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv},
-    /* [ 67] =   123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv},
-    /* [ 68] =   124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv},
-    /* [ 69] =   125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv},
-    /* [ 70] =   126 */ {__glXDisp_GetPixelMapuiv, __glXDispSwap_GetPixelMapuiv},
-    /* [ 71] =   127 */ {__glXDisp_GetPixelMapusv, __glXDispSwap_GetPixelMapusv},
-    /* [ 72] =   128 */ {__glXDisp_GetPolygonStipple, __glXDispSwap_GetPolygonStipple},
-    /* [ 73] =   129 */ {__glXDisp_GetString, __glXDispSwap_GetString},
-    /* [ 74] =   130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv},
-    /* [ 75] =   131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv},
-    /* [ 76] =   132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv},
-    /* [ 77] =   133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv},
-    /* [ 78] =   134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv},
-    /* [ 79] =   135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage},
-    /* [ 80] =   136 */ {__glXDisp_GetTexParameterfv, __glXDispSwap_GetTexParameterfv},
-    /* [ 81] =   137 */ {__glXDisp_GetTexParameteriv, __glXDispSwap_GetTexParameteriv},
-    /* [ 82] =   138 */ {__glXDisp_GetTexLevelParameterfv, __glXDispSwap_GetTexLevelParameterfv},
-    /* [ 83] =   139 */ {__glXDisp_GetTexLevelParameteriv, __glXDispSwap_GetTexLevelParameteriv},
-    /* [ 84] =   140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled},
-    /* [ 85] =   141 */ {__glXDisp_IsList, __glXDispSwap_IsList},
-    /* [ 86] =   142 */ {__glXDisp_Flush, __glXDispSwap_Flush},
-    /* [ 87] =   143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident},
-    /* [ 88] =   144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures},
-    /* [ 89] =   145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures},
-    /* [ 90] =   146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture},
-    /* [ 91] =   147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable},
-    /* [ 92] =   148 */ {__glXDisp_GetColorTableParameterfv, __glXDispSwap_GetColorTableParameterfv},
-    /* [ 93] =   149 */ {__glXDisp_GetColorTableParameteriv, __glXDispSwap_GetColorTableParameteriv},
-    /* [ 94] =   150 */ {__glXDisp_GetConvolutionFilter, __glXDispSwap_GetConvolutionFilter},
-    /* [ 95] =   151 */ {__glXDisp_GetConvolutionParameterfv, __glXDispSwap_GetConvolutionParameterfv},
-    /* [ 96] =   152 */ {__glXDisp_GetConvolutionParameteriv, __glXDispSwap_GetConvolutionParameteriv},
-    /* [ 97] =   153 */ {__glXDisp_GetSeparableFilter, __glXDispSwap_GetSeparableFilter},
-    /* [ 98] =   154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram},
-    /* [ 99] =   155 */ {__glXDisp_GetHistogramParameterfv, __glXDispSwap_GetHistogramParameterfv},
-    /* [ 100] =   156 */ {__glXDisp_GetHistogramParameteriv, __glXDispSwap_GetHistogramParameteriv},
-    /* [ 101] =   157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax},
-    /* [ 102] =   158 */ {__glXDisp_GetMinmaxParameterfv, __glXDispSwap_GetMinmaxParameterfv},
-    /* [ 103] =   159 */ {__glXDisp_GetMinmaxParameteriv, __glXDispSwap_GetMinmaxParameteriv},
-    /* [ 104] =   160 */ {__glXDisp_GetCompressedTexImageARB, __glXDispSwap_GetCompressedTexImageARB},
-    /* [ 105] =   161 */ {__glXDisp_DeleteQueriesARB, __glXDispSwap_DeleteQueriesARB},
-    /* [ 106] =   162 */ {__glXDisp_GenQueriesARB, __glXDispSwap_GenQueriesARB},
-    /* [ 107] =   163 */ {__glXDisp_IsQueryARB, __glXDispSwap_IsQueryARB},
-    /* [ 108] =   164 */ {__glXDisp_GetQueryivARB, __glXDispSwap_GetQueryivARB},
-    /* [ 109] =   165 */ {__glXDisp_GetQueryObjectivARB, __glXDispSwap_GetQueryObjectivARB},
-    /* [ 110] =   166 */ {__glXDisp_GetQueryObjectuivARB, __glXDispSwap_GetQueryObjectuivARB},
-    /* [ 111] =   167 */ {NULL, NULL},
-};
-
-const struct __glXDispatchInfo Single_dispatch_info = {
-    8,
-    Single_dispatch_tree,
-    Single_function_table,
-    NULL,
-    NULL
-};
-
-/*****************************************************************/
-/* tree depth = 8 */
-static const int_fast16_t Render_dispatch_tree[95] = {
-    /* [0] -> opcode range [0, 8192], node depth 1 */
-    2,
-    5,
-    31,
-    54,
-    EMPTY_LEAF,
-
-    /* [5] -> opcode range [0, 2048], node depth 2 */
-    1,
-    8,
-    EMPTY_LEAF,
-
-    /* [8] -> opcode range [0, 1024], node depth 3 */
-    1,
-    11,
-    EMPTY_LEAF,
-
-    /* [11] -> opcode range [0, 512], node depth 4 */
-    1,
-    14,
-    EMPTY_LEAF,
-
-    /* [14] -> opcode range [0, 256], node depth 5 */
-    4,
-    LEAF(0),
-    LEAF(16),
-    LEAF(32),
-    LEAF(48),
-    LEAF(64),
-    LEAF(80),
-    LEAF(96),
-    LEAF(112),
-    LEAF(128),
-    LEAF(144),
-    LEAF(160),
-    LEAF(176),
-    LEAF(192),
-    LEAF(208),
-    LEAF(224),
-    EMPTY_LEAF,
-
-    /* [31] -> opcode range [2048, 4096], node depth 2 */
-    1,
-    34,
-    EMPTY_LEAF,
-
-    /* [34] -> opcode range [2048, 3072], node depth 3 */
-    1,
-    37,
-    EMPTY_LEAF,
-
-    /* [37] -> opcode range [2048, 2560], node depth 4 */
-    1,
-    40,
-    EMPTY_LEAF,
-
-    /* [40] -> opcode range [2048, 2304], node depth 5 */
-    1,
-    43,
-    EMPTY_LEAF,
-
-    /* [43] -> opcode range [2048, 2176], node depth 6 */
-    1,
-    46,
-    EMPTY_LEAF,
-
-    /* [46] -> opcode range [2048, 2112], node depth 7 */
-    1,
-    49,
-    EMPTY_LEAF,
-
-    /* [49] -> opcode range [2048, 2080], node depth 8 */
-    2,
-    LEAF(240),
-    LEAF(248),
-    LEAF(256),
-    EMPTY_LEAF,
-
-    /* [54] -> opcode range [4096, 6144], node depth 2 */
-    1,
-    57,
-    EMPTY_LEAF,
-
-    /* [57] -> opcode range [4096, 5120], node depth 3 */
-    1,
-    60,
-    EMPTY_LEAF,
-
-    /* [60] -> opcode range [4096, 4608], node depth 4 */
-    1,
-    63,
-    EMPTY_LEAF,
-
-    /* [63] -> opcode range [4096, 4352], node depth 5 */
-    4,
-    LEAF(264),
-    LEAF(280),
-    80,
-    EMPTY_LEAF,
-    EMPTY_LEAF,
-    LEAF(296),
-    LEAF(312),
-    LEAF(328),
-    LEAF(344),
-    EMPTY_LEAF,
-    83,
-    86,
-    EMPTY_LEAF,
-    89,
-    92,
-    EMPTY_LEAF,
-
-    /* [80] -> opcode range [4128, 4144], node depth 6 */
-    1,
-    LEAF(360),
-    EMPTY_LEAF,
-
-    /* [83] -> opcode range [4256, 4272], node depth 6 */
-    1,
-    EMPTY_LEAF,
-    LEAF(368),
-
-    /* [86] -> opcode range [4272, 4288], node depth 6 */
-    1,
-    LEAF(376),
-    EMPTY_LEAF,
-
-    /* [89] -> opcode range [4304, 4320], node depth 6 */
-    1,
-    EMPTY_LEAF,
-    LEAF(384),
-
-    /* [92] -> opcode range [4320, 4336], node depth 6 */
-    1,
-    LEAF(392),
-    EMPTY_LEAF,
-
-};
-
-static const void *Render_function_table[400][2] = {
-    /* [  0] =     0 */ {NULL, NULL},
-    /* [  1] =     1 */ {__glXDisp_CallList, __glXDispSwap_CallList},
-    /* [  2] =     2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists},
-    /* [  3] =     3 */ {__glXDisp_ListBase, __glXDispSwap_ListBase},
-    /* [  4] =     4 */ {__glXDisp_Begin, __glXDispSwap_Begin},
-    /* [  5] =     5 */ {__glXDisp_Bitmap, __glXDispSwap_Bitmap},
-    /* [  6] =     6 */ {__glXDisp_Color3bv, __glXDispSwap_Color3bv},
-    /* [  7] =     7 */ {__glXDisp_Color3dv, __glXDispSwap_Color3dv},
-    /* [  8] =     8 */ {__glXDisp_Color3fv, __glXDispSwap_Color3fv},
-    /* [  9] =     9 */ {__glXDisp_Color3iv, __glXDispSwap_Color3iv},
-    /* [ 10] =    10 */ {__glXDisp_Color3sv, __glXDispSwap_Color3sv},
-    /* [ 11] =    11 */ {__glXDisp_Color3ubv, __glXDispSwap_Color3ubv},
-    /* [ 12] =    12 */ {__glXDisp_Color3uiv, __glXDispSwap_Color3uiv},
-    /* [ 13] =    13 */ {__glXDisp_Color3usv, __glXDispSwap_Color3usv},
-    /* [ 14] =    14 */ {__glXDisp_Color4bv, __glXDispSwap_Color4bv},
-    /* [ 15] =    15 */ {__glXDisp_Color4dv, __glXDispSwap_Color4dv},
-    /* [ 16] =    16 */ {__glXDisp_Color4fv, __glXDispSwap_Color4fv},
-    /* [ 17] =    17 */ {__glXDisp_Color4iv, __glXDispSwap_Color4iv},
-    /* [ 18] =    18 */ {__glXDisp_Color4sv, __glXDispSwap_Color4sv},
-    /* [ 19] =    19 */ {__glXDisp_Color4ubv, __glXDispSwap_Color4ubv},
-    /* [ 20] =    20 */ {__glXDisp_Color4uiv, __glXDispSwap_Color4uiv},
-    /* [ 21] =    21 */ {__glXDisp_Color4usv, __glXDispSwap_Color4usv},
-    /* [ 22] =    22 */ {__glXDisp_EdgeFlagv, __glXDispSwap_EdgeFlagv},
-    /* [ 23] =    23 */ {__glXDisp_End, __glXDispSwap_End},
-    /* [ 24] =    24 */ {__glXDisp_Indexdv, __glXDispSwap_Indexdv},
-    /* [ 25] =    25 */ {__glXDisp_Indexfv, __glXDispSwap_Indexfv},
-    /* [ 26] =    26 */ {__glXDisp_Indexiv, __glXDispSwap_Indexiv},
-    /* [ 27] =    27 */ {__glXDisp_Indexsv, __glXDispSwap_Indexsv},
-    /* [ 28] =    28 */ {__glXDisp_Normal3bv, __glXDispSwap_Normal3bv},
-    /* [ 29] =    29 */ {__glXDisp_Normal3dv, __glXDispSwap_Normal3dv},
-    /* [ 30] =    30 */ {__glXDisp_Normal3fv, __glXDispSwap_Normal3fv},
-    /* [ 31] =    31 */ {__glXDisp_Normal3iv, __glXDispSwap_Normal3iv},
-    /* [ 32] =    32 */ {__glXDisp_Normal3sv, __glXDispSwap_Normal3sv},
-    /* [ 33] =    33 */ {__glXDisp_RasterPos2dv, __glXDispSwap_RasterPos2dv},
-    /* [ 34] =    34 */ {__glXDisp_RasterPos2fv, __glXDispSwap_RasterPos2fv},
-    /* [ 35] =    35 */ {__glXDisp_RasterPos2iv, __glXDispSwap_RasterPos2iv},
-    /* [ 36] =    36 */ {__glXDisp_RasterPos2sv, __glXDispSwap_RasterPos2sv},
-    /* [ 37] =    37 */ {__glXDisp_RasterPos3dv, __glXDispSwap_RasterPos3dv},
-    /* [ 38] =    38 */ {__glXDisp_RasterPos3fv, __glXDispSwap_RasterPos3fv},
-    /* [ 39] =    39 */ {__glXDisp_RasterPos3iv, __glXDispSwap_RasterPos3iv},
-    /* [ 40] =    40 */ {__glXDisp_RasterPos3sv, __glXDispSwap_RasterPos3sv},
-    /* [ 41] =    41 */ {__glXDisp_RasterPos4dv, __glXDispSwap_RasterPos4dv},
-    /* [ 42] =    42 */ {__glXDisp_RasterPos4fv, __glXDispSwap_RasterPos4fv},
-    /* [ 43] =    43 */ {__glXDisp_RasterPos4iv, __glXDispSwap_RasterPos4iv},
-    /* [ 44] =    44 */ {__glXDisp_RasterPos4sv, __glXDispSwap_RasterPos4sv},
-    /* [ 45] =    45 */ {__glXDisp_Rectdv, __glXDispSwap_Rectdv},
-    /* [ 46] =    46 */ {__glXDisp_Rectfv, __glXDispSwap_Rectfv},
-    /* [ 47] =    47 */ {__glXDisp_Rectiv, __glXDispSwap_Rectiv},
-    /* [ 48] =    48 */ {__glXDisp_Rectsv, __glXDispSwap_Rectsv},
-    /* [ 49] =    49 */ {__glXDisp_TexCoord1dv, __glXDispSwap_TexCoord1dv},
-    /* [ 50] =    50 */ {__glXDisp_TexCoord1fv, __glXDispSwap_TexCoord1fv},
-    /* [ 51] =    51 */ {__glXDisp_TexCoord1iv, __glXDispSwap_TexCoord1iv},
-    /* [ 52] =    52 */ {__glXDisp_TexCoord1sv, __glXDispSwap_TexCoord1sv},
-    /* [ 53] =    53 */ {__glXDisp_TexCoord2dv, __glXDispSwap_TexCoord2dv},
-    /* [ 54] =    54 */ {__glXDisp_TexCoord2fv, __glXDispSwap_TexCoord2fv},
-    /* [ 55] =    55 */ {__glXDisp_TexCoord2iv, __glXDispSwap_TexCoord2iv},
-    /* [ 56] =    56 */ {__glXDisp_TexCoord2sv, __glXDispSwap_TexCoord2sv},
-    /* [ 57] =    57 */ {__glXDisp_TexCoord3dv, __glXDispSwap_TexCoord3dv},
-    /* [ 58] =    58 */ {__glXDisp_TexCoord3fv, __glXDispSwap_TexCoord3fv},
-    /* [ 59] =    59 */ {__glXDisp_TexCoord3iv, __glXDispSwap_TexCoord3iv},
-    /* [ 60] =    60 */ {__glXDisp_TexCoord3sv, __glXDispSwap_TexCoord3sv},
-    /* [ 61] =    61 */ {__glXDisp_TexCoord4dv, __glXDispSwap_TexCoord4dv},
-    /* [ 62] =    62 */ {__glXDisp_TexCoord4fv, __glXDispSwap_TexCoord4fv},
-    /* [ 63] =    63 */ {__glXDisp_TexCoord4iv, __glXDispSwap_TexCoord4iv},
-    /* [ 64] =    64 */ {__glXDisp_TexCoord4sv, __glXDispSwap_TexCoord4sv},
-    /* [ 65] =    65 */ {__glXDisp_Vertex2dv, __glXDispSwap_Vertex2dv},
-    /* [ 66] =    66 */ {__glXDisp_Vertex2fv, __glXDispSwap_Vertex2fv},
-    /* [ 67] =    67 */ {__glXDisp_Vertex2iv, __glXDispSwap_Vertex2iv},
-    /* [ 68] =    68 */ {__glXDisp_Vertex2sv, __glXDispSwap_Vertex2sv},
-    /* [ 69] =    69 */ {__glXDisp_Vertex3dv, __glXDispSwap_Vertex3dv},
-    /* [ 70] =    70 */ {__glXDisp_Vertex3fv, __glXDispSwap_Vertex3fv},
-    /* [ 71] =    71 */ {__glXDisp_Vertex3iv, __glXDispSwap_Vertex3iv},
-    /* [ 72] =    72 */ {__glXDisp_Vertex3sv, __glXDispSwap_Vertex3sv},
-    /* [ 73] =    73 */ {__glXDisp_Vertex4dv, __glXDispSwap_Vertex4dv},
-    /* [ 74] =    74 */ {__glXDisp_Vertex4fv, __glXDispSwap_Vertex4fv},
-    /* [ 75] =    75 */ {__glXDisp_Vertex4iv, __glXDispSwap_Vertex4iv},
-    /* [ 76] =    76 */ {__glXDisp_Vertex4sv, __glXDispSwap_Vertex4sv},
-    /* [ 77] =    77 */ {__glXDisp_ClipPlane, __glXDispSwap_ClipPlane},
-    /* [ 78] =    78 */ {__glXDisp_ColorMaterial, __glXDispSwap_ColorMaterial},
-    /* [ 79] =    79 */ {__glXDisp_CullFace, __glXDispSwap_CullFace},
-    /* [ 80] =    80 */ {__glXDisp_Fogf, __glXDispSwap_Fogf},
-    /* [ 81] =    81 */ {__glXDisp_Fogfv, __glXDispSwap_Fogfv},
-    /* [ 82] =    82 */ {__glXDisp_Fogi, __glXDispSwap_Fogi},
-    /* [ 83] =    83 */ {__glXDisp_Fogiv, __glXDispSwap_Fogiv},
-    /* [ 84] =    84 */ {__glXDisp_FrontFace, __glXDispSwap_FrontFace},
-    /* [ 85] =    85 */ {__glXDisp_Hint, __glXDispSwap_Hint},
-    /* [ 86] =    86 */ {__glXDisp_Lightf, __glXDispSwap_Lightf},
-    /* [ 87] =    87 */ {__glXDisp_Lightfv, __glXDispSwap_Lightfv},
-    /* [ 88] =    88 */ {__glXDisp_Lighti, __glXDispSwap_Lighti},
-    /* [ 89] =    89 */ {__glXDisp_Lightiv, __glXDispSwap_Lightiv},
-    /* [ 90] =    90 */ {__glXDisp_LightModelf, __glXDispSwap_LightModelf},
-    /* [ 91] =    91 */ {__glXDisp_LightModelfv, __glXDispSwap_LightModelfv},
-    /* [ 92] =    92 */ {__glXDisp_LightModeli, __glXDispSwap_LightModeli},
-    /* [ 93] =    93 */ {__glXDisp_LightModeliv, __glXDispSwap_LightModeliv},
-    /* [ 94] =    94 */ {__glXDisp_LineStipple, __glXDispSwap_LineStipple},
-    /* [ 95] =    95 */ {__glXDisp_LineWidth, __glXDispSwap_LineWidth},
-    /* [ 96] =    96 */ {__glXDisp_Materialf, __glXDispSwap_Materialf},
-    /* [ 97] =    97 */ {__glXDisp_Materialfv, __glXDispSwap_Materialfv},
-    /* [ 98] =    98 */ {__glXDisp_Materiali, __glXDispSwap_Materiali},
-    /* [ 99] =    99 */ {__glXDisp_Materialiv, __glXDispSwap_Materialiv},
-    /* [ 100] =   100 */ {__glXDisp_PointSize, __glXDispSwap_PointSize},
-    /* [ 101] =   101 */ {__glXDisp_PolygonMode, __glXDispSwap_PolygonMode},
-    /* [ 102] =   102 */ {__glXDisp_PolygonStipple, __glXDispSwap_PolygonStipple},
-    /* [ 103] =   103 */ {__glXDisp_Scissor, __glXDispSwap_Scissor},
-    /* [ 104] =   104 */ {__glXDisp_ShadeModel, __glXDispSwap_ShadeModel},
-    /* [ 105] =   105 */ {__glXDisp_TexParameterf, __glXDispSwap_TexParameterf},
-    /* [ 106] =   106 */ {__glXDisp_TexParameterfv, __glXDispSwap_TexParameterfv},
-    /* [ 107] =   107 */ {__glXDisp_TexParameteri, __glXDispSwap_TexParameteri},
-    /* [ 108] =   108 */ {__glXDisp_TexParameteriv, __glXDispSwap_TexParameteriv},
-    /* [ 109] =   109 */ {__glXDisp_TexImage1D, __glXDispSwap_TexImage1D},
-    /* [ 110] =   110 */ {__glXDisp_TexImage2D, __glXDispSwap_TexImage2D},
-    /* [ 111] =   111 */ {__glXDisp_TexEnvf, __glXDispSwap_TexEnvf},
-    /* [ 112] =   112 */ {__glXDisp_TexEnvfv, __glXDispSwap_TexEnvfv},
-    /* [ 113] =   113 */ {__glXDisp_TexEnvi, __glXDispSwap_TexEnvi},
-    /* [ 114] =   114 */ {__glXDisp_TexEnviv, __glXDispSwap_TexEnviv},
-    /* [ 115] =   115 */ {__glXDisp_TexGend, __glXDispSwap_TexGend},
-    /* [ 116] =   116 */ {__glXDisp_TexGendv, __glXDispSwap_TexGendv},
-    /* [ 117] =   117 */ {__glXDisp_TexGenf, __glXDispSwap_TexGenf},
-    /* [ 118] =   118 */ {__glXDisp_TexGenfv, __glXDispSwap_TexGenfv},
-    /* [ 119] =   119 */ {__glXDisp_TexGeni, __glXDispSwap_TexGeni},
-    /* [ 120] =   120 */ {__glXDisp_TexGeniv, __glXDispSwap_TexGeniv},
-    /* [ 121] =   121 */ {__glXDisp_InitNames, __glXDispSwap_InitNames},
-    /* [ 122] =   122 */ {__glXDisp_LoadName, __glXDispSwap_LoadName},
-    /* [ 123] =   123 */ {__glXDisp_PassThrough, __glXDispSwap_PassThrough},
-    /* [ 124] =   124 */ {__glXDisp_PopName, __glXDispSwap_PopName},
-    /* [ 125] =   125 */ {__glXDisp_PushName, __glXDispSwap_PushName},
-    /* [ 126] =   126 */ {__glXDisp_DrawBuffer, __glXDispSwap_DrawBuffer},
-    /* [ 127] =   127 */ {__glXDisp_Clear, __glXDispSwap_Clear},
-    /* [ 128] =   128 */ {__glXDisp_ClearAccum, __glXDispSwap_ClearAccum},
-    /* [ 129] =   129 */ {__glXDisp_ClearIndex, __glXDispSwap_ClearIndex},
-    /* [ 130] =   130 */ {__glXDisp_ClearColor, __glXDispSwap_ClearColor},
-    /* [ 131] =   131 */ {__glXDisp_ClearStencil, __glXDispSwap_ClearStencil},
-    /* [ 132] =   132 */ {__glXDisp_ClearDepth, __glXDispSwap_ClearDepth},
-    /* [ 133] =   133 */ {__glXDisp_StencilMask, __glXDispSwap_StencilMask},
-    /* [ 134] =   134 */ {__glXDisp_ColorMask, __glXDispSwap_ColorMask},
-    /* [ 135] =   135 */ {__glXDisp_DepthMask, __glXDispSwap_DepthMask},
-    /* [ 136] =   136 */ {__glXDisp_IndexMask, __glXDispSwap_IndexMask},
-    /* [ 137] =   137 */ {__glXDisp_Accum, __glXDispSwap_Accum},
-    /* [ 138] =   138 */ {__glXDisp_Disable, __glXDispSwap_Disable},
-    /* [ 139] =   139 */ {__glXDisp_Enable, __glXDispSwap_Enable},
-    /* [ 140] =   140 */ {NULL, NULL},
-    /* [ 141] =   141 */ {__glXDisp_PopAttrib, __glXDispSwap_PopAttrib},
-    /* [ 142] =   142 */ {__glXDisp_PushAttrib, __glXDispSwap_PushAttrib},
-    /* [ 143] =   143 */ {__glXDisp_Map1d, __glXDispSwap_Map1d},
-    /* [ 144] =   144 */ {__glXDisp_Map1f, __glXDispSwap_Map1f},
-    /* [ 145] =   145 */ {__glXDisp_Map2d, __glXDispSwap_Map2d},
-    /* [ 146] =   146 */ {__glXDisp_Map2f, __glXDispSwap_Map2f},
-    /* [ 147] =   147 */ {__glXDisp_MapGrid1d, __glXDispSwap_MapGrid1d},
-    /* [ 148] =   148 */ {__glXDisp_MapGrid1f, __glXDispSwap_MapGrid1f},
-    /* [ 149] =   149 */ {__glXDisp_MapGrid2d, __glXDispSwap_MapGrid2d},
-    /* [ 150] =   150 */ {__glXDisp_MapGrid2f, __glXDispSwap_MapGrid2f},
-    /* [ 151] =   151 */ {__glXDisp_EvalCoord1dv, __glXDispSwap_EvalCoord1dv},
-    /* [ 152] =   152 */ {__glXDisp_EvalCoord1fv, __glXDispSwap_EvalCoord1fv},
-    /* [ 153] =   153 */ {__glXDisp_EvalCoord2dv, __glXDispSwap_EvalCoord2dv},
-    /* [ 154] =   154 */ {__glXDisp_EvalCoord2fv, __glXDispSwap_EvalCoord2fv},
-    /* [ 155] =   155 */ {__glXDisp_EvalMesh1, __glXDispSwap_EvalMesh1},
-    /* [ 156] =   156 */ {__glXDisp_EvalPoint1, __glXDispSwap_EvalPoint1},
-    /* [ 157] =   157 */ {__glXDisp_EvalMesh2, __glXDispSwap_EvalMesh2},
-    /* [ 158] =   158 */ {__glXDisp_EvalPoint2, __glXDispSwap_EvalPoint2},
-    /* [ 159] =   159 */ {__glXDisp_AlphaFunc, __glXDispSwap_AlphaFunc},
-    /* [ 160] =   160 */ {__glXDisp_BlendFunc, __glXDispSwap_BlendFunc},
-    /* [ 161] =   161 */ {__glXDisp_LogicOp, __glXDispSwap_LogicOp},
-    /* [ 162] =   162 */ {__glXDisp_StencilFunc, __glXDispSwap_StencilFunc},
-    /* [ 163] =   163 */ {__glXDisp_StencilOp, __glXDispSwap_StencilOp},
-    /* [ 164] =   164 */ {__glXDisp_DepthFunc, __glXDispSwap_DepthFunc},
-    /* [ 165] =   165 */ {__glXDisp_PixelZoom, __glXDispSwap_PixelZoom},
-    /* [ 166] =   166 */ {__glXDisp_PixelTransferf, __glXDispSwap_PixelTransferf},
-    /* [ 167] =   167 */ {__glXDisp_PixelTransferi, __glXDispSwap_PixelTransferi},
-    /* [ 168] =   168 */ {__glXDisp_PixelMapfv, __glXDispSwap_PixelMapfv},
-    /* [ 169] =   169 */ {__glXDisp_PixelMapuiv, __glXDispSwap_PixelMapuiv},
-    /* [ 170] =   170 */ {__glXDisp_PixelMapusv, __glXDispSwap_PixelMapusv},
-    /* [ 171] =   171 */ {__glXDisp_ReadBuffer, __glXDispSwap_ReadBuffer},
-    /* [ 172] =   172 */ {__glXDisp_CopyPixels, __glXDispSwap_CopyPixels},
-    /* [ 173] =   173 */ {__glXDisp_DrawPixels, __glXDispSwap_DrawPixels},
-    /* [ 174] =   174 */ {__glXDisp_DepthRange, __glXDispSwap_DepthRange},
-    /* [ 175] =   175 */ {__glXDisp_Frustum, __glXDispSwap_Frustum},
-    /* [ 176] =   176 */ {__glXDisp_LoadIdentity, __glXDispSwap_LoadIdentity},
-    /* [ 177] =   177 */ {__glXDisp_LoadMatrixf, __glXDispSwap_LoadMatrixf},
-    /* [ 178] =   178 */ {__glXDisp_LoadMatrixd, __glXDispSwap_LoadMatrixd},
-    /* [ 179] =   179 */ {__glXDisp_MatrixMode, __glXDispSwap_MatrixMode},
-    /* [ 180] =   180 */ {__glXDisp_MultMatrixf, __glXDispSwap_MultMatrixf},
-    /* [ 181] =   181 */ {__glXDisp_MultMatrixd, __glXDispSwap_MultMatrixd},
-    /* [ 182] =   182 */ {__glXDisp_Ortho, __glXDispSwap_Ortho},
-    /* [ 183] =   183 */ {__glXDisp_PopMatrix, __glXDispSwap_PopMatrix},
-    /* [ 184] =   184 */ {__glXDisp_PushMatrix, __glXDispSwap_PushMatrix},
-    /* [ 185] =   185 */ {__glXDisp_Rotated, __glXDispSwap_Rotated},
-    /* [ 186] =   186 */ {__glXDisp_Rotatef, __glXDispSwap_Rotatef},
-    /* [ 187] =   187 */ {__glXDisp_Scaled, __glXDispSwap_Scaled},
-    /* [ 188] =   188 */ {__glXDisp_Scalef, __glXDispSwap_Scalef},
-    /* [ 189] =   189 */ {__glXDisp_Translated, __glXDispSwap_Translated},
-    /* [ 190] =   190 */ {__glXDisp_Translatef, __glXDispSwap_Translatef},
-    /* [ 191] =   191 */ {__glXDisp_Viewport, __glXDispSwap_Viewport},
-    /* [ 192] =   192 */ {__glXDisp_PolygonOffset, __glXDispSwap_PolygonOffset},
-    /* [ 193] =   193 */ {__glXDisp_DrawArrays, __glXDispSwap_DrawArrays},
-    /* [ 194] =   194 */ {__glXDisp_Indexubv, __glXDispSwap_Indexubv},
-    /* [ 195] =   195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable},
-    /* [ 196] =   196 */ {__glXDisp_CopyColorSubTable, __glXDispSwap_CopyColorSubTable},
-    /* [ 197] =   197 */ {__glXDisp_ActiveTextureARB, __glXDispSwap_ActiveTextureARB},
-    /* [ 198] =   198 */ {__glXDisp_MultiTexCoord1dvARB, __glXDispSwap_MultiTexCoord1dvARB},
-    /* [ 199] =   199 */ {__glXDisp_MultiTexCoord1fvARB, __glXDispSwap_MultiTexCoord1fvARB},
-    /* [ 200] =   200 */ {__glXDisp_MultiTexCoord1ivARB, __glXDispSwap_MultiTexCoord1ivARB},
-    /* [ 201] =   201 */ {__glXDisp_MultiTexCoord1svARB, __glXDispSwap_MultiTexCoord1svARB},
-    /* [ 202] =   202 */ {__glXDisp_MultiTexCoord2dvARB, __glXDispSwap_MultiTexCoord2dvARB},
-    /* [ 203] =   203 */ {__glXDisp_MultiTexCoord2fvARB, __glXDispSwap_MultiTexCoord2fvARB},
-    /* [ 204] =   204 */ {__glXDisp_MultiTexCoord2ivARB, __glXDispSwap_MultiTexCoord2ivARB},
-    /* [ 205] =   205 */ {__glXDisp_MultiTexCoord2svARB, __glXDispSwap_MultiTexCoord2svARB},
-    /* [ 206] =   206 */ {__glXDisp_MultiTexCoord3dvARB, __glXDispSwap_MultiTexCoord3dvARB},
-    /* [ 207] =   207 */ {__glXDisp_MultiTexCoord3fvARB, __glXDispSwap_MultiTexCoord3fvARB},
-    /* [ 208] =   208 */ {__glXDisp_MultiTexCoord3ivARB, __glXDispSwap_MultiTexCoord3ivARB},
-    /* [ 209] =   209 */ {__glXDisp_MultiTexCoord3svARB, __glXDispSwap_MultiTexCoord3svARB},
-    /* [ 210] =   210 */ {__glXDisp_MultiTexCoord4dvARB, __glXDispSwap_MultiTexCoord4dvARB},
-    /* [ 211] =   211 */ {__glXDisp_MultiTexCoord4fvARB, __glXDispSwap_MultiTexCoord4fvARB},
-    /* [ 212] =   212 */ {__glXDisp_MultiTexCoord4ivARB, __glXDispSwap_MultiTexCoord4ivARB},
-    /* [ 213] =   213 */ {__glXDisp_MultiTexCoord4svARB, __glXDispSwap_MultiTexCoord4svARB},
-    /* [ 214] =   214 */ {__glXDisp_CompressedTexImage1DARB, __glXDispSwap_CompressedTexImage1DARB},
-    /* [ 215] =   215 */ {__glXDisp_CompressedTexImage2DARB, __glXDispSwap_CompressedTexImage2DARB},
-    /* [ 216] =   216 */ {__glXDisp_CompressedTexImage3DARB, __glXDispSwap_CompressedTexImage3DARB},
-    /* [ 217] =   217 */ {__glXDisp_CompressedTexSubImage1DARB, __glXDispSwap_CompressedTexSubImage1DARB},
-    /* [ 218] =   218 */ {__glXDisp_CompressedTexSubImage2DARB, __glXDispSwap_CompressedTexSubImage2DARB},
-    /* [ 219] =   219 */ {__glXDisp_CompressedTexSubImage3DARB, __glXDispSwap_CompressedTexSubImage3DARB},
-    /* [ 220] =   220 */ {NULL, NULL},
-    /* [ 221] =   221 */ {NULL, NULL},
-    /* [ 222] =   222 */ {NULL, NULL},
-    /* [ 223] =   223 */ {NULL, NULL},
-    /* [ 224] =   224 */ {NULL, NULL},
-    /* [ 225] =   225 */ {NULL, NULL},
-    /* [ 226] =   226 */ {NULL, NULL},
-    /* [ 227] =   227 */ {NULL, NULL},
-    /* [ 228] =   228 */ {NULL, NULL},
-    /* [ 229] =   229 */ {__glXDisp_SampleCoverageARB, __glXDispSwap_SampleCoverageARB},
-    /* [ 230] =   230 */ {__glXDisp_WindowPos3fvMESA, __glXDispSwap_WindowPos3fvMESA},
-    /* [ 231] =   231 */ {__glXDisp_BeginQueryARB, __glXDispSwap_BeginQueryARB},
-    /* [ 232] =   232 */ {__glXDisp_EndQueryARB, __glXDispSwap_EndQueryARB},
-    /* [ 233] =   233 */ {__glXDisp_DrawBuffersARB, __glXDispSwap_DrawBuffersARB},
-    /* [ 234] =   234 */ {NULL, NULL},
-    /* [ 235] =   235 */ {NULL, NULL},
-    /* [ 236] =   236 */ {NULL, NULL},
-    /* [ 237] =   237 */ {NULL, NULL},
-    /* [ 238] =   238 */ {NULL, NULL},
-    /* [ 239] =   239 */ {NULL, NULL},
-    /* [ 240] =  2048 */ {__glXDisp_SampleMaskSGIS, __glXDispSwap_SampleMaskSGIS},
-    /* [ 241] =  2049 */ {__glXDisp_SamplePatternSGIS, __glXDispSwap_SamplePatternSGIS},
-    /* [ 242] =  2050 */ {NULL, NULL},
-    /* [ 243] =  2051 */ {NULL, NULL},
-    /* [ 244] =  2052 */ {NULL, NULL},
-    /* [ 245] =  2053 */ {__glXDisp_ColorTable, __glXDispSwap_ColorTable},
-    /* [ 246] =  2054 */ {__glXDisp_ColorTableParameterfv, __glXDispSwap_ColorTableParameterfv},
-    /* [ 247] =  2055 */ {__glXDisp_ColorTableParameteriv, __glXDispSwap_ColorTableParameteriv},
-    /* [ 248] =  2056 */ {__glXDisp_CopyColorTable, __glXDispSwap_CopyColorTable},
-    /* [ 249] =  2057 */ {NULL, NULL},
-    /* [ 250] =  2058 */ {NULL, NULL},
-    /* [ 251] =  2059 */ {NULL, NULL},
-    /* [ 252] =  2060 */ {NULL, NULL},
-    /* [ 253] =  2061 */ {NULL, NULL},
-    /* [ 254] =  2062 */ {NULL, NULL},
-    /* [ 255] =  2063 */ {NULL, NULL},
-    /* [ 256] =  2064 */ {NULL, NULL},
-    /* [ 257] =  2065 */ {__glXDisp_PointParameterfEXT, __glXDispSwap_PointParameterfEXT},
-    /* [ 258] =  2066 */ {__glXDisp_PointParameterfvEXT, __glXDispSwap_PointParameterfvEXT},
-    /* [ 259] =  2067 */ {NULL, NULL},
-    /* [ 260] =  2068 */ {NULL, NULL},
-    /* [ 261] =  2069 */ {NULL, NULL},
-    /* [ 262] =  2070 */ {NULL, NULL},
-    /* [ 263] =  2071 */ {NULL, NULL},
-    /* [ 264] =  4096 */ {__glXDisp_BlendColor, __glXDispSwap_BlendColor},
-    /* [ 265] =  4097 */ {__glXDisp_BlendEquation, __glXDispSwap_BlendEquation},
-    /* [ 266] =  4098 */ {NULL, NULL},
-    /* [ 267] =  4099 */ {__glXDisp_TexSubImage1D, __glXDispSwap_TexSubImage1D},
-    /* [ 268] =  4100 */ {__glXDisp_TexSubImage2D, __glXDispSwap_TexSubImage2D},
-    /* [ 269] =  4101 */ {__glXDisp_ConvolutionFilter1D, __glXDispSwap_ConvolutionFilter1D},
-    /* [ 270] =  4102 */ {__glXDisp_ConvolutionFilter2D, __glXDispSwap_ConvolutionFilter2D},
-    /* [ 271] =  4103 */ {__glXDisp_ConvolutionParameterf, __glXDispSwap_ConvolutionParameterf},
-    /* [ 272] =  4104 */ {__glXDisp_ConvolutionParameterfv, __glXDispSwap_ConvolutionParameterfv},
-    /* [ 273] =  4105 */ {__glXDisp_ConvolutionParameteri, __glXDispSwap_ConvolutionParameteri},
-    /* [ 274] =  4106 */ {__glXDisp_ConvolutionParameteriv, __glXDispSwap_ConvolutionParameteriv},
-    /* [ 275] =  4107 */ {__glXDisp_CopyConvolutionFilter1D, __glXDispSwap_CopyConvolutionFilter1D},
-    /* [ 276] =  4108 */ {__glXDisp_CopyConvolutionFilter2D, __glXDispSwap_CopyConvolutionFilter2D},
-    /* [ 277] =  4109 */ {__glXDisp_SeparableFilter2D, __glXDispSwap_SeparableFilter2D},
-    /* [ 278] =  4110 */ {__glXDisp_Histogram, __glXDispSwap_Histogram},
-    /* [ 279] =  4111 */ {__glXDisp_Minmax, __glXDispSwap_Minmax},
-    /* [ 280] =  4112 */ {__glXDisp_ResetHistogram, __glXDispSwap_ResetHistogram},
-    /* [ 281] =  4113 */ {__glXDisp_ResetMinmax, __glXDispSwap_ResetMinmax},
-    /* [ 282] =  4114 */ {__glXDisp_TexImage3D, __glXDispSwap_TexImage3D},
-    /* [ 283] =  4115 */ {__glXDisp_TexSubImage3D, __glXDispSwap_TexSubImage3D},
-    /* [ 284] =  4116 */ {NULL, NULL},
-    /* [ 285] =  4117 */ {__glXDisp_BindTexture, __glXDispSwap_BindTexture},
-    /* [ 286] =  4118 */ {__glXDisp_PrioritizeTextures, __glXDispSwap_PrioritizeTextures},
-    /* [ 287] =  4119 */ {__glXDisp_CopyTexImage1D, __glXDispSwap_CopyTexImage1D},
-    /* [ 288] =  4120 */ {__glXDisp_CopyTexImage2D, __glXDispSwap_CopyTexImage2D},
-    /* [ 289] =  4121 */ {__glXDisp_CopyTexSubImage1D, __glXDispSwap_CopyTexSubImage1D},
-    /* [ 290] =  4122 */ {__glXDisp_CopyTexSubImage2D, __glXDispSwap_CopyTexSubImage2D},
-    /* [ 291] =  4123 */ {__glXDisp_CopyTexSubImage3D, __glXDispSwap_CopyTexSubImage3D},
-    /* [ 292] =  4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT},
-    /* [ 293] =  4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT},
-    /* [ 294] =  4126 */ {__glXDisp_SecondaryColor3bvEXT, __glXDispSwap_SecondaryColor3bvEXT},
-    /* [ 295] =  4127 */ {__glXDisp_SecondaryColor3svEXT, __glXDispSwap_SecondaryColor3svEXT},
-    /* [ 296] =  4176 */ {NULL, NULL},
-    /* [ 297] =  4177 */ {NULL, NULL},
-    /* [ 298] =  4178 */ {NULL, NULL},
-    /* [ 299] =  4179 */ {NULL, NULL},
-    /* [ 300] =  4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV},
-    /* [ 301] =  4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV},
-    /* [ 302] =  4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV},
-    /* [ 303] =  4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV},
-    /* [ 304] =  4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB},
-    /* [ 305] =  4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB},
-    /* [ 306] =  4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV},
-    /* [ 307] =  4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV},
-    /* [ 308] =  4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV},
-    /* [ 309] =  4189 */ {__glXDisp_VertexAttrib1svARB, __glXDispSwap_VertexAttrib1svARB},
-    /* [ 310] =  4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB},
-    /* [ 311] =  4191 */ {__glXDisp_VertexAttrib3svARB, __glXDispSwap_VertexAttrib3svARB},
-    /* [ 312] =  4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB},
-    /* [ 313] =  4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB},
-    /* [ 314] =  4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB},
-    /* [ 315] =  4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB},
-    /* [ 316] =  4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB},
-    /* [ 317] =  4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB},
-    /* [ 318] =  4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB},
-    /* [ 319] =  4199 */ {__glXDisp_VertexAttrib3dvARB, __glXDispSwap_VertexAttrib3dvARB},
-    /* [ 320] =  4200 */ {__glXDisp_VertexAttrib4dvARB, __glXDispSwap_VertexAttrib4dvARB},
-    /* [ 321] =  4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB},
-    /* [ 322] =  4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV},
-    /* [ 323] =  4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV},
-    /* [ 324] =  4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV},
-    /* [ 325] =  4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV},
-    /* [ 326] =  4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV},
-    /* [ 327] =  4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV},
-    /* [ 328] =  4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV},
-    /* [ 329] =  4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV},
-    /* [ 330] =  4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV},
-    /* [ 331] =  4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV},
-    /* [ 332] =  4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV},
-    /* [ 333] =  4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV},
-    /* [ 334] =  4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV},
-    /* [ 335] =  4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB},
-    /* [ 336] =  4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB},
-    /* [ 337] =  4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB},
-    /* [ 338] =  4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV},
-    /* [ 339] =  4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV},
-    /* [ 340] =  4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT},
-    /* [ 341] =  4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV},
-    /* [ 342] =  4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV},
-    /* [ 343] =  4223 */ {NULL, NULL},
-    /* [ 344] =  4224 */ {NULL, NULL},
-    /* [ 345] =  4225 */ {NULL, NULL},
-    /* [ 346] =  4226 */ {NULL, NULL},
-    /* [ 347] =  4227 */ {NULL, NULL},
-    /* [ 348] =  4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT},
-    /* [ 349] =  4229 */ {NULL, NULL},
-    /* [ 350] =  4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB},
-    /* [ 351] =  4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB},
-    /* [ 352] =  4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB},
-    /* [ 353] =  4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB},
-    /* [ 354] =  4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB},
-    /* [ 355] =  4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB},
-    /* [ 356] =  4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB},
-    /* [ 357] =  4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB},
-    /* [ 358] =  4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB},
-    /* [ 359] =  4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB},
-    /* [ 360] =  4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT},
-    /* [ 361] =  4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT},
-    /* [ 362] =  4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT},
-    /* [ 363] =  4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT},
-    /* [ 364] =  4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT},
-    /* [ 365] =  4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT},
-    /* [ 366] =  4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT},
-    /* [ 367] =  4135 */ {NULL, NULL},
-    /* [ 368] =  4264 */ {NULL, NULL},
-    /* [ 369] =  4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV},
-    /* [ 370] =  4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV},
-    /* [ 371] =  4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV},
-    /* [ 372] =  4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV},
-    /* [ 373] =  4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV},
-    /* [ 374] =  4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV},
-    /* [ 375] =  4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV},
-    /* [ 376] =  4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV},
-    /* [ 377] =  4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV},
-    /* [ 378] =  4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV},
-    /* [ 379] =  4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV},
-    /* [ 380] =  4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV},
-    /* [ 381] =  4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV},
-    /* [ 382] =  4278 */ {NULL, NULL},
-    /* [ 383] =  4279 */ {NULL, NULL},
-    /* [ 384] =  4312 */ {NULL, NULL},
-    /* [ 385] =  4313 */ {NULL, NULL},
-    /* [ 386] =  4314 */ {NULL, NULL},
-    /* [ 387] =  4315 */ {NULL, NULL},
-    /* [ 388] =  4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT},
-    /* [ 389] =  4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT},
-    /* [ 390] =  4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT},
-    /* [ 391] =  4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT},
-    /* [ 392] =  4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT},
-    /* [ 393] =  4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT},
-    /* [ 394] =  4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT},
-    /* [ 395] =  4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT},
-    /* [ 396] =  4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT},
-    /* [ 397] =  4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT},
-    /* [ 398] =  4326 */ {NULL, NULL},
-    /* [ 399] =  4327 */ {NULL, NULL},
-};
-
-static const int_fast16_t Render_size_table[400][2] = {
-    /* [  0] =     0 */ {  0, ~0},
-    /* [  1] =     1 */ {  8, ~0},
-    /* [  2] =     2 */ { 12,  0},
-    /* [  3] =     3 */ {  8, ~0},
-    /* [  4] =     4 */ {  8, ~0},
-    /* [  5] =     5 */ { 48,  1},
-    /* [  6] =     6 */ {  8, ~0},
-    /* [  7] =     7 */ { 28, ~0},
-    /* [  8] =     8 */ { 16, ~0},
-    /* [  9] =     9 */ { 16, ~0},
-    /* [ 10] =    10 */ { 12, ~0},
-    /* [ 11] =    11 */ {  8, ~0},
-    /* [ 12] =    12 */ { 16, ~0},
-    /* [ 13] =    13 */ { 12, ~0},
-    /* [ 14] =    14 */ {  8, ~0},
-    /* [ 15] =    15 */ { 36, ~0},
-    /* [ 16] =    16 */ { 20, ~0},
-    /* [ 17] =    17 */ { 20, ~0},
-    /* [ 18] =    18 */ { 12, ~0},
-    /* [ 19] =    19 */ {  8, ~0},
-    /* [ 20] =    20 */ { 20, ~0},
-    /* [ 21] =    21 */ { 12, ~0},
-    /* [ 22] =    22 */ {  8, ~0},
-    /* [ 23] =    23 */ {  4, ~0},
-    /* [ 24] =    24 */ { 12, ~0},
-    /* [ 25] =    25 */ {  8, ~0},
-    /* [ 26] =    26 */ {  8, ~0},
-    /* [ 27] =    27 */ {  8, ~0},
-    /* [ 28] =    28 */ {  8, ~0},
-    /* [ 29] =    29 */ { 28, ~0},
-    /* [ 30] =    30 */ { 16, ~0},
-    /* [ 31] =    31 */ { 16, ~0},
-    /* [ 32] =    32 */ { 12, ~0},
-    /* [ 33] =    33 */ { 20, ~0},
-    /* [ 34] =    34 */ { 12, ~0},
-    /* [ 35] =    35 */ { 12, ~0},
-    /* [ 36] =    36 */ {  8, ~0},
-    /* [ 37] =    37 */ { 28, ~0},
-    /* [ 38] =    38 */ { 16, ~0},
-    /* [ 39] =    39 */ { 16, ~0},
-    /* [ 40] =    40 */ { 12, ~0},
-    /* [ 41] =    41 */ { 36, ~0},
-    /* [ 42] =    42 */ { 20, ~0},
-    /* [ 43] =    43 */ { 20, ~0},
-    /* [ 44] =    44 */ { 12, ~0},
-    /* [ 45] =    45 */ { 36, ~0},
-    /* [ 46] =    46 */ { 20, ~0},
-    /* [ 47] =    47 */ { 20, ~0},
-    /* [ 48] =    48 */ { 12, ~0},
-    /* [ 49] =    49 */ { 12, ~0},
-    /* [ 50] =    50 */ {  8, ~0},
-    /* [ 51] =    51 */ {  8, ~0},
-    /* [ 52] =    52 */ {  8, ~0},
-    /* [ 53] =    53 */ { 20, ~0},
-    /* [ 54] =    54 */ { 12, ~0},
-    /* [ 55] =    55 */ { 12, ~0},
-    /* [ 56] =    56 */ {  8, ~0},
-    /* [ 57] =    57 */ { 28, ~0},
-    /* [ 58] =    58 */ { 16, ~0},
-    /* [ 59] =    59 */ { 16, ~0},
-    /* [ 60] =    60 */ { 12, ~0},
-    /* [ 61] =    61 */ { 36, ~0},
-    /* [ 62] =    62 */ { 20, ~0},
-    /* [ 63] =    63 */ { 20, ~0},
-    /* [ 64] =    64 */ { 12, ~0},
-    /* [ 65] =    65 */ { 20, ~0},
-    /* [ 66] =    66 */ { 12, ~0},
-    /* [ 67] =    67 */ { 12, ~0},
-    /* [ 68] =    68 */ {  8, ~0},
-    /* [ 69] =    69 */ { 28, ~0},
-    /* [ 70] =    70 */ { 16, ~0},
-    /* [ 71] =    71 */ { 16, ~0},
-    /* [ 72] =    72 */ { 12, ~0},
-    /* [ 73] =    73 */ { 36, ~0},
-    /* [ 74] =    74 */ { 20, ~0},
-    /* [ 75] =    75 */ { 20, ~0},
-    /* [ 76] =    76 */ { 12, ~0},
-    /* [ 77] =    77 */ { 40, ~0},
-    /* [ 78] =    78 */ { 12, ~0},
-    /* [ 79] =    79 */ {  8, ~0},
-    /* [ 80] =    80 */ { 12, ~0},
-    /* [ 81] =    81 */ {  8,  2},
-    /* [ 82] =    82 */ { 12, ~0},
-    /* [ 83] =    83 */ {  8,  3},
-    /* [ 84] =    84 */ {  8, ~0},
-    /* [ 85] =    85 */ { 12, ~0},
-    /* [ 86] =    86 */ { 16, ~0},
-    /* [ 87] =    87 */ { 12,  4},
-    /* [ 88] =    88 */ { 16, ~0},
-    /* [ 89] =    89 */ { 12,  5},
-    /* [ 90] =    90 */ { 12, ~0},
-    /* [ 91] =    91 */ {  8,  6},
-    /* [ 92] =    92 */ { 12, ~0},
-    /* [ 93] =    93 */ {  8,  7},
-    /* [ 94] =    94 */ { 12, ~0},
-    /* [ 95] =    95 */ {  8, ~0},
-    /* [ 96] =    96 */ { 16, ~0},
-    /* [ 97] =    97 */ { 12,  8},
-    /* [ 98] =    98 */ { 16, ~0},
-    /* [ 99] =    99 */ { 12,  9},
-    /* [100] =   100 */ {  8, ~0},
-    /* [101] =   101 */ { 12, ~0},
-    /* [102] =   102 */ { 24, 10},
-    /* [103] =   103 */ { 20, ~0},
-    /* [104] =   104 */ {  8, ~0},
-    /* [105] =   105 */ { 16, ~0},
-    /* [106] =   106 */ { 12, 11},
-    /* [107] =   107 */ { 16, ~0},
-    /* [108] =   108 */ { 12, 12},
-    /* [109] =   109 */ { 56, 13},
-    /* [110] =   110 */ { 56, 14},
-    /* [111] =   111 */ { 16, ~0},
-    /* [112] =   112 */ { 12, 15},
-    /* [113] =   113 */ { 16, ~0},
-    /* [114] =   114 */ { 12, 16},
-    /* [115] =   115 */ { 20, ~0},
-    /* [116] =   116 */ { 12, 17},
-    /* [117] =   117 */ { 16, ~0},
-    /* [118] =   118 */ { 12, 18},
-    /* [119] =   119 */ { 16, ~0},
-    /* [120] =   120 */ { 12, 19},
-    /* [121] =   121 */ {  4, ~0},
-    /* [122] =   122 */ {  8, ~0},
-    /* [123] =   123 */ {  8, ~0},
-    /* [124] =   124 */ {  4, ~0},
-    /* [125] =   125 */ {  8, ~0},
-    /* [126] =   126 */ {  8, ~0},
-    /* [127] =   127 */ {  8, ~0},
-    /* [128] =   128 */ { 20, ~0},
-    /* [129] =   129 */ {  8, ~0},
-    /* [130] =   130 */ { 20, ~0},
-    /* [131] =   131 */ {  8, ~0},
-    /* [132] =   132 */ { 12, ~0},
-    /* [133] =   133 */ {  8, ~0},
-    /* [134] =   134 */ {  8, ~0},
-    /* [135] =   135 */ {  8, ~0},
-    /* [136] =   136 */ {  8, ~0},
-    /* [137] =   137 */ { 12, ~0},
-    /* [138] =   138 */ {  8, ~0},
-    /* [139] =   139 */ {  8, ~0},
-    /* [140] =   140 */ {  0, ~0},
-    /* [141] =   141 */ {  4, ~0},
-    /* [142] =   142 */ {  8, ~0},
-    /* [143] =   143 */ { 28, 20},
-    /* [144] =   144 */ { 20, 21},
-    /* [145] =   145 */ { 48, 22},
-    /* [146] =   146 */ { 32, 23},
-    /* [147] =   147 */ { 24, ~0},
-    /* [148] =   148 */ { 16, ~0},
-    /* [149] =   149 */ { 44, ~0},
-    /* [150] =   150 */ { 28, ~0},
-    /* [151] =   151 */ { 12, ~0},
-    /* [152] =   152 */ {  8, ~0},
-    /* [153] =   153 */ { 20, ~0},
-    /* [154] =   154 */ { 12, ~0},
-    /* [155] =   155 */ { 16, ~0},
-    /* [156] =   156 */ {  8, ~0},
-    /* [157] =   157 */ { 24, ~0},
-    /* [158] =   158 */ { 12, ~0},
-    /* [159] =   159 */ { 12, ~0},
-    /* [160] =   160 */ { 12, ~0},
-    /* [161] =   161 */ {  8, ~0},
-    /* [162] =   162 */ { 16, ~0},
-    /* [163] =   163 */ { 16, ~0},
-    /* [164] =   164 */ {  8, ~0},
-    /* [165] =   165 */ { 12, ~0},
-    /* [166] =   166 */ { 12, ~0},
-    /* [167] =   167 */ { 12, ~0},
-    /* [168] =   168 */ { 12, 24},
-    /* [169] =   169 */ { 12, 25},
-    /* [170] =   170 */ { 12, 26},
-    /* [171] =   171 */ {  8, ~0},
-    /* [172] =   172 */ { 24, ~0},
-    /* [173] =   173 */ { 40, 27},
-    /* [174] =   174 */ { 20, ~0},
-    /* [175] =   175 */ { 52, ~0},
-    /* [176] =   176 */ {  4, ~0},
-    /* [177] =   177 */ { 68, ~0},
-    /* [178] =   178 */ {132, ~0},
-    /* [179] =   179 */ {  8, ~0},
-    /* [180] =   180 */ { 68, ~0},
-    /* [181] =   181 */ {132, ~0},
-    /* [182] =   182 */ { 52, ~0},
-    /* [183] =   183 */ {  4, ~0},
-    /* [184] =   184 */ {  4, ~0},
-    /* [185] =   185 */ { 36, ~0},
-    /* [186] =   186 */ { 20, ~0},
-    /* [187] =   187 */ { 28, ~0},
-    /* [188] =   188 */ { 16, ~0},
-    /* [189] =   189 */ { 28, ~0},
-    /* [190] =   190 */ { 16, ~0},
-    /* [191] =   191 */ { 20, ~0},
-    /* [192] =   192 */ { 12, ~0},
-    /* [193] =   193 */ { 16, 28},
-    /* [194] =   194 */ {  8, ~0},
-    /* [195] =   195 */ { 44, 29},
-    /* [196] =   196 */ { 24, ~0},
-    /* [197] =   197 */ {  8, ~0},
-    /* [198] =   198 */ { 16, ~0},
-    /* [199] =   199 */ { 12, ~0},
-    /* [200] =   200 */ { 12, ~0},
-    /* [201] =   201 */ { 12, ~0},
-    /* [202] =   202 */ { 24, ~0},
-    /* [203] =   203 */ { 16, ~0},
-    /* [204] =   204 */ { 16, ~0},
-    /* [205] =   205 */ { 12, ~0},
-    /* [206] =   206 */ { 32, ~0},
-    /* [207] =   207 */ { 20, ~0},
-    /* [208] =   208 */ { 20, ~0},
-    /* [209] =   209 */ { 16, ~0},
-    /* [210] =   210 */ { 40, ~0},
-    /* [211] =   211 */ { 24, ~0},
-    /* [212] =   212 */ { 24, ~0},
-    /* [213] =   213 */ { 16, ~0},
-    /* [214] =   214 */ { 28, 30},
-    /* [215] =   215 */ { 32, 31},
-    /* [216] =   216 */ { 36, 32},
-    /* [217] =   217 */ { 28, 33},
-    /* [218] =   218 */ { 36, 34},
-    /* [219] =   219 */ { 44, 35},
-    /* [220] =   220 */ {  0, ~0},
-    /* [221] =   221 */ {  0, ~0},
-    /* [222] =   222 */ {  0, ~0},
-    /* [223] =   223 */ {  0, ~0},
-    /* [224] =   224 */ {  0, ~0},
-    /* [225] =   225 */ {  0, ~0},
-    /* [226] =   226 */ {  0, ~0},
-    /* [227] =   227 */ {  0, ~0},
-    /* [228] =   228 */ {  0, ~0},
-    /* [229] =   229 */ { 12, ~0},
-    /* [230] =   230 */ { 16, ~0},
-    /* [231] =   231 */ { 12, ~0},
-    /* [232] =   232 */ {  8, ~0},
-    /* [233] =   233 */ {  8, 36},
-    /* [234] =   234 */ {  0, ~0},
-    /* [235] =   235 */ {  0, ~0},
-    /* [236] =   236 */ {  0, ~0},
-    /* [237] =   237 */ {  0, ~0},
-    /* [238] =   238 */ {  0, ~0},
-    /* [239] =   239 */ {  0, ~0},
-    /* [240] =  2048 */ { 12, ~0},
-    /* [241] =  2049 */ {  8, ~0},
-    /* [242] =  2050 */ {  0, ~0},
-    /* [243] =  2051 */ {  0, ~0},
-    /* [244] =  2052 */ {  0, ~0},
-    /* [245] =  2053 */ { 44, 37},
-    /* [246] =  2054 */ { 12, 38},
-    /* [247] =  2055 */ { 12, 39},
-    /* [248] =  2056 */ { 24, ~0},
-    /* [249] =  2057 */ {  0, ~0},
-    /* [250] =  2058 */ {  0, ~0},
-    /* [251] =  2059 */ {  0, ~0},
-    /* [252] =  2060 */ {  0, ~0},
-    /* [253] =  2061 */ {  0, ~0},
-    /* [254] =  2062 */ {  0, ~0},
-    /* [255] =  2063 */ {  0, ~0},
-    /* [256] =  2064 */ {  0, ~0},
-    /* [257] =  2065 */ { 12, ~0},
-    /* [258] =  2066 */ {  8, 40},
-    /* [259] =  2067 */ {  0, ~0},
-    /* [260] =  2068 */ {  0, ~0},
-    /* [261] =  2069 */ {  0, ~0},
-    /* [262] =  2070 */ {  0, ~0},
-    /* [263] =  2071 */ {  0, ~0},
-    /* [264] =  4096 */ { 20, ~0},
-    /* [265] =  4097 */ {  8, ~0},
-    /* [266] =  4098 */ {  0, ~0},
-    /* [267] =  4099 */ { 60, 41},
-    /* [268] =  4100 */ { 60, 42},
-    /* [269] =  4101 */ { 48, 43},
-    /* [270] =  4102 */ { 48, 44},
-    /* [271] =  4103 */ { 16, ~0},
-    /* [272] =  4104 */ { 12, 45},
-    /* [273] =  4105 */ { 16, ~0},
-    /* [274] =  4106 */ { 12, 46},
-    /* [275] =  4107 */ { 24, ~0},
-    /* [276] =  4108 */ { 28, ~0},
-    /* [277] =  4109 */ { 32, 47},
-    /* [278] =  4110 */ { 20, ~0},
-    /* [279] =  4111 */ { 16, ~0},
-    /* [280] =  4112 */ {  8, ~0},
-    /* [281] =  4113 */ {  8, ~0},
-    /* [282] =  4114 */ { 84, 48},
-    /* [283] =  4115 */ { 92, 49},
-    /* [284] =  4116 */ {  0, ~0},
-    /* [285] =  4117 */ { 12, ~0},
-    /* [286] =  4118 */ {  8, 50},
-    /* [287] =  4119 */ { 32, ~0},
-    /* [288] =  4120 */ { 36, ~0},
-    /* [289] =  4121 */ { 28, ~0},
-    /* [290] =  4122 */ { 36, ~0},
-    /* [291] =  4123 */ { 40, ~0},
-    /* [292] =  4124 */ {  8, ~0},
-    /* [293] =  4125 */ { 12, ~0},
-    /* [294] =  4126 */ {  8, ~0},
-    /* [295] =  4127 */ { 12, ~0},
-    /* [296] =  4176 */ {  0, ~0},
-    /* [297] =  4177 */ {  0, ~0},
-    /* [298] =  4178 */ {  0, ~0},
-    /* [299] =  4179 */ {  0, ~0},
-    /* [300] =  4180 */ { 12, ~0},
-    /* [301] =  4181 */ { 28, ~0},
-    /* [302] =  4182 */ {  8, 51},
-    /* [303] =  4183 */ { 16, 52},
-    /* [304] =  4184 */ { 28, ~0},
-    /* [305] =  4185 */ { 44, ~0},
-    /* [306] =  4186 */ { 16, 53},
-    /* [307] =  4187 */ { 16, 54},
-    /* [308] =  4188 */ { 20, ~0},
-    /* [309] =  4189 */ { 12, ~0},
-    /* [310] =  4190 */ { 12, ~0},
-    /* [311] =  4191 */ { 16, ~0},
-    /* [312] =  4192 */ { 16, ~0},
-    /* [313] =  4193 */ { 12, ~0},
-    /* [314] =  4194 */ { 16, ~0},
-    /* [315] =  4195 */ { 20, ~0},
-    /* [316] =  4196 */ { 24, ~0},
-    /* [317] =  4197 */ { 16, ~0},
-    /* [318] =  4198 */ { 24, ~0},
-    /* [319] =  4199 */ { 32, ~0},
-    /* [320] =  4200 */ { 40, ~0},
-    /* [321] =  4201 */ { 12, ~0},
-    /* [322] =  4202 */ { 12, 55},
-    /* [323] =  4203 */ { 12, 56},
-    /* [324] =  4204 */ { 12, 57},
-    /* [325] =  4205 */ { 12, 58},
-    /* [326] =  4206 */ { 12, 59},
-    /* [327] =  4207 */ { 12, 60},
-    /* [328] =  4208 */ { 12, 61},
-    /* [329] =  4209 */ { 12, 62},
-    /* [330] =  4210 */ { 12, 63},
-    /* [331] =  4211 */ { 12, 64},
-    /* [332] =  4212 */ { 12, 65},
-    /* [333] =  4213 */ { 12, 66},
-    /* [334] =  4214 */ { 12, 67},
-    /* [335] =  4215 */ { 28, ~0},
-    /* [336] =  4216 */ { 44, ~0},
-    /* [337] =  4217 */ { 16, 68},
-    /* [338] =  4218 */ { 28, 69},
-    /* [339] =  4219 */ { 44, 70},
-    /* [340] =  4220 */ {  8, ~0},
-    /* [341] =  4221 */ { 12, ~0},
-    /* [342] =  4222 */ {  8, 71},
-    /* [343] =  4223 */ {  0, ~0},
-    /* [344] =  4224 */ {  0, ~0},
-    /* [345] =  4225 */ {  0, ~0},
-    /* [346] =  4226 */ {  0, ~0},
-    /* [347] =  4227 */ {  0, ~0},
-    /* [348] =  4228 */ { 12, ~0},
-    /* [349] =  4229 */ {  0, ~0},
-    /* [350] =  4230 */ { 12, ~0},
-    /* [351] =  4231 */ { 24, ~0},
-    /* [352] =  4232 */ { 12, ~0},
-    /* [353] =  4233 */ { 16, ~0},
-    /* [354] =  4234 */ { 24, ~0},
-    /* [355] =  4235 */ { 12, ~0},
-    /* [356] =  4236 */ { 16, ~0},
-    /* [357] =  4237 */ { 24, ~0},
-    /* [358] =  4238 */ { 16, ~0},
-    /* [359] =  4239 */ { 24, ~0},
-    /* [360] =  4128 */ { 16, ~0},
-    /* [361] =  4129 */ { 16, ~0},
-    /* [362] =  4130 */ { 28, ~0},
-    /* [363] =  4131 */ {  8, ~0},
-    /* [364] =  4132 */ { 12, ~0},
-    /* [365] =  4133 */ { 16, ~0},
-    /* [366] =  4134 */ { 20, ~0},
-    /* [367] =  4135 */ {  0, ~0},
-    /* [368] =  4264 */ {  0, ~0},
-    /* [369] =  4265 */ { 12, ~0},
-    /* [370] =  4266 */ { 12, ~0},
-    /* [371] =  4267 */ { 16, ~0},
-    /* [372] =  4268 */ { 16, ~0},
-    /* [373] =  4269 */ { 12, ~0},
-    /* [374] =  4270 */ { 16, ~0},
-    /* [375] =  4271 */ { 20, ~0},
-    /* [376] =  4272 */ { 24, ~0},
-    /* [377] =  4273 */ { 16, ~0},
-    /* [378] =  4274 */ { 24, ~0},
-    /* [379] =  4275 */ { 32, ~0},
-    /* [380] =  4276 */ { 40, ~0},
-    /* [381] =  4277 */ { 12, ~0},
-    /* [382] =  4278 */ {  0, ~0},
-    /* [383] =  4279 */ {  0, ~0},
-    /* [384] =  4312 */ {  0, ~0},
-    /* [385] =  4313 */ {  0, ~0},
-    /* [386] =  4314 */ {  0, ~0},
-    /* [387] =  4315 */ {  0, ~0},
-    /* [388] =  4316 */ { 12, ~0},
-    /* [389] =  4317 */ {  8, 72},
-    /* [390] =  4318 */ { 20, ~0},
-    /* [391] =  4319 */ { 12, ~0},
-    /* [392] =  4320 */ {  8, 73},
-    /* [393] =  4321 */ { 24, ~0},
-    /* [394] =  4322 */ { 24, ~0},
-    /* [395] =  4323 */ { 28, ~0},
-    /* [396] =  4324 */ { 20, ~0},
-    /* [397] =  4325 */ {  8, ~0},
-    /* [398] =  4326 */ {  0, ~0},
-    /* [399] =  4327 */ {  0, ~0},
-};
-
-static const gl_proto_size_func Render_size_func_table[74] = {
-   __glXCallListsReqSize,
-   __glXBitmapReqSize,
-   __glXFogfvReqSize,
-   __glXFogivReqSize,
-   __glXLightfvReqSize,
-   __glXLightivReqSize,
-   __glXLightModelfvReqSize,
-   __glXLightModelivReqSize,
-   __glXMaterialfvReqSize,
-   __glXMaterialivReqSize,
-   __glXPolygonStippleReqSize,
-   __glXTexParameterfvReqSize,
-   __glXTexParameterivReqSize,
-   __glXTexImage1DReqSize,
-   __glXTexImage2DReqSize,
-   __glXTexEnvfvReqSize,
-   __glXTexEnvivReqSize,
-   __glXTexGendvReqSize,
-   __glXTexGenfvReqSize,
-   __glXTexGenivReqSize,
-   __glXMap1dReqSize,
-   __glXMap1fReqSize,
-   __glXMap2dReqSize,
-   __glXMap2fReqSize,
-   __glXPixelMapfvReqSize,
-   __glXPixelMapuivReqSize,
-   __glXPixelMapusvReqSize,
-   __glXDrawPixelsReqSize,
-   __glXDrawArraysReqSize,
-   __glXColorSubTableReqSize,
-   __glXCompressedTexImage1DARBReqSize,
-   __glXCompressedTexImage2DARBReqSize,
-   __glXCompressedTexImage3DARBReqSize,
-   __glXCompressedTexSubImage1DARBReqSize,
-   __glXCompressedTexSubImage2DARBReqSize,
-   __glXCompressedTexSubImage3DARBReqSize,
-   __glXDrawBuffersARBReqSize,
-   __glXColorTableReqSize,
-   __glXColorTableParameterfvReqSize,
-   __glXColorTableParameterivReqSize,
-   __glXPointParameterfvEXTReqSize,
-   __glXTexSubImage1DReqSize,
-   __glXTexSubImage2DReqSize,
-   __glXConvolutionFilter1DReqSize,
-   __glXConvolutionFilter2DReqSize,
-   __glXConvolutionParameterfvReqSize,
-   __glXConvolutionParameterivReqSize,
-   __glXSeparableFilter2DReqSize,
-   __glXTexImage3DReqSize,
-   __glXTexSubImage3DReqSize,
-   __glXPrioritizeTexturesReqSize,
-   __glXRequestResidentProgramsNVReqSize,
-   __glXLoadProgramNVReqSize,
-   __glXProgramParameters4fvNVReqSize,
-   __glXProgramParameters4dvNVReqSize,
-   __glXVertexAttribs1svNVReqSize,
-   __glXVertexAttribs2svNVReqSize,
-   __glXVertexAttribs3svNVReqSize,
-   __glXVertexAttribs4svNVReqSize,
-   __glXVertexAttribs1fvNVReqSize,
-   __glXVertexAttribs2fvNVReqSize,
-   __glXVertexAttribs3fvNVReqSize,
-   __glXVertexAttribs4fvNVReqSize,
-   __glXVertexAttribs1dvNVReqSize,
-   __glXVertexAttribs2dvNVReqSize,
-   __glXVertexAttribs3dvNVReqSize,
-   __glXVertexAttribs4dvNVReqSize,
-   __glXVertexAttribs4ubvNVReqSize,
-   __glXProgramStringARBReqSize,
-   __glXProgramNamedParameter4fvNVReqSize,
-   __glXProgramNamedParameter4dvNVReqSize,
-   __glXPointParameterivNVReqSize,
-   __glXDeleteRenderbuffersEXTReqSize,
-   __glXDeleteFramebuffersEXTReqSize,
-};
-
-const struct __glXDispatchInfo Render_dispatch_info = {
-    13,
-    Render_dispatch_tree,
-    Render_function_table,
-    Render_size_table,
-    Render_size_func_table
-};
-
-/*****************************************************************/
-/* tree depth = 12 */
-static const int_fast16_t VendorPriv_dispatch_tree[152] = {
-    /* [0] -> opcode range [0, 131072], node depth 1 */
-    2,
-    5,
-    EMPTY_LEAF,
-    119,
-    EMPTY_LEAF,
-
-    /* [5] -> opcode range [0, 32768], node depth 2 */
-    1,
-    8,
-    EMPTY_LEAF,
-
-    /* [8] -> opcode range [0, 16384], node depth 3 */
-    1,
-    11,
-    EMPTY_LEAF,
-
-    /* [11] -> opcode range [0, 8192], node depth 4 */
-    2,
-    16,
-    EMPTY_LEAF,
-    78,
-    EMPTY_LEAF,
-
-    /* [16] -> opcode range [0, 2048], node depth 5 */
-    2,
-    21,
-    EMPTY_LEAF,
-    36,
-    EMPTY_LEAF,
-
-    /* [21] -> opcode range [0, 512], node depth 6 */
-    1,
-    24,
-    EMPTY_LEAF,
-
-    /* [24] -> opcode range [0, 256], node depth 7 */
-    1,
-    27,
-    EMPTY_LEAF,
-
-    /* [27] -> opcode range [0, 128], node depth 8 */
-    1,
-    30,
-    EMPTY_LEAF,
-
-    /* [30] -> opcode range [0, 64], node depth 9 */
-    1,
-    33,
-    EMPTY_LEAF,
-
-    /* [33] -> opcode range [0, 32], node depth 10 */
-    1,
-    LEAF(0),
-    EMPTY_LEAF,
-
-    /* [36] -> opcode range [1024, 1536], node depth 6 */
-    2,
-    41,
-    EMPTY_LEAF,
-    53,
-    67,
-
-    /* [41] -> opcode range [1024, 1152], node depth 7 */
-    1,
-    44,
-    EMPTY_LEAF,
-
-    /* [44] -> opcode range [1024, 1088], node depth 8 */
-    1,
-    47,
-    EMPTY_LEAF,
-
-    /* [47] -> opcode range [1024, 1056], node depth 9 */
-    1,
-    50,
-    EMPTY_LEAF,
-
-    /* [50] -> opcode range [1024, 1040], node depth 10 */
-    1,
-    LEAF(16),
-    EMPTY_LEAF,
-
-    /* [53] -> opcode range [1280, 1408], node depth 7 */
-    1,
-    56,
-    EMPTY_LEAF,
-
-    /* [56] -> opcode range [1280, 1344], node depth 8 */
-    2,
-    61,
-    LEAF(24),
-    EMPTY_LEAF,
-    64,
-
-    /* [61] -> opcode range [1280, 1296], node depth 9 */
-    1,
-    EMPTY_LEAF,
-    LEAF(40),
-
-    /* [64] -> opcode range [1328, 1344], node depth 9 */
-    1,
-    LEAF(48),
-    EMPTY_LEAF,
-
-    /* [67] -> opcode range [1408, 1536], node depth 7 */
-    1,
-    70,
-    EMPTY_LEAF,
-
-    /* [70] -> opcode range [1408, 1472], node depth 8 */
-    1,
-    73,
-    EMPTY_LEAF,
-
-    /* [73] -> opcode range [1408, 1440], node depth 9 */
-    2,
-    EMPTY_LEAF,
-    LEAF(56),
-    LEAF(64),
-    EMPTY_LEAF,
-
-    /* [78] -> opcode range [4096, 6144], node depth 5 */
-    2,
-    83,
-    EMPTY_LEAF,
-    101,
-    EMPTY_LEAF,
-
-    /* [83] -> opcode range [4096, 4608], node depth 6 */
-    1,
-    86,
-    EMPTY_LEAF,
-
-    /* [86] -> opcode range [4096, 4352], node depth 7 */
-    1,
-    89,
-    EMPTY_LEAF,
-
-    /* [89] -> opcode range [4096, 4224], node depth 8 */
-    1,
-    92,
-    EMPTY_LEAF,
-
-    /* [92] -> opcode range [4096, 4160], node depth 9 */
-    1,
-    95,
-    EMPTY_LEAF,
-
-    /* [95] -> opcode range [4096, 4128], node depth 10 */
-    1,
-    98,
-    EMPTY_LEAF,
-
-    /* [98] -> opcode range [4096, 4112], node depth 11 */
-    1,
-    LEAF(72),
-    EMPTY_LEAF,
-
-    /* [101] -> opcode range [5120, 5632], node depth 6 */
-    1,
-    104,
-    EMPTY_LEAF,
-
-    /* [104] -> opcode range [5120, 5376], node depth 7 */
-    1,
-    107,
-    EMPTY_LEAF,
-
-    /* [107] -> opcode range [5120, 5248], node depth 8 */
-    1,
-    110,
-    EMPTY_LEAF,
-
-    /* [110] -> opcode range [5120, 5184], node depth 9 */
-    1,
-    EMPTY_LEAF,
-    113,
-
-    /* [113] -> opcode range [5152, 5184], node depth 10 */
-    1,
-    116,
-    EMPTY_LEAF,
-
-    /* [116] -> opcode range [5152, 5168], node depth 11 */
-    1,
-    LEAF(80),
-    EMPTY_LEAF,
-
-    /* [119] -> opcode range [65536, 98304], node depth 2 */
-    1,
-    122,
-    EMPTY_LEAF,
-
-    /* [122] -> opcode range [65536, 81920], node depth 3 */
-    1,
-    125,
-    EMPTY_LEAF,
-
-    /* [125] -> opcode range [65536, 73728], node depth 4 */
-    1,
-    128,
-    EMPTY_LEAF,
-
-    /* [128] -> opcode range [65536, 69632], node depth 5 */
-    1,
-    131,
-    EMPTY_LEAF,
-
-    /* [131] -> opcode range [65536, 67584], node depth 6 */
-    1,
-    134,
-    EMPTY_LEAF,
-
-    /* [134] -> opcode range [65536, 66560], node depth 7 */
-    1,
-    137,
-    EMPTY_LEAF,
-
-    /* [137] -> opcode range [65536, 66048], node depth 8 */
-    1,
-    140,
-    EMPTY_LEAF,
-
-    /* [140] -> opcode range [65536, 65792], node depth 9 */
-    1,
-    143,
-    EMPTY_LEAF,
-
-    /* [143] -> opcode range [65536, 65664], node depth 10 */
-    1,
-    146,
-    EMPTY_LEAF,
-
-    /* [146] -> opcode range [65536, 65600], node depth 11 */
-    1,
-    149,
-    EMPTY_LEAF,
-
-    /* [149] -> opcode range [65536, 65568], node depth 12 */
-    1,
-    LEAF(88),
-    EMPTY_LEAF,
-
-};
-
-static const void *VendorPriv_function_table[104][2] = {
-    /* [  0] =     0 */ {NULL, NULL},
-    /* [  1] =     1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT},
-    /* [  2] =     2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT},
-    /* [  3] =     3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT},
-    /* [  4] =     4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT},
-    /* [  5] =     5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT},
-    /* [  6] =     6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT},
-    /* [  7] =     7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT},
-    /* [  8] =     8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT},
-    /* [  9] =     9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT},
-    /* [ 10] =    10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT},
-    /* [ 11] =    11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT},
-    /* [ 12] =    12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT},
-    /* [ 13] =    13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT},
-    /* [ 14] =    14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT},
-    /* [ 15] =    15 */ {NULL, NULL},
-    /* [ 16] =  1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT},
-    /* [ 17] =  1025 */ {NULL, NULL},
-    /* [ 18] =  1026 */ {NULL, NULL},
-    /* [ 19] =  1027 */ {NULL, NULL},
-    /* [ 20] =  1028 */ {NULL, NULL},
-    /* [ 21] =  1029 */ {NULL, NULL},
-    /* [ 22] =  1030 */ {NULL, NULL},
-    /* [ 23] =  1031 */ {NULL, NULL},
-    /* [ 24] =  1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB},
-    /* [ 25] =  1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB},
-    /* [ 26] =  1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV},
-    /* [ 27] =  1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV},
-    /* [ 28] =  1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV},
-    /* [ 29] =  1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB},
-    /* [ 30] =  1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV},
-    /* [ 31] =  1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV},
-    /* [ 32] =  1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV},
-    /* [ 33] =  1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB},
-    /* [ 34] =  1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB},
-    /* [ 35] =  1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB},
-    /* [ 36] =  1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB},
-    /* [ 37] =  1309 */ {NULL, NULL},
-    /* [ 38] =  1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV},
-    /* [ 39] =  1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV},
-    /* [ 40] =  1288 */ {NULL, NULL},
-    /* [ 41] =  1289 */ {NULL, NULL},
-    /* [ 42] =  1290 */ {NULL, NULL},
-    /* [ 43] =  1291 */ {NULL, NULL},
-    /* [ 44] =  1292 */ {NULL, NULL},
-    /* [ 45] =  1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV},
-    /* [ 46] =  1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV},
-    /* [ 47] =  1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV},
-    /* [ 48] =  1328 */ {NULL, NULL},
-    /* [ 49] =  1329 */ {NULL, NULL},
-    /* [ 50] =  1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT},
-    /* [ 51] =  1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT},
-    /* [ 52] =  1332 */ {NULL, NULL},
-    /* [ 53] =  1333 */ {NULL, NULL},
-    /* [ 54] =  1334 */ {NULL, NULL},
-    /* [ 55] =  1335 */ {NULL, NULL},
-    /* [ 56] =  1416 */ {NULL, NULL},
-    /* [ 57] =  1417 */ {NULL, NULL},
-    /* [ 58] =  1418 */ {NULL, NULL},
-    /* [ 59] =  1419 */ {NULL, NULL},
-    /* [ 60] =  1420 */ {NULL, NULL},
-    /* [ 61] =  1421 */ {NULL, NULL},
-    /* [ 62] =  1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT},
-    /* [ 63] =  1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT},
-    /* [ 64] =  1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT},
-    /* [ 65] =  1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT},
-    /* [ 66] =  1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT},
-    /* [ 67] =  1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT},
-    /* [ 68] =  1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT},
-    /* [ 69] =  1429 */ {NULL, NULL},
-    /* [ 70] =  1430 */ {NULL, NULL},
-    /* [ 71] =  1431 */ {NULL, NULL},
-    /* [ 72] =  4096 */ {NULL, NULL},
-    /* [ 73] =  4097 */ {NULL, NULL},
-    /* [ 74] =  4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI},
-    /* [ 75] =  4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI},
-    /* [ 76] =  4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI},
-    /* [ 77] =  4101 */ {NULL, NULL},
-    /* [ 78] =  4102 */ {NULL, NULL},
-    /* [ 79] =  4103 */ {NULL, NULL},
-    /* [ 80] =  5152 */ {NULL, NULL},
-    /* [ 81] =  5153 */ {NULL, NULL},
-    /* [ 82] =  5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA},
-    /* [ 83] =  5155 */ {NULL, NULL},
-    /* [ 84] =  5156 */ {NULL, NULL},
-    /* [ 85] =  5157 */ {NULL, NULL},
-    /* [ 86] =  5158 */ {NULL, NULL},
-    /* [ 87] =  5159 */ {NULL, NULL},
-    /* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI},
-    /* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI},
-    /* [ 90] = 65538 */ {NULL, NULL},
-    /* [ 91] = 65539 */ {NULL, NULL},
-    /* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX},
-    /* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX},
-    /* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX},
-    /* [ 95] = 65543 */ {__glXDisp_CreateGLXPbufferSGIX, __glXDispSwap_CreateGLXPbufferSGIX},
-    /* [ 96] = 65544 */ {__glXDisp_DestroyGLXPbufferSGIX, __glXDispSwap_DestroyGLXPbufferSGIX},
-    /* [ 97] = 65545 */ {__glXDisp_ChangeDrawableAttributesSGIX, __glXDispSwap_ChangeDrawableAttributesSGIX},
-    /* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, __glXDispSwap_GetDrawableAttributesSGIX},
-    /* [ 99] = 65547 */ {NULL, NULL},
-    /* [ 100] = 65548 */ {NULL, NULL},
-    /* [ 101] = 65549 */ {NULL, NULL},
-    /* [ 102] = 65550 */ {NULL, NULL},
-    /* [ 103] = 65551 */ {NULL, NULL},
-};
-
-const struct __glXDispatchInfo VendorPriv_dispatch_info = {
-    17,
-    VendorPriv_dispatch_tree,
-    VendorPriv_function_table,
-    NULL,
-    NULL
-};
-
diff --git a/GL/symlink-mesa.sh b/GL/symlink-mesa.sh
index 0cfe1c9..af9adbd 100755
--- a/GL/symlink-mesa.sh
+++ b/GL/symlink-mesa.sh
@@ -229,6 +229,14 @@ symlink_glx() {
     action indirect_size.h
     action glcontextmodes.c
     action glcontextmodes.h
+    action indirect_dispatch.c
+    action indirect_dispatch.h
+    action indirect_dispatch_swap.c
+    action indirect_reqsize.c
+    action indirect_reqsize.h
+    action indirect_size_get.c
+    action indirect_size_get.h
+    action indirect_table.c
 
     src_dir src/mesa/glapi
 
commit fbd776894658e7afb2c55dc8582b2a3efab78a3c
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Feb 16 20:01:18 2008 +0200

    XKB: Ditch XkbFileInfo
    
    Sorry about the megacommit, but this touches on a lot of stuff.
    
    Get rid of XkbFileInfo, which was pretty seriously redundant, and move the
    only useful thing it had (defined) into XkbDescRec.  defined will be removed
    pretty soon anyway.  Is the compat map pointer non-NULL? Then you have a
    compat map, congratulations! Anyhow, I digress.
    
    All functions that took an XkbFileInfoPtr now take an XkbDescPtr, _except_
    XkmReadFile, which returns an XkbDescPtr *, because people want to deal in
    XkbDescPtrs, not XkbDescRecs.

diff --git a/include/xkbfile.h b/include/xkbfile.h
index e90d766..0a6cb18 100644
--- a/include/xkbfile.h
+++ b/include/xkbfile.h
@@ -37,15 +37,9 @@
 #define	XkbMapDefined		(1<<0)
 #define	XkbStateDefined		(1<<1)
 
-typedef struct _XkbFileInfo {
-    unsigned		type;
-    unsigned		defined;
-    XkbDescPtr	 	xkb;
-} XkbFileInfo,*XkbFileInfoPtr;
-
 typedef void	(*XkbFileAddOnFunc)(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr  	/* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     int			/* fileSection */,
@@ -277,12 +271,6 @@ extern	unsigned	XkbConvertXkbComponents(
     unsigned 		/* orig */
 );
 
-extern	Bool	XkbDetermineFileType(
-    XkbFileInfo *	/* xkb */,
-    int			/* format */,
-    int *		/* opts_missing */
-);
-
 extern	Bool	XkbNameMatchesPattern(
     char *		/* name */,
     char *		/* pattern */
@@ -292,7 +280,7 @@ extern	Bool	XkbNameMatchesPattern(
 
 extern	Bool	XkbWriteXKBKeycodes(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr          /* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
@@ -301,7 +289,7 @@ extern	Bool	XkbWriteXKBKeycodes(
 
 extern	Bool	XkbWriteXKBKeyTypes(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr  	/* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
@@ -310,7 +298,7 @@ extern	Bool	XkbWriteXKBKeyTypes(
 
 extern	Bool	XkbWriteXKBCompatMap(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr	/* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
@@ -319,7 +307,7 @@ extern	Bool	XkbWriteXKBCompatMap(
 
 extern	Bool	XkbWriteXKBSymbols(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr	/* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
@@ -328,7 +316,7 @@ extern	Bool	XkbWriteXKBSymbols(
 
 extern	Bool	XkbWriteXKBGeometry(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr	/* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
@@ -337,7 +325,7 @@ extern	Bool	XkbWriteXKBGeometry(
 
 extern	Bool	XkbWriteXKBSemantics(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr	/* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
@@ -346,7 +334,7 @@ extern	Bool	XkbWriteXKBSemantics(
 
 extern	Bool	XkbWriteXKBLayout(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr	/* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
@@ -355,7 +343,7 @@ extern	Bool	XkbWriteXKBLayout(
 
 extern	Bool	XkbWriteXKBKeymap(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr	/* result */,
     Bool		/* topLevel */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
@@ -364,7 +352,7 @@ extern	Bool	XkbWriteXKBKeymap(
 
 extern	Bool	XkbWriteXKBFile(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */,
+    XkbDescPtr	/* result */,
     Bool		/* showImplicit */,
     XkbFileAddOnFunc	/* addOn */,
     void *		/* priv */
@@ -373,16 +361,16 @@ extern	Bool	XkbWriteXKBFile(
 extern	Bool	XkbWriteCFile(
     FILE *		/* file */,
     char *		/* name */,
-    XkbFileInfo *	/* info */
+    XkbDescPtr	/* info */
 );
 
 extern	Bool	XkbWriteXKMFile(
     FILE *		/* file */,
-    XkbFileInfo *	/* result */
+    XkbDescPtr	/* result */
 );
 
 extern	Bool	XkbWriteToServer(
-    XkbFileInfo *	/* result */
+    XkbDescPtr	/* result */
 );
 
 extern	void	XkbEnsureSafeMapName(
@@ -398,8 +386,7 @@ extern	Bool	XkbWriteXKBKeymapForNames(
 );
 
 extern	Status	XkbMergeFile(
-    XkbDescPtr			/* xkb */,
-    XkbFileInfo			/* finfo */
+    XkbDescPtr			/* xkb */
 );
 
 /***====================================================================***/
@@ -412,7 +399,7 @@ extern unsigned	XkmReadFile(
     FILE *		/* file */,
     unsigned		/* need */,
     unsigned		/* want */,
-    XkbFileInfo *	/* result */
+    XkbDescPtr	        * /* result */
 );
 
 #ifdef _XKMFORMAT_H_
@@ -433,7 +420,7 @@ extern xkmSectionInfo *XkmFindTOCEntry(
 extern Bool	XkmReadFileSection(
     FILE *              /* file */,
     xkmSectionInfo *    /* toc */,
-    XkbFileInfo *       /* result */,
+    XkbDescPtr       /* result */,
     unsigned *          /* loaded_rtrn */
 );
 
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index 60b0eb7..ef99e94 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -1005,7 +1005,7 @@ extern	unsigned int XkbDDXLoadKeymapByNames(
 	XkbComponentNamesPtr	/* names */,
 	unsigned int		/* want */,
 	unsigned int		/* need */,
-	XkbFileInfoPtr		/* finfoRtrn */,
+	XkbDescPtr *		/* finfoRtrn */,
 	char *			/* keymapNameRtrn */,
 	int 			/* keymapNameRtrnLen */
 );
diff --git a/include/xkbstr.h b/include/xkbstr.h
index f390c61..214a554 100644
--- a/include/xkbstr.h
+++ b/include/xkbstr.h
@@ -418,6 +418,7 @@ typedef	struct _XkbGeometry	*XkbGeometryPtr;
 	 * Tie it all together into one big keyboard description
 	 */
 typedef	struct _XkbDesc {
+        unsigned int            defined;
 	unsigned short	 	flags;
 	unsigned short		device_spec;
 	KeyCode			min_key_code;
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index 760119d..d80ce62 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -334,16 +334,16 @@ XkbDDXLoadKeymapByNames(	DeviceIntPtr		keybd,
 				XkbComponentNamesPtr	names,
 				unsigned		want,
 				unsigned		need,
-				XkbFileInfo *		finfoRtrn,
+				XkbDescPtr *		xkbRtrn,
 				char *			nameRtrn,
 				int 			nameRtrnLen)
 {
-XkbDescPtr	xkb;
+XkbDescPtr      xkb;
 FILE	*	file;
 char		fileName[PATH_MAX];
 unsigned	missing;
 
-    bzero(finfoRtrn,sizeof(XkbFileInfo));
+    *xkbRtrn = NULL;
     if ((keybd==NULL)||(keybd->key==NULL)||(keybd->key->xkbInfo==NULL))
 	 xkb= NULL;
     else xkb= keybd->key->xkbInfo->desc;
@@ -353,7 +353,7 @@ unsigned	missing;
         return 0;
     }
     else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need,
-						nameRtrn,nameRtrnLen)){
+                                         nameRtrn,nameRtrnLen)){
 	DebugF("Couldn't compile keymap file\n");
 	return 0;
     }
@@ -362,15 +362,15 @@ unsigned	missing;
 	LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",fileName);
 	return 0;
     }
-    missing= XkmReadFile(file,need,want,finfoRtrn);
-    if (finfoRtrn->xkb==NULL) {
+    missing= XkmReadFile(file,need,want,xkbRtrn);
+    if (*xkbRtrn==NULL) {
 	LogMessage(X_ERROR, "Error loading keymap %s\n",fileName);
 	fclose(file);
 	(void) unlink (fileName);
 	return 0;
     }
     else if (xkbDebugFlags) {
-	DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,finfoRtrn->defined);
+	DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
     }
     fclose(file);
     (void) unlink (fileName);
diff --git a/xkb/xkb.c b/xkb/xkb.c
index ea5189f..b0d2f0d 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -5109,7 +5109,6 @@ ProcXkbGetKbdByName(ClientPtr client)
 {
     DeviceIntPtr 		dev;
     DeviceIntPtr                tmpd;
-    XkbFileInfo			finfo;
     xkbGetKbdByNameReply 	rep;
     xkbGetMapReply		mrep;
     xkbGetCompatMapReply	crep;
@@ -5117,7 +5116,7 @@ ProcXkbGetKbdByName(ClientPtr client)
     xkbGetNamesReply		nrep;
     xkbGetGeometryReply		grep;
     XkbComponentNamesRec	names;
-    XkbDescPtr			xkb;
+    XkbDescPtr			xkb, new;
     unsigned char *		str;
     char 			mapFile[PATH_MAX];
     unsigned			len;
@@ -5194,35 +5193,35 @@ ProcXkbGetKbdByName(ClientPtr client)
     }
 
     /* We pass dev in here so we can get the old names out if needed. */
-    rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&finfo,
+    rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&new,
                                         mapFile,PATH_MAX);
     rep.newKeyboard= False;
     rep.pad1= rep.pad2= rep.pad3= rep.pad4= 0;
 
     stuff->want|= stuff->need;
-    if (finfo.xkb==NULL)
+    if (new==NULL)
 	rep.reported= 0;
     else {
 	if (stuff->load)
 	    rep.loaded= True;
 	if (stuff->load || 
-		((rep.reported&XkbGBN_SymbolsMask) && (finfo.xkb->compat))) {
+		((rep.reported&XkbGBN_SymbolsMask) && (new->compat))) {
 	    XkbChangesRec changes;
 	    bzero(&changes,sizeof(changes));
-	    XkbUpdateDescActions(finfo.xkb,
-			finfo.xkb->min_key_code,XkbNumKeys(finfo.xkb),
+	    XkbUpdateDescActions(new,
+			new->min_key_code,XkbNumKeys(new),
 			&changes);
 	}
 
-	if (finfo.xkb->map==NULL)
+	if (new->map==NULL)
 	    rep.reported&= ~(XkbGBN_SymbolsMask|XkbGBN_TypesMask);
 	else if (rep.reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask)) {
 	    mrep.type= X_Reply;
 	    mrep.deviceID = dev->id;
 	    mrep.sequenceNumber= client->sequence;
 	    mrep.length = ((SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2);
-	    mrep.minKeyCode = finfo.xkb->min_key_code;
-	    mrep.maxKeyCode = finfo.xkb->max_key_code;
+	    mrep.minKeyCode = new->min_key_code;
+	    mrep.maxKeyCode = new->max_key_code;
 	    mrep.present = 0;
 	    mrep.totalSyms = mrep.totalActs =
 		mrep.totalKeyBehaviors= mrep.totalKeyExplicit= 
@@ -5230,7 +5229,7 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    if (rep.reported&(XkbGBN_TypesMask|XkbGBN_ClientSymbolsMask)) {
 		mrep.present|= XkbKeyTypesMask;
 		mrep.firstType = 0;
-		mrep.nTypes = mrep.totalTypes= finfo.xkb->map->num_types;
+		mrep.nTypes = mrep.totalTypes= new->map->num_types;
 	    }
 	    else {
 		mrep.firstType = mrep.nTypes= 0;
@@ -5238,8 +5237,8 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    }
 	    if (rep.reported&XkbGBN_ClientSymbolsMask) {
 		mrep.present|= (XkbKeySymsMask|XkbModifierMapMask);
-		mrep.firstKeySym = mrep.firstModMapKey= finfo.xkb->min_key_code;
-		mrep.nKeySyms = mrep.nModMapKeys= XkbNumKeys(finfo.xkb);
+		mrep.firstKeySym = mrep.firstModMapKey= new->min_key_code;
+		mrep.nKeySyms = mrep.nModMapKeys= XkbNumKeys(new);
 	    }
 	    else {
 		mrep.firstKeySym= mrep.firstModMapKey= 0;
@@ -5249,9 +5248,9 @@ ProcXkbGetKbdByName(ClientPtr client)
 		mrep.present|= XkbAllServerInfoMask;
 		mrep.virtualMods= ~0;
 		mrep.firstKeyAct = mrep.firstKeyBehavior = 
-			mrep.firstKeyExplicit = finfo.xkb->min_key_code;
+			mrep.firstKeyExplicit = new->min_key_code;
 		mrep.nKeyActs = mrep.nKeyBehaviors = 
-			mrep.nKeyExplicit = XkbNumKeys(finfo.xkb);
+			mrep.nKeyExplicit = XkbNumKeys(new);
 	    }
 	    else {
 		mrep.virtualMods= 0;
@@ -5259,10 +5258,10 @@ ProcXkbGetKbdByName(ClientPtr client)
 			mrep.firstKeyExplicit = 0;
 		mrep.nKeyActs= mrep.nKeyBehaviors= mrep.nKeyExplicit= 0;
 	    }
-	    XkbComputeGetMapReplySize(finfo.xkb,&mrep);
+	    XkbComputeGetMapReplySize(new,&mrep);
 	    rep.length+= SIZEOF(xGenericReply)/4+mrep.length;
 	}
-	if (finfo.xkb->compat==NULL)
+	if (new->compat==NULL)
 	    rep.reported&= ~XkbGBN_CompatMapMask;
 	else if (rep.reported&XkbGBN_CompatMapMask) {
 	    crep.type= X_Reply;
@@ -5271,11 +5270,11 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    crep.length= 0;
 	    crep.groups= XkbAllGroupsMask;
 	    crep.firstSI= 0;
-	    crep.nSI= crep.nTotalSI= finfo.xkb->compat->num_si;
-	    XkbComputeGetCompatMapReplySize(finfo.xkb->compat,&crep);
+	    crep.nSI= crep.nTotalSI= new->compat->num_si;
+	    XkbComputeGetCompatMapReplySize(new->compat,&crep);
 	    rep.length+= SIZEOF(xGenericReply)/4+crep.length;
 	}
-	if (finfo.xkb->indicators==NULL)
+	if (new->indicators==NULL)
 	    rep.reported&= ~XkbGBN_IndicatorMapMask;
 	else if (rep.reported&XkbGBN_IndicatorMapMask) {
 	    irep.type= X_Reply;
@@ -5283,28 +5282,28 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    irep.sequenceNumber= client->sequence;
 	    irep.length= 0;
 	    irep.which= XkbAllIndicatorsMask;
-	    XkbComputeGetIndicatorMapReplySize(finfo.xkb->indicators,&irep);
+	    XkbComputeGetIndicatorMapReplySize(new->indicators,&irep);
 	    rep.length+= SIZEOF(xGenericReply)/4+irep.length;
 	}
-	if (finfo.xkb->names==NULL)
+	if (new->names==NULL)
 	    rep.reported&= ~(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask);
 	else if (rep.reported&(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask)) {
 	    nrep.type= X_Reply;
 	    nrep.deviceID= dev->id;
 	    nrep.sequenceNumber= client->sequence;
 	    nrep.length= 0;
-	    nrep.minKeyCode= finfo.xkb->min_key_code;
-	    nrep.maxKeyCode= finfo.xkb->max_key_code;
+	    nrep.minKeyCode= new->min_key_code;
+	    nrep.maxKeyCode= new->max_key_code;
 	    if (rep.reported&XkbGBN_OtherNamesMask) {
 		nrep.which= XkbAllNamesMask;
-		if (finfo.xkb->map!=NULL)
-		     nrep.nTypes= finfo.xkb->map->num_types;
+		if (new->map!=NULL)
+		     nrep.nTypes= new->map->num_types;
 		else nrep.nTypes= 0;
 		nrep.nKTLevels= 0;
 		nrep.groupNames= XkbAllGroupsMask;
 		nrep.virtualMods= XkbAllVirtualModsMask;
 		nrep.indicators= XkbAllIndicatorsMask;
-		nrep.nRadioGroups= finfo.xkb->names->num_rg;
+		nrep.nRadioGroups= new->names->num_rg;
 	    }
 	    else {
 		nrep.which= 0;
@@ -5317,9 +5316,9 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    }
 	    if (rep.reported&XkbGBN_KeyNamesMask) {
 		nrep.which|= XkbKeyNamesMask;
-		nrep.firstKey= finfo.xkb->min_key_code;
-		nrep.nKeys= XkbNumKeys(finfo.xkb);
-		nrep.nKeyAliases= finfo.xkb->names->num_key_aliases;
+		nrep.firstKey= new->min_key_code;
+		nrep.nKeys= XkbNumKeys(new);
+		nrep.nKeyAliases= new->names->num_key_aliases;
 		if (nrep.nKeyAliases)
 		    nrep.which|= XkbKeyAliasesMask;
 	    }
@@ -5328,10 +5327,10 @@ ProcXkbGetKbdByName(ClientPtr client)
 		nrep.firstKey= nrep.nKeys= 0;
 		nrep.nKeyAliases= 0;
 	    }
-	    XkbComputeGetNamesReplySize(finfo.xkb,&nrep);
+	    XkbComputeGetNamesReplySize(new,&nrep);
 	    rep.length+= SIZEOF(xGenericReply)/4+nrep.length;
 	}
-	if (finfo.xkb->geom==NULL)
+	if (new->geom==NULL)
 	    rep.reported&= ~XkbGBN_GeometryMask;
 	else if (rep.reported&XkbGBN_GeometryMask) {
 	    grep.type= X_Reply;
@@ -5344,7 +5343,7 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    grep.nProperties= grep.nColors= grep.nShapes= 0;
 	    grep.nSections= grep.nDoodads= 0;
 	    grep.baseColorNdx= grep.labelColorNdx= 0;
-	    XkbComputeGetGeometryReplySize(finfo.xkb->geom,&grep,None);
+	    XkbComputeGetGeometryReplySize(new->geom,&grep,None);
 	    rep.length+= SIZEOF(xGenericReply)/4+grep.length;
 	}
     }
@@ -5359,23 +5358,23 @@ ProcXkbGetKbdByName(ClientPtr client)
     }
     WriteToClient(client,SIZEOF(xkbGetKbdByNameReply), (char *)&rep);
     if (reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask))
-	XkbSendMap(client,finfo.xkb,&mrep);
+	XkbSendMap(client,new,&mrep);
     if (reported&XkbGBN_CompatMapMask)
-	XkbSendCompatMap(client,finfo.xkb->compat,&crep);
+	XkbSendCompatMap(client,new->compat,&crep);
     if (reported&XkbGBN_IndicatorMapMask)
-	XkbSendIndicatorMap(client,finfo.xkb->indicators,&irep);
+	XkbSendIndicatorMap(client,new->indicators,&irep);
     if (reported&(XkbGBN_KeyNamesMask|XkbGBN_OtherNamesMask))
-	XkbSendNames(client,finfo.xkb,&nrep);
+	XkbSendNames(client,new,&nrep);
     if (reported&XkbGBN_GeometryMask)
-	XkbSendGeometry(client,finfo.xkb->geom,&grep,False);
+	XkbSendGeometry(client,new->geom,&grep,False);
     if (rep.loaded) {
 	XkbDescPtr		old_xkb;
 	xkbNewKeyboardNotify 	nkn;
 	int 			i,nG,nTG;
 	old_xkb= xkb;
-	xkb= finfo.xkb;
+	xkb= new;
 	dev->key->xkbInfo->desc= xkb;
-	finfo.xkb= old_xkb; /* so it'll get freed automatically */
+	new= old_xkb; /* so it'll get freed automatically */
 
 	*xkb->ctrls= *old_xkb->ctrls;
 	for (nG=nTG=0,i=xkb->min_key_code;i<=xkb->max_key_code;i++) {
@@ -5419,8 +5418,8 @@ ProcXkbGetKbdByName(ClientPtr client)
         /* this should be either a MN or an NKN, depending on whether or not
          * the keycode range changed? */
 	nkn.deviceID= nkn.oldDeviceID= dev->id;
-	nkn.minKeyCode= finfo.xkb->min_key_code;
-	nkn.maxKeyCode= finfo.xkb->max_key_code;
+	nkn.minKeyCode= new->min_key_code;
+	nkn.maxKeyCode= new->max_key_code;
 	nkn.oldMinKeyCode= xkb->min_key_code;
 	nkn.oldMaxKeyCode= xkb->max_key_code;
 	nkn.requestMajor= XkbReqCode;
@@ -5430,9 +5429,9 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    nkn.changed|= XkbNKN_GeometryMask;
 	XkbSendNewKeyboardNotify(dev,&nkn);
     }
-    if ((finfo.xkb!=NULL)&&(finfo.xkb!=xkb)) {
-	XkbFreeKeyboard(finfo.xkb,XkbAllComponentsMask,True);
-	finfo.xkb= NULL;
+    if ((new!=NULL)&&(new!=xkb)) {
+	XkbFreeKeyboard(new,XkbAllComponentsMask,True);
+	new= NULL;
     }
     if (names.keymap)	{ _XkbFree(names.keymap); names.keymap= NULL; }
     if (names.keycodes)	{ _XkbFree(names.keycodes); names.keycodes= NULL; }
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 2aacc8c..890cf42 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -843,7 +843,7 @@ _XkbFilterRedirectKey(	XkbSrvInfoPtr	xkbi,
 			unsigned	keycode,
 			XkbAction *	pAction)
 {
-unsigned	realMods;
+unsigned	realMods = 0;
 xEvent 		ev;
 int		x,y;
 XkbStateRec	old;
@@ -1145,7 +1145,7 @@ void
 XkbHandleActions(DeviceIntPtr dev,DeviceIntPtr kbd,xEvent *xE,int count)
 {
 int		key,bit,i;
-CARD8		realMods;
+CARD8		realMods = 0;
 XkbSrvInfoPtr	xkbi;
 KeyClassPtr	keyc;
 int		changed,sendEvent;
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 73dd32e..37dd940 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -88,7 +88,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 typedef struct	_SrvXkmInfo {
 	DeviceIntPtr	dev;
 	FILE *		file;
-	XkbFileInfo	xkbinfo;
+	XkbDescPtr	xkb;
 } SrvXkmInfo;
 
 
@@ -125,7 +125,6 @@ typedef struct	_SrvXkmInfo {
 char	*		XkbBaseDirectory=	XKB_BASE_DIRECTORY;
 char	*		XkbBinDirectory=	XKB_BIN_DIRECTORY;
 static int	 	XkbWantAccessX=		0;	
-static XkbFileInfo *	_XkbInitFileInfo=	NULL;
 
 static Bool		rulesDefined=		False;
 static char *		XkbRulesFile=		NULL;
@@ -283,10 +282,8 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout,
 #include "xkbDflts.h"
 
 static Bool
-XkbInitKeyTypes(XkbDescPtr xkb,SrvXkmInfo *file)
+XkbInitKeyTypes(XkbDescPtr xkb)
 {
-    if (file->xkbinfo.defined&XkmTypesMask)
-	return True;
     initTypeNames(NULL);
     if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_dflt_types)!=Success)
 	return False;
@@ -299,7 +296,7 @@ XkbInitKeyTypes(XkbDescPtr xkb,SrvXkmInfo *file)
 }
 
 static void
-XkbInitRadioGroups(XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
+XkbInitRadioGroups(XkbSrvInfoPtr xkbi)
 {
     xkbi->nRadioGroups = 0;
     xkbi->radioGroups = NULL;
@@ -308,13 +305,11 @@ XkbInitRadioGroups(XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
 
 
 static Status
-XkbInitCompatStructs(XkbDescPtr xkb,SrvXkmInfo *file)
+XkbInitCompatStructs(XkbDescPtr xkb)
 {
 register int 	i;
 XkbCompatMapPtr	compat;
 
-    if (file->xkbinfo.defined&XkmCompatMapMask)
-	return Success;
     if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_dfltSI)!=Success)
 	return BadAlloc;
     compat = xkb->compat;
@@ -335,17 +330,17 @@ XkbCompatMapPtr	compat;
 }
 
 static void
-XkbInitSemantics(XkbDescPtr xkb,SrvXkmInfo *file)
+XkbInitSemantics(XkbDescPtr xkb)
 {
-    XkbInitKeyTypes(xkb,file);
-    XkbInitCompatStructs(xkb,file);
+    XkbInitKeyTypes(xkb);
+    XkbInitCompatStructs(xkb);
     return;
 }
 
 /***====================================================================***/
 
 static Status
-XkbInitNames(XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
+XkbInitNames(XkbSrvInfoPtr xkbi)
 {
 XkbDescPtr	xkb;
 XkbNamesPtr	names;
@@ -363,29 +358,25 @@ Atom		unknown;
     if (names->symbols==None)		names->symbols= unknown;
     if (names->types==None)		names->types= unknown;
     if (names->compat==None)		names->compat= unknown;
-    if ((file->xkbinfo.defined&XkmVirtualModsMask)==0) {
-	if (names->vmods[vmod_NumLock]==None)
-	    names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock");
-	if (names->vmods[vmod_Alt]==None)
-	    names->vmods[vmod_Alt]= CREATE_ATOM("Alt");
-	if (names->vmods[vmod_AltGr]==None)
-	    names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch");
-    }
-
-    if (((file->xkbinfo.defined&XkmIndicatorsMask)==0)||
-	((file->xkbinfo.defined&XkmGeometryMask)==0)) {
-	initIndicatorNames(NULL,xkb);
-	if (names->indicators[LED_CAPS-1]==None)
-	    names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock");
-	if (names->indicators[LED_NUM-1]==None)
-	    names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock");
-	if (names->indicators[LED_SCROLL-1]==None)
-	    names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock");
+    if (names->vmods[vmod_NumLock]==None)
+        names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock");
+    if (names->vmods[vmod_Alt]==None)
+        names->vmods[vmod_Alt]= CREATE_ATOM("Alt");
+    if (names->vmods[vmod_AltGr]==None)
+        names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch");
+
+    initIndicatorNames(NULL,xkb);
+    if (names->indicators[LED_CAPS-1]==None)
+        names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock");
+    if (names->indicators[LED_NUM-1]==None)
+        names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock");
+    if (names->indicators[LED_SCROLL-1]==None)
+        names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock");
 #ifdef LED_COMPOSE
-	if (names->indicators[LED_COMPOSE-1]==None)
-	    names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose");
+    if (names->indicators[LED_COMPOSE-1]==None)
+        names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose");
 #endif
-    }
+
     if (xkb->geom!=NULL)
 	 names->geometry= xkb->geom->name;
     else names->geometry= unknown;
@@ -393,7 +384,7 @@ Atom		unknown;
 }
 
 static Status
-XkbInitIndicatorMap(XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
+XkbInitIndicatorMap(XkbSrvInfoPtr xkbi)
 {
 XkbDescPtr		xkb;
 XkbIndicatorPtr		map;
@@ -402,27 +393,24 @@ XkbSrvLedInfoPtr	sli;
     xkb= xkbi->desc;
     if (XkbAllocIndicatorMaps(xkb)!=Success)
 	return BadAlloc;
-    if ((file->xkbinfo.defined&XkmIndicatorsMask)==0) {
-	map= xkb->indicators;
-	map->phys_indicators = PHYS_LEDS;
-	map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit;
-	map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked;
-	map->maps[LED_CAPS-1].mods.mask= LockMask;
-	map->maps[LED_CAPS-1].mods.real_mods= LockMask;
-
-	map->maps[LED_NUM-1].flags= XkbIM_NoExplicit;
-	map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked;
-	map->maps[LED_NUM-1].mods.mask= 0;
-	map->maps[LED_NUM-1].mods.real_mods= 0;
-	map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask;
-
-/* Metro Link */
-	map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit;
-	map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked;
-	map->maps[LED_SCROLL-1].mods.mask= Mod3Mask;
-	map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask;
-/* Metro Link */
-    }
+    map= xkb->indicators;
+    map->phys_indicators = PHYS_LEDS;
+    map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit;
+    map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked;
+    map->maps[LED_CAPS-1].mods.mask= LockMask;
+    map->maps[LED_CAPS-1].mods.real_mods= LockMask;
+
+    map->maps[LED_NUM-1].flags= XkbIM_NoExplicit;
+    map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked;
+    map->maps[LED_NUM-1].mods.mask= 0;
+    map->maps[LED_NUM-1].mods.real_mods= 0;
+    map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask;
+
+    map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit;
+    map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked;
+    map->maps[LED_SCROLL-1].mods.mask= Mod3Mask;
+    map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask;
+
     sli= XkbFindSrvLedInfo(xkbi->device,XkbDfltXIClass,XkbDfltXIId,0);
     if (sli)
 	XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask);
@@ -430,7 +418,7 @@ XkbSrvLedInfoPtr	sli;
 }
 
 static Status
-XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
+XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi)
 {
 XkbDescPtr	xkb;
 XkbControlsPtr	ctrls;
@@ -440,8 +428,7 @@ XkbControlsPtr	ctrls;
     if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success)
 	FatalError("Couldn't allocate keyboard controls\n");
     ctrls= xkb->ctrls;
-    if ((file->xkbinfo.defined&XkmSymbolsMask)==0)
-	ctrls->num_groups = 1;
+    ctrls->num_groups = 1;
     ctrls->groups_wrap = XkbSetGroupInfo(1,XkbWrapIntoRange,0);
     ctrls->internal.mask = 0;
     ctrls->internal.real_mods = 0;
@@ -464,29 +451,18 @@ XkbInitDevice(DeviceIntPtr pXDev)
 int			i;
 XkbSrvInfoPtr		xkbi;
 XkbChangesRec		changes;
-SrvXkmInfo		file;
 unsigned		check;
 XkbEventCauseRec	cause;
 
-    file.dev= pXDev;
-    file.file=NULL;
-    bzero(&file.xkbinfo,sizeof(XkbFileInfo));
     bzero(&changes,sizeof(XkbChangesRec));
     pXDev->key->xkbInfo= xkbi= _XkbTypedCalloc(1,XkbSrvInfoRec);
     if ( xkbi ) {
 	XkbDescPtr	xkb;
-	if ((_XkbInitFileInfo!=NULL)&&(_XkbInitFileInfo->xkb!=NULL)) {
-	    file.xkbinfo= *_XkbInitFileInfo;
-	    xkbi->desc= _XkbInitFileInfo->xkb;
-	    _XkbInitFileInfo= NULL;
-	}
-	else {
-	    xkbi->desc= XkbAllocKeyboard();
-	    if (!xkbi->desc)
-		FatalError("Couldn't allocate keyboard description\n");
-	    xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode;
-	    xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode;
-	}
+        xkbi->desc= XkbAllocKeyboard();
+	if (!xkbi->desc)
+	    FatalError("Couldn't allocate keyboard description\n");
+	xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode;
+	xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode;
 	xkb= xkbi->desc;
 	if (xkb->min_key_code == 0)
 	    xkb->min_key_code = pXDev->key->curKeySyms.minKeyCode;
@@ -509,32 +485,23 @@ XkbEventCauseRec	cause;
 	xkbi->dfltPtrDelta=1;
 	xkbi->device = pXDev;
 
-	file.xkbinfo.xkb= xkb;
-	XkbInitSemantics(xkb,&file);
-	XkbInitNames(xkbi,&file);
-	XkbInitRadioGroups(xkbi,&file);
+	XkbInitSemantics(xkb);
+	XkbInitNames(xkbi);
+	XkbInitRadioGroups(xkbi);
 
 	/* 12/31/94 (ef) -- XXX! Should check if state loaded from file */
 	bzero(&xkbi->state,sizeof(XkbStateRec));
 
-	XkbInitControls(pXDev,xkbi,&file);
+	XkbInitControls(pXDev,xkbi);
 
-	if (file.xkbinfo.defined&XkmSymbolsMask)
-	   memcpy(pXDev->key->modifierMap,xkb->map->modmap,xkb->max_key_code+1);
-	else
-	   memcpy(xkb->map->modmap,pXDev->key->modifierMap,xkb->max_key_code+1);
+        memcpy(xkb->map->modmap,pXDev->key->modifierMap,xkb->max_key_code+1);
 
-	XkbInitIndicatorMap(xkbi,&file);
+	XkbInitIndicatorMap(xkbi);
 
 	XkbDDXInitDevice(pXDev);
 
-	if (!(file.xkbinfo.defined&XkmSymbolsMask)) {
-	    XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb),
-								&changes);
-	}
-	else {
-	    XkbUpdateCoreDescription(pXDev,True);
-	}
+        XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb),
+                                  &changes);
 	XkbSetCauseUnknown(&cause);
 	XkbUpdateActions(pXDev,xkb->min_key_code, XkbNumKeys(xkb),&changes,
 								&check,&cause);
@@ -546,8 +513,6 @@ XkbEventCauseRec	cause;
 	pXDev->key->curKeySyms.minKeyCode = xkb->min_key_code;
 	pXDev->key->curKeySyms.maxKeyCode = xkb->max_key_code;
     }
-    if (file.file!=NULL)
-	fclose(file.file);
     return;
 }
 
@@ -571,12 +536,12 @@ XkbInitKeyboardDeviceStruct(
         DeviceIntPtr /*device*/,
         KeybdCtrl * /*ctrl*/))
 {
-XkbFileInfo		finfo;
 KeySymsRec		tmpSyms,*pSyms;
 CARD8			tmpMods[XkbMaxLegalKeyCode+1],*pMods;
 char			name[PATH_MAX],*rules;
 Bool			ok=False;
 XkbRF_VarDefsRec	defs;
+XkbDescPtr              xkb;
 
     if ((dev->key!=NULL)||(dev->kbdfeed!=NULL))
 	return False;
@@ -633,13 +598,11 @@ XkbRF_VarDefsRec	defs;
     }
 
     ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0,
-                                        &finfo,name,PATH_MAX);
+                                        &xkb,name,PATH_MAX);
 
-    if (ok && (finfo.xkb!=NULL)) {
-	XkbDescPtr	xkb;
+    if (ok && (xkb!=NULL)) {
 	KeyCode		minKC,maxKC;
 
-	xkb= finfo.xkb;
 	minKC= xkb->min_key_code;
 	maxKC= xkb->max_key_code;
 	if (XkbIsLegalKeycode(minKC)&&XkbIsLegalKeycode(maxKC)&&(minKC<=maxKC)&&
@@ -669,13 +632,11 @@ XkbRF_VarDefsRec	defs;
 		pMods= tmpMods;
 	    }
 	}
-	_XkbInitFileInfo= &finfo;
     }
     else {
 	LogMessage(X_WARNING, "Couldn't load XKB keymap, falling back to pre-XKB keymap\n");
     }
     ok= InitKeyboardDeviceStruct((DevicePtr)dev,pSyms,pMods,bellProc,ctrlProc);
-    _XkbInitFileInfo= NULL;
     if ((pSyms==&tmpSyms)&&(pSyms->map!=NULL)) {
 	_XkbFree(pSyms->map);
 	pSyms->map= NULL;
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 4182c3a..866b4b1 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -146,7 +146,7 @@ XkbWriteSectionFromName(FILE *file,char *sectionName,char *name)
 /* ARGSUSED */
 static void
 _AddIncl(	FILE *		file,
-		XkbFileInfo *	result,
+		XkbDescPtr 	xkb,
 		Bool 		topLevel,
 		Bool 		showImplicit,
 		int 		index,
@@ -169,9 +169,6 @@ unsigned	complete;
 XkbNamesPtr	old_names;
 int		multi_section;
 unsigned	wantNames,wantConfig,wantDflts;
-XkbFileInfo	finfo;
-
-    bzero(&finfo,sizeof(XkbFileInfo));
 
     complete= 0;
     if ((name=names->keymap)==NULL)	name= "default";
@@ -187,14 +184,8 @@ XkbFileInfo	finfo;
     if (want==0)
 	return False;
 
-    if (xkb!=NULL) {
+    if (xkb!=NULL)
 	 old_names= xkb->names;
-	 finfo.type= 0;
-	 finfo.defined= 0;
-	 finfo.xkb= xkb;
-	 if (!XkbDetermineFileType(&finfo,XkbXKBFile,NULL))
-	    return False;
-    }
     else old_names= NULL;
 
     wantConfig= want&(~complete);
@@ -304,7 +295,7 @@ XkbFileInfo	finfo;
     wantNames= complete&(~(wantConfig|wantDflts));
     name= names->keycodes;
     if (wantConfig&XkmKeyNamesMask)
-	XkbWriteXKBKeycodes(file,&finfo,False,False,_AddIncl,name);
+	XkbWriteXKBKeycodes(file,xkb,False,False,_AddIncl,name);
     else if (wantDflts&XkmKeyNamesMask)
 	fprintf(stderr,"Default symbols not implemented yet!\n");
     else if (wantNames&XkmKeyNamesMask)
@@ -312,7 +303,7 @@ XkbFileInfo	finfo;
 
     name= names->types;
     if (wantConfig&XkmTypesMask)
-	XkbWriteXKBKeyTypes(file,&finfo,False,False,_AddIncl,name);
+	XkbWriteXKBKeyTypes(file,xkb,False,False,_AddIncl,name);
     else if (wantDflts&XkmTypesMask)
 	fprintf(stderr,"Default types not implemented yet!\n");
     else if (wantNames&XkmTypesMask)
@@ -320,7 +311,7 @@ XkbFileInfo	finfo;
 
     name= names->compat;
     if (wantConfig&XkmCompatMapMask)
-	XkbWriteXKBCompatMap(file,&finfo,False,False,_AddIncl,name);
+	XkbWriteXKBCompatMap(file,xkb,False,False,_AddIncl,name);
     else if (wantDflts&XkmCompatMapMask)
 	fprintf(stderr,"Default interps not implemented yet!\n");
     else if (wantNames&XkmCompatMapMask)
@@ -328,13 +319,13 @@ XkbFileInfo	finfo;
 
     name= names->symbols;
     if (wantConfig&XkmSymbolsMask)
-	XkbWriteXKBSymbols(file,&finfo,False,False,_AddIncl,name);
+	XkbWriteXKBSymbols(file,xkb,False,False,_AddIncl,name);
     else if (wantNames&XkmSymbolsMask)
 	XkbWriteSectionFromName(file,"symbols",name);
 
     name= names->geometry;
     if (wantConfig&XkmGeometryMask)
-	XkbWriteXKBGeometry(file,&finfo,False,False,_AddIncl,name);
+	XkbWriteXKBGeometry(file,xkb,False,False,_AddIncl,name);
     else if (wantNames&XkmGeometryMask)
 	XkbWriteSectionFromName(file,"geometry",name);
 
@@ -404,81 +395,6 @@ unsigned	rtrn;
     return rtrn;
 }
 
-Bool
-XkbDetermineFileType(XkbFileInfoPtr finfo,int format,int *opts_missing)
-{
-unsigned	present;
-XkbDescPtr	xkb;
-
-    if ((!finfo)||(!finfo->xkb))
-	return False;
-    if (opts_missing)
-	*opts_missing= 0;
-    xkb= finfo->xkb;
-    present= 0;
-    if ((xkb->names)&&(xkb->names->keys))	present|= XkmKeyNamesMask;
-    if ((xkb->map)&&(xkb->map->types))		present|= XkmTypesMask;
-    if (xkb->compat)				present|= XkmCompatMapMask;
-    if ((xkb->map)&&(xkb->map->num_syms>1))	present|= XkmSymbolsMask;
-    if (xkb->indicators)			present|= XkmIndicatorsMask;
-    if (xkb->geom)				present|= XkmGeometryMask;
-    if (!present)
-	return False;
-    else switch (present) {
-	case XkmKeyNamesMask:	
-	    finfo->type= 	XkmKeyNamesIndex;
-	    finfo->defined= 	present;
-	    return True;
-	case XkmTypesMask:
-	    finfo->type=	XkmTypesIndex;
-	    finfo->defined= 	present;
-	    return True;
-	case XkmCompatMapMask:	
-	    finfo->type=	XkmCompatMapIndex;
-	    finfo->defined=	present;
-	    return True;
-	case XkmSymbolsMask:	
-	    if (format!=XkbXKMFile) {
-		finfo->type= 	XkmSymbolsIndex;
-		finfo->defined=	present;
-		return True;
-	    }
-	    break;
-	case XkmGeometryMask:	
-	    finfo->type=	XkmGeometryIndex;
-	    finfo->defined=	present;
-	    return True;
-    }
-    if ((present&(~XkmSemanticsLegal))==0) {
-	if ((XkmSemanticsRequired&present)==XkmSemanticsRequired) {
-	    if (opts_missing)
-		*opts_missing= XkmSemanticsOptional&(~present);
-	    finfo->type= 	XkmSemanticsFile;
-	    finfo->defined=	present;
-	    return True;
-	}
-    }
-    else if ((present&(~XkmLayoutLegal))==0) {
-	if ((XkmLayoutRequired&present)==XkmLayoutRequired) {
-	    if (opts_missing)
-		*opts_missing= XkmLayoutOptional&(~present);
-	    finfo->type=	XkmLayoutFile;
-	    finfo->defined=	present;
-	    return True;
-	}
-    }
-    else if ((present&(~XkmKeymapLegal))==0) {
-	if ((XkmKeymapRequired&present)==XkmKeymapRequired) {
-	    if (opts_missing)
-		*opts_missing= XkmKeymapOptional&(~present);
-	    finfo->type=	XkmKeymapFile;
-	    finfo->defined=	present;
-	    return True;
-	}
-    }
-    return False;
-}
-
 /* all latin-1 alphanumerics, plus parens, slash, minus, underscore and */
 /* wildcards */
 
diff --git a/xkb/xkbout.c b/xkb/xkbout.c
index b72c05c..229cc92 100644
--- a/xkb/xkbout.c
+++ b/xkb/xkbout.c
@@ -90,9 +90,9 @@ Atom *		vmodNames;
 /***====================================================================***/
 
 static Bool
-WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action)
+WriteXKBAction(FILE *file,XkbDescPtr xkb,XkbAnyAction *action)
 {
-    fprintf(file,"%s",XkbActionText(result->xkb,(XkbAction *)action,XkbXKBFile));
+    fprintf(file,"%s",XkbActionText(xkb,(XkbAction *)action,XkbXKBFile));
     return True;
 }
 
@@ -100,7 +100,7 @@ WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action)
 
 Bool
 XkbWriteXKBKeycodes(	FILE *			file,
-			XkbFileInfo *		result,
+			XkbDescPtr		xkb,
 			Bool			topLevel,
 			Bool			showImplicit,
 			XkbFileAddOnFunc	addOn,
@@ -108,10 +108,8 @@ XkbWriteXKBKeycodes(	FILE *			file,
 {
 Atom			kcName;
 register unsigned 	i;
-XkbDescPtr		xkb;
 char *			alternate;
 
-    xkb= result->xkb;
     if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) {
 	_XkbLibError(_XkbErrMissingNames,"XkbWriteXKBKeycodes",0);
 	return False;
@@ -155,14 +153,14 @@ char *			alternate;
 	}
     }
     if (addOn)
-	(*addOn)(file,result,topLevel,showImplicit,XkmKeyNamesIndex,priv);
+	(*addOn)(file,xkb,topLevel,showImplicit,XkmKeyNamesIndex,priv);
     fprintf(file,"};\n\n");
     return True;
 }
 
 Bool
 XkbWriteXKBKeyTypes(	FILE *			file,
-			XkbFileInfo *		result,
+			XkbDescPtr              xkb,
 			Bool			topLevel,
 			Bool			showImplicit,
 			XkbFileAddOnFunc	addOn,
@@ -171,9 +169,7 @@ XkbWriteXKBKeyTypes(	FILE *			file,
 register unsigned	i,n;
 XkbKeyTypePtr		type;
 XkbKTMapEntryPtr	entry;
-XkbDescPtr		xkb;
 
-    xkb= result->xkb;
     if ((!xkb)||(!xkb->map)||(!xkb->map->types)) {
 	_XkbLibError(_XkbErrMissingTypes,"XkbWriteXKBKeyTypes",0);
 	return False;
@@ -223,22 +219,20 @@ XkbDescPtr		xkb;
 	fprintf(file,"    };\n");
     }
     if (addOn)
-	(*addOn)(file,result,topLevel,showImplicit,XkmTypesIndex,priv);
+	(*addOn)(file,xkb,topLevel,showImplicit,XkmTypesIndex,priv);
     fprintf(file,"};\n\n");
     return True;
 }
 
 static Bool
 WriteXKBIndicatorMap(	FILE *			file,
-			XkbFileInfo *		result,
+			XkbDescPtr              xkb,
 			Atom			name,
 			XkbIndicatorMapPtr	led,
 			XkbFileAddOnFunc	addOn,
 			void *			priv)
 {
-XkbDescPtr	xkb;
 
-    xkb= result->xkb;
     fprintf(file,"    indicator \"%s\" {\n",XkbAtomGetString(name));
     if (led->flags&XkbIM_NoExplicit)
 	fprintf(file,"        !allowExplicit;\n");
@@ -266,14 +260,14 @@ XkbDescPtr	xkb;
 			XkbControlsMaskText(led->ctrls,XkbXKBFile));
     }
     if (addOn)
-	(*addOn)(file,result,False,True,XkmIndicatorsIndex,priv);
+	(*addOn)(file,xkb,False,True,XkmIndicatorsIndex,priv);
     fprintf(file,"    };\n");
     return True;
 }
 
 Bool
 XkbWriteXKBCompatMap(	FILE *			file,
-			XkbFileInfo *		result,
+			XkbDescPtr              xkb,
 			Bool			topLevel,
 			Bool			showImplicit,
 			XkbFileAddOnFunc	addOn,
@@ -281,9 +275,7 @@ XkbWriteXKBCompatMap(	FILE *			file,
 {
 register unsigned	i;
 XkbSymInterpretPtr	interp;
-XkbDescPtr		xkb;
 
-    xkb= result->xkb;
     if ((!xkb)||(!xkb->compat)||(!xkb->compat->sym_interpret)) {
 	_XkbLibError(_XkbErrMissingCompatMap,"XkbWriteXKBCompatMap",0);
 	return False;
@@ -316,7 +308,7 @@ XkbDescPtr		xkb;
 	if (interp->flags&XkbSI_AutoRepeat)
 	    fprintf(file,"        repeat= True;\n");
 	fprintf(file,"        action= ");
-	WriteXKBAction(file,result,&interp->act);
+	WriteXKBAction(file,xkb,&interp->act);
 	fprintf(file,";\n");
 	fprintf(file,"    };\n");
     }
@@ -337,32 +329,30 @@ XkbDescPtr		xkb;
 		(map->which_mods!=0)||
 		(map->mods.real_mods!=0)||(map->mods.vmods!=0)||
 		(map->ctrls!=0)) {
-		WriteXKBIndicatorMap(file,result,xkb->names->indicators[i],map,
+		WriteXKBIndicatorMap(file,xkb,xkb->names->indicators[i],map,
 								addOn,priv);
 	    }
 	}
     }
     if (addOn)
-	(*addOn)(file,result,topLevel,showImplicit,XkmCompatMapIndex,priv);
+	(*addOn)(file,xkb,topLevel,showImplicit,XkmCompatMapIndex,priv);
     fprintf(file,"};\n\n");
     return True;
 }
 
 Bool
 XkbWriteXKBSymbols(	FILE *			file,
-			XkbFileInfo *		result,
+			XkbDescPtr              xkb,
 			Bool			topLevel,
 			Bool			showImplicit,
 			XkbFileAddOnFunc	addOn,
 			void *			priv)
 {
 register unsigned	i,tmp;
-XkbDescPtr		xkb;
 XkbClientMapPtr		map;
 XkbServerMapPtr		srv;
 Bool			showActions;
 
-    xkb= result->xkb;
     map= xkb->map;
     srv= xkb->server;
     if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) {
@@ -517,7 +507,7 @@ Bool			showActions;
 		    for (s=0;s<XkbKeyGroupWidth(xkb,i,g);s++) {
 			if (s!=0)
 			    fprintf(file,", ");
-			WriteXKBAction(file,result,(XkbAnyAction *)&acts[s]);
+			WriteXKBAction(file,xkb,(XkbAnyAction *)&acts[s]);
 		    }
 		    fprintf(file," ]");
 		    acts+= XkbKeyGroupsWidth(xkb,i);
@@ -543,7 +533,7 @@ Bool			showActions;
 	}
     }
     if (addOn)
-	(*addOn)(file,result,topLevel,showImplicit,XkmSymbolsIndex,priv);
+	(*addOn)(file,xkb,topLevel,showImplicit,XkmSymbolsIndex,priv);
     fprintf(file,"};\n\n");
     return True;
 }
@@ -803,17 +793,15 @@ int		dfltKeyColor = 0;
 
 Bool
 XkbWriteXKBGeometry(	FILE *			file,
-			XkbFileInfo *		result,
+			XkbDescPtr              xkb,
 			Bool			topLevel,
 			Bool			showImplicit,
 			XkbFileAddOnFunc	addOn,
 			void *			priv)
 {
 register unsigned	i,n;
-XkbDescPtr		xkb;
 XkbGeometryPtr		geom;
 
-    xkb= result->xkb;
     if ((!xkb)||(!xkb->geom)) {
 	_XkbLibError(_XkbErrMissingGeometry,"XkbWriteXKBGeometry",0);
  	return False;
@@ -901,7 +889,7 @@ XkbGeometryPtr		geom;
 	}
     }
     if (addOn)
-	(*addOn)(file,result,topLevel,showImplicit,XkmGeometryIndex,priv);
+	(*addOn)(file,xkb,topLevel,showImplicit,XkmGeometryIndex,priv);
     fprintf(file,"};\n\n");
     return True;
 }
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 1e5b2cb..b14a5be 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -165,14 +165,12 @@ int	count,nRead=0;
 /***====================================================================***/
 
 static int
-ReadXkmVirtualMods(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
+ReadXkmVirtualMods(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
 {
 register unsigned int i,bit;
 unsigned int	bound,named,tmp;
 int		nRead=0;
-XkbDescPtr	xkb;
 
-    xkb= result->xkb;
     if (XkbAllocServerMap(xkb,XkbVirtualModsMask,0)!=Success) {
 	_XkbLibError(_XkbErrBadAlloc,"ReadXkmVirtualMods",0);
 	return -1;
@@ -209,16 +207,14 @@ XkbDescPtr	xkb;
 /***====================================================================***/
 
 static int
-ReadXkmKeycodes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
+ReadXkmKeycodes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
 {
 register int	i;
 unsigned	minKC,maxKC,nAl;
 int		nRead=0;
 char 		name[100];
 XkbKeyNamePtr	pN;
-XkbDescPtr	xkb;
 
-    xkb= result->xkb;
     name[0]= '\0';
     nRead+= XkmGetCountedString(file,name,100);
     minKC= XkmGetCARD8(file,&nRead);
@@ -276,7 +272,7 @@ XkbDescPtr	xkb;
 /***====================================================================***/
 
 static int
-ReadXkmKeyTypes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
+ReadXkmKeyTypes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
 {
 register unsigned	i,n;
 unsigned		num_types;
@@ -287,9 +283,7 @@ xkmKeyTypeDesc		wire;
 XkbKTMapEntryPtr	entry;
 xkmKTMapEntryDesc	wire_entry;
 char 			buf[100];
-XkbDescPtr		xkb;
 
-    xkb= result->xkb;
     if ((tmp= XkmGetCountedString(file,buf,100))<1) {
 	_XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0);
 	return -1;
@@ -414,7 +408,7 @@ XkbDescPtr		xkb;
 /***====================================================================***/
 
 static int
-ReadXkmCompatMap(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
+ReadXkmCompatMap(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
 {
 register int		i;
 unsigned		num_si,groups;
@@ -423,10 +417,8 @@ XkbSymInterpretPtr	interp;
 xkmSymInterpretDesc	wire;
 unsigned		tmp;
 int			nRead=0;
-XkbDescPtr		xkb;
 XkbCompatMapPtr		compat;
 
-    xkb= result->xkb;
     if ((tmp= XkmGetCountedString(file,name,100))<1) {
 	_XkbLibError(_XkbErrBadLength,"ReadXkmCompatMap",0);
 	return -1;
@@ -492,16 +484,14 @@ XkbCompatMapPtr		compat;
 }
 
 static int
-ReadXkmIndicators(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
+ReadXkmIndicators(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes)
 {
 register unsigned	nLEDs;
 xkmIndicatorMapDesc	wire;
 char			buf[100];
 unsigned		tmp;
 int			nRead=0;
-XkbDescPtr		xkb;
 
-    xkb= result->xkb;
     if ((xkb->indicators==NULL)&&(XkbAllocIndicatorMaps(xkb)!=Success)) {
 	_XkbLibError(_XkbErrBadAlloc,"indicator rec",0);
 	return -1;
@@ -575,16 +565,14 @@ FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms)
 }
 
 static int
-ReadXkmSymbols(FILE *file,XkbFileInfo *result)
+ReadXkmSymbols(FILE *file,XkbDescPtr xkb)
 {
 register int		i,g,s,totalVModMaps;
 xkmKeySymMapDesc 	wireMap;
 char 			buf[100];
 unsigned		minKC,maxKC,groupNames,tmp;
 int			nRead=0;
-XkbDescPtr		xkb;
 
-    xkb= result->xkb;
     if ((tmp=XkmGetCountedString(file,buf,100))<1)
 	return -1;
     nRead+= tmp;
@@ -911,7 +899,7 @@ Atom		nameAtom;
 }
 
 static int
-ReadXkmGeometry(FILE *file,XkbFileInfo *result)
+ReadXkmGeometry(FILE *file,XkbDescPtr xkb)
 {
 register int		i;
 char 			buf[100];
@@ -931,11 +919,11 @@ XkbGeometrySizesRec	sizes;
     sizes.num_sections= wireGeom.num_sections;
     sizes.num_doodads= wireGeom.num_doodads;
     sizes.num_key_aliases= wireGeom.num_key_aliases;
-    if (XkbAllocGeometry(result->xkb,&sizes)!=Success) {
+    if (XkbAllocGeometry(xkb,&sizes)!=Success) {
 	_XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0);
 	return nRead;
     }
-    geom= result->xkb->geom;
+    geom= xkb->geom;
     geom->name= XkbInternAtom(buf,False);
     geom->width_mm= wireGeom.width_mm;
     geom->height_mm= wireGeom.height_mm;
@@ -1055,7 +1043,7 @@ int	 nRead=0;
     return 1;
 }
 
-Bool
+static Bool
 XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc)
 {
 unsigned hdr,tmp;
@@ -1086,117 +1074,11 @@ unsigned i,size_toc;
     return 1;
 }
 
-Bool
-XkmReadFileSection(	FILE *			file,
-			xkmSectionInfo *	toc,
-			XkbFileInfo *		result,
-			unsigned *		loaded_rtrn)
-{
-xkmSectionInfo		tmpTOC;
-int			nRead;
-
-    if ((!result)||(!result->xkb)) {
-	_XkbLibError(_XkbErrBadMatch,"XkmReadFileSection",0);
-	return 0;
-    }
-    fseek(file,toc->offset,SEEK_SET);
-    fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file);
-    nRead= SIZEOF(xkmSectionInfo);
-    if ((tmpTOC.type!=toc->type)||(tmpTOC.format!=toc->format)||
-	(tmpTOC.size!=toc->size)||(tmpTOC.offset!=toc->offset)) {
-	_XkbLibError(_XkbErrIllegalContents,"XkmReadFileSection",0);
-	return 0;
-    }
-    switch (tmpTOC.type) {
-	case XkmVirtualModsIndex:
-	    nRead+= ReadXkmVirtualMods(file,result,NULL);
-	    if ((loaded_rtrn)&&(nRead>=0))
-		*loaded_rtrn|= XkmVirtualModsMask;
-	    break;
-	case XkmTypesIndex:
-	    nRead+= ReadXkmKeyTypes(file,result,NULL);
-	    if ((loaded_rtrn)&&(nRead>=0))
-		*loaded_rtrn|= XkmTypesMask;
-	    break;
-	case XkmCompatMapIndex:
-	    nRead+= ReadXkmCompatMap(file,result,NULL);
-	    if ((loaded_rtrn)&&(nRead>=0))
-		*loaded_rtrn|= XkmCompatMapMask;
-	    break;
-	case XkmKeyNamesIndex:
-	    nRead+= ReadXkmKeycodes(file,result,NULL);
-	    if ((loaded_rtrn)&&(nRead>=0))
-		*loaded_rtrn|= XkmKeyNamesMask;
-	    break;
-	case XkmSymbolsIndex:
-	    nRead+= ReadXkmSymbols(file,result);
-	    if ((loaded_rtrn)&&(nRead>=0))
-		*loaded_rtrn|= XkmSymbolsMask;
-	    break;
-	case XkmIndicatorsIndex:
-	    nRead+= ReadXkmIndicators(file,result,NULL);
-	    if ((loaded_rtrn)&&(nRead>=0))
-		*loaded_rtrn|= XkmIndicatorsMask;
-	    break;
-	case XkmGeometryIndex:
-	    nRead+= ReadXkmGeometry(file,result);
-	    if ((loaded_rtrn)&&(nRead>=0))
-		*loaded_rtrn|= XkmGeometryMask;
-	    break;
-	default:
-	    _XkbLibError(_XkbErrBadImplementation,
-	    			XkbConfigText(tmpTOC.type,XkbMessage),0);
-	    nRead= 0;
-	    break;
-    }
-    if (nRead!=tmpTOC.size) {
-	_XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
-						nRead-tmpTOC.size);
-	return 0;
-    }
-    return (nRead>=0);
-}
-
-char *
-XkmReadFileSectionName(FILE *file,xkmSectionInfo *toc)
-{
-xkmSectionInfo	tmpTOC;
-char 		name[100];
-
-    if ((!file)||(!toc))
-	return 0;
-    switch (toc->type) {
-	case XkmVirtualModsIndex:
-	case XkmIndicatorsIndex:
-	    break;
-	case XkmTypesIndex:
-	case XkmCompatMapIndex:
-	case XkmKeyNamesIndex:
-	case XkmSymbolsIndex:
-	case XkmGeometryIndex:
-	    fseek(file,toc->offset,SEEK_SET);
-	    fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file);
-	    if ((tmpTOC.type!=toc->type)||(tmpTOC.format!=toc->format)||
-		(tmpTOC.size!=toc->size)||(tmpTOC.offset!=toc->offset)) {
-		_XkbLibError(_XkbErrIllegalContents,"XkmReadFileSectionName",0);
-		return 0;
-	    }
-	    if (XkmGetCountedString(file,name,100)>0)
-		return _XkbDupString(name);
-	    break;
-	default:
-	    _XkbLibError(_XkbErrBadImplementation,
-				XkbConfigText(tmpTOC.type,XkbMessage),0);
-	    break;
-    }
-    return NULL;
-}
-
 /***====================================================================***/
 
 #define	MAX_TOC	16
 unsigned
-XkmReadFile(FILE *file,unsigned need,unsigned want,XkbFileInfo *result)
+XkmReadFile(FILE *file,unsigned need,unsigned want,XkbDescPtr *xkb)
 {
 register unsigned	i;
 xkmSectionInfo		toc[MAX_TOC],tmpTOC;
@@ -1211,9 +1093,8 @@ unsigned		which= need|want;
        						need&(~fileInfo.present));
        return which;
     }
-    result->type= fileInfo.type;
-    if (result->xkb==NULL)
-	result->xkb= XkbAllocKeyboard();
+    if (*xkb==NULL)
+	*xkb= XkbAllocKeyboard();
     for (i=0;i<fileInfo.num_toc;i++) {
 	fseek(file,toc[i].offset,SEEK_SET);
 	tmp= fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file);
@@ -1227,25 +1108,25 @@ unsigned		which= need|want;
 	}
 	switch (tmpTOC.type) {
 	    case XkmVirtualModsIndex:
-		tmp= ReadXkmVirtualMods(file,result,NULL);
+		tmp= ReadXkmVirtualMods(file,*xkb,NULL);
 		break;
 	    case XkmTypesIndex:
-		tmp= ReadXkmKeyTypes(file,result,NULL);
+		tmp= ReadXkmKeyTypes(file,*xkb,NULL);
 		break;
 	    case XkmCompatMapIndex:
-		tmp= ReadXkmCompatMap(file,result,NULL);
+		tmp= ReadXkmCompatMap(file,*xkb,NULL);
 		break;
 	    case XkmKeyNamesIndex:
-		tmp= ReadXkmKeycodes(file,result,NULL);
+		tmp= ReadXkmKeycodes(file,*xkb,NULL);
 		break;
 	    case XkmIndicatorsIndex:
-		tmp= ReadXkmIndicators(file,result,NULL);
+		tmp= ReadXkmIndicators(file,*xkb,NULL);
 		break;
 	    case XkmSymbolsIndex:
-		tmp= ReadXkmSymbols(file,result);
+		tmp= ReadXkmSymbols(file,*xkb);
 		break;
 	    case XkmGeometryIndex:
-		tmp= ReadXkmGeometry(file,result);
+		tmp= ReadXkmGeometry(file,*xkb);
 		break;
 	    default:
 		_XkbLibError(_XkbErrBadImplementation,
@@ -1256,7 +1137,7 @@ unsigned		which= need|want;
 	if (tmp>0) {
 	    nRead+= tmp;
 	    which&= ~(1<<toc[i].type);
-	    result->defined|= (1<<toc[i].type);
+	    (*xkb)->defined|= (1<<toc[i].type);
 	}
 	if (nRead!=tmpTOC.size) {
 	    _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
commit e5f002eddef1abe324033a3155f01d048536a48d
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Feb 16 20:00:47 2008 +0200

    XkbProcessOtherEvent: Don't depend on now-removed header
    
    We don't do XKBsrv.h anymore.

diff --git a/xkb/xkbPrOtherEv.c b/xkb/xkbPrOtherEv.c
index d65107c..8017903 100644
--- a/xkb/xkbPrOtherEv.c
+++ b/xkb/xkbPrOtherEv.c
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <X11/keysym.h>
 #include "misc.h"
 #include "inputstr.h"
-#include <X11/extensions/XKBsrv.h>
+#include "xkbsrv.h"
 
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
commit 2d256f098ae05033ad76672d5ebdb9dfa7e6b995
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Feb 16 19:57:37 2008 +0200

    XKB: Always set size correctly in XkbCopyKeymap's geometry routines
    
    We were forgetting to set the sizes for sections and rows and a couple of
    other misc bits in XkbCopyKeymap's geometry.  Sort that out, and add a
    couple of clarifying comments along the way.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 28d66b3..b313270 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1506,10 +1506,12 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
         /* properties */
         if (src->geom->num_properties) {
             if (src->geom->num_properties != dst->geom->sz_properties) {
+                /* If we've got more properties in the destination than
+                 * the source, run through and free all the excess ones
+                 * first. */
                 if (src->geom->num_properties < dst->geom->sz_properties) {
                     for (i = src->geom->num_properties,
-                          dprop = dst->geom->properties +
-                                  src->geom->num_properties;
+                         dprop = dst->geom->properties + i;
                          i < dst->geom->num_properties;
                          i++, dprop++) {
                         xfree(dprop->name);
@@ -1529,6 +1531,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                 dst->geom->properties = tmp;
             }
 
+            /* We don't set num_properties as we need it to try and avoid
+             * too much reallocing. */
             dst->geom->sz_properties = src->geom->num_properties;
 
             if (dst->geom->sz_properties > dst->geom->num_properties) {
@@ -1564,6 +1568,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                 }
             }
 
+            /* ... which is already src->geom->num_properties. */
             dst->geom->num_properties = dst->geom->sz_properties;
         }
         else {
@@ -1587,8 +1592,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             if (src->geom->num_colors != dst->geom->sz_colors) {
                 if (src->geom->num_colors < dst->geom->sz_colors) {
                     for (i = src->geom->num_colors,
-                          dcolor = dst->geom->colors +
-                                   src->geom->num_colors;
+                         dcolor = dst->geom->colors + i;
                          i < dst->geom->num_colors;
                          i++, dcolor++) {
                         xfree(dcolor->spec);
@@ -1706,7 +1710,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                         }
 
                         doutline->num_points = soutline->num_points;
-                        doutline->sz_points = soutline->sz_points;
+                        doutline->sz_points = soutline->num_points;
                     }
                 }
 
@@ -1785,6 +1789,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             memset(tmp, 0, src->geom->num_sections * sizeof(XkbSectionRec));
             dst->geom->sections = tmp;
             dst->geom->num_sections = src->geom->num_sections;
+            dst->geom->sz_sections = src->geom->num_sections;
 
             for (i = 0,
                   ssection = src->geom->sections,
@@ -1798,6 +1803,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                     dsection->rows = tmp;
                 }
                 dsection->num_rows = ssection->num_rows;
+                dsection->sz_rows = ssection->num_rows;
+
                 for (j = 0, srow = ssection->rows, drow = dsection->rows;
                      j < ssection->num_rows;
                      j++, srow++, drow++) {
commit ab79110a84b2d299ecae0605fa535edbebd99565
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sun Feb 3 23:48:57 2008 +1100

    XKB: Remove support for pre-built keymaps
    
    Don't load prebuilt keymaps anymore.

diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index a711504..60b0eb7 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -1022,13 +1022,6 @@ extern	Bool XkbDDXApplyConfig(
 	XkbSrvInfoPtr	/* xkbi */
 );
 
-extern void *XkbDDXPreloadConfig(
-	char **			/* rulesFileRtrn */,
-	XkbRF_VarDefsPtr	/* defs */,
-	XkbComponentNamesPtr	/* names */,
-	DeviceIntPtr		/* dev */
-);
-
 extern	int _XkbStrCaseCmp(
 	char *			/* str1 */,
 	char *			/* str2 */
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index 60a8d44..760119d 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -178,74 +178,6 @@ OutputDirectory(
     }
 }
 
-static Bool
-XkbDDXCompileNamedKeymap(	XkbDescPtr		xkb,
-				XkbComponentNamesPtr	names,
-				char *			nameRtrn,
-				int			nameRtrnLen)
-{
-char 	*cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
-
-    if (names->keymap==NULL)
-	return False;
-    strncpy(file,names->keymap,PATH_MAX); file[PATH_MAX-1]= '\0';
-    if ((map= strrchr(file,'('))!=NULL) {
-	char *tmp;
-	if ((tmp= strrchr(map,')'))!=NULL) {
-	    *map++= '\0';
-	    *tmp= '\0';
-	}
-	else {
-	    map= NULL;
-	}
-    }
-    if ((outFile= strrchr(file,'/'))!=NULL)
-	 outFile= _XkbDupString(&outFile[1]);
-    else outFile= _XkbDupString(file);
-    XkbEnsureSafeMapName(outFile);
-    OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
-
-    if (XkbBaseDirectory!=NULL) {
-        char *xkbbasedir = XkbBaseDirectory;
-        char *xkbbindir = XkbBinDirectory;
-
-	cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"",
-		xkbbindir,
-		((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)),
-		xkbbasedir,(map?"-m ":""),(map?map:""),
-		PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file,
-		xkm_output_dir,outFile);
-    }
-    else {
-	cmd = Xprintf("xkbcomp -w %d -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"",
-		((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)),
-		(map?"-m ":""),(map?map:""),
-		PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file,
-		xkm_output_dir,outFile);
-    }
-    if (xkbDebugFlags) {
-	DebugF("XkbDDXCompileNamedKeymap compiling keymap using:\n");
-	DebugF("    \"cmd\"\n");
-    }
-    if (System(cmd)==0) {
-	if (nameRtrn) {
-	    strncpy(nameRtrn,outFile,nameRtrnLen);
-	    nameRtrn[nameRtrnLen-1]= '\0';
-	}
-	if (outFile!=NULL)
-	    _XkbFree(outFile);
-        if (cmd!=NULL)
-            xfree(cmd);
-	return True;
-    } 
-    DebugF("Error compiling keymap (%s)\n",names->keymap);
-    if (outFile!=NULL)
-	_XkbFree(outFile);
-    if (cmd!=NULL)
-        xfree(cmd);
-    return False;
-}
-
 static Bool    	
 XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
 				XkbComponentNamesPtr	names,
@@ -418,20 +350,7 @@ unsigned	missing;
     if ((names->keycodes==NULL)&&(names->types==NULL)&&
 	(names->compat==NULL)&&(names->symbols==NULL)&&
 	(names->geometry==NULL)) {
-	if (names->keymap==NULL) {
-	    bzero(finfoRtrn,sizeof(XkbFileInfo));
-	    if (xkb && XkbDetermineFileType(finfoRtrn,XkbXKMFile,NULL) &&
-	   				((finfoRtrn->defined&need)==need) ) {
-		finfoRtrn->xkb= xkb;
-		nameRtrn[0]= '\0';
-		return finfoRtrn->defined;
-	    }
-	    return 0;
-	}
-	else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) {
-	    DebugF("Couldn't compile keymap file\n");
-	    return 0;
-	}
+        return 0;
     }
     else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need,
 						nameRtrn,nameRtrnLen)){
diff --git a/xkb/maprules.c b/xkb/maprules.c
index 72e642f..4c947f0 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -459,7 +459,7 @@ Bool 		append = False;
     rule->types= _XkbDupString(tmp.name[TYPES]);
     rule->compat= _XkbDupString(tmp.name[COMPAT]);
     rule->geometry= _XkbDupString(tmp.name[GEOMETRY]);
-    rule->keymap= _XkbDupString(tmp.name[KEYMAP]);
+    rule->keymap= NULL;
 
     rule->layout_num = rule->variant_num = 0;
     for (i = 0; i < nread; i++) {
@@ -589,7 +589,6 @@ XkbRF_ApplyRule(	XkbRF_RulePtr 		rule,
     Apply(rule->types,    &names->types);
     Apply(rule->compat,   &names->compat);
     Apply(rule->geometry, &names->geometry);
-    Apply(rule->keymap,   &names->keymap);
 }
 
 static Bool
@@ -1279,7 +1278,6 @@ XkbRF_GroupPtr	group;
 	    if (rule->types)	_XkbFree(rule->types);
 	    if (rule->compat)	_XkbFree(rule->compat);
 	    if (rule->geometry)	_XkbFree(rule->geometry);
-	    if (rule->keymap)	_XkbFree(rule->keymap);
 	    bzero((char *)rule,sizeof(XkbRF_RuleRec));
 	}
 	_XkbFree(rules->rules);
diff --git a/xkb/xkb.c b/xkb/xkb.c
index bd9a87c..ea5189f 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -5157,25 +5157,20 @@ ProcXkbGetKbdByName(ClientPtr client)
     if (stuff->load)
 	 fwant= XkbGBN_AllComponentsMask;
     else fwant= stuff->want|stuff->need;
-    if (!names.keymap) {
-	if ((!names.compat)&&
-    		(fwant&(XkbGBN_CompatMapMask|XkbGBN_IndicatorMapMask))) {
-	    names.compat= _XkbDupString("%");
-	}
-	if ((!names.types)&&(fwant&(XkbGBN_TypesMask))) {
-	    names.types= _XkbDupString("%");
-	}
-	if ((!names.symbols)&&(fwant&XkbGBN_SymbolsMask)) {
-	    names.symbols= _XkbDupString("%");
-	}
-	geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0));
-	if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) {
-	    names.geometry= _XkbDupString("%");
-	    geom_changed= False;
-	}
+    if ((!names.compat)&&
+        (fwant&(XkbGBN_CompatMapMask|XkbGBN_IndicatorMapMask))) {
+        names.compat= _XkbDupString("%");
     }
-    else {
-	geom_changed= True;
+    if ((!names.types)&&(fwant&(XkbGBN_TypesMask))) {
+        names.types= _XkbDupString("%");
+    }
+    if ((!names.symbols)&&(fwant&XkbGBN_SymbolsMask)) {
+        names.symbols= _XkbDupString("%");
+    }
+    geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0));
+    if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) {
+        names.geometry= _XkbDupString("%");
+        geom_changed= False;
     }
 
     bzero(mapFile,PATH_MAX);
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 2ac51f2..73dd32e 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -591,7 +591,7 @@ XkbRF_VarDefsRec	defs;
      * generation. Eventually they will be freed at the end of this
      * function.
      */
-    if (names->keymap) names->keymap = _XkbDupString(names->keymap);
+    names->keymap = NULL;
     if (names->keycodes) names->keycodes = _XkbDupString(names->keycodes);
     if (names->types) names->types = _XkbDupString(names->types);
     if (names->compat) names->compat = _XkbDupString(names->compat);
@@ -602,11 +602,6 @@ XkbRF_VarDefsRec	defs;
 	XkbComponentNamesRec	rNames;
 	bzero(&rNames,sizeof(XkbComponentNamesRec));
 	if (XkbDDXNamesFromRules(dev,rules,&defs,&rNames)) {
-	    if (rNames.keymap) {
-		if (!names->keymap)
-		    names->keymap = rNames.keymap;
-		else _XkbFree(rNames.keymap);
-	    }
 	    if (rNames.keycodes) {
 		if (!names->keycodes)
 		    names->keycodes =  rNames.keycodes;
@@ -637,16 +632,8 @@ XkbRF_VarDefsRec	defs;
 	}
     }
 
-    if (names->keymap) {
-        XkbComponentNamesRec	tmpNames;
-	bzero(&tmpNames,sizeof(XkbComponentNamesRec));
-	tmpNames.keymap = names->keymap;
-        ok = (Bool) XkbDDXLoadKeymapByNames(dev,&tmpNames,XkmAllIndicesMask,0,
-					    &finfo,name,PATH_MAX);
-    }
-    if (!(ok && (finfo.xkb!=NULL)))
-        ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0,
-					    &finfo,name,PATH_MAX);
+    ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0,
+                                        &finfo,name,PATH_MAX);
 
     if (ok && (finfo.xkb!=NULL)) {
 	XkbDescPtr	xkb;
@@ -694,8 +681,6 @@ XkbRF_VarDefsRec	defs;
 	pSyms->map= NULL;
     }
 
-    if (names->keymap) _XkbFree(names->keymap);
-    names->keymap = NULL;
     if (names->keycodes) _XkbFree(names->keycodes);
     names->keycodes = NULL;
     if (names->types) _XkbFree(names->types);
commit 1332343910a1880854bae21a790cff198855cd24
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sun Feb 3 23:43:18 2008 +1100

    XKB: Remove usage of client-side types
    
    Since we're no longer sharing with Xlib, don't pass Displays and XPointers
    everywhere.

diff --git a/include/xkbfile.h b/include/xkbfile.h
index d58bec6..e90d766 100644
--- a/include/xkbfile.h
+++ b/include/xkbfile.h
@@ -96,7 +96,6 @@ extern	char *	XkbIndentText(
 );
 
 extern	char *	XkbAtomText(
-    Display *	/* dpy */,
     Atom 	/* atm */,
     unsigned	/* format */
 );
@@ -129,14 +128,12 @@ XkbModMaskText(
 );
 
 extern char *	XkbVModIndexText(
-    Display *	/* dpy */,
     XkbDescPtr	/* xkb */,
     unsigned	/* ndx */,
     unsigned	/* format */
 );
 
 extern	char *	XkbVModMaskText(
-    Display *	/* dpy */,
     XkbDescPtr	/* xkb */,
     unsigned	/* modMask */,
     unsigned	/* mask */,
@@ -189,7 +186,6 @@ extern char *	XkbActionTypeText(
 );
 
 extern char *	XkbActionText(
-    Display *	/* dpy */,
     XkbDescPtr	/* xkb */,
     XkbAction *	/* action */,
     unsigned	/* format */
@@ -232,31 +228,12 @@ extern	Bool	XkbLookupGroupAndLevel(
 
 /***====================================================================***/
 
-extern	char *	XkbAtomGetString(
-    Display *	/* dpy */,
-    Atom 	/* atm */
-);
-
 extern	Atom	XkbInternAtom(
-    Display *	/* dpy */,
     char *	/* name */,
     Bool	/* onlyIfExists */
 );
 
-extern	Status	XkbChangeKbdDisplay(
-    Display *		/* newDpy */,
-    XkbFileInfo *	/* result */
-);
-
-extern	Atom	XkbChangeAtomDisplay(
-    Display *	/* oldDpy */,
-    Display *	/* newDpy */,
-    Atom	/* atm */
-);
-
-extern	void	XkbInitAtoms(
-    Display *	/* dpy */
-);
+extern	void	XkbInitAtoms(void);
 
 /***====================================================================***/
 
@@ -415,7 +392,6 @@ extern	void	XkbEnsureSafeMapName(
 extern	Bool	XkbWriteXKBKeymapForNames(
     FILE *			/* file */,
     XkbComponentNamesPtr	/* names */,
-    Display *			/* dpy */,
     XkbDescPtr			/* xkb */,
     unsigned			/* want */,
     unsigned			/* need */
@@ -432,13 +408,6 @@ extern Bool	XkmProbe(
     FILE *		/* file */
 );
 
-extern unsigned XkbReadFromServer(
-    Display *		/* dpy */,
-    unsigned		/* need */,
-    unsigned		/* want */,
-    XkbFileInfo *	/* result */
-);
-
 extern unsigned	XkmReadFile(
     FILE *		/* file */,
     unsigned		/* need */,
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index df9aefc..a711504 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -328,12 +328,10 @@ extern	int	DeviceEnterNotify,DeviceLeaveNotify;
 #define	IsKeypadKey(s)		XkbKSIsKeypad(s)
 
 #define	Status		int
-#define	XPointer	pointer
-#define	Display		struct _XDisplay
 
 #ifndef True
-#define	True	1
-#define	False	0
+#define	True	TRUE
+#define	False	FALSE
 #endif
 
 _XFUNCPROTOBEGIN
@@ -1020,11 +1018,11 @@ extern	Bool XkbDDXNamesFromRules(
 );
 
 extern	Bool XkbDDXApplyConfig(
-	XPointer	/* cfg_in */,
+	void *	/* cfg_in */,
 	XkbSrvInfoPtr	/* xkbi */
 );
 
-extern XPointer XkbDDXPreloadConfig(
+extern void *XkbDDXPreloadConfig(
 	char **			/* rulesFileRtrn */,
 	XkbRF_VarDefsPtr	/* defs */,
 	XkbComponentNamesPtr	/* names */,
@@ -1038,6 +1036,6 @@ extern	int _XkbStrCaseCmp(
 
 _XFUNCPROTOEND
 
-#define	XkbAtomGetString(d,s)	NameForAtom(s)
+#define	XkbAtomGetString(s)	NameForAtom(s)
 
 #endif /* _XKBSRV_H_ */
diff --git a/include/xkbstr.h b/include/xkbstr.h
index e519e65..f390c61 100644
--- a/include/xkbstr.h
+++ b/include/xkbstr.h
@@ -418,7 +418,6 @@ typedef	struct _XkbGeometry	*XkbGeometryPtr;
 	 * Tie it all together into one big keyboard description
 	 */
 typedef	struct _XkbDesc {
-	struct _XDisplay *	dpy;
 	unsigned short	 	flags;
 	unsigned short		device_spec;
 	KeyCode			min_key_code;
diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
index 94072b8..c37f49a 100644
--- a/xkb/XKBGAlloc.c
+++ b/xkb/XKBGAlloc.c
@@ -455,7 +455,7 @@ XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap)
 /***====================================================================***/
 
 static Status
-_XkbGeomAlloc(	XPointer *		old,
+_XkbGeomAlloc(	void **		old,
 		unsigned short *	num,
 		unsigned short *	total,
 		int			num_new,
@@ -471,8 +471,8 @@ _XkbGeomAlloc(	XPointer *		old,
 
     *total= (*num)+num_new;
     if ((*old)!=NULL)
-	 (*old)= (XPointer)_XkbRealloc((*old),(*total)*sz_elem);
-    else (*old)= (XPointer)_XkbCalloc((*total),sz_elem);
+	 (*old)= _XkbRealloc((*old),(*total)*sz_elem);
+    else (*old)= _XkbCalloc((*total),sz_elem);
     if ((*old)==NULL) {
 	*total= *num= 0;
 	return BadAlloc;
@@ -485,44 +485,44 @@ _XkbGeomAlloc(	XPointer *		old,
     return Success;
 }
 
-#define	_XkbAllocProps(g,n) _XkbGeomAlloc((XPointer *)&(g)->properties,\
+#define	_XkbAllocProps(g,n) _XkbGeomAlloc((void *)&(g)->properties,\
 				&(g)->num_properties,&(g)->sz_properties,\
 				(n),sizeof(XkbPropertyRec))
-#define	_XkbAllocColors(g,n) _XkbGeomAlloc((XPointer *)&(g)->colors,\
+#define	_XkbAllocColors(g,n) _XkbGeomAlloc((void *)&(g)->colors,\
 				&(g)->num_colors,&(g)->sz_colors,\
 				(n),sizeof(XkbColorRec))
-#define	_XkbAllocShapes(g,n) _XkbGeomAlloc((XPointer *)&(g)->shapes,\
+#define	_XkbAllocShapes(g,n) _XkbGeomAlloc((void *)&(g)->shapes,\
 				&(g)->num_shapes,&(g)->sz_shapes,\
 				(n),sizeof(XkbShapeRec))
-#define	_XkbAllocSections(g,n) _XkbGeomAlloc((XPointer *)&(g)->sections,\
+#define	_XkbAllocSections(g,n) _XkbGeomAlloc((void *)&(g)->sections,\
 				&(g)->num_sections,&(g)->sz_sections,\
 				(n),sizeof(XkbSectionRec))
-#define	_XkbAllocDoodads(g,n) _XkbGeomAlloc((XPointer *)&(g)->doodads,\
+#define	_XkbAllocDoodads(g,n) _XkbGeomAlloc((void *)&(g)->doodads,\
 				&(g)->num_doodads,&(g)->sz_doodads,\
 				(n),sizeof(XkbDoodadRec))
-#define	_XkbAllocKeyAliases(g,n) _XkbGeomAlloc((XPointer *)&(g)->key_aliases,\
+#define	_XkbAllocKeyAliases(g,n) _XkbGeomAlloc((void *)&(g)->key_aliases,\
 				&(g)->num_key_aliases,&(g)->sz_key_aliases,\
 				(n),sizeof(XkbKeyAliasRec))
 
-#define	_XkbAllocOutlines(s,n) _XkbGeomAlloc((XPointer *)&(s)->outlines,\
+#define	_XkbAllocOutlines(s,n) _XkbGeomAlloc((void *)&(s)->outlines,\
 				&(s)->num_outlines,&(s)->sz_outlines,\
 				(n),sizeof(XkbOutlineRec))
-#define	_XkbAllocRows(s,n) _XkbGeomAlloc((XPointer *)&(s)->rows,\
+#define	_XkbAllocRows(s,n) _XkbGeomAlloc((void *)&(s)->rows,\
 				&(s)->num_rows,&(s)->sz_rows,\
 				(n),sizeof(XkbRowRec))
-#define	_XkbAllocPoints(o,n) _XkbGeomAlloc((XPointer *)&(o)->points,\
+#define	_XkbAllocPoints(o,n) _XkbGeomAlloc((void *)&(o)->points,\
 				&(o)->num_points,&(o)->sz_points,\
 				(n),sizeof(XkbPointRec))
-#define	_XkbAllocKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\
+#define	_XkbAllocKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\
 				&(r)->num_keys,&(r)->sz_keys,\
 				(n),sizeof(XkbKeyRec))
-#define	_XkbAllocOverlays(s,n) _XkbGeomAlloc((XPointer *)&(s)->overlays,\
+#define	_XkbAllocOverlays(s,n) _XkbGeomAlloc((void *)&(s)->overlays,\
 				&(s)->num_overlays,&(s)->sz_overlays,\
 				(n),sizeof(XkbOverlayRec))
-#define	_XkbAllocOverlayRows(o,n) _XkbGeomAlloc((XPointer *)&(o)->rows,\
+#define	_XkbAllocOverlayRows(o,n) _XkbGeomAlloc((void *)&(o)->rows,\
 				&(o)->num_rows,&(o)->sz_rows,\
 				(n),sizeof(XkbOverlayRowRec))
-#define	_XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\
+#define	_XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\
 				&(r)->num_keys,&(r)->sz_keys,\
 				(n),sizeof(XkbOverlayKeyRec))
     
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index 6312226..60a8d44 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -321,10 +321,10 @@ char tmpname[PATH_MAX];
 #ifdef DEBUG
     if (xkbDebugFlags) {
        ErrorF("XkbDDXCompileKeymapByNames compiling keymap:\n");
-       XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need);
+       XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
     }
 #endif
-	XkbWriteXKBKeymapForNames(out,names,NULL,xkb,want,need);
+	XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
 #ifndef WIN32
 	if (Pclose(out)==0)
 #else
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 06d3519..4182c3a 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -160,7 +160,6 @@ _AddIncl(	FILE *		file,
 Bool
 XkbWriteXKBKeymapForNames(	FILE *			file,
 				XkbComponentNamesPtr	names,
-				Display *		dpy,
 				XkbDescPtr		xkb,
 				unsigned		want,
 				unsigned		need)
@@ -233,7 +232,7 @@ XkbFileInfo	finfo;
     if ((xkb!=NULL) && (old_names!=NULL)) {
 	if (wantNames&XkmTypesMask) {
 	    if (old_names->types!=None) {
-		tmp= XkbAtomGetString(dpy,old_names->types);
+		tmp= XkbAtomGetString(old_names->types);
 		names->types= _XkbDupString(tmp);
 	    }
 	    else {
@@ -243,7 +242,7 @@ XkbFileInfo	finfo;
 	}
 	if (wantNames&XkmCompatMapMask) {
 	    if (old_names->compat!=None) {
-		tmp= XkbAtomGetString(dpy,old_names->compat);
+		tmp= XkbAtomGetString(old_names->compat);
 		names->compat= _XkbDupString(tmp);
 	    }
 	    else wantDflts|= XkmCompatMapMask;
@@ -252,13 +251,13 @@ XkbFileInfo	finfo;
 	if (wantNames&XkmSymbolsMask) {
 	    if (old_names->symbols==None)
 		return False;
-	    tmp= XkbAtomGetString(dpy,old_names->symbols);
+	    tmp= XkbAtomGetString(old_names->symbols);
 	    names->symbols= _XkbDupString(tmp);
 	    complete|= XkmSymbolsMask; 
 	}
 	if (wantNames&XkmKeyNamesMask) {
 	   if (old_names->keycodes!=None) {
-		tmp= XkbAtomGetString(dpy,old_names->keycodes);
+		tmp= XkbAtomGetString(old_names->keycodes);
 		names->keycodes= _XkbDupString(tmp);
 	    }
 	    else wantDflts|= XkmKeyNamesMask;
@@ -267,7 +266,7 @@ XkbFileInfo	finfo;
 	if (wantNames&XkmGeometryMask) {
 	    if (old_names->geometry==None)
 		return False;
-	    tmp= XkbAtomGetString(dpy,old_names->geometry);
+	    tmp= XkbAtomGetString(old_names->geometry);
 	    names->geometry= _XkbDupString(tmp);
 	    complete|= XkmGeometryMask; 
 	    wantNames&= ~XkmGeometryMask;
diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h
index a6918b4..173affe 100644
--- a/xkb/xkbgeom.h
+++ b/xkb/xkbgeom.h
@@ -599,13 +599,6 @@ XkbAllocGeometry(
 	XkbGeometrySizesPtr	/* sizes */
 );
 
-extern	Status
-XkbSetGeometry(
-	Display *		/* dpy */,
-	unsigned		/* deviceSpec */,
-	XkbGeometryPtr		/* geom */
-);
-
 extern	Bool
 XkbComputeShapeTop(
 	XkbShapePtr		/* shape */,
@@ -637,19 +630,6 @@ XkbFindOverlayForKey(
 	char *			/* under */
 );
 
-extern	Status
-XkbGetGeometry(
-    Display *			/* dpy */,
-    XkbDescPtr			/* xkb */
-);
-
-extern	Status
-XkbGetNamedGeometry(
-    Display *			/* dpy */,
-    XkbDescPtr			/* xkb */,
-    Atom			/* name */
-);
-
 _XFUNCPROTOEND
 
 #endif /* _XKBGEOM_H_ */
diff --git a/xkb/xkbout.c b/xkb/xkbout.c
index fc4e43e..b72c05c 100644
--- a/xkb/xkbout.c
+++ b/xkb/xkbout.c
@@ -52,7 +52,7 @@
 #define	VMOD_COMMENT_VALUE 2
 
 static Bool
-WriteXKBVModDecl(FILE *file,Display *dpy,XkbDescPtr xkb,int showValue)
+WriteXKBVModDecl(FILE *file,XkbDescPtr xkb,int showValue)
 {
 register int 	i,nMods;
 Atom *		vmodNames;
@@ -67,7 +67,7 @@ Atom *		vmodNames;
 	if ((vmodNames!=NULL)&&(vmodNames[i]!=None)) {
 	    if (nMods==0)	fprintf(file,"    virtual_modifiers ");
 	    else		fprintf(file,",");
-	    fprintf(file,"%s",XkbAtomText(dpy,vmodNames[i],XkbXKBFile));
+	    fprintf(file,"%s",XkbAtomText(vmodNames[i],XkbXKBFile));
 	    if ((showValue!=VMOD_HIDE_VALUE)&&
 		(xkb->server)&&(xkb->server->vmods[i]!=XkbNoModifierMask)) {
 		if (showValue==VMOD_COMMENT_VALUE) {
@@ -92,12 +92,7 @@ Atom *		vmodNames;
 static Bool
 WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action)
 {
-XkbDescPtr	xkb;
-Display *	dpy;
-
-    xkb= result->xkb;
-    dpy= xkb->dpy;
-    fprintf(file,"%s",XkbActionText(dpy,xkb,(XkbAction *)action,XkbXKBFile));
+    fprintf(file,"%s",XkbActionText(result->xkb,(XkbAction *)action,XkbXKBFile));
     return True;
 }
 
@@ -114,11 +109,9 @@ XkbWriteXKBKeycodes(	FILE *			file,
 Atom			kcName;
 register unsigned 	i;
 XkbDescPtr		xkb;
-Display *		dpy;
 char *			alternate;
 
     xkb= result->xkb;
-    dpy= xkb->dpy;
     if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) {
 	_XkbLibError(_XkbErrMissingNames,"XkbWriteXKBKeycodes",0);
 	return False;
@@ -126,7 +119,7 @@ char *			alternate;
     kcName= xkb->names->keycodes;
     if (kcName!=None)
 	 fprintf(file,"xkb_keycodes \"%s\" {\n",
-					XkbAtomText(dpy,kcName,XkbXKBFile));
+					XkbAtomText(kcName,XkbXKBFile));
     else fprintf(file,"xkb_keycodes {\n");
     fprintf(file,"    minimum = %d;\n",xkb->min_key_code);
     fprintf(file,"    maximum = %d;\n",xkb->max_key_code);
@@ -148,7 +141,7 @@ char *			alternate;
 	    else	type= "    virtual ";
 	    if (xkb->names->indicators[i]!=None) {
 		fprintf(file,"%sindicator %d = \"%s\";\n",type,i+1,
-			XkbAtomText(dpy,xkb->names->indicators[i],XkbXKBFile));
+			XkbAtomText(xkb->names->indicators[i],XkbXKBFile));
 	    }
 	}
     }
@@ -175,14 +168,12 @@ XkbWriteXKBKeyTypes(	FILE *			file,
 			XkbFileAddOnFunc	addOn,
 			void *			priv)
 {
-Display *		dpy;
 register unsigned	i,n;
 XkbKeyTypePtr		type;
 XkbKTMapEntryPtr	entry;
 XkbDescPtr		xkb;
 
     xkb= result->xkb;
-    dpy= xkb->dpy;
     if ((!xkb)||(!xkb->map)||(!xkb->map->types)) {
 	_XkbLibError(_XkbErrMissingTypes,"XkbWriteXKBKeyTypes",0);
 	return False;
@@ -194,27 +185,27 @@ XkbDescPtr		xkb;
     if ((xkb->names==NULL)||(xkb->names->types==None))
 	 fprintf(file,"xkb_types {\n\n");
     else fprintf(file,"xkb_types \"%s\" {\n\n",
-			XkbAtomText(dpy,xkb->names->types,XkbXKBFile));
-    WriteXKBVModDecl(file,dpy,xkb,
+			XkbAtomText(xkb->names->types,XkbXKBFile));
+    WriteXKBVModDecl(file,xkb,
 			(showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE));
 
     type= xkb->map->types;
     for (i=0;i<xkb->map->num_types;i++,type++) {
 	fprintf(file,"    type \"%s\" {\n",
-		XkbAtomText(dpy,type->name,XkbXKBFile));
+		XkbAtomText(type->name,XkbXKBFile));
 	fprintf(file,"        modifiers= %s;\n",
-	       XkbVModMaskText(dpy,xkb,type->mods.real_mods,type->mods.vmods,
+	       XkbVModMaskText(xkb,type->mods.real_mods,type->mods.vmods,
 								XkbXKBFile));
 	entry= type->map;
 	for (n=0;n<type->map_count;n++,entry++) {
 	    char *str;	
-	    str=XkbVModMaskText(dpy,xkb,entry->mods.real_mods,entry->mods.vmods,
+	    str=XkbVModMaskText(xkb,entry->mods.real_mods,entry->mods.vmods,
 								XkbXKBFile);
 	    fprintf(file,"        map[%s]= Level%d;\n",str,entry->level+1);
 	    if ((type->preserve)&&((type->preserve[n].real_mods)||
 				   (type->preserve[n].vmods))) {
 		fprintf(file,"        preserve[%s]= ",str);
-		fprintf(file,"%s;\n",XkbVModMaskText(dpy,xkb,
+		fprintf(file,"%s;\n",XkbVModMaskText(xkb,
 					type->preserve[n].real_mods,
 					type->preserve[n].vmods,
 					XkbXKBFile));
@@ -226,7 +217,7 @@ XkbDescPtr		xkb;
 		if ((*name)==None)
 		    continue;
 		fprintf(file,"        level_name[Level%d]= \"%s\";\n",n+1,
-					XkbAtomText(dpy,*name,XkbXKBFile));
+					XkbAtomText(*name,XkbXKBFile));
 	    }
 	}
 	fprintf(file,"    };\n");
@@ -248,7 +239,7 @@ WriteXKBIndicatorMap(	FILE *			file,
 XkbDescPtr	xkb;
 
     xkb= result->xkb;
-    fprintf(file,"    indicator \"%s\" {\n",XkbAtomGetString(xkb->dpy,name));
+    fprintf(file,"    indicator \"%s\" {\n",XkbAtomGetString(name));
     if (led->flags&XkbIM_NoExplicit)
 	fprintf(file,"        !allowExplicit;\n");
     if (led->flags&XkbIM_LEDDrivesKB)
@@ -266,7 +257,7 @@ XkbDescPtr	xkb;
 			XkbIMWhichStateMaskText(led->which_mods,XkbXKBFile));
 	}
 	fprintf(file,"        modifiers= %s;\n",
-			XkbVModMaskText(xkb->dpy,xkb,
+			XkbVModMaskText(xkb,
 					led->mods.real_mods,led->mods.vmods,
 					XkbXKBFile));
     }
@@ -288,13 +279,11 @@ XkbWriteXKBCompatMap(	FILE *			file,
 			XkbFileAddOnFunc	addOn,
 			void *			priv)
 {
-Display *		dpy;
 register unsigned	i;
 XkbSymInterpretPtr	interp;
 XkbDescPtr		xkb;
 
     xkb= result->xkb;
-    dpy= xkb->dpy;
     if ((!xkb)||(!xkb->compat)||(!xkb->compat->sym_interpret)) {
 	_XkbLibError(_XkbErrMissingCompatMap,"XkbWriteXKBCompatMap",0);
 	return False;
@@ -302,8 +291,8 @@ XkbDescPtr		xkb;
     if ((xkb->names==NULL)||(xkb->names->compat==None))
 	 fprintf(file,"xkb_compatibility {\n\n");
     else fprintf(file,"xkb_compatibility \"%s\" {\n\n",
-			XkbAtomText(dpy,xkb->names->compat,XkbXKBFile));
-    WriteXKBVModDecl(file,dpy,xkb,
+			XkbAtomText(xkb->names->compat,XkbXKBFile));
+    WriteXKBVModDecl(file,xkb,
 			(showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE));
 
     fprintf(file,"    interpret.useModMapMods= AnyLevel;\n");
@@ -318,7 +307,7 @@ XkbDescPtr		xkb;
 				XkbModMaskText(interp->mods,XkbXKBFile));
 	if (interp->virtual_mod!=XkbNoModifier) {
 	    fprintf(file,"        virtualModifier= %s;\n",
-		XkbVModIndexText(dpy,xkb,interp->virtual_mod,XkbXKBFile));
+		XkbVModIndexText(xkb,interp->virtual_mod,XkbXKBFile));
 	}
 	if (interp->match&XkbSI_LevelOneOnly)
 	    fprintf(file,"        useModMapMods=level1;\n");
@@ -337,7 +326,7 @@ XkbDescPtr		xkb;
 	gc= &xkb->compat->groups[i];
 	if ((gc->real_mods==0)&&(gc->vmods==0))
 	    continue;
-	fprintf(file,"    group %d = %s;\n",i+1,XkbVModMaskText(xkb->dpy,xkb,
+	fprintf(file,"    group %d = %s;\n",i+1,XkbVModMaskText(xkb,
 							gc->real_mods,gc->vmods,
 							XkbXKBFile));
     }
@@ -367,7 +356,6 @@ XkbWriteXKBSymbols(	FILE *			file,
 			XkbFileAddOnFunc	addOn,
 			void *			priv)
 {
-Display *		dpy;
 register unsigned	i,tmp;
 XkbDescPtr		xkb;
 XkbClientMapPtr		map;
@@ -377,7 +365,6 @@ Bool			showActions;
     xkb= result->xkb;
     map= xkb->map;
     srv= xkb->server;
-    dpy= xkb->dpy;
     if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) {
 	_XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0);
 	return False;
@@ -389,11 +376,11 @@ Bool			showActions;
     if ((xkb->names==NULL)||(xkb->names->symbols==None))
 	 fprintf(file,"xkb_symbols {\n\n");
     else fprintf(file,"xkb_symbols \"%s\" {\n\n",
-			XkbAtomText(dpy,xkb->names->symbols,XkbXKBFile));
+			XkbAtomText(xkb->names->symbols,XkbXKBFile));
     for (tmp=i=0;i<XkbNumKbdGroups;i++) {
 	if (xkb->names->groups[i]!=None) {
 	    fprintf(file,"    name[group%d]=\"%s\";\n",i+1,
-			XkbAtomText(dpy,xkb->names->groups[i],XkbXKBFile));
+			XkbAtomText(xkb->names->groups[i],XkbXKBFile));
 	    tmp++;
 	}
     }
@@ -429,19 +416,19 @@ Bool			showActions;
 			if (srv->explicit[i]&(1<<g)) {
 			    fprintf(file,"\n%s      type[group%d]= \"%s\",",
 			    	comment,g+1,
-				XkbAtomText(dpy,map->types[typeNdx].name,
+				XkbAtomText(map->types[typeNdx].name,
 			    	XkbXKBFile));
 			}
 			else if (showImplicit) {
 			    fprintf(file,"\n//      type[group%d]= \"%s\",",g+1,
-				XkbAtomText(dpy,map->types[typeNdx].name,
+				XkbAtomText(map->types[typeNdx].name,
 			    	XkbXKBFile));
 			}
 		    }
 		}
 		else {
 		    fprintf(file,"\n%s      type= \"%s\",",comment,
-				XkbAtomText(dpy,map->types[typeNdx].name,
+				XkbAtomText(map->types[typeNdx].name,
 			    	XkbXKBFile));
 		}
 		simple= False;
@@ -457,13 +444,13 @@ Bool			showActions;
 					(xkb->server->vmodmap[i]!=0)) {
 		if ((srv->explicit[i]&XkbExplicitVModMapMask)!=0) {
 		    fprintf(file,"\n        virtualMods= %s,",
-				XkbVModMaskText(dpy,xkb,0,
+				XkbVModMaskText(xkb,0,
 						xkb->server->vmodmap[i],
 						XkbXKBFile));
 		}
 		else if (showImplicit) {
 		    fprintf(file,"\n//      virtualMods= %s,",
-				XkbVModMaskText(dpy,xkb,0,
+				XkbVModMaskText(xkb,0,
 						xkb->server->vmodmap[i],
 						XkbXKBFile));
 		}
@@ -603,7 +590,6 @@ char *		iStr;
 
 static Bool
 WriteXKBDoodad(	FILE *		file,
-		Display *	dpy,
 		unsigned	indent,
 		XkbGeometryPtr	geom,
 		XkbDoodadPtr	doodad)
@@ -615,7 +601,7 @@ XkbColorPtr	color;
     i_str= XkbIndentText(indent);
     fprintf(file,"%s%s \"%s\" {\n",i_str,
 				XkbDoodadTypeText(doodad->any.type,XkbMessage),
-				XkbAtomText(dpy,doodad->any.name,XkbMessage));
+				XkbAtomText(doodad->any.name,XkbMessage));
     fprintf(file,"%s    top=      %s;\n",i_str,
 				 XkbGeomFPText(doodad->any.top,XkbXKBFile));
     fprintf(file,"%s    left=     %s;\n",i_str,
@@ -634,7 +620,7 @@ XkbColorPtr	color;
 	    }
 	    shape= XkbShapeDoodadShape(geom,&doodad->shape);
 	    fprintf(file,"%s    shape= \"%s\";\n",i_str,
-			    XkbAtomText(dpy,shape->name,XkbXKBFile));
+			    XkbAtomText(shape->name,XkbXKBFile));
 	    break;
 	case XkbTextDoodad:
 	    if (doodad->text.angle!=0) {
@@ -670,7 +656,7 @@ XkbColorPtr	color;
 	    fprintf(file,"%s    offColor= \"%s\";\n",i_str,
 	    		    XkbStringText(color->spec,XkbXKBFile));
 	    fprintf(file,"%s    shape= \"%s\";\n",i_str,
-			     XkbAtomText(dpy,shape->name,XkbXKBFile));
+			     XkbAtomText(shape->name,XkbXKBFile));
 	    break;
 	case XkbLogoDoodad:
 	    fprintf(file,"%s    logoName= \"%s\";\n",i_str,
@@ -685,7 +671,7 @@ XkbColorPtr	color;
 	    }
 	    shape= XkbLogoDoodadShape(geom,&doodad->logo);
 	    fprintf(file,"%s    shape= \"%s\";\n",i_str,
-			    XkbAtomText(dpy,shape->name,XkbXKBFile));
+			    XkbAtomText(shape->name,XkbXKBFile));
 	    break;
     }
     fprintf(file,"%s};\n",i_str);
@@ -695,7 +681,6 @@ XkbColorPtr	color;
 /*ARGSUSED*/
 static Bool
 WriteXKBOverlay(	FILE *		file,
-			Display *	dpy,
 			unsigned	indent,
 			XkbGeometryPtr	geom,
 			XkbOverlayPtr	ol)
@@ -708,7 +693,7 @@ XkbOverlayKeyPtr	key;
     i_str= XkbIndentText(indent);
     if (ol->name!=None) {
 	 fprintf(file,"%soverlay \"%s\" {\n",i_str,
-    					XkbAtomText(dpy,ol->name,XkbMessage));
+    					XkbAtomText(ol->name,XkbMessage));
     }
     else fprintf(file,"%soverlay {\n",i_str);
     for (nOut=r=0,row=ol->rows;r<ol->num_rows;r++,row++) {
@@ -730,7 +715,6 @@ XkbOverlayKeyPtr	key;
 
 static Bool
 WriteXKBSection(	FILE *		file,
-			Display *	dpy,
 			XkbSectionPtr 	s,
 			XkbGeometryPtr	geom)
 {
@@ -739,7 +723,7 @@ XkbRowPtr	row;
 int		dfltKeyColor = 0;
 
     fprintf(file,"    section \"%s\" {\n",
-				XkbAtomText(dpy,s->name,XkbXKBFile));
+				XkbAtomText(s->name,XkbXKBFile));
     if (s->rows&&(s->rows->num_keys>0)) {
 	dfltKeyColor= s->rows->keys[0].color_ndx;
 	fprintf(file,"        key.color= \"%s\";\n",
@@ -788,7 +772,7 @@ int		dfltKeyColor = 0;
 		shape= XkbKeyShape(geom,key);
 		fprintf(file,"{ %6s, \"%s\", %3s",
 		      XkbKeyNameText(key->name.name,XkbXKBFile),
-		      XkbAtomText(dpy,shape->name,XkbXKBFile),
+		      XkbAtomText(shape->name,XkbXKBFile),
 		      XkbGeomFPText(key->gap,XkbXKBFile));
 		if (key->color_ndx!=dfltKeyColor) {
 		    fprintf(file,", color=\"%s\"",XkbKeyColor(geom,key)->spec);
@@ -803,17 +787,17 @@ int		dfltKeyColor = 0;
     if (s->doodads!=NULL) {
 	XkbDoodadPtr	doodad;
 	for (i=0,doodad=s->doodads;i<s->num_doodads;i++,doodad++) {
-	    WriteXKBDoodad(file,dpy,8,geom,doodad);
+	    WriteXKBDoodad(file,8,geom,doodad);
 	}
     }
     if (s->overlays!=NULL) {
 	XkbOverlayPtr	ol;
 	for (i=0,ol=s->overlays;i<s->num_overlays;i++,ol++) {
-	    WriteXKBOverlay(file,dpy,8,geom,ol);
+	    WriteXKBOverlay(file,8,geom,ol);
 	}
     }
     fprintf(file,"    }; // End of \"%s\" section\n\n",
-				XkbAtomText(dpy,s->name,XkbXKBFile));
+				XkbAtomText(s->name,XkbXKBFile));
     return True;
 }
 
@@ -825,7 +809,6 @@ XkbWriteXKBGeometry(	FILE *			file,
 			XkbFileAddOnFunc	addOn,
 			void *			priv)
 {
-Display *		dpy;
 register unsigned	i,n;
 XkbDescPtr		xkb;
 XkbGeometryPtr		geom;
@@ -835,12 +818,11 @@ XkbGeometryPtr		geom;
 	_XkbLibError(_XkbErrMissingGeometry,"XkbWriteXKBGeometry",0);
  	return False;
     }
-    dpy= xkb->dpy;
     geom= xkb->geom;
     if (geom->name==None)
 	 fprintf(file,"xkb_geometry {\n\n");
     else fprintf(file,"xkb_geometry \"%s\" {\n\n",
-				XkbAtomText(dpy,geom->name,XkbXKBFile));
+				XkbAtomText(geom->name,XkbXKBFile));
     fprintf(file,"    width=       %s;\n",
 				XkbGeomFPText(geom->width_mm,XkbXKBFile));
     fprintf(file,"    height=      %s;\n\n",
@@ -889,7 +871,7 @@ XkbGeometryPtr		geom;
 	for (shape=geom->shapes,i=0;i<geom->num_shapes;i++,shape++) {
 	    lastR=0;
 	    fprintf(file,"    shape \"%s\" {",
-				   XkbAtomText(dpy,shape->name,XkbXKBFile));
+				   XkbAtomText(shape->name,XkbXKBFile));
 	    outline= shape->outlines;
 	    if (shape->num_outlines>1) {
 		for (n=0;n<shape->num_outlines;n++,outline++) {
@@ -909,13 +891,13 @@ XkbGeometryPtr		geom;
     if (geom->num_sections>0) {
 	XkbSectionPtr	section;
 	for (section=geom->sections,i=0;i<geom->num_sections;i++,section++){
-	    WriteXKBSection(file,dpy,section,geom);
+	    WriteXKBSection(file,section,geom);
 	}
     }
     if (geom->num_doodads>0) {
 	XkbDoodadPtr	doodad;
 	for (i=0,doodad=geom->doodads;i<geom->num_doodads;i++,doodad++) {
-	    WriteXKBDoodad(file,dpy,4,geom,doodad);
+	    WriteXKBDoodad(file,4,geom,doodad);
 	}
     }
     if (addOn)
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index 1520a9f..d08c915 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -69,11 +69,11 @@ char *rtrn;
 /***====================================================================***/
 
 char *
-XkbAtomText(Display *dpy,Atom atm,unsigned format)
+XkbAtomText(Atom atm,unsigned format)
 {
 char	*rtrn,*tmp;
 
-    tmp= XkbAtomGetString(dpy,atm);
+    tmp= XkbAtomGetString(atm);
     if (tmp!=NULL) {
 	int	len;
 	len= strlen(tmp)+1;
@@ -101,7 +101,7 @@ char	*rtrn,*tmp;
 /***====================================================================***/
 
 char *
-XkbVModIndexText(Display *dpy,XkbDescPtr xkb,unsigned ndx,unsigned format)
+XkbVModIndexText(XkbDescPtr xkb,unsigned ndx,unsigned format)
 {
 register int len;
 register Atom *vmodNames;
@@ -116,7 +116,7 @@ char  numBuf[20];
     if (ndx>=XkbNumVirtualMods)
 	 tmp= "illegal";
     else if (vmodNames&&(vmodNames[ndx]!=None))
-	 tmp= XkbAtomGetString(dpy,vmodNames[ndx]);
+	 tmp= XkbAtomGetString(vmodNames[ndx]);
     if (tmp==NULL)
 	sprintf(tmp=numBuf,"%d",ndx);
 
@@ -135,8 +135,7 @@ char  numBuf[20];
 }
 
 char *
-XkbVModMaskText(	Display *	dpy,
-			XkbDescPtr	xkb,
+XkbVModMaskText(        XkbDescPtr	xkb,
 			unsigned	modMask,
 			unsigned	mask,
 			unsigned	format)
@@ -163,7 +162,7 @@ char *str,buf[BUFFER_SIZE];
 	char *tmp;
 	for (i=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
 	    if (mask&bit) {
-		tmp= XkbVModIndexText(dpy,xkb,i,format);
+		tmp= XkbVModIndexText(xkb,i,format);
 		len= strlen(tmp)+1+(str==buf?0:1);
 		if (format==XkbCFile)
 		    len+= 4;
@@ -667,13 +666,13 @@ register int len;
 
 /*ARGSUSED*/
 static Bool
-CopyNoActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int*sz)
+CopyNoActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int*sz)
 {
     return True;
 }
 
 static Bool
-CopyModActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyModActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
 								int* sz)
 {
 XkbModAction *	act;
@@ -686,7 +685,7 @@ unsigned	tmp;
 	  TryCopyStr(buf,"modMapMods",sz);
     else if (act->real_mods || tmp) {
 	 TryCopyStr(buf,
-		     XkbVModMaskText(dpy,xkb,act->real_mods,tmp,XkbXKBFile),
+		     XkbVModMaskText(xkb,act->real_mods,tmp,XkbXKBFile),
 		     sz);
     }
     else TryCopyStr(buf,"none",sz);
@@ -701,7 +700,7 @@ unsigned	tmp;
 
 /*ARGSUSED*/
 static Bool
-CopyGroupActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyGroupActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
 								int *sz)
 {
 XkbGroupAction *	act;
@@ -726,7 +725,7 @@ char			tbuf[32];
 
 /*ARGSUSED*/
 static Bool
-CopyMovePtrArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
+CopyMovePtrArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
 {
 XkbPtrAction *	act;
 int		x,y;
@@ -751,7 +750,7 @@ char		tbuf[32];
 
 /*ARGSUSED*/
 static Bool
-CopyPtrBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
+CopyPtrBtnArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
 {
 XkbPtrBtnAction *	act;
 char			tbuf[32];
@@ -785,7 +784,7 @@ char			tbuf[32];
 
 /*ARGSUSED*/
 static Bool
-CopySetPtrDfltArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopySetPtrDfltArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
 								int *sz)
 {
 XkbPtrDfltAction *	act;
@@ -803,7 +802,7 @@ char			tbuf[32];
 }
 
 static Bool
-CopyISOLockArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
+CopyISOLockArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
 {
 XkbISOAction *	act;
 char		tbuf[64];
@@ -831,7 +830,7 @@ char		tbuf[64];
 		    TryCopyStr(buf,"+",sz);
 	    }
 	    if (tmp)
-		TryCopyStr(buf,XkbVModMaskText(dpy,xkb,0,tmp,XkbXKBFile),sz);
+		TryCopyStr(buf,XkbVModMaskText(xkb,0,tmp,XkbXKBFile),sz);
 	}
 	else TryCopyStr(buf,"none",sz);
     }
@@ -865,7 +864,7 @@ char		tbuf[64];
 
 /*ARGSUSED*/
 static Bool
-CopySwitchScreenArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopySwitchScreenArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
 								int *sz)
 {
 XkbSwitchScreenAction *	act;
@@ -884,7 +883,7 @@ char			tbuf[32];
 
 /*ARGSUSED*/
 static Bool
-CopySetLockControlsArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,
+CopySetLockControlsArgs(XkbDescPtr xkb,XkbAction *action,
 							char *buf,int *sz)
 {
 XkbCtrlsAction *	act;
@@ -971,7 +970,7 @@ char			tbuf[32];
 
 /*ARGSUSED*/
 static Bool
-CopyActionMessageArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyActionMessageArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
 								int *sz)
 {
 XkbMessageAction *	act;
@@ -998,7 +997,7 @@ char			tbuf[32];
 }
 
 static Bool
-CopyRedirectKeyArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyRedirectKeyArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
 								int *sz)
 {
 XkbRedirectKeyAction *	act;
@@ -1022,19 +1021,19 @@ unsigned		vmods,vmods_mask;
 	return True;
     if ((act->mods_mask==XkbAllModifiersMask)&&
 	(vmods_mask==XkbAllVirtualModsMask)) {
-	tmp= XkbVModMaskText(dpy,xkb,act->mods,vmods,XkbXKBFile);
+	tmp= XkbVModMaskText(xkb,act->mods,vmods,XkbXKBFile);
 	TryCopyStr(buf,",mods=",sz);
 	TryCopyStr(buf,tmp,sz);
     }
     else {
 	if ((act->mods_mask&act->mods)||(vmods_mask&vmods)) {
-	    tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&act->mods,
+	    tmp= XkbVModMaskText(xkb,act->mods_mask&act->mods,
 					 vmods_mask&vmods,XkbXKBFile);
 	    TryCopyStr(buf,",mods= ",sz);
 	    TryCopyStr(buf,tmp,sz);
 	}
 	if ((act->mods_mask&(~act->mods))||(vmods_mask&(~vmods))) {
-	    tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&(~act->mods),
+	    tmp= XkbVModMaskText(xkb,act->mods_mask&(~act->mods),
 					 vmods_mask&(~vmods),XkbXKBFile);
 	    TryCopyStr(buf,",clearMods= ",sz);
 	    TryCopyStr(buf,tmp,sz);
@@ -1045,7 +1044,7 @@ unsigned		vmods,vmods_mask;
 
 /*ARGSUSED*/
 static Bool
-CopyDeviceBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyDeviceBtnArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
 								int *sz)
 {
 XkbDeviceBtnAction *	act;
@@ -1078,7 +1077,7 @@ char			tbuf[32];
 
 /*ARGSUSED*/
 static Bool
-CopyOtherArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
+CopyOtherArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
 {
 XkbAnyAction *	act;
 char		tbuf[32];
@@ -1096,7 +1095,6 @@ char		tbuf[32];
 }
 
 typedef	Bool	(*actionCopy)(
-	Display *	/* dpy */,
 	XkbDescPtr 	/* xkb */,
 	XkbAction *	/* action */,
 	char *		/* buf */,
@@ -1128,7 +1126,7 @@ static actionCopy	copyActionArgs[XkbSA_NumActions] = {
 #define	ACTION_SZ	256
 
 char *
-XkbActionText(Display *dpy,XkbDescPtr xkb,XkbAction *action,unsigned format)
+XkbActionText(XkbDescPtr xkb,XkbAction *action,unsigned format)
 {
 char	buf[ACTION_SZ],*tmp;
 int	sz;
@@ -1145,8 +1143,8 @@ int	sz;
 	sprintf(buf,"%s(",XkbActionTypeText(action->type,XkbXKBFile));
 	sz= ACTION_SZ-strlen(buf)+2; /* room for close paren and NULL */
 	if (action->type<(unsigned)XkbSA_NumActions)
-	     (*copyActionArgs[action->type])(dpy,xkb,action,buf,&sz);
-	else CopyOtherArgs(dpy,xkb,action,buf,&sz);
+	     (*copyActionArgs[action->type])(xkb,action,buf,&sz);
+	else CopyOtherArgs(xkb,action,buf,&sz);
 	TryCopyStr(buf,")",&sz);
     }
     tmp= tbGetBuffer(strlen(buf)+1);
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 2bb0289..1e5b2cb 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -44,7 +44,7 @@
 #include "xkbgeom.h"
 
 Atom
-XkbInternAtom(Display *dpy,char *str,Bool only_if_exists)
+XkbInternAtom(char *str,Bool only_if_exists)
 {
     if (str==NULL)
 	return None;
@@ -66,18 +66,18 @@ char *new;
 
 /***====================================================================***/
 
-static XPointer
-XkmInsureSize(XPointer oldPtr,int oldCount,int *newCountRtrn,int elemSize)
+static void *
+XkmInsureSize(void *oldPtr,int oldCount,int *newCountRtrn,int elemSize)
 {
 int	newCount= *newCountRtrn;
 
     if (oldPtr==NULL) {
 	if (newCount==0)
 	    return NULL;
-	oldPtr= (XPointer)_XkbCalloc(newCount,elemSize);
+	oldPtr= _XkbCalloc(newCount,elemSize);
     }
     else if (oldCount<newCount) {
-	oldPtr= (XPointer)_XkbRealloc(oldPtr,newCount*elemSize);
+	oldPtr= _XkbRealloc(oldPtr,newCount*elemSize);
 	if (oldPtr!=NULL) {
 	    char *tmp= (char *)oldPtr;
 	    bzero(&tmp[oldCount*elemSize],(newCount-oldCount)*elemSize);
@@ -197,7 +197,7 @@ XkbDescPtr	xkb;
 	char name[100];
 	if (named&bit) {
 	    if (nRead+=XkmGetCountedString(file,name,100)) {
-		xkb->names->vmods[i]= XkbInternAtom(xkb->dpy,name,False);
+		xkb->names->vmods[i]= XkbInternAtom(name,False);
 		if (changes)
 		    changes->names.changed_vmods|= bit;
 	    }
@@ -244,7 +244,7 @@ XkbDescPtr	xkb;
 	return -1;
     }
     if (name[0]!='\0') {
-	xkb->names->keycodes= XkbInternAtom(xkb->dpy,name,False);
+	xkb->names->keycodes= XkbInternAtom(name,False);
     }
 
     for (pN=&xkb->names->keys[minKC],i=minKC;i<=(int)maxKC;i++,pN++) {
@@ -300,7 +300,7 @@ XkbDescPtr		xkb;
 	    _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeyTypes",0);
 	    return -1;
         }
-	xkb->names->types= XkbInternAtom(xkb->dpy,buf,False);
+	xkb->names->types= XkbInternAtom(buf,False);
     }
     num_types= XkmGetCARD16(file,&nRead);
     nRead+= XkmSkipPadding(file,2);
@@ -355,7 +355,7 @@ XkbDescPtr		xkb;
 	   return -1;
 	}
 	if (buf[0]!='\0') {
-	     type->name= XkbInternAtom(xkb->dpy,buf,False);
+	     type->name= XkbInternAtom(buf,False);
 	}
 	else type->name= None;
 
@@ -393,7 +393,7 @@ XkbDescPtr		xkb;
 		    nRead+= tmp;
 		    if (strlen(buf)==0)
 			 type->level_names[n]= None;
-		    else type->level_names[n]= XkbInternAtom(xkb->dpy,buf,0);
+		    else type->level_names[n]= XkbInternAtom(buf,0);
 		}
 	    }
 	}
@@ -437,7 +437,7 @@ XkbCompatMapPtr		compat;
 	    _XkbLibError(_XkbErrBadAlloc,"ReadXkmCompatMap",0);
 	    return -1;
 	}
-	xkb->names->compat= XkbInternAtom(xkb->dpy,name,False);
+	xkb->names->compat= XkbInternAtom(name,False);
     }
     num_si= XkmGetCARD16(file,&nRead);
     groups= XkmGetCARD8(file,&nRead);
@@ -523,7 +523,7 @@ XkbDescPtr		xkb;
 	}
 	nRead+= tmp;
 	if (buf[0]!='\0')
-	     name= XkbInternAtom(xkb->dpy,buf,False);
+	     name= XkbInternAtom(buf,False);
 	else name= None;
 	if ((tmp=fread(&wire,SIZEOF(xkmIndicatorMapDesc),1,file))<1) {
 	    _XkbLibError(_XkbErrBadLength,"ReadXkmIndicators",0);
@@ -600,7 +600,7 @@ XkbDescPtr		xkb;
     }
     if ((buf[0]!='\0')&&(xkb->names)) {
 	Atom name;
-	name= XkbInternAtom(xkb->dpy,buf,0);
+	name= XkbInternAtom(buf,0);
 	xkb->names->symbols= name;
 	xkb->names->phys_symbols= name;
     }
@@ -611,7 +611,7 @@ XkbDescPtr		xkb;
 	    nRead+= tmp;
 	    if ((buf[0]!='\0')&&(xkb->names)) {
 		Atom name;
-		name= XkbInternAtom(xkb->dpy,buf,0);
+		name= XkbInternAtom(buf,0);
 		xkb->names->groups[i]= name;
 	    }	
 	    else xkb->names->groups[i]= None;
@@ -654,7 +654,7 @@ XkbDescPtr		xkb;
 	    for (g=0;g<XkbNumKbdGroups;g++) {
 		if ((wireMap.flags&(1<<g))&&
 			((tmp=XkmGetCountedString(file,buf,100))>0)) {
-		    typeName[g]= XkbInternAtom(xkb->dpy,buf,1);
+		    typeName[g]= XkbInternAtom(buf,1);
 		    nRead+= tmp;
 		}
 		type[g]=FindTypeForKey(xkb,typeName[g],wireMap.width,NULL);
@@ -732,7 +732,6 @@ XkbDescPtr		xkb;
 static int
 ReadXkmGeomDoodad(
     FILE *		file,
-    Display *		dpy,
     XkbGeometryPtr	geom,
     XkbSectionPtr	section)
 {
@@ -745,7 +744,7 @@ int		nRead=0;
     nRead+= XkmGetCountedString(file,buf,100);
     tmp= fread(&doodadWire,SIZEOF(xkmDoodadDesc),1,file);
     nRead+= SIZEOF(xkmDoodadDesc)*tmp;
-    doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(dpy,buf,False));
+    doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(buf,False));
     if (!doodad)
 	return nRead;
     doodad->any.type= doodadWire.any.type;
@@ -790,7 +789,6 @@ int		nRead=0;
 
 static int
 ReadXkmGeomOverlay(	FILE *		file,
-			Display *	dpy,
 			XkbGeometryPtr	geom,
 			XkbSectionPtr	section)
 {
@@ -806,7 +804,7 @@ register int		r;
     nRead+= XkmGetCountedString(file,buf,100);
     tmp= fread(&olWire,SIZEOF(xkmOverlayDesc),1,file);
     nRead+= tmp*SIZEOF(xkmOverlayDesc);
-    ol= XkbAddGeomOverlay(section,XkbInternAtom(dpy,buf,False),
+    ol= XkbAddGeomOverlay(section,XkbInternAtom(buf,False),
     							olWire.num_rows);
     if (!ol)
 	return nRead;
@@ -833,7 +831,6 @@ register int		r;
 
 static int
 ReadXkmGeomSection(	FILE *		file,
-			Display *	dpy,
 			XkbGeometryPtr	geom)
 {
 register int	i;
@@ -845,7 +842,7 @@ char		buf[100];
 Atom		nameAtom;
 
     nRead+= XkmGetCountedString(file,buf,100);
-    nameAtom= XkbInternAtom(dpy,buf,False);
+    nameAtom= XkbInternAtom(buf,False);
     tmp= fread(&sectionWire,SIZEOF(xkmSectionDesc),1,file);
     nRead+= SIZEOF(xkmSectionDesc)*tmp;
     section= XkbAddGeomSection(geom,nameAtom,sectionWire.num_rows,
@@ -896,7 +893,7 @@ Atom		nameAtom;
     }
     if (sectionWire.num_doodads>0) {
 	for (i=0;i<sectionWire.num_doodads;i++) {
-	    tmp= ReadXkmGeomDoodad(file,dpy,geom,section);
+	    tmp= ReadXkmGeomDoodad(file,geom,section);
 	    nRead+= tmp;
 	    if (tmp<1)
 		return nRead;
@@ -904,7 +901,7 @@ Atom		nameAtom;
     }
     if (sectionWire.num_overlays>0) {
 	for (i=0;i<sectionWire.num_overlays;i++) {
-	    tmp= ReadXkmGeomOverlay(file,dpy,geom,section);
+	    tmp= ReadXkmGeomOverlay(file,geom,section);
 	    nRead+= tmp;
 	    if (tmp<1)
 		return nRead;
@@ -939,7 +936,7 @@ XkbGeometrySizesRec	sizes;
 	return nRead;
     }
     geom= result->xkb->geom;
-    geom->name= XkbInternAtom(result->xkb->dpy,buf,False);
+    geom->name= XkbInternAtom(buf,False);
     geom->width_mm= wireGeom.width_mm;
     geom->height_mm= wireGeom.height_mm;
     nRead+= XkmGetCountedString(file,buf,100);
@@ -975,7 +972,7 @@ XkbGeometrySizesRec	sizes;
 	    XkbOutlinePtr	ol;
 	    xkmOutlineDesc	olWire;
 	    nRead+= XkmGetCountedString(file,buf,100);
-	    nameAtom= XkbInternAtom(result->xkb->dpy,buf,False);
+	    nameAtom= XkbInternAtom(buf,False);
 	    tmp= fread(&shapeWire,SIZEOF(xkmShapeDesc),1,file);
 	    nRead+= tmp*SIZEOF(xkmShapeDesc);
 	    shape= XkbAddGeomShape(geom,nameAtom,shapeWire.num_outlines);
@@ -1014,7 +1011,7 @@ XkbGeometrySizesRec	sizes;
     }
     if (wireGeom.num_sections>0) {
 	for (i=0;i<wireGeom.num_sections;i++) {
-	    tmp= ReadXkmGeomSection(file,result->xkb->dpy,geom);
+	    tmp= ReadXkmGeomSection(file,geom);
 	    nRead+= tmp;
 	    if (tmp==0)
 		return nRead;
@@ -1022,7 +1019,7 @@ XkbGeometrySizesRec	sizes;
     }
     if (wireGeom.num_doodads>0) {
 	for (i=0;i<wireGeom.num_doodads;i++) {
-	    tmp= ReadXkmGeomDoodad(file,result->xkb->dpy,geom,NULL);
+	    tmp= ReadXkmGeomDoodad(file,geom,NULL);
 	    nRead+= tmp;
 	    if (tmp==0)
 		return nRead;
commit 534fc5140b039a8c98ab715d0a6740d513b41209
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sun Feb 3 23:30:22 2008 +1100

    XKB: Remove a bunch of mad ifdefs
    
    We have SEEK_SET and size_t, seriously.  Also use DebugF instead of
    ifdef DEBUG, and ditch a couple of random bits that were never used.

diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
index 7a75d20..94072b8 100644
--- a/xkb/XKBGAlloc.c
+++ b/xkb/XKBGAlloc.c
@@ -39,12 +39,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <xkbsrv.h>
 #include "xkbgeom.h"
 
-#ifdef X_NOT_POSIX
-#define Size_t unsigned int
-#else
-#define Size_t size_t
-#endif
-
 /***====================================================================***/
 
 static void 
@@ -465,7 +459,7 @@ _XkbGeomAlloc(	XPointer *		old,
 		unsigned short *	num,
 		unsigned short *	total,
 		int			num_new,
-		Size_t			sz_elem)
+		size_t			sz_elem)
 {
     if (num_new<1)
 	return Success;
diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c
index 9feaf8e..178b5b8 100644
--- a/xkb/XKBMAlloc.c
+++ b/xkb/XKBMAlloc.c
@@ -55,10 +55,8 @@ XkbClientMapPtr map;
 	((!XkbIsLegalKeycode(xkb->min_key_code))||
 	 (!XkbIsLegalKeycode(xkb->max_key_code))||
 	 (xkb->max_key_code<xkb->min_key_code))) {
-#ifdef DEBUG
-fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n",
+        DebugF("bad keycode (%d,%d) in XkbAllocClientMap\n",
 				xkb->min_key_code,xkb->max_key_code);
-#endif
 	return BadValue;
     }
 
diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c
index 0404108..85415a4 100644
--- a/xkb/XKBMisc.c
+++ b/xkb/XKBMisc.c
@@ -416,10 +416,7 @@ unsigned		changed,tmp;
 	if (((explicit&XkbExplicitAutoRepeatMask)==0)&&(xkb->ctrls)) {
 	    CARD8 old;
 	    old= xkb->ctrls->per_key_repeat[key/8];
-#ifdef RETURN_SHOULD_REPEAT
-	    if (*XkbKeySymsPtr(xkb,key) != XK_Return)
-#endif
-		xkb->ctrls->per_key_repeat[key/8]|= (1<<(key%8));
+            xkb->ctrls->per_key_repeat[key/8]|= (1<<(key%8));
 	    if (changes && (old!=xkb->ctrls->per_key_repeat[key/8]))
 		changes->ctrls.changed_ctrls|= XkbPerKeyRepeatMask;
 	}
diff --git a/xkb/ddxBeep.c b/xkb/ddxBeep.c
index 331357d..2faed58 100644
--- a/xkb/ddxBeep.c
+++ b/xkb/ddxBeep.c
@@ -139,10 +139,6 @@ Atom		name;
     next= 0;
     pitch= oldPitch= ctrl->bell_pitch;
     duration= oldDuration= ctrl->bell_duration;
-#ifdef DEBUG
-    if (xkbDebugFlags>1)
-	ErrorF("beep: %d (count= %d)\n",xkbInfo->beepType,xkbInfo->beepCount);
-#endif
     name= None;
     switch (xkbInfo->beepType) {
 	default:
diff --git a/xkb/ddxCtrls.c b/xkb/ddxCtrls.c
index 0f7f918..34ea0bd 100644
--- a/xkb/ddxCtrls.c
+++ b/xkb/ddxCtrls.c
@@ -47,12 +47,6 @@ int realRepeat;
     realRepeat= ctrl->autoRepeat;
     if ((dev->kbdfeed)&&(XkbDDXUsesSoftRepeat(dev)))
 	ctrl->autoRepeat= 0;
-#ifdef DEBUG
-if (xkbDebugFlags&0x4) {
-    ErrorF("XkbDDXKeybdCtrlProc: setting repeat to %d (real repeat is %d)\n",
-					ctrl->autoRepeat,realRepeat);
-}
-#endif
     if (dev->key && dev->key->xkbInfo && dev->key->xkbInfo->kbdProc)
 	(*dev->key->xkbInfo->kbdProc)(dev,ctrl);
     ctrl->autoRepeat= realRepeat;
@@ -93,23 +87,6 @@ unsigned	changed, i;
 unsigned 	char *rep_old, *rep_new, *rep_fb;
 
     changed= new->enabled_ctrls^old->enabled_ctrls;
-#ifdef NOTDEF
-    if (changed&XkbRepeatKeysMask) {
-	if (dev->kbdfeed) {
-	    int realRepeat;
-
-	    if (new->enabled_ctrls&XkbRepeatKeysMask)
-		 dev->kbdfeed->ctrl.autoRepeat= realRepeat= 1;
-	    else dev->kbdfeed->ctrl.autoRepeat= realRepeat= 0;
-
-	    if (XkbDDXUsesSoftRepeat(dev))
-		dev->kbdfeed->ctrl.autoRepeat= FALSE;
-	    if (dev->kbdfeed->CtrlProc)
-		(*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl);
-	    dev->kbdfeed->ctrl.autoRepeat= realRepeat;
-	}
-    }
-#endif
     for (rep_old = old->per_key_repeat,
          rep_new = new->per_key_repeat,
 	 rep_fb  = dev->kbdfeed->ctrl.autoRepeats,
diff --git a/xkb/ddxKeyClick.c b/xkb/ddxKeyClick.c
index f48296d..51d78f5 100644
--- a/xkb/ddxKeyClick.c
+++ b/xkb/ddxKeyClick.c
@@ -42,9 +42,5 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 void
 XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic)
 {
-#ifdef DEBUG
-    if (xkbDebugFlags)
-	ErrorF("Click.\n");
-#endif
     return;
 }
diff --git a/xkb/ddxList.c b/xkb/ddxList.c
index a91a9ba..80e0505 100644
--- a/xkb/ddxList.c
+++ b/xkb/ddxList.c
@@ -43,14 +43,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <xkbsrv.h>
 #include <X11/extensions/XI.h>
 
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define	PATH_MAX MAXPATHLEN
-#else
-#define	PATH_MAX 1024
-#endif
-#endif
-
 #ifdef WIN32
 /* from ddxLoad.c */
 extern const char* Win32TempDir();
@@ -199,9 +191,8 @@ char	tmpname[PATH_MAX];
 #ifndef WIN32
 	in= Popen(buf,"r");
 #else
-#ifdef DEBUG_CMD
-	ErrorF("xkb executes: %s\n",buf);
-#endif
+        if (xkbDebugFlags)
+            DebugF("xkbList executes: %s\n",buf);
 	if (System(buf) < 0)
 	    ErrorF("Could not invoke keymap compiler\n");
 	else
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index d79ae7a..6312226 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -52,14 +52,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <paths.h>
 #endif
 
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define	PATH_MAX MAXPATHLEN
-#else
-#define	PATH_MAX 1024
-#endif
-#endif
-
 	/*
 	 * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
 	 * relative to the top-level XKB configuration directory.
@@ -161,44 +153,19 @@ Win32System(const char *cmdline)
 #define System(x) Win32System(x)
 #endif
 
-#ifdef MAKE_XKM_OUTPUT_DIR
-/* Borrow trans_mkdir from Xtransutil.c to more safely make directories */
-# undef X11_t
-# define TRANS_SERVER
-# define PRMSG(lvl,x,a,b,c) \
-	if (lvl <= 1) { LogMessage(X_ERROR,x,a,b,c); } else ((void)0)
-# include <X11/Xtrans/Xtransutil.c>
-# ifndef XKM_OUTPUT_DIR_MODE
-#  define XKM_OUTPUT_DIR_MODE 0755
-# endif
-#endif
-
 static void
 OutputDirectory(
     char* outdir,
     size_t size)
 {
 #ifndef WIN32
-    if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size)
-#ifdef MAKE_XKM_OUTPUT_DIR    
-	&& (trans_mkdir(XKM_OUTPUT_DIR, XKM_OUTPUT_DIR_MODE) == 0)
-#endif
-	)
+    if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size))
     {
 	/* if server running as root it *may* be able to write */
 	/* FIXME: check whether directory is writable at all */
 	(void) strcpy (outdir, XKM_OUTPUT_DIR);
     } else
-#endif
-#ifdef _PATH_VARTMP
-    if ((strlen(_PATH_VARTMP) + 1) < size) 
-    {
-	(void) strcpy (outdir, _PATH_VARTMP);
-	if (outdir[strlen(outdir) - 1] != '/')	/* Hi IBM, Digital */
-	    (void) strcat (outdir, "/");
-    } else
-#endif
-#ifdef WIN32
+#else
     if (strlen(Win32TempDir()) + 1 < size)
     {
 	(void) strcpy(outdir, Win32TempDir());
@@ -256,15 +223,10 @@ char 	*cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
 		PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file,
 		xkm_output_dir,outFile);
     }
-#ifdef DEBUG
     if (xkbDebugFlags) {
-	ErrorF("XkbDDXCompileNamedKeymap compiling keymap using:\n");
-	ErrorF("    \"cmd\"\n");
+	DebugF("XkbDDXCompileNamedKeymap compiling keymap using:\n");
+	DebugF("    \"cmd\"\n");
     }
-#endif
-#ifdef DEBUG_CMD
-    ErrorF("xkb executes: %s\n",cmd);
-#endif
     if (System(cmd)==0) {
 	if (nameRtrn) {
 	    strncpy(nameRtrn,outFile,nameRtrnLen);
@@ -276,9 +238,7 @@ char 	*cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
             xfree(cmd);
 	return True;
     } 
-#ifdef DEBUG
-    ErrorF("Error compiling keymap (%s)\n",names->keymap);
-#endif
+    DebugF("Error compiling keymap (%s)\n",names->keymap);
     if (outFile!=NULL)
 	_XkbFree(outFile);
     if (cmd!=NULL)
@@ -371,12 +331,8 @@ char tmpname[PATH_MAX];
 	if (fclose(out)==0 && System(buf) >= 0)
 #endif
 	{
-#ifdef DEBUG_CMD
-	    ErrorF("xkb executes: %s\n",buf);
-	    ErrorF("xkbcomp input:\n");
-	    XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need);
-	    ErrorF("end xkbcomp input\n");
-#endif
+            if (xkbDebugFlags)
+                DebugF("xkb executes: %s\n",buf);
 	    if (nameRtrn) {
 		strncpy(nameRtrn,keymap,nameRtrnLen);
 		nameRtrn[nameRtrnLen-1]= '\0';
@@ -385,24 +341,20 @@ char tmpname[PATH_MAX];
                 xfree (buf);
 	    return True;
 	}
-#ifdef DEBUG
 	else
-	    ErrorF("Error compiling keymap (%s)\n",keymap);
-#endif
+	    DebugF("Error compiling keymap (%s)\n",keymap);
 #ifdef WIN32
         /* remove the temporary file */
         unlink(tmpname);
 #endif
     }
-#ifdef DEBUG
     else {
 #ifndef WIN32
-	ErrorF("Could not invoke keymap compiler\n");
+	DebugF("Could not invoke keymap compiler\n");
 #else
-	ErrorF("Could not open file %s\n", tmpname);
+	DebugF("Could not open file %s\n", tmpname);
 #endif
     }
-#endif
     if (nameRtrn)
 	nameRtrn[0]= '\0';
     if (buf != NULL)
@@ -477,17 +429,13 @@ unsigned	missing;
 	    return 0;
 	}
 	else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) {
-#ifdef NOISY
-	    ErrorF("Couldn't compile keymap file\n");
-#endif
+	    DebugF("Couldn't compile keymap file\n");
 	    return 0;
 	}
     }
     else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need,
 						nameRtrn,nameRtrnLen)){
-#ifdef NOISY
-	ErrorF("Couldn't compile keymap file\n");
-#endif
+	DebugF("Couldn't compile keymap file\n");
 	return 0;
     }
     file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX);
@@ -502,11 +450,9 @@ unsigned	missing;
 	(void) unlink (fileName);
 	return 0;
     }
-#ifdef DEBUG
     else if (xkbDebugFlags) {
-	ErrorF("Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined);
+	DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,finfoRtrn->defined);
     }
-#endif
     fclose(file);
     (void) unlink (fileName);
     return (need|want)&(~missing);
diff --git a/xkb/maprules.c b/xkb/maprules.c
index 52a1cdc..72e642f 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -50,16 +50,6 @@
 #define XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
 
-#ifdef DEBUG
-#define PR_DEBUG(s)		fprintf(stderr,s)
-#define PR_DEBUG1(s,a)		fprintf(stderr,s,a)
-#define PR_DEBUG2(s,a,b)	fprintf(stderr,s,a,b)
-#else
-#define PR_DEBUG(s)
-#define PR_DEBUG1(s,a)
-#define PR_DEBUG2(s,a,b)
-#endif
-
 /***====================================================================***/
 
 #define DFLT_LINE_SIZE	128
@@ -171,8 +161,8 @@ Bool	endOfFile,spacePending,slashPending,inComment;
 		}
 		if (checkbang && ch=='!') {
 		    if (line->num_line!=0) {
-			PR_DEBUG("The '!' legal only at start of line\n");
-			PR_DEBUG("Line containing '!' ignored\n");
+			DebugF("The '!' legal only at start of line\n");
+			DebugF("Line containing '!' ignored\n");
 			line->num_line= 0;
 			inComment= 0;
 			break;
@@ -273,9 +263,7 @@ unsigned	present, l_ndx_present, v_ndx_present;
 register int	i;
 int		len, ndx;
 _Xstrtokparams	strtok_buf;
-#ifdef DEBUG
 Bool		found;
-#endif
 
 
    l_ndx_present = v_ndx_present = present= 0;
@@ -284,9 +272,7 @@ Bool		found;
    bzero((char *)remap,sizeof(RemapSpec));
    remap->number = len;
    while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) {
-#ifdef DEBUG
 	found= False;
-#endif
 	str= NULL;
 	if (strcmp(tok,"=")==0)
 	    continue;
@@ -299,22 +285,20 @@ Bool		found;
 			*end != '\0' || ndx == -1)
 		        break;
 		     if (ndx < 1 || ndx > XkbNumKbdGroups) {
-		        PR_DEBUG2("Illegal %s index: %d\n", cname[i], ndx);
-		        PR_DEBUG1("Index must be in range 1..%d\n",
+		        DebugF("Illegal %s index: %d\n", cname[i], ndx);
+		        DebugF("Index must be in range 1..%d\n",
 				   XkbNumKbdGroups);
 			break;
 		     }
                 } else {
 		    ndx = 0;
                 }
-#ifdef DEBUG
 		found= True;
-#endif
 		if (present&(1<<i)) {
 		    if ((i == LAYOUT && l_ndx_present&(1<<ndx)) ||
 			(i == VARIANT && v_ndx_present&(1<<ndx)) ) {
-		        PR_DEBUG1("Component \"%s\" listed twice\n",tok);
-		        PR_DEBUG("Second definition ignored\n");
+		        DebugF("Component \"%s\" listed twice\n",tok);
+		        DebugF("Second definition ignored\n");
 		        break;
 		    }
 		}
@@ -328,38 +312,34 @@ Bool		found;
 		break;
 	    }
 	}
-#ifdef DEBUG
 	if (!found) {
 	    fprintf(stderr,"Unknown component \"%s\" ignored\n",tok);
 	}
-#endif
    }
    if ((present&PART_MASK)==0) {
-#ifdef DEBUG
 	unsigned mask= PART_MASK;
-	fprintf(stderr,"Mapping needs at least one of ");
+	ErrorF("Mapping needs at least one of ");
 	for (i=0; (i<MAX_WORDS); i++) {
 	    if ((1L<<i)&mask) {
 		mask&= ~(1L<<i);
-		if (mask)	fprintf(stderr,"\"%s,\" ",cname[i]);
-		else		fprintf(stderr,"or \"%s\"\n",cname[i]);
+		if (mask)	DebugF("\"%s,\" ",cname[i]);
+		else		DebugF("or \"%s\"\n",cname[i]);
 	    }
 	}
-	fprintf(stderr,"Illegal mapping ignored\n");
-#endif
+	DebugF("Illegal mapping ignored\n");
 	remap->num_remap= 0;
 	return;
    }
    if ((present&COMPONENT_MASK)==0) {
-	PR_DEBUG("Mapping needs at least one component\n");
-	PR_DEBUG("Illegal mapping ignored\n");
+	DebugF("Mapping needs at least one component\n");
+	DebugF("Illegal mapping ignored\n");
 	remap->num_remap= 0;
 	return;
    }
    if (((present&COMPONENT_MASK)&(1<<KEYMAP))&&
 				((present&COMPONENT_MASK)!=(1<<KEYMAP))) {
-	PR_DEBUG("Keymap cannot appear with other components\n");
-	PR_DEBUG("Illegal mapping ignored\n");
+	DebugF("Keymap cannot appear with other components\n");
+	DebugF("Illegal mapping ignored\n");
 	remap->num_remap= 0;
 	return;
    }
@@ -434,8 +414,8 @@ Bool 		append = False;
     }
 
     if (remap->num_remap==0) {
-	PR_DEBUG("Must have a mapping before first line of data\n");
-	PR_DEBUG("Illegal line of data ignored\n");
+	DebugF("Must have a mapping before first line of data\n");
+	DebugF("Illegal line of data ignored\n");
 	return False;
     }
     bzero((char *)&tmp,sizeof(FileSpec));
@@ -447,8 +427,8 @@ Bool 		append = False;
 	    continue;
 	}
 	if (nread>remap->num_remap) {
-	    PR_DEBUG("Too many words on a line\n");
-	    PR_DEBUG1("Extra word \"%s\" ignored\n",tok);
+	    DebugF("Too many words on a line\n");
+	    DebugF("Extra word \"%s\" ignored\n",tok);
 	    continue;
 	}
 	tmp.name[remap->remap[nread].word]= tok;
@@ -456,8 +436,8 @@ Bool 		append = False;
 	    append = True;
     }
     if (nread<remap->num_remap) {
-	PR_DEBUG1("Too few words on a line: %s\n", line->line);
-	PR_DEBUG("line ignored\n");
+	DebugF("Too few words on a line: %s\n", line->line);
+	DebugF("line ignored\n");
 	return False;
     }
 
@@ -903,9 +883,7 @@ XkbRF_AddRule(XkbRF_RulesPtr	rules)
     }
     if (!rules->rules) {
 	rules->sz_rules= rules->num_rules= 0;
-#ifdef DEBUG
-	fprintf(stderr,"Allocation failure in XkbRF_AddRule\n");
-#endif
+	DebugF("Allocation failure in XkbRF_AddRule\n");
 	return NULL;
     }
     bzero((char *)&rules->rules[rules->num_rules],sizeof(XkbRF_RuleRec));
@@ -1022,7 +1000,7 @@ XkbRF_AddVarDesc(XkbRF_DescribeVarsPtr	vars)
     }
     if (!vars->desc) {
 	vars->sz_desc= vars->num_desc= 0;
-	PR_DEBUG("Allocation failure in XkbRF_AddVarDesc\n");
+	DebugF("Allocation failure in XkbRF_AddVarDesc\n");
 	return NULL;
     }
     vars->desc[vars->num_desc].name= NULL;
@@ -1059,7 +1037,7 @@ XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name)
 							XkbRF_DescribeVarsRec);
     }
     if ((!rules->extra_names)||(!rules->extra)) {
-	PR_DEBUG("allocation error in extra parts\n");
+	DebugF("allocation error in extra parts\n");
 	rules->sz_extra= rules->num_extra= 0;
 	rules->extra_names= NULL;
 	rules->extra= NULL;
@@ -1102,7 +1080,7 @@ int			len,headingtype,extra_ndx = 0;
 		}
 		if (extra_ndx<0) {
 		    XkbRF_DescribeVarsPtr	var;
-		    PR_DEBUG1("Extra heading \"%s\" encountered\n",tok);
+		    DebugF("Extra heading \"%s\" encountered\n",tok);
 		    var= XkbRF_AddVarToDescribe(rules,tok);
 		    if (var)
 			 extra_ndx= var-rules->extra;
@@ -1113,20 +1091,20 @@ int			len,headingtype,extra_ndx = 0;
 	}
 
 	if (headingtype == HEAD_NONE) {
-	    PR_DEBUG("Must have a heading before first line of data\n");
-	    PR_DEBUG("Illegal line of data ignored\n");
+	    DebugF("Must have a heading before first line of data\n");
+	    DebugF("Illegal line of data ignored\n");
 	    continue;
 	}
 
 	len = strlen(line.line);
 	if ((tmp.name= strtok(line.line, " \t")) == NULL) {
-	    PR_DEBUG("Huh? No token on line\n");
-	    PR_DEBUG("Illegal line of data ignored\n");
+	    DebugF("Huh? No token on line\n");
+	    DebugF("Illegal line of data ignored\n");
 	    continue;
 	}
 	if (strlen(tmp.name) == len) {
-	    PR_DEBUG("No description found\n");
-	    PR_DEBUG("Illegal line of data ignored\n");
+	    DebugF("No description found\n");
+	    DebugF("Illegal line of data ignored\n");
 	    continue;
 	}
 
@@ -1134,8 +1112,8 @@ int			len,headingtype,extra_ndx = 0;
 	while ((*tok!='\n')&&isspace(*tok))
 		tok++;
 	if (*tok == '\0') {
-	    PR_DEBUG("No description found\n");
-	    PR_DEBUG("Illegal line of data ignored\n");
+	    DebugF("No description found\n");
+	    DebugF("Illegal line of data ignored\n");
 	    continue;
 	}
 	tmp.desc= tok;
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 66edcc1..bd9a87c 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -5784,10 +5784,8 @@ char *			str;
 	    return status;
     }
     else if (length!=0)  {
-#ifdef DEBUG
 	ErrorF("Internal Error!  BadLength in ProcXkbGetDeviceInfo\n");
 	ErrorF("                 Wrote %d fewer bytes than expected\n",length);
-#endif
 	return BadLength;
     }
     if (stuff->wanted&(~supported)) {
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index d95fbcd..75b8c5a 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -130,11 +130,9 @@ xEvent		xE;
     xE.u.u.type = type;
     xE.u.u.detail = keyCode;
     xE.u.keyButtonPointer.time = GetTimeInMillis();	    
-#ifdef DEBUG
     if (xkbDebugFlags&0x8) {
-	ErrorF("AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up"));
+	DebugF("AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up"));
     }
-#endif
 
     if (_XkbIsPressEvent(type))
 	XkbDDXKeyClick(keybd,keyCode,TRUE);
@@ -533,10 +531,8 @@ KeySym *	sym = XkbKeySymsPtr(xkbi->desc,key);
 		((ctrls->enabled_ctrls&(XkbSlowKeysMask|XkbRepeatKeysMask))==
 							XkbRepeatKeysMask)) {
 	    if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,key)) {
-#ifdef DEBUG
 		if (xkbDebugFlags&0x10)
-		    ErrorF("Starting software autorepeat...\n");
-#endif	    
+		    DebugF("Starting software autorepeat...\n");
 		xkbi->repeatKey = key;
 		xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer,
 					0, ctrls->repeat_delay,
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
index 7643703..49725d0 100644
--- a/xkb/xkbEvents.c
+++ b/xkb/xkbEvents.c
@@ -813,23 +813,21 @@ XkbSrvInfoPtr	xkbi;
 
     xkbi= pXDev->key->xkbInfo;
     if ( pClient->xkbClientFlags & _XkbClientInitialized ) {
-#ifdef DEBUG
 	if ((xkbDebugFlags&0x10)&&
 		((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)||
                  (xE[0].u.u.type==DeviceKeyPress)||
                  (xE[0].u.u.type == DeviceKeyRelease))) {
-	    ErrorF("XKbFilterWriteEvents:\n");
-	    ErrorF("   Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state);
-	    ErrorF("   XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n",
+	    DebugF("XKbFilterWriteEvents:\n");
+	    DebugF("   Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state);
+	    DebugF("   XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n",
 			XkbLastRepeatEvent,xE,
 			((XkbLastRepeatEvent!=(pointer)xE)?"True":"False"));
-	    ErrorF("   (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n",
+	    DebugF("   (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n",
 		pClient->xkbClientFlags,
 		(_XkbWantsDetectableAutoRepeat(pClient)?"True":"False"));
-	    ErrorF("   !IsRelease(%d) %s\n",xE[0].u.u.type,
+	    DebugF("   !IsRelease(%d) %s\n",xE[0].u.u.type,
 			(!_XkbIsReleaseEvent(xE[0].u.u.type))?"True":"False");
 	}
-#endif /* DEBUG */
 	if (	(XkbLastRepeatEvent==(pointer)xE) &&
 	     	(_XkbWantsDetectableAutoRepeat(pClient)) &&
 	     	(_XkbIsReleaseEvent(xE[0].u.u.type)) ) {
@@ -866,13 +864,11 @@ XkbSrvInfoPtr	xkbi;
 	if (xE[0].u.u.type == ButtonPress &&
 	    ((xE[0].u.keyButtonPointer.state >> 7) & button_mask) == button_mask &&
 	    (xkbi->lockedPtrButtons & button_mask) == button_mask) {
-#ifdef DEBUG
 	    /* If the MouseKeys is pressed, and the "real" mouse is also pressed
 	     * when the mouse is released, the server does not behave properly.
 	     * Faking a release of the button here solves the problem.
 	     */
-	    ErrorF("Faking release of button %d\n", xE[0].u.u.detail);
-#endif
+	    DebugF("Faking release of button %d\n", xE[0].u.u.detail);
 	    XkbDDXFakePointerButton(ButtonRelease, xE[0].u.u.detail);
         }
     }
@@ -881,21 +877,19 @@ XkbSrvInfoPtr	xkbi;
 
 	for (i=0;i<nEvents;i++) {
 	    type= xE[i].u.u.type;
-#ifdef DEBUG
 	    if ((xkbDebugFlags&0x4)&&
 		((xE[i].u.u.type==KeyPress)||(xE[i].u.u.type==KeyRelease)||
                  (xE[i].u.u.type==DeviceKeyPress)||
                  (xE[i].u.u.type == DeviceKeyRelease))) {
 		XkbStatePtr s= &xkbi->state;
-		ErrorF("XKbFilterWriteEvents (non-XKB):\n");
-		ErrorF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state);
-		ErrorF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods,
+		DebugF("XKbFilterWriteEvents (non-XKB):\n");
+		DebugF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state);
+		DebugF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods,
 							s->grab_mods);
-		ErrorF("compat lookup= 0x%02x, grab= 0x%02x\n",
+		DebugF("compat lookup= 0x%02x, grab= 0x%02x\n",
 							s->compat_lookup_mods,
 							s->compat_grab_mods);
 	    }
-#endif
 	    if ( (type>=KeyPress)&&(type<=MotionNotify) ) {
 		CARD16	old,new;
 
@@ -924,16 +918,12 @@ XkbSrvInfoPtr	xkbi;
 	    if (type == ButtonPress &&
 		((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask &&
 		(xkbi->lockedPtrButtons & button_mask) == button_mask) {
-#ifdef DEBUG
-		ErrorF("Faking release of button %d\n", xE[i].u.u.detail);
-#endif
+		DebugF("Faking release of button %d\n", xE[i].u.u.detail);
 		XkbDDXFakePointerButton(ButtonRelease, xE[i].u.u.detail);
 	    } else if (type == DeviceButtonPress &&
                     ((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask &&
                     (xkbi->lockedPtrButtons & button_mask) == button_mask) {
-#ifdef DEBUG
-		ErrorF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state);
-#endif
+		DebugF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state);
 		XkbDDXFakePointerButton(DeviceButtonRelease, ((deviceKeyButtonPointer*)&xE[i])->state);
             }
 	}
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index bb1de9d..2ac51f2 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -280,10 +280,6 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout,
 
 /***====================================================================***/
 
-#if defined(luna)
-#define	XKB_DDX_PERMANENT_LOCK	1
-#endif
-
 #include "xkbDflts.h"
 
 static Bool
@@ -390,15 +386,6 @@ Atom		unknown;
 	    names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose");
 #endif
     }
-#ifdef DEBUG_RADIO_GROUPS
-    if (names->num_rg<1) {
-	names->radio_groups= (Atom *)_XkbCalloc(RG_COUNT, sizeof(Atom));
-	if (names->radio_groups) {
-	    names->num_rg = RG_COUNT;
-	    names->radio_groups[RG_BOGUS_FUNCTION_GROUP]= CREATE_ATOM("BOGUS");
-	}
-    }
-#endif
     if (xkb->geom!=NULL)
 	 names->geometry= xkb->geom->name;
     else names->geometry= unknown;
@@ -771,9 +758,7 @@ XkbSrvLedInfoPtr	sli;
     sli= XkbFindSrvLedInfo(pXDev,XkbDfltXIClass,XkbDfltXIId,0);
     if (sli && xkbi)
 	XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask);
-#ifdef DEBUG
-    else ErrorF("No indicator feedback in XkbFinishInit (shouldn't happen)!\n");
-#endif
+    else DebugF("No indicator feedback in XkbFinishInit (shouldn't happen)!\n");
     return softRepeat;
 }
 
diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c
index 3fec4f5..69c218c 100644
--- a/xkb/xkbPrKeyEv.c
+++ b/xkb/xkbPrKeyEv.c
@@ -56,11 +56,9 @@ int             xiEvent;
     xkbi= keyc->xkbInfo;
     key= xE->u.u.detail;
     xiEvent= (xE->u.u.type & EXTENSION_EVENT_BASE);
-#ifdef DEBUG
     if (xkbDebugFlags&0x8) {
-	ErrorF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up"));
+	DebugF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up"));
     }
-#endif
 
     if ( (xkbi->repeatKey==key) && (xE->u.u.type==KeyRelease) &&
 	 ((xkbi->desc->ctrls->enabled_ctrls&XkbRepeatKeysMask)==0) ) {
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 67843e9..28d66b3 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -211,16 +211,6 @@ KeySym			tsyms[XkbMaxSymsPerKey],*syms;
 XkbMapChangesPtr	mc;
 
     xkb= pXDev->key->xkbInfo->desc;
-#ifdef NOTYET
-    if (first<xkb->min_key_code) {
-	if (first>=XkbMinLegalKeyCode) {
-	    xkb->min_key_code= first;
-	    /* 1/12/95 (ef) -- XXX! should zero out the new maps */
-	    changes->map.changed|= XkbKeycodesMask;
-/* generate a NewKeyboard notify here? */
-	}
-    }
-#endif
     if (first+num-1>xkb->max_key_code) {
 	/* 1/12/95 (ef) -- XXX! should allow XKB structures to grow */
 	num= xkb->max_key_code-first+1;
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 8829618..2bb0289 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -40,8 +40,7 @@
 #include "misc.h"
 #include "inputstr.h"
 #include "xkbstr.h"
-#define	 XKBSRV_NEED_FILE_FUNCS
-#include <xkbsrv.h>
+#include "xkbsrv.h"
 #include "xkbgeom.h"
 
 Atom
@@ -52,10 +51,6 @@ XkbInternAtom(Display *dpy,char *str,Bool only_if_exists)
     return MakeAtom(str,strlen(str),!only_if_exists);
 }
 
-#ifndef SEEK_SET
-#define	SEEK_SET 0
-#endif
-
 char *
 _XkbDupString(char *str)
 {
@@ -562,10 +557,8 @@ FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms)
 	register unsigned i;
 	for (i=0;i<xkb->map->num_types;i++) {
 	    if (xkb->map->types[i].name==name) {
-#ifdef DEBUG
 		if (xkb->map->types[i].num_levels!=width)
-		    fprintf(stderr,"Group width mismatch between key and type\n");
-#endif
+		    DebugF("Group width mismatch between key and type\n");
 		return &xkb->map->types[i];
 	    }
 	}
@@ -1086,10 +1079,8 @@ unsigned i,size_toc;
     fread(file_info,SIZEOF(xkmFileInfo),1,file);
     size_toc= file_info->num_toc;
     if (size_toc>max_toc) {
-#ifdef DEBUG
-	fprintf(stderr,"Warning! Too many TOC entries; last %d ignored\n",
+	DebugF("Warning! Too many TOC entries; last %d ignored\n",
 							size_toc-max_toc);
-#endif
 	size_toc= max_toc;
     }
     for (i=0;i<size_toc;i++) {
@@ -1227,11 +1218,7 @@ unsigned		which= need|want;
     if (result->xkb==NULL)
 	result->xkb= XkbAllocKeyboard();
     for (i=0;i<fileInfo.num_toc;i++) {
-#ifdef SEEK_SET
 	fseek(file,toc[i].offset,SEEK_SET);
-#else
-	fseek(file,toc[i].offset,0);
-#endif
 	tmp= fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file);
 	nRead= tmp*SIZEOF(xkmSectionInfo);
 	if ((tmpTOC.type!=toc[i].type)||(tmpTOC.format!=toc[i].format)||
commit 0f12a448dcbbbf1f40aa98d09c9d25ee511c5bbf
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sun Feb 3 23:15:39 2008 +1100

    XKB: Deprecate XKBSRV_NEED_FILE_FUNCS
    
    There's no point in having the function definitions be conditional, so
    whatever.

diff --git a/include/xkbfile.h b/include/xkbfile.h
new file mode 100644
index 0000000..d58bec6
--- /dev/null
+++ b/include/xkbfile.h
@@ -0,0 +1,480 @@
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ 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 Silicon Graphics not be 
+ used in advertising or publicity pertaining to distribution 
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability 
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+ 
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS 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.
+
+ ********************************************************/
+
+#ifndef _XKBFILE_H_
+#define	_XKBFILE_H_ 1
+
+/***====================================================================***/
+
+#define	XkbXKMFile	0
+#define	XkbCFile	1
+#define	XkbXKBFile	2
+#define	XkbMessage	3
+
+#define	XkbMapDefined		(1<<0)
+#define	XkbStateDefined		(1<<1)
+
+typedef struct _XkbFileInfo {
+    unsigned		type;
+    unsigned		defined;
+    XkbDescPtr	 	xkb;
+} XkbFileInfo,*XkbFileInfoPtr;
+
+typedef void	(*XkbFileAddOnFunc)(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    int			/* fileSection */,
+    void *		/* priv */
+);
+
+/***====================================================================***/
+
+#define	_XkbSuccess			0
+#define	_XkbErrMissingNames		1
+#define	_XkbErrMissingTypes		2
+#define	_XkbErrMissingReqTypes		3
+#define	_XkbErrMissingSymbols		4
+#define	_XkbErrMissingVMods		5
+#define	_XkbErrMissingIndicators	6
+#define	_XkbErrMissingCompatMap		7
+#define	_XkbErrMissingSymInterps	8
+#define	_XkbErrMissingGeometry		9
+#define	_XkbErrIllegalDoodad		10
+#define	_XkbErrIllegalTOCType		11
+#define	_XkbErrIllegalContents		12
+#define	_XkbErrEmptyFile		13
+#define	_XkbErrFileNotFound		14
+#define	_XkbErrFileCannotOpen		15
+#define	_XkbErrBadValue			16
+#define	_XkbErrBadMatch			17
+#define	_XkbErrBadTypeName		18
+#define	_XkbErrBadTypeWidth		19
+#define	_XkbErrBadFileType		20
+#define	_XkbErrBadFileVersion		21
+#define	_XkbErrBadFileFormat		22
+#define	_XkbErrBadAlloc			23
+#define	_XkbErrBadLength		24
+#define	_XkbErrXReqFailure		25
+#define	_XkbErrBadImplementation	26
+
+extern char *		_XkbErrMessages[];
+extern unsigned		_XkbErrCode;
+extern char *		_XkbErrLocation;
+extern unsigned		_XkbErrData;
+
+/***====================================================================***/
+
+_XFUNCPROTOBEGIN
+
+extern	char *	XkbIndentText(
+    unsigned	/* size */
+);
+
+extern	char *	XkbAtomText(
+    Display *	/* dpy */,
+    Atom 	/* atm */,
+    unsigned	/* format */
+);
+
+extern char *	XkbKeysymText(
+    KeySym	/* sym */,
+    unsigned	/* format */
+);
+
+extern char *	XkbStringText(
+    char *	/* str */,
+    unsigned	/* format */
+);
+
+extern char *	XkbKeyNameText(
+    char *	/* name */,
+    unsigned	/* format */
+);
+
+extern char *
+XkbModIndexText(
+    unsigned	/* ndx */,
+    unsigned	/* format */
+);
+
+extern char *
+XkbModMaskText(
+    unsigned	/* mask */,
+    unsigned	/* format */
+);
+
+extern char *	XkbVModIndexText(
+    Display *	/* dpy */,
+    XkbDescPtr	/* xkb */,
+    unsigned	/* ndx */,
+    unsigned	/* format */
+);
+
+extern	char *	XkbVModMaskText(
+    Display *	/* dpy */,
+    XkbDescPtr	/* xkb */,
+    unsigned	/* modMask */,
+    unsigned	/* mask */,
+    unsigned	/* format */
+);
+
+extern char *	XkbConfigText(
+    unsigned 	/* config */,
+    unsigned 	/* format */
+);
+
+extern char *	XkbSIMatchText(
+    unsigned	/* type */,
+    unsigned	/* format */
+);
+
+extern char *	XkbIMWhichStateMaskText(
+    unsigned	/* use_which */,
+    unsigned	/* format */
+);
+
+extern char *	XkbAccessXDetailText(
+    unsigned	/* state */,
+    unsigned	/* format */
+);
+
+extern char *	XkbNKNDetailMaskText(
+    unsigned	/* detail */,
+    unsigned	/* format */
+);
+
+extern char *	XkbControlsMaskText(
+    unsigned	/* ctrls */,
+    unsigned	/* format */
+);
+
+extern char *	XkbGeomFPText(
+    int		/* val */,
+    unsigned 	/* format */
+);
+
+extern char *	XkbDoodadTypeText(
+    unsigned	/* type */,
+    unsigned	/* format */
+);
+
+extern char *	XkbActionTypeText(
+    unsigned	/* type */,
+    unsigned	/* format */
+);
+
+extern char *	XkbActionText(
+    Display *	/* dpy */,
+    XkbDescPtr	/* xkb */,
+    XkbAction *	/* action */,
+    unsigned	/* format */
+);
+
+extern char *	XkbBehaviorText(
+    XkbDescPtr 		/* xkb */,
+    XkbBehavior *	/* behavior */,
+    unsigned		/* format */
+);
+
+/***====================================================================***/
+
+#define	_XkbKSLower	(1<<0)
+#define	_XkbKSUpper	(1<<1)
+
+#define	XkbKSIsLower(k)		(_XkbKSCheckCase(k)&_XkbKSLower)
+#define	XkbKSIsUpper(k)		(_XkbKSCheckCase(k)&_XkbKSUpper)
+#define XkbKSIsKeypad(k)	(((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal))
+#define	XkbKSIsDeadKey(k)	\
+		(((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
+
+extern	unsigned _XkbKSCheckCase(
+   KeySym	/* sym */
+);
+
+extern	int	 XkbFindKeycodeByName(
+    XkbDescPtr	/* xkb */,
+    char *	/* name */,
+    Bool	/* use_aliases */
+);
+
+extern	Bool	XkbLookupGroupAndLevel(
+    XkbDescPtr	/* xkb */,
+    int		/* key */,
+    int	*	/* mods_inout */,
+    int *	/* grp_inout */,
+    int	*	/* lvl_rtrn */
+);
+
+/***====================================================================***/
+
+extern	char *	XkbAtomGetString(
+    Display *	/* dpy */,
+    Atom 	/* atm */
+);
+
+extern	Atom	XkbInternAtom(
+    Display *	/* dpy */,
+    char *	/* name */,
+    Bool	/* onlyIfExists */
+);
+
+extern	Status	XkbChangeKbdDisplay(
+    Display *		/* newDpy */,
+    XkbFileInfo *	/* result */
+);
+
+extern	Atom	XkbChangeAtomDisplay(
+    Display *	/* oldDpy */,
+    Display *	/* newDpy */,
+    Atom	/* atm */
+);
+
+extern	void	XkbInitAtoms(
+    Display *	/* dpy */
+);
+
+/***====================================================================***/
+
+#ifdef _XKBGEOM_H_
+
+#define	XkbDW_Unknown	0
+#define	XkbDW_Doodad	1
+#define	XkbDW_Section	2
+typedef struct _XkbDrawable {
+	int		type;
+	int		priority;
+	union {
+	    XkbDoodadPtr	doodad;
+	    XkbSectionPtr	section;
+	} u;
+	struct _XkbDrawable *	next;
+} XkbDrawableRec,*XkbDrawablePtr; 
+
+extern	XkbDrawablePtr
+XkbGetOrderedDrawables(
+    XkbGeometryPtr	/* geom */,
+    XkbSectionPtr	/* section */
+);
+
+extern	void
+XkbFreeOrderedDrawables(
+    XkbDrawablePtr	/* draw */
+);
+
+#endif
+
+/***====================================================================***/
+
+extern	unsigned	XkbConvertGetByNameComponents(
+    Bool		/* toXkm */,
+    unsigned 		/* orig */
+);
+
+extern	unsigned	XkbConvertXkbComponents(
+    Bool		/* toXkm */,
+    unsigned 		/* orig */
+);
+
+extern	Bool	XkbDetermineFileType(
+    XkbFileInfo *	/* xkb */,
+    int			/* format */,
+    int *		/* opts_missing */
+);
+
+extern	Bool	XkbNameMatchesPattern(
+    char *		/* name */,
+    char *		/* pattern */
+);
+
+/***====================================================================***/
+
+extern	Bool	XkbWriteXKBKeycodes(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBKeyTypes(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBCompatMap(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBSymbols(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBGeometry(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBSemantics(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBLayout(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBKeymap(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBFile(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteCFile(
+    FILE *		/* file */,
+    char *		/* name */,
+    XkbFileInfo *	/* info */
+);
+
+extern	Bool	XkbWriteXKMFile(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */
+);
+
+extern	Bool	XkbWriteToServer(
+    XkbFileInfo *	/* result */
+);
+
+extern	void	XkbEnsureSafeMapName(
+    char *		/* name */
+);
+
+extern	Bool	XkbWriteXKBKeymapForNames(
+    FILE *			/* file */,
+    XkbComponentNamesPtr	/* names */,
+    Display *			/* dpy */,
+    XkbDescPtr			/* xkb */,
+    unsigned			/* want */,
+    unsigned			/* need */
+);
+
+extern	Status	XkbMergeFile(
+    XkbDescPtr			/* xkb */,
+    XkbFileInfo			/* finfo */
+);
+
+/***====================================================================***/
+
+extern Bool	XkmProbe(
+    FILE *		/* file */
+);
+
+extern unsigned XkbReadFromServer(
+    Display *		/* dpy */,
+    unsigned		/* need */,
+    unsigned		/* want */,
+    XkbFileInfo *	/* result */
+);
+
+extern unsigned	XkmReadFile(
+    FILE *		/* file */,
+    unsigned		/* need */,
+    unsigned		/* want */,
+    XkbFileInfo *	/* result */
+);
+
+#ifdef _XKMFORMAT_H_
+
+extern Bool	XkmReadTOC(
+    FILE *              /* file */,
+    xkmFileInfo *       /* file_info */,
+    int                 /* max_toc */,
+    xkmSectionInfo *    /* toc */
+);
+
+extern xkmSectionInfo *XkmFindTOCEntry(
+    xkmFileInfo *       /* finfo */,
+    xkmSectionInfo *    /* toc */,
+    unsigned            /* type */
+);
+
+extern Bool	XkmReadFileSection(
+    FILE *              /* file */,
+    xkmSectionInfo *    /* toc */,
+    XkbFileInfo *       /* result */,
+    unsigned *          /* loaded_rtrn */
+);
+
+extern char *	XkmReadFileSectionName(
+    FILE *		/* file */,
+    xkmSectionInfo *	/* toc */
+);
+
+#endif /* _XKMFORMAT_H  */
+
+_XFUNCPROTOEND
+
+#endif /* _XKBFILE_H_ */
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index e825f33..df9aefc 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -124,8 +124,6 @@ typedef struct	_XkbEventCause {
 #define	_BEEP_LED_CHANGE	14
 #define	_BEEP_BOUNCE_REJECT	15
 
-struct _XkbSrvInfo; /* definition see below */
-
 typedef struct _XkbFilter {
 	CARD16			  keycode;
 	CARD8			  what;
@@ -317,13 +315,8 @@ extern	int	DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
 extern	int	DeviceButtonPress,DeviceButtonRelease;
 extern	int	DeviceEnterNotify,DeviceLeaveNotify;
 
-#ifdef XINPUT
 #define	_XkbIsPressEvent(t)	(((t)==KeyPress)||((t)==DeviceKeyPress))
 #define	_XkbIsReleaseEvent(t)	(((t)==KeyRelease)||((t)==DeviceKeyRelease))
-#else
-#define	_XkbIsPressEvent(t)	((t)==KeyPress)
-#define	_XkbIsReleaseEvent(t)	((t)==KeyRelease)
-#endif
 
 #define	_XkbCoreKeycodeInRange(c,k)	(((k)>=(c)->curKeySyms.minKeyCode)&&\
 					 ((k)<=(c)->curKeySyms.maxKeyCode))
@@ -343,14 +336,6 @@ extern	int	DeviceEnterNotify,DeviceLeaveNotify;
 #define	False	0
 #endif
 
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define	PATH_MAX MAXPATHLEN
-#else
-#define	PATH_MAX 1024
-#endif
-#endif
-
 _XFUNCPROTOBEGIN
 
 extern void XkbUseMsg(
@@ -987,10 +972,8 @@ extern void XkbSendNewKeyboardNotify(
 	xkbNewKeyboardNotify *	/* pNKN */
 );
 
-#ifdef XKBSRV_NEED_FILE_FUNCS
-
+#include "xkbfile.h"
 #include <X11/extensions/XKMformat.h>
-#include <X11/extensions/XKBfile.h>
 #include <X11/extensions/XKBrules.h>
 
 #define	_XkbListKeymaps		0
@@ -1053,8 +1036,6 @@ extern	int _XkbStrCaseCmp(
 	char *			/* str2 */
 );
 
-#endif /* XKBSRV_NEED_FILE_FUNCS */
-
 _XFUNCPROTOEND
 
 #define	XkbAtomGetString(d,s)	NameForAtom(s)
diff --git a/xkb/xkbfile.h b/xkb/xkbfile.h
deleted file mode 100644
index d58bec6..0000000
--- a/xkb/xkbfile.h
+++ /dev/null
@@ -1,480 +0,0 @@
-/************************************************************
- Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
-
- 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 Silicon Graphics not be 
- used in advertising or publicity pertaining to distribution 
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability 
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
- 
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS 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.
-
- ********************************************************/
-
-#ifndef _XKBFILE_H_
-#define	_XKBFILE_H_ 1
-
-/***====================================================================***/
-
-#define	XkbXKMFile	0
-#define	XkbCFile	1
-#define	XkbXKBFile	2
-#define	XkbMessage	3
-
-#define	XkbMapDefined		(1<<0)
-#define	XkbStateDefined		(1<<1)
-
-typedef struct _XkbFileInfo {
-    unsigned		type;
-    unsigned		defined;
-    XkbDescPtr	 	xkb;
-} XkbFileInfo,*XkbFileInfoPtr;
-
-typedef void	(*XkbFileAddOnFunc)(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    int			/* fileSection */,
-    void *		/* priv */
-);
-
-/***====================================================================***/
-
-#define	_XkbSuccess			0
-#define	_XkbErrMissingNames		1
-#define	_XkbErrMissingTypes		2
-#define	_XkbErrMissingReqTypes		3
-#define	_XkbErrMissingSymbols		4
-#define	_XkbErrMissingVMods		5
-#define	_XkbErrMissingIndicators	6
-#define	_XkbErrMissingCompatMap		7
-#define	_XkbErrMissingSymInterps	8
-#define	_XkbErrMissingGeometry		9
-#define	_XkbErrIllegalDoodad		10
-#define	_XkbErrIllegalTOCType		11
-#define	_XkbErrIllegalContents		12
-#define	_XkbErrEmptyFile		13
-#define	_XkbErrFileNotFound		14
-#define	_XkbErrFileCannotOpen		15
-#define	_XkbErrBadValue			16
-#define	_XkbErrBadMatch			17
-#define	_XkbErrBadTypeName		18
-#define	_XkbErrBadTypeWidth		19
-#define	_XkbErrBadFileType		20
-#define	_XkbErrBadFileVersion		21
-#define	_XkbErrBadFileFormat		22
-#define	_XkbErrBadAlloc			23
-#define	_XkbErrBadLength		24
-#define	_XkbErrXReqFailure		25
-#define	_XkbErrBadImplementation	26
-
-extern char *		_XkbErrMessages[];
-extern unsigned		_XkbErrCode;
-extern char *		_XkbErrLocation;
-extern unsigned		_XkbErrData;
-
-/***====================================================================***/
-
-_XFUNCPROTOBEGIN
-
-extern	char *	XkbIndentText(
-    unsigned	/* size */
-);
-
-extern	char *	XkbAtomText(
-    Display *	/* dpy */,
-    Atom 	/* atm */,
-    unsigned	/* format */
-);
-
-extern char *	XkbKeysymText(
-    KeySym	/* sym */,
-    unsigned	/* format */
-);
-
-extern char *	XkbStringText(
-    char *	/* str */,
-    unsigned	/* format */
-);
-
-extern char *	XkbKeyNameText(
-    char *	/* name */,
-    unsigned	/* format */
-);
-
-extern char *
-XkbModIndexText(
-    unsigned	/* ndx */,
-    unsigned	/* format */
-);
-
-extern char *
-XkbModMaskText(
-    unsigned	/* mask */,
-    unsigned	/* format */
-);
-
-extern char *	XkbVModIndexText(
-    Display *	/* dpy */,
-    XkbDescPtr	/* xkb */,
-    unsigned	/* ndx */,
-    unsigned	/* format */
-);
-
-extern	char *	XkbVModMaskText(
-    Display *	/* dpy */,
-    XkbDescPtr	/* xkb */,
-    unsigned	/* modMask */,
-    unsigned	/* mask */,
-    unsigned	/* format */
-);
-
-extern char *	XkbConfigText(
-    unsigned 	/* config */,
-    unsigned 	/* format */
-);
-
-extern char *	XkbSIMatchText(
-    unsigned	/* type */,
-    unsigned	/* format */
-);
-
-extern char *	XkbIMWhichStateMaskText(
-    unsigned	/* use_which */,
-    unsigned	/* format */
-);
-
-extern char *	XkbAccessXDetailText(
-    unsigned	/* state */,
-    unsigned	/* format */
-);
-
-extern char *	XkbNKNDetailMaskText(
-    unsigned	/* detail */,
-    unsigned	/* format */
-);
-
-extern char *	XkbControlsMaskText(
-    unsigned	/* ctrls */,
-    unsigned	/* format */
-);
-
-extern char *	XkbGeomFPText(
-    int		/* val */,
-    unsigned 	/* format */
-);
-
-extern char *	XkbDoodadTypeText(
-    unsigned	/* type */,
-    unsigned	/* format */
-);
-
-extern char *	XkbActionTypeText(
-    unsigned	/* type */,
-    unsigned	/* format */
-);
-
-extern char *	XkbActionText(
-    Display *	/* dpy */,
-    XkbDescPtr	/* xkb */,
-    XkbAction *	/* action */,
-    unsigned	/* format */
-);
-
-extern char *	XkbBehaviorText(
-    XkbDescPtr 		/* xkb */,
-    XkbBehavior *	/* behavior */,
-    unsigned		/* format */
-);
-
-/***====================================================================***/
-
-#define	_XkbKSLower	(1<<0)
-#define	_XkbKSUpper	(1<<1)
-
-#define	XkbKSIsLower(k)		(_XkbKSCheckCase(k)&_XkbKSLower)
-#define	XkbKSIsUpper(k)		(_XkbKSCheckCase(k)&_XkbKSUpper)
-#define XkbKSIsKeypad(k)	(((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal))
-#define	XkbKSIsDeadKey(k)	\
-		(((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
-
-extern	unsigned _XkbKSCheckCase(
-   KeySym	/* sym */
-);
-
-extern	int	 XkbFindKeycodeByName(
-    XkbDescPtr	/* xkb */,
-    char *	/* name */,
-    Bool	/* use_aliases */
-);
-
-extern	Bool	XkbLookupGroupAndLevel(
-    XkbDescPtr	/* xkb */,
-    int		/* key */,
-    int	*	/* mods_inout */,
-    int *	/* grp_inout */,
-    int	*	/* lvl_rtrn */
-);
-
-/***====================================================================***/
-
-extern	char *	XkbAtomGetString(
-    Display *	/* dpy */,
-    Atom 	/* atm */
-);
-
-extern	Atom	XkbInternAtom(
-    Display *	/* dpy */,
-    char *	/* name */,
-    Bool	/* onlyIfExists */
-);
-
-extern	Status	XkbChangeKbdDisplay(
-    Display *		/* newDpy */,
-    XkbFileInfo *	/* result */
-);
-
-extern	Atom	XkbChangeAtomDisplay(
-    Display *	/* oldDpy */,
-    Display *	/* newDpy */,
-    Atom	/* atm */
-);
-
-extern	void	XkbInitAtoms(
-    Display *	/* dpy */
-);
-
-/***====================================================================***/
-
-#ifdef _XKBGEOM_H_
-
-#define	XkbDW_Unknown	0
-#define	XkbDW_Doodad	1
-#define	XkbDW_Section	2
-typedef struct _XkbDrawable {
-	int		type;
-	int		priority;
-	union {
-	    XkbDoodadPtr	doodad;
-	    XkbSectionPtr	section;
-	} u;
-	struct _XkbDrawable *	next;
-} XkbDrawableRec,*XkbDrawablePtr; 
-
-extern	XkbDrawablePtr
-XkbGetOrderedDrawables(
-    XkbGeometryPtr	/* geom */,
-    XkbSectionPtr	/* section */
-);
-
-extern	void
-XkbFreeOrderedDrawables(
-    XkbDrawablePtr	/* draw */
-);
-
-#endif
-
-/***====================================================================***/
-
-extern	unsigned	XkbConvertGetByNameComponents(
-    Bool		/* toXkm */,
-    unsigned 		/* orig */
-);
-
-extern	unsigned	XkbConvertXkbComponents(
-    Bool		/* toXkm */,
-    unsigned 		/* orig */
-);
-
-extern	Bool	XkbDetermineFileType(
-    XkbFileInfo *	/* xkb */,
-    int			/* format */,
-    int *		/* opts_missing */
-);
-
-extern	Bool	XkbNameMatchesPattern(
-    char *		/* name */,
-    char *		/* pattern */
-);
-
-/***====================================================================***/
-
-extern	Bool	XkbWriteXKBKeycodes(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteXKBKeyTypes(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteXKBCompatMap(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteXKBSymbols(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteXKBGeometry(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteXKBSemantics(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteXKBLayout(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteXKBKeymap(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* topLevel */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteXKBFile(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */,
-    Bool		/* showImplicit */,
-    XkbFileAddOnFunc	/* addOn */,
-    void *		/* priv */
-);
-
-extern	Bool	XkbWriteCFile(
-    FILE *		/* file */,
-    char *		/* name */,
-    XkbFileInfo *	/* info */
-);
-
-extern	Bool	XkbWriteXKMFile(
-    FILE *		/* file */,
-    XkbFileInfo *	/* result */
-);
-
-extern	Bool	XkbWriteToServer(
-    XkbFileInfo *	/* result */
-);
-
-extern	void	XkbEnsureSafeMapName(
-    char *		/* name */
-);
-
-extern	Bool	XkbWriteXKBKeymapForNames(
-    FILE *			/* file */,
-    XkbComponentNamesPtr	/* names */,
-    Display *			/* dpy */,
-    XkbDescPtr			/* xkb */,
-    unsigned			/* want */,
-    unsigned			/* need */
-);
-
-extern	Status	XkbMergeFile(
-    XkbDescPtr			/* xkb */,
-    XkbFileInfo			/* finfo */
-);
-
-/***====================================================================***/
-
-extern Bool	XkmProbe(
-    FILE *		/* file */
-);
-
-extern unsigned XkbReadFromServer(
-    Display *		/* dpy */,
-    unsigned		/* need */,
-    unsigned		/* want */,
-    XkbFileInfo *	/* result */
-);
-
-extern unsigned	XkmReadFile(
-    FILE *		/* file */,
-    unsigned		/* need */,
-    unsigned		/* want */,
-    XkbFileInfo *	/* result */
-);
-
-#ifdef _XKMFORMAT_H_
-
-extern Bool	XkmReadTOC(
-    FILE *              /* file */,
-    xkmFileInfo *       /* file_info */,
-    int                 /* max_toc */,
-    xkmSectionInfo *    /* toc */
-);
-
-extern xkmSectionInfo *XkmFindTOCEntry(
-    xkmFileInfo *       /* finfo */,
-    xkmSectionInfo *    /* toc */,
-    unsigned            /* type */
-);
-
-extern Bool	XkmReadFileSection(
-    FILE *              /* file */,
-    xkmSectionInfo *    /* toc */,
-    XkbFileInfo *       /* result */,
-    unsigned *          /* loaded_rtrn */
-);
-
-extern char *	XkmReadFileSectionName(
-    FILE *		/* file */,
-    xkmSectionInfo *	/* toc */
-);
-
-#endif /* _XKMFORMAT_H  */
-
-_XFUNCPROTOEND
-
-#endif /* _XKBFILE_H_ */
commit 68bd7ac1930b5cffb6657b8d5f5bf8ae58eae8d9
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sun Feb 3 23:12:15 2008 +1100

    XKB: Move headers into the server tree
    
    We need to start breaking the XKB API to enforce sanity, so drag whichever
    headers we need to do so into the server tree, as the client API is set in
    stone, being part of Xlib.

diff --git a/hw/dmx/examples/xinput.c b/hw/dmx/examples/xinput.c
index 74353a9..b6753e4 100644
--- a/hw/dmx/examples/xinput.c
+++ b/hw/dmx/examples/xinput.c
@@ -38,7 +38,7 @@
 #include <X11/XKBlib.h>
 #include <X11/extensions/XInput.h>
 #include <X11/extensions/XKB.h>
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #include <X11/extensions/dmxext.h>
 #include <sys/time.h>
 
diff --git a/hw/dmx/examples/xled.c b/hw/dmx/examples/xled.c
index 270f805..322dda2 100644
--- a/hw/dmx/examples/xled.c
+++ b/hw/dmx/examples/xled.c
@@ -37,7 +37,7 @@
 #include <X11/Xlib.h>
 #include <X11/XKBlib.h>
 #include <X11/extensions/XKB.h>
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #include <sys/time.h>
 
 int main(int argc, char **argv)
diff --git a/hw/xfree86/utils/xorgcfg/text-mode.c b/hw/xfree86/utils/xorgcfg/text-mode.c
index 0b6e654..c1fa67e 100644
--- a/hw/xfree86/utils/xorgcfg/text-mode.c
+++ b/hw/xfree86/utils/xorgcfg/text-mode.c
@@ -39,7 +39,7 @@
 #endif
 #include <ctype.h>
 #include <X11/Xlib.h>
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #include <X11/extensions/XKBrules.h>
 #include "cards.h"
 #include "config.h"
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index 30eb831..d537aba 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -106,7 +106,7 @@
 #include <sys/stat.h>
 
 #include <X11/Xlib.h>
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #include <X11/extensions/XKBrules.h>
 #define MAX_XKBOPTIONS	5
 
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index c7709f7..e825f33 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -27,7 +27,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef _XKBSRV_H_
 #define	_XKBSRV_H_
 
-#ifdef XKB_IN_SERVER
 #define XkbAllocClientMap		SrvXkbAllocClientMap
 #define XkbAllocServerMap		SrvXkbAllocServerMap
 #define XkbChangeTypesOfKey		SrvXkbChangeTypesOfKey
@@ -52,10 +51,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #define XkbVirtualModsToReal		SrvXkbVirtualModsToReal
 #define	XkbChangeKeycodeRange		SrvXkbChangeKeycodeRange
 #define	XkbApplyVirtualModChanges	SrvXkbApplyVirtualModChanges
-#endif
 
-#include <X11/extensions/XKBstr.h>
 #include <X11/extensions/XKBproto.h>
+#include "xkbstr.h"
 #include "inputstr.h"
 
 typedef struct _XkbInterest {
diff --git a/include/xkbstr.h b/include/xkbstr.h
new file mode 100644
index 0000000..e519e65
--- /dev/null
+++ b/include/xkbstr.h
@@ -0,0 +1,613 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+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 Silicon Graphics not be 
+used in advertising or publicity pertaining to distribution 
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability 
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS 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.
+
+********************************************************/
+
+#ifndef _XKBSTR_H_
+#define	_XKBSTR_H_
+
+#include <X11/extensions/XKB.h>
+
+#define	XkbCharToInt(v)		((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
+#define	XkbIntTo2Chars(i,h,l)	(((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
+
+#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
+#define	Xkb2CharsToInt(h,l)	((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\
+					  (int)(((h)<<8)|(l)&0x7fff))
+#else
+#define	Xkb2CharsToInt(h,l)	((short)(((h)<<8)|(l)))
+#endif
+
+	/*
+	 * Common data structures and access macros
+	 */
+
+typedef struct _XkbStateRec {
+	unsigned char	group;
+	unsigned char   locked_group;
+	unsigned short	base_group;
+	unsigned short	latched_group;
+	unsigned char	mods;
+	unsigned char	base_mods;
+	unsigned char	latched_mods;
+	unsigned char	locked_mods;
+	unsigned char	compat_state;
+	unsigned char	grab_mods;
+	unsigned char	compat_grab_mods;
+	unsigned char	lookup_mods;
+	unsigned char	compat_lookup_mods;
+	unsigned short	ptr_buttons;
+} XkbStateRec,*XkbStatePtr;
+#define	XkbModLocks(s)	 ((s)->locked_mods)
+#define	XkbStateMods(s)	 ((s)->base_mods|(s)->latched_mods|XkbModLocks(s))
+#define	XkbGroupLock(s)	 ((s)->locked_group)
+#define	XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s))
+#define	XkbStateFieldFromRec(s)	XkbBuildCoreState((s)->lookup_mods,(s)->group)
+#define	XkbGrabStateFromRec(s)	XkbBuildCoreState((s)->grab_mods,(s)->group)
+
+typedef struct _XkbMods {
+	unsigned char	mask;	/* effective mods */
+	unsigned char	real_mods;
+	unsigned short	vmods;
+} XkbModsRec,*XkbModsPtr;
+
+typedef struct _XkbKTMapEntry {
+	Bool		active;
+	unsigned char	level;
+	XkbModsRec	mods;
+} XkbKTMapEntryRec,*XkbKTMapEntryPtr;
+
+typedef struct _XkbKeyType {
+	XkbModsRec		mods;
+	unsigned char	  	num_levels;
+	unsigned char	  	map_count;
+	XkbKTMapEntryPtr  	map;
+	XkbModsPtr  		preserve;
+	Atom		  	name;
+	Atom *			level_names;
+} XkbKeyTypeRec, *XkbKeyTypePtr;
+
+#define	XkbNumGroups(g)			((g)&0x0f)
+#define	XkbOutOfRangeGroupInfo(g)	((g)&0xf0)
+#define	XkbOutOfRangeGroupAction(g)	((g)&0xc0)
+#define	XkbOutOfRangeGroupNumber(g)	(((g)&0x30)>>4)
+#define	XkbSetGroupInfo(g,w,n)	(((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
+#define	XkbSetNumGroups(g,n)	(((g)&0xf0)|((n)&0x0f))
+
+	/*
+	 * Structures and access macros used primarily by the server
+	 */
+
+typedef struct _XkbBehavior {
+	unsigned char	type;
+	unsigned char	data;
+} XkbBehavior;
+
+#define	XkbAnyActionDataSize 7
+typedef	struct _XkbAnyAction {
+	unsigned char	type;
+	unsigned char	data[XkbAnyActionDataSize];
+} XkbAnyAction;
+
+typedef struct _XkbModAction {
+	unsigned char	type;
+	unsigned char	flags;
+	unsigned char	mask;
+	unsigned char	real_mods;
+	unsigned char	vmods1;
+	unsigned char	vmods2;
+} XkbModAction;
+#define	XkbModActionVMods(a)      \
+	((short)(((a)->vmods1<<8)|((a)->vmods2)))
+#define	XkbSetModActionVMods(a,v) \
+	(((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
+
+typedef struct _XkbGroupAction {
+	unsigned char	type;
+	unsigned char	flags;
+	char		group_XXX;
+} XkbGroupAction;
+#define	XkbSAGroup(a)		(XkbCharToInt((a)->group_XXX))
+#define	XkbSASetGroup(a,g)	((a)->group_XXX=(g))
+
+typedef struct _XkbISOAction {
+	unsigned char	type;
+	unsigned char	flags;
+	unsigned char	mask;
+	unsigned char	real_mods;
+	char		group_XXX;
+	unsigned char	affect;
+	unsigned char	vmods1;
+	unsigned char	vmods2;
+} XkbISOAction;
+
+typedef struct _XkbPtrAction {
+	unsigned char	type;
+	unsigned char	flags;
+	unsigned char	high_XXX;
+	unsigned char	low_XXX;
+	unsigned char	high_YYY;
+	unsigned char	low_YYY;
+} XkbPtrAction;
+#define	XkbPtrActionX(a)      (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
+#define	XkbPtrActionY(a)      (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
+#define	XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
+#define	XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
+
+typedef struct _XkbPtrBtnAction {
+	unsigned char	type;
+	unsigned char	flags;
+	unsigned char	count;
+	unsigned char	button;
+} XkbPtrBtnAction;
+
+typedef struct _XkbPtrDfltAction {
+	unsigned char	type;
+	unsigned char	flags;
+	unsigned char	affect;
+	char		valueXXX;
+} XkbPtrDfltAction;
+#define	XkbSAPtrDfltValue(a)		(XkbCharToInt((a)->valueXXX))
+#define	XkbSASetPtrDfltValue(a,c)	((a)->valueXXX= ((c)&0xff))
+
+typedef struct _XkbSwitchScreenAction {
+	unsigned char	type;
+	unsigned char	flags;
+	char		screenXXX;
+} XkbSwitchScreenAction;
+#define	XkbSAScreen(a)			(XkbCharToInt((a)->screenXXX))
+#define	XkbSASetScreen(a,s)		((a)->screenXXX= ((s)&0xff))
+
+typedef struct _XkbCtrlsAction {
+	unsigned char	type;
+	unsigned char	flags;
+	unsigned char	ctrls3;
+	unsigned char	ctrls2;
+	unsigned char	ctrls1;
+	unsigned char	ctrls0;
+} XkbCtrlsAction;
+#define	XkbActionSetCtrls(a,c)	(((a)->ctrls3=(((c)>>24)&0xff)),\
+					((a)->ctrls2=(((c)>>16)&0xff)),\
+					((a)->ctrls1=(((c)>>8)&0xff)),\
+					((a)->ctrls0=((c)&0xff)))
+#define	XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
+			   (((unsigned int)(a)->ctrls2)<<16)|\
+			   (((unsigned int)(a)->ctrls1)<<8)|\
+			   ((unsigned int)((a)->ctrls0)))
+
+typedef struct _XkbMessageAction {
+	unsigned char	type;
+	unsigned char	flags;
+	unsigned char	message[6];
+} XkbMessageAction;
+
+typedef struct	_XkbRedirectKeyAction {
+	unsigned char	type;
+	unsigned char	new_key;
+	unsigned char	mods_mask;
+	unsigned char	mods;
+	unsigned char	vmods_mask0;
+	unsigned char	vmods_mask1;
+	unsigned char	vmods0;
+	unsigned char	vmods1;
+} XkbRedirectKeyAction;
+
+#define	XkbSARedirectVMods(a)		((((unsigned int)(a)->vmods1)<<8)|\
+					((unsigned int)(a)->vmods0))
+#define	XkbSARedirectSetVMods(a,m)	(((a)->vmods_mask1=(((m)>>8)&0xff)),\
+					 ((a)->vmods_mask0=((m)&0xff)))
+#define	XkbSARedirectVModsMask(a)	((((unsigned int)(a)->vmods_mask1)<<8)|\
+					((unsigned int)(a)->vmods_mask0))
+#define	XkbSARedirectSetVModsMask(a,m)	(((a)->vmods_mask1=(((m)>>8)&0xff)),\
+					 ((a)->vmods_mask0=((m)&0xff)))
+
+typedef struct _XkbDeviceBtnAction {
+	unsigned char	type;
+	unsigned char	flags;
+	unsigned char	count;
+	unsigned char	button;
+	unsigned char	device;
+} XkbDeviceBtnAction;
+
+typedef struct _XkbDeviceValuatorAction {
+	unsigned char	type;
+	unsigned char	device;
+	unsigned char	v1_what;
+	unsigned char	v1_ndx;
+	unsigned char	v1_value;
+	unsigned char	v2_what;
+	unsigned char	v2_ndx;
+	unsigned char	v2_value;
+} XkbDeviceValuatorAction;
+
+typedef	union _XkbAction {
+	XkbAnyAction		any;
+	XkbModAction		mods;
+	XkbGroupAction		group;
+	XkbISOAction		iso;
+	XkbPtrAction		ptr;
+	XkbPtrBtnAction		btn;
+	XkbPtrDfltAction	dflt;
+	XkbSwitchScreenAction	screen;
+	XkbCtrlsAction		ctrls;
+	XkbMessageAction	msg;
+	XkbRedirectKeyAction	redirect;
+	XkbDeviceBtnAction	devbtn;
+	XkbDeviceValuatorAction	devval;
+	unsigned char 		type;
+} XkbAction;
+
+typedef	struct _XkbControls {
+	unsigned char	mk_dflt_btn;
+	unsigned char	num_groups;
+	unsigned char	groups_wrap;
+	XkbModsRec	internal;
+	XkbModsRec	ignore_lock;
+	unsigned int	enabled_ctrls;
+	unsigned short	repeat_delay;
+	unsigned short	repeat_interval;
+	unsigned short	slow_keys_delay;
+	unsigned short	debounce_delay;
+	unsigned short	mk_delay;
+	unsigned short	mk_interval;
+	unsigned short	mk_time_to_max;
+	unsigned short	mk_max_speed;
+		 short	mk_curve;
+	unsigned short	ax_options;
+	unsigned short	ax_timeout;
+	unsigned short	axt_opts_mask;
+	unsigned short	axt_opts_values;
+	unsigned int	axt_ctrls_mask;
+	unsigned int	axt_ctrls_values;
+	unsigned char	per_key_repeat[XkbPerKeyBitArraySize];
+} XkbControlsRec, *XkbControlsPtr;
+
+#define	XkbAX_AnyFeedback(c)	((c)->enabled_ctrls&XkbAccessXFeedbackMask)
+#define	XkbAX_NeedOption(c,w)	((c)->ax_options&(w))
+#define	XkbAX_NeedFeedback(c,w)	(XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
+
+typedef struct _XkbServerMapRec {
+	unsigned short		 num_acts;
+	unsigned short		 size_acts;
+	XkbAction		*acts;
+
+	XkbBehavior		*behaviors;
+	unsigned short		*key_acts;
+#if defined(__cplusplus) || defined(c_plusplus)
+	/* explicit is a C++ reserved word */
+	unsigned char		*c_explicit;
+#else
+	unsigned char		*explicit;
+#endif
+	unsigned char		 vmods[XkbNumVirtualMods];
+	unsigned short		*vmodmap;
+} XkbServerMapRec, *XkbServerMapPtr;
+
+#define	XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
+
+	/*
+	 * Structures and access macros used primarily by clients
+	 */
+
+typedef	struct _XkbSymMapRec {
+	unsigned char	 kt_index[XkbNumKbdGroups];
+	unsigned char	 group_info;
+	unsigned char	 width;
+	unsigned short	 offset;
+} XkbSymMapRec, *XkbSymMapPtr;
+
+typedef struct _XkbClientMapRec {
+	unsigned char		 size_types;
+	unsigned char		 num_types;
+	XkbKeyTypePtr		 types;
+
+	unsigned short		 size_syms;
+	unsigned short		 num_syms;
+	KeySym			*syms;
+	XkbSymMapPtr		 key_sym_map;
+
+	unsigned char		*modmap;
+} XkbClientMapRec, *XkbClientMapPtr;
+
+#define	XkbCMKeyGroupInfo(m,k)  ((m)->key_sym_map[k].group_info)
+#define	XkbCMKeyNumGroups(m,k)	 (XkbNumGroups((m)->key_sym_map[k].group_info))
+#define	XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
+#define	XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
+#define	XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
+#define	XkbCMKeyType(m,k,g)	 (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
+#define	XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
+#define	XkbCMKeySymsOffset(m,k)	((m)->key_sym_map[k].offset)
+#define	XkbCMKeySymsPtr(m,k)	(&(m)->syms[XkbCMKeySymsOffset(m,k)])
+
+	/*
+	 * Compatibility structures and access macros
+	 */
+
+typedef struct _XkbSymInterpretRec {
+	KeySym		sym;
+	unsigned char	flags;
+	unsigned char	match;
+	unsigned char	mods;
+	unsigned char	virtual_mod;
+	XkbAnyAction	act;
+} XkbSymInterpretRec,*XkbSymInterpretPtr;
+
+typedef struct _XkbCompatMapRec {
+	XkbSymInterpretPtr	 sym_interpret;
+	XkbModsRec		 groups[XkbNumKbdGroups];
+	unsigned short		 num_si;
+	unsigned short		 size_si;
+} XkbCompatMapRec, *XkbCompatMapPtr;
+
+typedef struct _XkbIndicatorMapRec {
+	unsigned char	flags;
+	unsigned char	which_groups;
+	unsigned char	groups;
+	unsigned char	which_mods;
+	XkbModsRec	mods;
+	unsigned int	ctrls;
+} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
+
+#define	XkbIM_IsAuto(i)	((((i)->flags&XkbIM_NoAutomatic)==0)&&\
+			    (((i)->which_groups&&(i)->groups)||\
+			     ((i)->which_mods&&(i)->mods.mask)||\
+			     ((i)->ctrls)))
+#define	XkbIM_InUse(i)	(((i)->flags)||((i)->which_groups)||\
+					((i)->which_mods)||((i)->ctrls))
+	
+
+typedef struct _XkbIndicatorRec {
+	unsigned long	  	phys_indicators;
+	XkbIndicatorMapRec	maps[XkbNumIndicators];
+} XkbIndicatorRec,*XkbIndicatorPtr;
+
+typedef	struct _XkbKeyNameRec {
+	char	name[XkbKeyNameLength];
+} XkbKeyNameRec,*XkbKeyNamePtr;
+
+typedef struct _XkbKeyAliasRec {
+	char	real[XkbKeyNameLength];
+	char	alias[XkbKeyNameLength];
+} XkbKeyAliasRec,*XkbKeyAliasPtr;
+
+	/*
+	 * Names for everything 
+	 */
+typedef struct _XkbNamesRec {
+	Atom		  keycodes;
+	Atom		  geometry;
+	Atom		  symbols;
+	Atom              types;
+	Atom		  compat;
+	Atom		  vmods[XkbNumVirtualMods];
+	Atom		  indicators[XkbNumIndicators];
+	Atom		  groups[XkbNumKbdGroups];
+	XkbKeyNamePtr	  keys;
+	XkbKeyAliasPtr	  key_aliases;
+	Atom		 *radio_groups;
+	Atom		  phys_symbols;
+
+	unsigned char	  num_keys;
+	unsigned char	  num_key_aliases;
+	unsigned short	  num_rg;
+} XkbNamesRec,*XkbNamesPtr;
+
+typedef	struct _XkbGeometry	*XkbGeometryPtr;
+	/*
+	 * Tie it all together into one big keyboard description
+	 */
+typedef	struct _XkbDesc {
+	struct _XDisplay *	dpy;
+	unsigned short	 	flags;
+	unsigned short		device_spec;
+	KeyCode			min_key_code;
+	KeyCode			max_key_code;
+
+	XkbControlsPtr		ctrls;
+	XkbServerMapPtr		server;
+	XkbClientMapPtr		map;
+	XkbIndicatorPtr		indicators;
+	XkbNamesPtr		names;
+	XkbCompatMapPtr		compat;
+	XkbGeometryPtr		geom;
+} XkbDescRec, *XkbDescPtr;
+#define	XkbKeyKeyTypeIndex(d,k,g)	(XkbCMKeyTypeIndex((d)->map,k,g))
+#define	XkbKeyKeyType(d,k,g)		(XkbCMKeyType((d)->map,k,g))
+#define	XkbKeyGroupWidth(d,k,g)		(XkbCMKeyGroupWidth((d)->map,k,g))
+#define	XkbKeyGroupsWidth(d,k)		(XkbCMKeyGroupsWidth((d)->map,k))
+#define	XkbKeyGroupInfo(d,k)		(XkbCMKeyGroupInfo((d)->map,(k)))
+#define	XkbKeyNumGroups(d,k)		(XkbCMKeyNumGroups((d)->map,(k)))
+#define	XkbKeyNumSyms(d,k)		(XkbCMKeyNumSyms((d)->map,(k)))
+#define	XkbKeySymsPtr(d,k)		(XkbCMKeySymsPtr((d)->map,(k)))
+#define	XkbKeySym(d,k,n)		(XkbKeySymsPtr(d,k)[n])
+#define	XkbKeySymEntry(d,k,sl,g) \
+	(XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
+#define	XkbKeyAction(d,k,n) \
+	(XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
+#define	XkbKeyActionEntry(d,k,sl,g) \
+	(XkbKeyHasActions(d,k)?\
+		XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
+
+#define	XkbKeyHasActions(d,k)	((d)->server->key_acts[k]!=0)
+#define	XkbKeyNumActions(d,k)	(XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
+#define	XkbKeyActionsPtr(d,k)	(XkbSMKeyActionsPtr((d)->server,k))
+#define	XkbKeycodeInRange(d,k)	(((k)>=(d)->min_key_code)&&\
+				 ((k)<=(d)->max_key_code))
+#define	XkbNumKeys(d)		((d)->max_key_code-(d)->min_key_code+1)
+
+
+	/*
+	 * The following structures can be used to track changes
+	 * to a keyboard device
+	 */
+typedef struct _XkbMapChanges {
+	unsigned short		 changed;
+	KeyCode			 min_key_code;
+	KeyCode			 max_key_code;
+	unsigned char		 first_type;
+	unsigned char		 num_types;
+	KeyCode			 first_key_sym;
+	unsigned char		 num_key_syms;
+	KeyCode			 first_key_act;
+	unsigned char		 num_key_acts;
+	KeyCode			 first_key_behavior;
+	unsigned char		 num_key_behaviors;
+	KeyCode 		 first_key_explicit;
+	unsigned char		 num_key_explicit;
+	KeyCode			 first_modmap_key;
+	unsigned char		 num_modmap_keys;
+	KeyCode			 first_vmodmap_key;
+	unsigned char		 num_vmodmap_keys;
+	unsigned char		 pad;
+	unsigned short		 vmods;
+} XkbMapChangesRec,*XkbMapChangesPtr;
+
+typedef struct _XkbControlsChanges {
+	unsigned int 		 changed_ctrls;
+	unsigned int		 enabled_ctrls_changes;
+	Bool			 num_groups_changed;
+} XkbControlsChangesRec,*XkbControlsChangesPtr;
+
+typedef struct _XkbIndicatorChanges {
+	unsigned int		 state_changes;
+	unsigned int		 map_changes;
+} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
+
+typedef struct _XkbNameChanges {
+	unsigned int 		changed;
+	unsigned char		first_type;
+	unsigned char		num_types;
+	unsigned char		first_lvl;
+	unsigned char		num_lvls;
+	unsigned char		num_aliases;
+	unsigned char		num_rg;
+	unsigned char		first_key;
+	unsigned char		num_keys;
+	unsigned short		changed_vmods;
+	unsigned long		changed_indicators;
+	unsigned char		changed_groups;
+} XkbNameChangesRec,*XkbNameChangesPtr;
+
+typedef struct _XkbCompatChanges {
+	unsigned char		changed_groups;
+	unsigned short		first_si;
+	unsigned short		num_si;
+} XkbCompatChangesRec,*XkbCompatChangesPtr;
+
+typedef struct _XkbChanges {
+	unsigned short		 device_spec;
+	unsigned short		 state_changes;
+	XkbMapChangesRec	 map;
+	XkbControlsChangesRec	 ctrls;
+	XkbIndicatorChangesRec	 indicators;
+	XkbNameChangesRec	 names;
+	XkbCompatChangesRec	 compat;
+} XkbChangesRec, *XkbChangesPtr;
+
+	/*
+	 * These data structures are used to construct a keymap from 
+	 * a set of components or to list components in the server
+	 * database.
+	 */
+typedef struct _XkbComponentNames {
+	char *			 keymap;
+	char *			 keycodes;
+	char *			 types;
+	char *			 compat;
+	char *			 symbols;
+	char *			 geometry;
+} XkbComponentNamesRec, *XkbComponentNamesPtr;
+
+typedef struct _XkbComponentName {
+	unsigned short		flags;
+	char *			name;
+} XkbComponentNameRec,*XkbComponentNamePtr;
+
+typedef struct _XkbComponentList {
+	int			num_keymaps;
+	int			num_keycodes;
+	int			num_types;
+	int			num_compat;
+	int			num_symbols;
+	int			num_geometry;
+	XkbComponentNamePtr	keymaps;
+	XkbComponentNamePtr 	keycodes;
+	XkbComponentNamePtr	types;
+	XkbComponentNamePtr	compat;
+	XkbComponentNamePtr	symbols;
+	XkbComponentNamePtr	geometry;
+} XkbComponentListRec, *XkbComponentListPtr;
+
+	/*
+	 * The following data structures describe and track changes to a 
+	 * non-keyboard extension device 
+	 */
+typedef struct _XkbDeviceLedInfo {
+	unsigned short			led_class;
+	unsigned short			led_id;
+	unsigned int			phys_indicators;
+	unsigned int			maps_present;
+	unsigned int			names_present;
+	unsigned int			state;
+	Atom 				names[XkbNumIndicators];
+	XkbIndicatorMapRec		maps[XkbNumIndicators];
+} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr;
+
+typedef struct _XkbDeviceInfo {
+	char *			name;
+	Atom			type;
+	unsigned short		device_spec;
+	Bool			has_own_state;
+	unsigned short		supported;
+	unsigned short		unsupported;
+
+	unsigned short		num_btns;
+	XkbAction *		btn_acts;
+
+	unsigned short		sz_leds;
+	unsigned short		num_leds;
+	unsigned short		dflt_kbd_fb;
+	unsigned short		dflt_led_fb;
+	XkbDeviceLedInfoPtr	leds;
+} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
+
+#define	XkbXI_DevHasBtnActs(d)	(((d)->num_btns>0)&&((d)->btn_acts!=NULL))
+#define	XkbXI_LegalDevBtn(d,b)	(XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
+#define	XkbXI_DevHasLeds(d)	(((d)->num_leds>0)&&((d)->leds!=NULL))
+
+typedef struct _XkbDeviceLedChanges {
+	unsigned short		led_class;
+	unsigned short		led_id;
+	unsigned int		defined; /* names or maps changed */
+	struct _XkbDeviceLedChanges *next;
+} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr;
+
+typedef struct _XkbDeviceChanges {
+	unsigned int		changed;
+	unsigned short		first_btn;
+	unsigned short		num_btns;
+	XkbDeviceLedChangesRec 	leds;
+} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
+
+#endif /* _XKBSTR_H_ */
diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c
index f0a1f89..790aede 100644
--- a/xkb/XKBAlloc.c
+++ b/xkb/XKBAlloc.c
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "misc.h"
 #include "inputstr.h"
 #include <xkbsrv.h>
-#include <X11/extensions/XKBgeom.h>
+#include "xkbgeom.h"
 
 /***===================================================================***/
 
diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
index 815cc95..7a75d20 100644
--- a/xkb/XKBGAlloc.c
+++ b/xkb/XKBGAlloc.c
@@ -37,7 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "misc.h"
 #include "inputstr.h"
 #include <xkbsrv.h>
-#include <X11/extensions/XKBgeom.h>
+#include "xkbgeom.h"
 
 #ifdef X_NOT_POSIX
 #define Size_t unsigned int
diff --git a/xkb/maprules.c b/xkb/maprules.c
index 0fa356e..52a1cdc 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -46,7 +46,7 @@
 #include "misc.h"
 #include "inputstr.h"
 #include "dix.h"
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #define XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
 
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 26f2812..66edcc1 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3870,7 +3870,7 @@ ProcXkbSetNames(ClientPtr client)
 
 /***====================================================================***/
 
-#include <X11/extensions/XKBgeom.h>
+#include "xkbgeom.h"
 
 #define	XkbSizeCountedString(s)  ((s)?((((2+strlen(s))+3)/4)*4):4)
 
diff --git a/xkb/xkb.h b/xkb/xkb.h
index 99b60bf..bc6c6c9 100644
--- a/xkb/xkb.h
+++ b/xkb/xkb.h
@@ -1,4 +1,5 @@
-/* #include "XKBfile.h" */
+#ifndef _XKB_H
+#define _XKB_H
 
 extern int ProcXkbUseExtension(ClientPtr client);
 extern int ProcXkbSelectEvents(ClientPtr client);
@@ -35,3 +36,5 @@ extern Bool XkbCopyKeymap(
     XkbDescPtr              src,
     XkbDescPtr              dst,
     Bool                    sendNotifies);
+
+#endif
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 6301a32..bb1de9d 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -48,9 +48,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "property.h"
 #define	XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
-#include <X11/extensions/XKBgeom.h>
+#include "xkbgeom.h"
 #include <X11/extensions/XKMformat.h>
-#include <X11/extensions/XKBfile.h>
+#include "xkbfile.h"
 #include "xkb.h"
 
 #define	CREATE_ATOM(s)	MakeAtom(s,sizeof(s)-1,1)
diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c
index da4c905..50b08f4 100644
--- a/xkb/xkbSwap.c
+++ b/xkb/xkbSwap.c
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "misc.h"
 #include "inputstr.h"
 #include <xkbsrv.h>
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #include "extnsionst.h"
 #include "xkb.h"
 
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 3cedf82..67843e9 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -42,7 +42,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #define	XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
-#include <X11/extensions/XKBgeom.h>
+#include "xkbgeom.h"
 #include "xkb.h"
 
 int	XkbDisableLockActions = 0;
diff --git a/xkb/xkbfile.h b/xkb/xkbfile.h
new file mode 100644
index 0000000..d58bec6
--- /dev/null
+++ b/xkb/xkbfile.h
@@ -0,0 +1,480 @@
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ 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 Silicon Graphics not be 
+ used in advertising or publicity pertaining to distribution 
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability 
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+ 
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS 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.
+
+ ********************************************************/
+
+#ifndef _XKBFILE_H_
+#define	_XKBFILE_H_ 1
+
+/***====================================================================***/
+
+#define	XkbXKMFile	0
+#define	XkbCFile	1
+#define	XkbXKBFile	2
+#define	XkbMessage	3
+
+#define	XkbMapDefined		(1<<0)
+#define	XkbStateDefined		(1<<1)
+
+typedef struct _XkbFileInfo {
+    unsigned		type;
+    unsigned		defined;
+    XkbDescPtr	 	xkb;
+} XkbFileInfo,*XkbFileInfoPtr;
+
+typedef void	(*XkbFileAddOnFunc)(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    int			/* fileSection */,
+    void *		/* priv */
+);
+
+/***====================================================================***/
+
+#define	_XkbSuccess			0
+#define	_XkbErrMissingNames		1
+#define	_XkbErrMissingTypes		2
+#define	_XkbErrMissingReqTypes		3
+#define	_XkbErrMissingSymbols		4
+#define	_XkbErrMissingVMods		5
+#define	_XkbErrMissingIndicators	6
+#define	_XkbErrMissingCompatMap		7
+#define	_XkbErrMissingSymInterps	8
+#define	_XkbErrMissingGeometry		9
+#define	_XkbErrIllegalDoodad		10
+#define	_XkbErrIllegalTOCType		11
+#define	_XkbErrIllegalContents		12
+#define	_XkbErrEmptyFile		13
+#define	_XkbErrFileNotFound		14
+#define	_XkbErrFileCannotOpen		15
+#define	_XkbErrBadValue			16
+#define	_XkbErrBadMatch			17
+#define	_XkbErrBadTypeName		18
+#define	_XkbErrBadTypeWidth		19
+#define	_XkbErrBadFileType		20
+#define	_XkbErrBadFileVersion		21
+#define	_XkbErrBadFileFormat		22
+#define	_XkbErrBadAlloc			23
+#define	_XkbErrBadLength		24
+#define	_XkbErrXReqFailure		25
+#define	_XkbErrBadImplementation	26
+
+extern char *		_XkbErrMessages[];
+extern unsigned		_XkbErrCode;
+extern char *		_XkbErrLocation;
+extern unsigned		_XkbErrData;
+
+/***====================================================================***/
+
+_XFUNCPROTOBEGIN
+
+extern	char *	XkbIndentText(
+    unsigned	/* size */
+);
+
+extern	char *	XkbAtomText(
+    Display *	/* dpy */,
+    Atom 	/* atm */,
+    unsigned	/* format */
+);
+
+extern char *	XkbKeysymText(
+    KeySym	/* sym */,
+    unsigned	/* format */
+);
+
+extern char *	XkbStringText(
+    char *	/* str */,
+    unsigned	/* format */
+);
+
+extern char *	XkbKeyNameText(
+    char *	/* name */,
+    unsigned	/* format */
+);
+
+extern char *
+XkbModIndexText(
+    unsigned	/* ndx */,
+    unsigned	/* format */
+);
+
+extern char *
+XkbModMaskText(
+    unsigned	/* mask */,
+    unsigned	/* format */
+);
+
+extern char *	XkbVModIndexText(
+    Display *	/* dpy */,
+    XkbDescPtr	/* xkb */,
+    unsigned	/* ndx */,
+    unsigned	/* format */
+);
+
+extern	char *	XkbVModMaskText(
+    Display *	/* dpy */,
+    XkbDescPtr	/* xkb */,
+    unsigned	/* modMask */,
+    unsigned	/* mask */,
+    unsigned	/* format */
+);
+
+extern char *	XkbConfigText(
+    unsigned 	/* config */,
+    unsigned 	/* format */
+);
+
+extern char *	XkbSIMatchText(
+    unsigned	/* type */,
+    unsigned	/* format */
+);
+
+extern char *	XkbIMWhichStateMaskText(
+    unsigned	/* use_which */,
+    unsigned	/* format */
+);
+
+extern char *	XkbAccessXDetailText(
+    unsigned	/* state */,
+    unsigned	/* format */
+);
+
+extern char *	XkbNKNDetailMaskText(
+    unsigned	/* detail */,
+    unsigned	/* format */
+);
+
+extern char *	XkbControlsMaskText(
+    unsigned	/* ctrls */,
+    unsigned	/* format */
+);
+
+extern char *	XkbGeomFPText(
+    int		/* val */,
+    unsigned 	/* format */
+);
+
+extern char *	XkbDoodadTypeText(
+    unsigned	/* type */,
+    unsigned	/* format */
+);
+
+extern char *	XkbActionTypeText(
+    unsigned	/* type */,
+    unsigned	/* format */
+);
+
+extern char *	XkbActionText(
+    Display *	/* dpy */,
+    XkbDescPtr	/* xkb */,
+    XkbAction *	/* action */,
+    unsigned	/* format */
+);
+
+extern char *	XkbBehaviorText(
+    XkbDescPtr 		/* xkb */,
+    XkbBehavior *	/* behavior */,
+    unsigned		/* format */
+);
+
+/***====================================================================***/
+
+#define	_XkbKSLower	(1<<0)
+#define	_XkbKSUpper	(1<<1)
+
+#define	XkbKSIsLower(k)		(_XkbKSCheckCase(k)&_XkbKSLower)
+#define	XkbKSIsUpper(k)		(_XkbKSCheckCase(k)&_XkbKSUpper)
+#define XkbKSIsKeypad(k)	(((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal))
+#define	XkbKSIsDeadKey(k)	\
+		(((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
+
+extern	unsigned _XkbKSCheckCase(
+   KeySym	/* sym */
+);
+
+extern	int	 XkbFindKeycodeByName(
+    XkbDescPtr	/* xkb */,
+    char *	/* name */,
+    Bool	/* use_aliases */
+);
+
+extern	Bool	XkbLookupGroupAndLevel(
+    XkbDescPtr	/* xkb */,
+    int		/* key */,
+    int	*	/* mods_inout */,
+    int *	/* grp_inout */,
+    int	*	/* lvl_rtrn */
+);
+
+/***====================================================================***/
+
+extern	char *	XkbAtomGetString(
+    Display *	/* dpy */,
+    Atom 	/* atm */
+);
+
+extern	Atom	XkbInternAtom(
+    Display *	/* dpy */,
+    char *	/* name */,
+    Bool	/* onlyIfExists */
+);
+
+extern	Status	XkbChangeKbdDisplay(
+    Display *		/* newDpy */,
+    XkbFileInfo *	/* result */
+);
+
+extern	Atom	XkbChangeAtomDisplay(
+    Display *	/* oldDpy */,
+    Display *	/* newDpy */,
+    Atom	/* atm */
+);
+
+extern	void	XkbInitAtoms(
+    Display *	/* dpy */
+);
+
+/***====================================================================***/
+
+#ifdef _XKBGEOM_H_
+
+#define	XkbDW_Unknown	0
+#define	XkbDW_Doodad	1
+#define	XkbDW_Section	2
+typedef struct _XkbDrawable {
+	int		type;
+	int		priority;
+	union {
+	    XkbDoodadPtr	doodad;
+	    XkbSectionPtr	section;
+	} u;
+	struct _XkbDrawable *	next;
+} XkbDrawableRec,*XkbDrawablePtr; 
+
+extern	XkbDrawablePtr
+XkbGetOrderedDrawables(
+    XkbGeometryPtr	/* geom */,
+    XkbSectionPtr	/* section */
+);
+
+extern	void
+XkbFreeOrderedDrawables(
+    XkbDrawablePtr	/* draw */
+);
+
+#endif
+
+/***====================================================================***/
+
+extern	unsigned	XkbConvertGetByNameComponents(
+    Bool		/* toXkm */,
+    unsigned 		/* orig */
+);
+
+extern	unsigned	XkbConvertXkbComponents(
+    Bool		/* toXkm */,
+    unsigned 		/* orig */
+);
+
+extern	Bool	XkbDetermineFileType(
+    XkbFileInfo *	/* xkb */,
+    int			/* format */,
+    int *		/* opts_missing */
+);
+
+extern	Bool	XkbNameMatchesPattern(
+    char *		/* name */,
+    char *		/* pattern */
+);
+
+/***====================================================================***/
+
+extern	Bool	XkbWriteXKBKeycodes(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBKeyTypes(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBCompatMap(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBSymbols(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBGeometry(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBSemantics(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBLayout(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBKeymap(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* topLevel */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteXKBFile(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */,
+    Bool		/* showImplicit */,
+    XkbFileAddOnFunc	/* addOn */,
+    void *		/* priv */
+);
+
+extern	Bool	XkbWriteCFile(
+    FILE *		/* file */,
+    char *		/* name */,
+    XkbFileInfo *	/* info */
+);
+
+extern	Bool	XkbWriteXKMFile(
+    FILE *		/* file */,
+    XkbFileInfo *	/* result */
+);
+
+extern	Bool	XkbWriteToServer(
+    XkbFileInfo *	/* result */
+);
+
+extern	void	XkbEnsureSafeMapName(
+    char *		/* name */
+);
+
+extern	Bool	XkbWriteXKBKeymapForNames(
+    FILE *			/* file */,
+    XkbComponentNamesPtr	/* names */,
+    Display *			/* dpy */,
+    XkbDescPtr			/* xkb */,
+    unsigned			/* want */,
+    unsigned			/* need */
+);
+
+extern	Status	XkbMergeFile(
+    XkbDescPtr			/* xkb */,
+    XkbFileInfo			/* finfo */
+);
+
+/***====================================================================***/
+
+extern Bool	XkmProbe(
+    FILE *		/* file */
+);
+
+extern unsigned XkbReadFromServer(
+    Display *		/* dpy */,
+    unsigned		/* need */,
+    unsigned		/* want */,
+    XkbFileInfo *	/* result */
+);
+
+extern unsigned	XkmReadFile(
+    FILE *		/* file */,
+    unsigned		/* need */,
+    unsigned		/* want */,
+    XkbFileInfo *	/* result */
+);
+
+#ifdef _XKMFORMAT_H_
+
+extern Bool	XkmReadTOC(
+    FILE *              /* file */,
+    xkmFileInfo *       /* file_info */,
+    int                 /* max_toc */,
+    xkmSectionInfo *    /* toc */
+);
+
+extern xkmSectionInfo *XkmFindTOCEntry(
+    xkmFileInfo *       /* finfo */,
+    xkmSectionInfo *    /* toc */,
+    unsigned            /* type */
+);
+
+extern Bool	XkmReadFileSection(
+    FILE *              /* file */,
+    xkmSectionInfo *    /* toc */,
+    XkbFileInfo *       /* result */,
+    unsigned *          /* loaded_rtrn */
+);
+
+extern char *	XkmReadFileSectionName(
+    FILE *		/* file */,
+    xkmSectionInfo *	/* toc */
+);
+
+#endif /* _XKMFORMAT_H  */
+
+_XFUNCPROTOEND
+
+#endif /* _XKBFILE_H_ */
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 05344b4..06d3519 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -42,10 +42,10 @@
 #include "misc.h"
 #include "inputstr.h"
 #include "dix.h"
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #define XKBSRV_NEED_FILE_FUNCS	1
 #include <xkbsrv.h>
-#include <X11/extensions/XKBgeom.h>
+#include "xkbgeom.h"
 #include "xkb.h"
 
 unsigned
diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h
new file mode 100644
index 0000000..a6918b4
--- /dev/null
+++ b/xkb/xkbgeom.h
@@ -0,0 +1,655 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+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 Silicon Graphics not be 
+used in advertising or publicity pertaining to distribution 
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability 
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS 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.
+
+********************************************************/
+
+#ifndef _XKBGEOM_H_
+#define	_XKBGEOM_H_
+
+#include "xkbstr.h"
+
+#define XkbAddGeomKeyAlias 		SrvXkbAddGeomKeyAlias
+#define XkbAddGeomColor 		SrvXkbAddGeomColor
+#define XkbAddGeomDoodad		SrvXkbAddGeomDoodad
+#define XkbAddGeomKey			SrvXkbAddGeomKey
+#define XkbAddGeomOutline		SrvXkbAddGeomOutline
+#define XkbAddGeomOverlay		SrvXkbAddGeomOverlay
+#define XkbAddGeomOverlayRow		SrvXkbAddGeomOverlayRow
+#define	XkbAddGeomOverlayKey		SrvXkbAddGeomOverlayKey
+#define XkbAddGeomProperty		SrvXkbAddGeomProperty
+#define XkbAddGeomRow			SrvXkbAddGeomRow
+#define XkbAddGeomSection		SrvXkbAddGeomSection
+#define XkbAddGeomShape			SrvXkbAddGeomShape
+#define XkbAllocGeomKeyAliases		SrvXkbAllocGeomKeyAliases
+#define XkbAllocGeomColors		SrvXkbAllocGeomColors
+#define XkbAllocGeomDoodads		SrvXkbAllocGeomDoodads
+#define XkbAllocGeomKeys		SrvXkbAllocGeomKeys
+#define XkbAllocGeomOutlines		SrvXkbAllocGeomOutlines
+#define XkbAllocGeomPoints		SrvXkbAllocGeomPoints
+#define XkbAllocGeomProps		SrvXkbAllocGeomProps
+#define XkbAllocGeomRows		SrvXkbAllocGeomRows
+#define XkbAllocGeomSectionDoodads	SrvXkbAllocGeomSectionDoodads
+#define XkbAllocGeomSections		SrvXkbAllocGeomSections
+#define	XkbAllocGeomOverlays		SrvXkbAllocGeomOverlays
+#define	XkbAllocGeomOverlayRows		SrvXkbAllocGeomOverlayRows
+#define	XkbAllocGeomOverlayKeys		SrvXkbAllocGeomOverlayKeys
+#define XkbAllocGeomShapes		SrvXkbAllocGeomShapes
+#define XkbAllocGeometry		SrvXkbAllocGeometry
+#define XkbFreeGeomKeyAliases		SrvXkbFreeGeomKeyAliases
+#define XkbFreeGeomColors		SrvXkbFreeGeomColors
+#define XkbFreeGeomDoodads		SrvXkbFreeGeomDoodads
+#define XkbFreeGeomProperties		SrvXkbFreeGeomProperties
+#define	XkbFreeGeomOverlayKeys		SrvXkbFreeGeomOverlayKeys
+#define	XkbFreeGeomOverlayRows		SrvXkbFreeGeomOverlayRows
+#define	XkbFreeGeomOverlays		SrvXkbFreeGeomOverlays
+#define	XkbFreeGeomKeys			SrvXkbFreeGeomKeys
+#define	XkbFreeGeomRows			SrvXkbFreeGeomRows
+#define XkbFreeGeomSections		SrvXkbFreeGeomSections
+#define	XkbFreeGeomPoints		SrvXkbFreeGeomPoints
+#define	XkbFreeGeomOutlines		SrvXkbFreeGeomOutlines
+#define XkbFreeGeomShapes		SrvXkbFreeGeomShapes
+#define XkbFreeGeometry			SrvXkbFreeGeometry
+
+typedef	struct _XkbProperty {
+	char	*name;
+	char	*value;
+} XkbPropertyRec,*XkbPropertyPtr;
+
+typedef struct _XkbColor {
+	unsigned int 	pixel;
+	char *		spec;
+} XkbColorRec,*XkbColorPtr;
+
+typedef	struct _XkbPoint {
+	short	x;
+	short	y;
+} XkbPointRec, *XkbPointPtr;
+
+typedef struct	_XkbBounds {
+	short	x1,y1;
+	short	x2,y2;
+} XkbBoundsRec, *XkbBoundsPtr;
+#define	XkbBoundsWidth(b)	(((b)->x2)-((b)->x1))
+#define	XkbBoundsHeight(b)	(((b)->y2)-((b)->y1))
+
+typedef struct _XkbOutline {
+	unsigned short	num_points;
+	unsigned short	sz_points;
+	unsigned short	corner_radius;
+	XkbPointPtr	points;
+} XkbOutlineRec, *XkbOutlinePtr;
+
+typedef struct _XkbShape {
+	Atom	 	 name;
+	unsigned short	 num_outlines;
+	unsigned short	 sz_outlines;
+	XkbOutlinePtr	 outlines;
+	XkbOutlinePtr	 approx;
+	XkbOutlinePtr	 primary;
+	XkbBoundsRec	 bounds;
+} XkbShapeRec, *XkbShapePtr;
+#define	XkbOutlineIndex(s,o)	((int)((o)-&(s)->outlines[0]))
+
+typedef struct _XkbShapeDoodad {
+	Atom		 name;
+	unsigned char	 type;
+	unsigned char	 priority;
+	short		 top;
+	short		 left;
+	short	 	 angle;
+	unsigned short	 color_ndx;
+	unsigned short	 shape_ndx;
+} XkbShapeDoodadRec, *XkbShapeDoodadPtr;
+#define	XkbShapeDoodadColor(g,d)	(&(g)->colors[(d)->color_ndx])
+#define	XkbShapeDoodadShape(g,d)	(&(g)->shapes[(d)->shape_ndx])
+#define	XkbSetShapeDoodadColor(g,d,c)	((d)->color_ndx= (c)-&(g)->colors[0])
+#define	XkbSetShapeDoodadShape(g,d,s)	((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbTextDoodad {
+	Atom		 name;
+	unsigned char	 type;
+	unsigned char	 priority;
+	short	 	 top;
+	short	 	 left;
+	short	 	 angle;
+	short	 	 width;
+	short		 height;
+	unsigned short	 color_ndx;
+	char *		 text;
+	char *		 font;
+} XkbTextDoodadRec, *XkbTextDoodadPtr;
+#define	XkbTextDoodadColor(g,d)	(&(g)->colors[(d)->color_ndx])
+#define	XkbSetTextDoodadColor(g,d,c)	((d)->color_ndx= (c)-&(g)->colors[0])
+
+typedef struct _XkbIndicatorDoodad {
+	Atom		 name;
+	unsigned char	 type;
+	unsigned char	 priority;
+	short	 	 top;
+	short	 	 left;
+	short		 angle;
+	unsigned short	 shape_ndx;
+	unsigned short	 on_color_ndx;
+	unsigned short	 off_color_ndx;
+} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr;
+#define	XkbIndicatorDoodadShape(g,d)	(&(g)->shapes[(d)->shape_ndx])
+#define	XkbIndicatorDoodadOnColor(g,d)	(&(g)->colors[(d)->on_color_ndx])
+#define	XkbIndicatorDoodadOffColor(g,d)	(&(g)->colors[(d)->off_color_ndx])
+#define	XkbSetIndicatorDoodadOnColor(g,d,c) \
+				((d)->on_color_ndx= (c)-&(g)->colors[0])
+#define	XkbSetIndicatorDoodadOffColor(g,d,c) \
+				((d)->off_color_ndx= (c)-&(g)->colors[0])
+#define	XkbSetIndicatorDoodadShape(g,d,s) \
+				((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbLogoDoodad {
+	Atom		 name;
+	unsigned char	 type;
+	unsigned char	 priority;
+	short		 top;
+	short		 left;
+	short	 	 angle;
+	unsigned short	 color_ndx;
+	unsigned short	 shape_ndx;
+	char *		 logo_name;
+} XkbLogoDoodadRec, *XkbLogoDoodadPtr;
+#define	XkbLogoDoodadColor(g,d)		(&(g)->colors[(d)->color_ndx])
+#define	XkbLogoDoodadShape(g,d)		(&(g)->shapes[(d)->shape_ndx])
+#define	XkbSetLogoDoodadColor(g,d,c)	((d)->color_ndx= (c)-&(g)->colors[0])
+#define	XkbSetLogoDoodadShape(g,d,s)	((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbAnyDoodad {
+	Atom		 name;
+	unsigned char	 type;
+	unsigned char	 priority;
+	short	 	 top;
+	short	 	 left;
+	short		 angle;
+} XkbAnyDoodadRec, *XkbAnyDoodadPtr;
+
+typedef union _XkbDoodad {
+	XkbAnyDoodadRec		any;
+	XkbShapeDoodadRec	shape;
+	XkbTextDoodadRec	text;
+	XkbIndicatorDoodadRec	indicator;
+	XkbLogoDoodadRec	logo;
+} XkbDoodadRec, *XkbDoodadPtr;
+
+#define	XkbUnknownDoodad	0
+#define	XkbOutlineDoodad	1
+#define	XkbSolidDoodad		2
+#define	XkbTextDoodad		3
+#define	XkbIndicatorDoodad	4
+#define	XkbLogoDoodad		5
+
+typedef struct _XkbKey {
+	XkbKeyNameRec	 name;
+	short		 gap;
+	unsigned char	 shape_ndx;
+	unsigned char	 color_ndx;
+} XkbKeyRec, *XkbKeyPtr;
+#define	XkbKeyShape(g,k)	(&(g)->shapes[(k)->shape_ndx])
+#define	XkbKeyColor(g,k)	(&(g)->colors[(k)->color_ndx])
+#define	XkbSetKeyShape(g,k,s)	((k)->shape_ndx= (s)-&(g)->shapes[0])
+#define	XkbSetKeyColor(g,k,c)	((k)->color_ndx= (c)-&(g)->colors[0])
+
+typedef struct _XkbRow {
+	short	 	top;
+	short	 	left;
+	unsigned short	num_keys;
+	unsigned short	sz_keys;
+	int		vertical;
+	XkbKeyPtr	keys;
+	XkbBoundsRec	bounds;
+} XkbRowRec, *XkbRowPtr;
+
+typedef struct _XkbSection {
+	Atom		 name;
+	unsigned char	 priority;
+	short	 	 top;
+	short	 	 left;
+	unsigned short	 width;
+	unsigned short	 height;
+	short	 	 angle;
+	unsigned short	 num_rows;
+	unsigned short	 num_doodads;
+	unsigned short	 num_overlays;
+	unsigned short	 sz_rows;
+	unsigned short	 sz_doodads;
+	unsigned short	 sz_overlays;
+	XkbRowPtr	 rows;
+	XkbDoodadPtr	 doodads;
+	XkbBoundsRec	 bounds;
+	struct _XkbOverlay *overlays;
+} XkbSectionRec, *XkbSectionPtr;
+
+typedef	struct _XkbOverlayKey {
+	XkbKeyNameRec	over;
+	XkbKeyNameRec	under;
+} XkbOverlayKeyRec,*XkbOverlayKeyPtr;
+
+typedef struct _XkbOverlayRow {
+	unsigned short		row_under;
+	unsigned short		num_keys;
+	unsigned short		sz_keys;
+	XkbOverlayKeyPtr	keys;
+} XkbOverlayRowRec,*XkbOverlayRowPtr;
+
+typedef struct _XkbOverlay {
+	Atom			name;
+	XkbSectionPtr		section_under;
+	unsigned short		num_rows;
+	unsigned short		sz_rows;
+	XkbOverlayRowPtr	rows;
+	XkbBoundsPtr		bounds;
+} XkbOverlayRec,*XkbOverlayPtr;
+
+typedef struct _XkbGeometry {
+	Atom		 name;
+	unsigned short	 width_mm;
+	unsigned short	 height_mm;
+	char *		 label_font;
+	XkbColorPtr	 label_color;
+	XkbColorPtr	 base_color;
+	unsigned short	 sz_properties;
+	unsigned short	 sz_colors;
+	unsigned short	 sz_shapes;
+	unsigned short   sz_sections;
+	unsigned short	 sz_doodads;
+	unsigned short	 sz_key_aliases;
+	unsigned short	 num_properties;
+	unsigned short	 num_colors;
+	unsigned short	 num_shapes;
+	unsigned short	 num_sections;
+	unsigned short	 num_doodads;
+	unsigned short	 num_key_aliases;
+	XkbPropertyPtr	 properties;
+	XkbColorPtr	 colors;
+	XkbShapePtr	 shapes;
+	XkbSectionPtr	 sections;
+	XkbDoodadPtr	 doodads;
+	XkbKeyAliasPtr	 key_aliases;
+} XkbGeometryRec;
+#define	XkbGeomColorIndex(g,c)	((int)((c)-&(g)->colors[0]))
+
+#define	XkbGeomPropertiesMask	(1<<0)
+#define	XkbGeomColorsMask	(1<<1)
+#define	XkbGeomShapesMask	(1<<2)
+#define	XkbGeomSectionsMask	(1<<3)
+#define	XkbGeomDoodadsMask	(1<<4)
+#define	XkbGeomKeyAliasesMask	(1<<5)
+#define	XkbGeomAllMask		(0x3f)
+
+typedef struct _XkbGeometrySizes {
+	unsigned int	which;
+	unsigned short	num_properties;
+	unsigned short	num_colors;
+	unsigned short	num_shapes;
+	unsigned short	num_sections;
+	unsigned short	num_doodads;
+	unsigned short	num_key_aliases;
+} XkbGeometrySizesRec,*XkbGeometrySizesPtr;
+
+_XFUNCPROTOBEGIN
+
+extern	XkbPropertyPtr
+XkbAddGeomProperty(
+    XkbGeometryPtr	/* geom */,
+    char *		/* name */,
+    char *		/* value */
+);
+
+extern	XkbKeyAliasPtr
+XkbAddGeomKeyAlias(
+    XkbGeometryPtr	/* geom */,
+    char *		/* alias */,
+    char *		/* real */
+);
+
+extern	XkbColorPtr
+XkbAddGeomColor(
+    XkbGeometryPtr	/* geom */,
+    char *		/* spec */,
+    unsigned int	/* pixel */
+);
+
+extern	XkbOutlinePtr
+XkbAddGeomOutline(
+    XkbShapePtr		/* shape */,
+    int			/* sz_points */
+);
+
+extern XkbShapePtr
+XkbAddGeomShape(
+    XkbGeometryPtr	/* geom */,
+    Atom		/* name */,
+    int			/* sz_outlines */
+);
+
+extern XkbKeyPtr
+XkbAddGeomKey(
+    XkbRowPtr		/* row */
+);
+
+extern XkbRowPtr
+XkbAddGeomRow(
+    XkbSectionPtr	/* section */,
+    int			/* sz_keys */
+);
+
+extern XkbSectionPtr
+XkbAddGeomSection(
+    XkbGeometryPtr	/* geom */,
+    Atom		/* name */,
+    int			/* sz_rows */,
+    int			/* sz_doodads */,
+    int			/* sz_overlays */
+);
+
+extern XkbOverlayPtr
+XkbAddGeomOverlay(
+    XkbSectionPtr	/* section */,
+    Atom		/* name */,
+    int			/* sz_rows */
+);
+
+extern XkbOverlayRowPtr
+XkbAddGeomOverlayRow(
+    XkbOverlayPtr	/* overlay */,
+    int			/* row_under */,
+    int			/* sz_keys */
+);
+
+extern XkbOverlayKeyPtr
+XkbAddGeomOverlayKey(
+    XkbOverlayPtr	/* overlay */,
+    XkbOverlayRowPtr	/* row */,
+    char *		/* over */,
+    char *		/* under */
+);
+
+extern XkbDoodadPtr
+XkbAddGeomDoodad(
+    XkbGeometryPtr	/* geom */,
+    XkbSectionPtr	/* section */,
+    Atom		/* name */
+);
+
+
+extern void
+XkbFreeGeomKeyAliases(
+    XkbGeometryPtr	/* geom */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomColors(
+    XkbGeometryPtr	/* geom */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomDoodads(
+    XkbDoodadPtr	/* doodads */,
+    int			/* nDoodads */,
+    Bool		/* freeAll */
+);
+
+
+extern void
+XkbFreeGeomProperties(
+    XkbGeometryPtr	/* geom */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlayKeys(
+    XkbOverlayRowPtr	/* row */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlayRows(
+    XkbOverlayPtr	/* overlay */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlays(
+    XkbSectionPtr	/* section */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomKeys(
+    XkbRowPtr		/* row */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomRows(
+    XkbSectionPtr	/* section */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomSections(
+    XkbGeometryPtr	/* geom */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+
+extern void
+XkbFreeGeomPoints(
+    XkbOutlinePtr	/* outline */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomOutlines(
+    XkbShapePtr		/* shape */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeomShapes(
+    XkbGeometryPtr	/* geom */,
+    int			/* first */,
+    int			/* count */,
+    Bool		/* freeAll */
+);
+
+extern void
+XkbFreeGeometry(
+    XkbGeometryPtr	/* geom */,
+    unsigned int	/* which */,
+    Bool		/* freeMap */
+);
+
+extern Status
+XkbAllocGeomProps(
+    XkbGeometryPtr	/* geom */,
+    int			/* nProps */
+);
+
+extern Status
+XkbAllocGeomKeyAliases(
+    XkbGeometryPtr	/* geom */,
+    int			/* nAliases */
+);
+
+extern Status
+XkbAllocGeomColors(
+    XkbGeometryPtr	/* geom */,
+    int			/* nColors */
+);
+
+extern Status
+XkbAllocGeomShapes(
+    XkbGeometryPtr	/* geom */,
+    int			/* nShapes */
+);
+
+extern Status
+XkbAllocGeomSections(
+    XkbGeometryPtr	/* geom */,
+    int			/* nSections */
+);
+
+extern Status
+XkbAllocGeomOverlays(
+    XkbSectionPtr	/* section */,
+    int			/* num_needed */
+);
+
+extern Status
+XkbAllocGeomOverlayRows(
+    XkbOverlayPtr	/* overlay */,
+    int			/* num_needed */
+);
+
+extern Status
+XkbAllocGeomOverlayKeys(
+    XkbOverlayRowPtr	/* row */,
+    int			/* num_needed */
+);
+
+extern Status
+XkbAllocGeomDoodads(
+    XkbGeometryPtr	/* geom */,
+    int			/* nDoodads */
+);
+
+extern Status
+XkbAllocGeomSectionDoodads(
+    XkbSectionPtr	/* section */,
+    int			/* nDoodads */
+);
+
+extern Status
+XkbAllocGeomOutlines(
+    XkbShapePtr		/* shape */,
+    int			/* nOL */
+);
+
+extern Status
+XkbAllocGeomRows(
+    XkbSectionPtr	/* section */,
+    int			/* nRows */
+);
+
+extern Status
+XkbAllocGeomPoints(
+    XkbOutlinePtr	/* ol */,
+    int			/* nPts */
+);
+
+extern Status
+XkbAllocGeomKeys(
+    XkbRowPtr		/* row */,
+    int			/* nKeys */
+);
+
+extern	Status
+XkbAllocGeometry(
+	XkbDescPtr		/* xkb */,
+	XkbGeometrySizesPtr	/* sizes */
+);
+
+extern	Status
+XkbSetGeometry(
+	Display *		/* dpy */,
+	unsigned		/* deviceSpec */,
+	XkbGeometryPtr		/* geom */
+);
+
+extern	Bool
+XkbComputeShapeTop(
+	XkbShapePtr		/* shape */,
+	XkbBoundsPtr		/* bounds */
+);
+
+extern	Bool
+XkbComputeShapeBounds(
+	XkbShapePtr		/* shape */
+);
+
+extern	Bool
+XkbComputeRowBounds(
+	XkbGeometryPtr		/* geom */,
+	XkbSectionPtr		/* section */,
+	XkbRowPtr		/* row */
+);
+
+extern	Bool
+XkbComputeSectionBounds(
+	XkbGeometryPtr		/* geom */,
+	XkbSectionPtr		/* section */
+);
+
+extern	char *
+XkbFindOverlayForKey(
+	XkbGeometryPtr		/* geom */,
+	XkbSectionPtr		/* wanted */,
+	char *			/* under */
+);
+
+extern	Status
+XkbGetGeometry(
+    Display *			/* dpy */,
+    XkbDescPtr			/* xkb */
+);
+
+extern	Status
+XkbGetNamedGeometry(
+    Display *			/* dpy */,
+    XkbDescPtr			/* xkb */,
+    Atom			/* name */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XKBGEOM_H_ */
diff --git a/xkb/xkbout.c b/xkb/xkbout.c
index 8905ef4..fc4e43e 100644
--- a/xkb/xkbout.c
+++ b/xkb/xkbout.c
@@ -40,12 +40,12 @@
 #include "misc.h"
 #include "inputstr.h"
 #include "dix.h"
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #define XKBSRV_NEED_FILE_FUNCS	1
 #include <xkbsrv.h>
 
-#include <X11/extensions/XKBgeom.h>
-#include <X11/extensions/XKBfile.h>
+#include "xkbgeom.h"
+#include "xkbfile.h"
 
 #define	VMOD_HIDE_VALUE	0
 #define	VMOD_SHOW_VALUE	1
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index 4983e2b..1520a9f 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -40,10 +40,10 @@
 #include "misc.h"
 #include "inputstr.h"
 #include "dix.h"
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #define XKBSRV_NEED_FILE_FUNCS	1
 #include <xkbsrv.h>
-#include <X11/extensions/XKBgeom.h>
+#include "xkbgeom.h"
 
 /***====================================================================***/
 
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index c6c1842..8829618 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -39,10 +39,10 @@
 #include <X11/keysym.h>
 #include "misc.h"
 #include "inputstr.h"
-#include <X11/extensions/XKBstr.h>
+#include "xkbstr.h"
 #define	 XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
-#include <X11/extensions/XKBgeom.h>
+#include "xkbgeom.h"
 
 Atom
 XkbInternAtom(Display *dpy,char *str,Bool only_if_exists)
commit 37867626e314e74031378a8a4ff06f69b899a3b2
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Feb 1 14:41:04 2008 +1100

    main(): Remove uncredible failure
    
    NO, NO, NO.
    
    NO.
    
    The only way this could possibly be worse is if you were viewing it in
    Comic Sans.

diff --git a/dix/main.c b/dix/main.c
index 9114f00..068dae9 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -137,8 +137,6 @@ _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[33];
 
 int connBlockScreenStart;
 
-static int restart = 0;
-
 _X_EXPORT void
 NotImplemented(xEvent *from, xEvent *to)
 {
@@ -264,13 +262,6 @@ main(int argc, char *argv[], char *envp[])
     DarwinHandleGUI(argc, argv, envp);
 #endif
 
-    /* Notice if we're restarted.  Probably this is because we jumped through
-     * an uninitialized pointer */
-    if (restart)
-	FatalError("server restarted. Jumped through uninitialized pointer?\n");
-    else
-	restart = 1;
-
     CheckUserParameters(argc, argv, envp);
 
     CheckUserAuthorization();
commit e4eb7e5842f0f56f07e9cf3b16249c172d0a975d
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Wed Jan 30 23:24:14 2008 +1100

    XKB: Delete xkberrs.c
    
    Get rid of the XKB errors code to save a bunch of space.

diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index bf386e7..c7709f7 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -310,8 +310,7 @@ extern CARD32	xkbDebugFlags;
 #define	_XkbClearElems(a,f,l,t)	bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
 #define	_XkbFree(p)		Xfree(p)
 
-#define	_XkbLibError(c,l,d) \
-	{ _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
+#define	_XkbLibError(c,l,d) /* Epoch fail */
 #define	_XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
 #define	_XkbErrCode3(a,b,c)	_XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
 #define	_XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
diff --git a/xkb/Makefile.am b/xkb/Makefile.am
index 78cdf71..e750d60 100644
--- a/xkb/Makefile.am
+++ b/xkb/Makefile.am
@@ -32,7 +32,6 @@ XKBFILE_SRCS = \
         xkmread.c \
         xkbtext.c \
         xkbfmisc.c \
-        xkberrs.c \
         xkbout.c
 
 X11_SRCS = \
diff --git a/xkb/xkberrs.c b/xkb/xkberrs.c
deleted file mode 100644
index 3534356..0000000
--- a/xkb/xkberrs.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/************************************************************
- Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
-
- 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 Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS 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_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-unsigned	_XkbErrCode;
-char *		_XkbErrLocation= NULL;
-unsigned	_XkbErrData;
commit a48cc88ea2674c28b69b8d738b168cbafcf4001f
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sun Feb 17 18:47:28 2008 +0100

    Fix rotation for multi-monitor situation.
    
    - The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find.
    - Fix bug #13787.

diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index c129d9b..e2d6295 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -580,9 +580,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
     }
     else
     {
-	PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, crtc->x, crtc->y);
+	PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y));
 	PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc);
-	
+
 	/* 
 	 * these are the size of the shadow pixmap, which
 	 * matches the mode, not the pre-rotated copy in the
commit 70c0592a97c7dc9db0576d32b3bdbe4766520509
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sun Feb 17 11:21:01 2008 +0100

    Resize composite overlay window when the root window changes.
    
    - This allows some compositing managers to work, even after randr12 has changed the root window size.
    - Thanks to ajax for figuring out the best place to put this.
    - Example:
    	- xf86RandR12SetMode() calls EnableDisableFBAccess().
    	- That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize().
    	- The final step is the call to PositionWindow().

diff --git a/composite/compwindow.c b/composite/compwindow.c
index 5792367..ee0f7d2 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -165,6 +165,29 @@ compCheckRedirect (WindowPtr pWin)
     return TRUE;
 }
 
+static int
+updateOverlayWindow(ScreenPtr pScreen)
+{
+	CompScreenPtr cs;
+	WindowPtr pWin; /* overlay window */
+	XID vlist[2];
+
+	cs = GetCompScreen(pScreen);
+	if ((pWin = cs->pOverlayWin) != NULL) {
+		if ((pWin->drawable.width == pScreen->width) &&
+			(pWin->drawable.height == pScreen->height))
+			return Success;
+
+		/* Let's resize the overlay window. */
+		vlist[0] = pScreen->width;
+		vlist[1] = pScreen->height;
+		return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin));
+	}
+
+	/* Let's be on the safe side and not assume an overlay window is always allocated. */
+	return Success;
+}
+
 Bool
 compPositionWindow (WindowPtr pWin, int x, int y)
 {
@@ -203,6 +226,8 @@ compPositionWindow (WindowPtr pWin, int x, int y)
     cs->PositionWindow = pScreen->PositionWindow;
     pScreen->PositionWindow = compPositionWindow;
     compCheckTree (pWin->drawable.pScreen);
+    if (updateOverlayWindow(pScreen) != Success)
+	ret = FALSE;
     return ret;
 }
 
commit b95059c20746a71e60ef152bb627e1d5c2210d75
Author: Jeremy Huddleston <jeremy at tifa-2.local>
Date:   Sat Feb 16 01:33:13 2008 -0800

    Added Xquartz.plist to EXTRA_DIST
    (cherry picked from commit 70f9495e0c1f1459507064b673fe57b1c90d3c2c)

diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index 093a102..801fdc7 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -15,6 +15,7 @@ resourcedir=$(libdir)/X11/xserver
 resource_DATA = Xquartz.plist
 
 EXTRA_DIST = \
+	$(resource_DATA) \
 	Info.plist \
 	X11.icns \
 	bundle-main.c \
commit d103820bb8635c63b34b85b45cad95ed9c152d90
Author: Jeremy Huddleston <jeremy at tifa-2.local>
Date:   Sat Feb 16 00:35:50 2008 -0800

    Fixed unescaped newline in EXTRA_DIST
    (cherry picked from commit 567c172c4d400fdfe69e7b096a3877fce5c2de9f)

diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index 95cfd19..093a102 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -18,7 +18,7 @@ EXTRA_DIST = \
 	Info.plist \
 	X11.icns \
 	bundle-main.c \
-	X11.xcodeproj/project.pbxproj
+	X11.xcodeproj/project.pbxproj \
 	Dutch.lproj/InfoPlist.strings \
 	Dutch.lproj/Localizable.strings \
 	Dutch.lproj/main.nib/keyedobjects.nib \
commit a7d936c4ac8e3d7227ecbfe0ddc6cc257b450458
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Mon Feb 11 16:09:03 2008 -0800

    XQuartz: Fixed EXTRA_DIST to include localization
    (cherry picked from commit 1b338c2a9330c85490a7c24d52adf24b124b70e6)

diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index 00d540f..95cfd19 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -18,9 +18,59 @@ EXTRA_DIST = \
 	Info.plist \
 	X11.icns \
 	bundle-main.c \
+	X11.xcodeproj/project.pbxproj
+	Dutch.lproj/InfoPlist.strings \
+	Dutch.lproj/Localizable.strings \
+	Dutch.lproj/main.nib/keyedobjects.nib \
 	English.lproj/InfoPlist.strings \
 	English.lproj/Localizable.strings \
-	English.lproj/main.nib/classes.nib \
-	English.lproj/main.nib/info.nib \
+	English.lproj/main.nib/designable.nib \
 	English.lproj/main.nib/keyedobjects.nib \
-	X11.xcodeproj/project.pbxproj
+	French.lproj/InfoPlist.strings \
+	French.lproj/Localizable.strings \
+	French.lproj/main.nib/keyedobjects.nib \
+	German.lproj/InfoPlist.strings \
+	German.lproj/Localizable.strings \
+	German.lproj/main.nib/keyedobjects.nib \
+	Italian.lproj/InfoPlist.strings \
+	Italian.lproj/Localizable.strings \
+	Italian.lproj/main.nib/keyedobjects.nib \
+	Japanese.lproj/InfoPlist.strings \
+	Japanese.lproj/Localizable.strings \
+	Japanese.lproj/main.nib/keyedobjects.nib \
+	Spanish.lproj/InfoPlist.strings \
+	Spanish.lproj/Localizable.strings \
+	Spanish.lproj/main.nib/keyedobjects.nib \
+	da.lproj/InfoPlist.strings \
+	da.lproj/Localizable.strings \
+	da.lproj/main.nib/keyedobjects.nib \
+	fi.lproj/InfoPlist.strings \
+	fi.lproj/Localizable.strings \
+	fi.lproj/main.nib/keyedobjects.nib \
+	ko.lproj/InfoPlist.strings \
+	ko.lproj/Localizable.strings \
+	ko.lproj/main.nib/keyedobjects.nib \
+	no.lproj/InfoPlist.strings \
+	no.lproj/Localizable.strings \
+	no.lproj/main.nib/keyedobjects.nib \
+	pl.lproj/InfoPlist.strings \
+	pl.lproj/Localizable.strings \
+	pl.lproj/main.nib/keyedobjects.nib \
+	pt.lproj/InfoPlist.strings \
+	pt.lproj/Localizable.strings \
+	pt.lproj/main.nib/keyedobjects.nib \
+	pt_PT.lproj/InfoPlist.strings \
+	pt_PT.lproj/Localizable.strings \
+	pt_PT.lproj/main.nib/keyedobjects.nib \
+	ru.lproj/InfoPlist.strings \
+	ru.lproj/Localizable.strings \
+	ru.lproj/main.nib/keyedobjects.nib \
+	sv.lproj/InfoPlist.strings \
+	sv.lproj/Localizable.strings \
+	sv.lproj/main.nib/keyedobjects.nib \
+	zh_CN.lproj/InfoPlist.strings \
+	zh_CN.lproj/Localizable.strings \
+	zh_CN.lproj/main.nib/keyedobjects.nib \
+	zh_TW.lproj/InfoPlist.strings \
+	zh_TW.lproj/Localizable.strings \
+	zh_TW.lproj/main.nib/keyedobjects.nib
commit 0ffb6a3ad010e80fe8f973fc228d549f9dd3effd
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Thu Feb 14 22:20:56 2008 -0500

    GLX: Implement support for TTM BO based TFP when available.

diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c
index d8df604..d1c8d41 100644
--- a/GL/glx/glxdri2.c
+++ b/GL/glx/glxdri2.c
@@ -75,6 +75,7 @@ struct __GLXDRIscreen {
 
     __DRIcopySubBufferExtension *copySubBuffer;
     __DRIswapControlExtension *swapControl;
+    __DRItexBufferExtension *texBuffer;
 
     unsigned char glx_enable_bits[__GLX_EXT_BYTES];
 };
@@ -213,11 +214,41 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
 					      &read->driDrawable);
 }
 
+#ifdef __DRI_TEX_BUFFER
+
+#define isPowerOfTwo(n) (((n) & ((n) - 1 )) == 0)
+
 static int
 __glXDRIbindTexImage(__GLXcontext *baseContext,
 		     int buffer,
 		     __GLXdrawable *glxPixmap)
 {
+    ScreenPtr pScreen = glxPixmap->pDraw->pScreen;
+    __GLXDRIscreen * const screen = (__GLXDRIscreen *) glxGetScreen(pScreen);
+    PixmapPtr pixmap;
+    __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+    unsigned int flags;
+    int w, h, target;
+
+    if (screen->texBuffer == NULL)
+        return Success;
+
+    pixmap = (PixmapPtr) glxPixmap->pDraw;
+    w = pixmap->drawable.width;
+    h = pixmap->drawable.height;
+
+    if (!isPowerOfTwo(w) || !isPowerOfTwo(h))
+	target = GL_TEXTURE_RECTANGLE_ARB;
+    else
+	target = GL_TEXTURE_2D;
+
+    screen->texBuffer->setTexBuffer(&context->driContext,
+				    target,
+				    DRI2GetPixmapHandle(pixmap, &flags),
+				    pixmap->drawable.depth,
+				    pixmap->devKind,
+				    h);
+
     return Success;
 }
 
@@ -226,9 +257,30 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext,
 			int buffer,
 			__GLXdrawable *pixmap)
 {
+    /* FIXME: Just unbind the texture? */
     return Success;
 }
 
+#else
+
+static int
+__glXDRIbindTexImage(__GLXcontext *baseContext,
+		     int buffer,
+		     __GLXdrawable *glxPixmap)
+{
+    return Success;
+}
+
+static int
+__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+			int buffer,
+			__GLXdrawable *pixmap)
+{
+    return Success;
+}
+
+#endif
+
 static __GLXtextureFromPixmap __glXDRItextureFromPixmap = {
     __glXDRIbindTexImage,
     __glXDRIreleaseTexImage
@@ -434,6 +486,14 @@ initializeExtensions(__GLXDRIscreen *screen)
 	    LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n");
 	}
 #endif
+
+#ifdef __DRI_TEX_BUFFER
+	if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {
+	    screen->texBuffer = (__DRItexBufferExtension *) extensions[i];
+	    /* GLX_EXT_texture_from_pixmap is always enabled. */
+	    LogMessage(X_INFO, "AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n");
+	}
+#endif
 	/* Ignore unknown extensions */
     }
 }
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 7c703a7..3bc533e 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -348,6 +348,14 @@ DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName,
     return TRUE;
 }
 
+unsigned int
+DRI2GetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags)
+{
+    DRI2ScreenPtr ds = DRI2GetScreen(pPixmap->drawable.pScreen);
+
+    return ds->getPixmapHandle(pPixmap, flags);
+}
+
 static void *
 DRI2SetupSAREA(ScreenPtr pScreen, size_t driverSareaSize)
 {
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index 65b4c6b..c687a93 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -62,6 +62,9 @@ Bool DRI2Connect(ScreenPtr pScreen,
 		 int *ddxPatch,
 		 unsigned int *sareaHandle);
 
+unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap,
+				 unsigned int *flags);
+
 void DRI2Lock(ScreenPtr pScreen);
 void DRI2Unlock(ScreenPtr pScreen);
 
commit 879515b1399f87a47010532af70f34b9b09e2a9b
Author: Kristian Høgsberg <krh at sasori.boston.redhat.com>
Date:   Mon Feb 4 13:13:35 2008 -0500

    Add GLX provider for DRI2.

diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am
index 4cf56e8..e37e499 100644
--- a/GL/glx/Makefile.am
+++ b/GL/glx/Makefile.am
@@ -25,6 +25,7 @@ INCLUDES = \
 	-I$(top_srcdir)/hw/xfree86/os-support/bus \
 	-I$(top_srcdir)/hw/xfree86/common \
 	-I$(top_srcdir)/hw/xfree86/dri \
+	-I$(top_srcdir)/hw/xfree86/dri2 \
 	-I$(top_srcdir)/mi
 
 
@@ -36,6 +37,7 @@ nodist_libglx_la_SOURCES = indirect_size.h \
 
 libglxdri_la_SOURCES = \
         glxdri.c \
+        glxdri2.c \
         extension_string.c \
         extension_string.h
 
diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c
new file mode 100644
index 0000000..d8df604
--- /dev/null
+++ b/GL/glx/glxdri2.c
@@ -0,0 +1,573 @@
+/*
+ * Copyright © 2007 Red Hat, Inc
+ *
+ * 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 Red Hat,
+ * Inc not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission.  Red Hat, Inc makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL RED HAT, INC 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_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <dlfcn.h>
+
+#include <drm.h>
+#include <GL/gl.h>
+#include <GL/internal/dri_interface.h>
+
+#include <windowstr.h>
+#include <os.h>
+
+#define _XF86DRI_SERVER_
+#include <xf86drm.h>
+#include <xf86dristr.h>
+#include <xf86str.h>
+#include <xf86.h>
+#include <dri2.h>
+
+#include "glxserver.h"
+#include "glxutil.h"
+#include "glcontextmodes.h"
+
+#include "g_disptab.h"
+#include "glapitable.h"
+#include "glapi.h"
+#include "glthread.h"
+#include "dispatch.h"
+#include "extension_string.h"
+
+#define containerOf(ptr, type, member)			\
+    (type *)( (char *)ptr - offsetof(type,member) )
+
+typedef struct __GLXDRIscreen   __GLXDRIscreen;
+typedef struct __GLXDRIcontext  __GLXDRIcontext;
+typedef struct __GLXDRIdrawable __GLXDRIdrawable;
+
+struct __GLXDRIscreen {
+    __GLXscreen		 base;
+    __DRIscreen		 driScreen;
+    void		*driver;
+    int			 fd;
+
+    xf86EnterVTProc	*enterVT;
+    xf86LeaveVTProc	*leaveVT;
+
+    __DRIcopySubBufferExtension *copySubBuffer;
+    __DRIswapControlExtension *swapControl;
+
+    unsigned char glx_enable_bits[__GLX_EXT_BYTES];
+};
+
+struct __GLXDRIcontext {
+    __GLXcontext base;
+    __DRIcontext driContext;
+    drm_context_t hwContext;
+};
+
+struct __GLXDRIdrawable {
+    __GLXdrawable base;
+    __DRIdrawable driDrawable;
+};
+
+static const char CREATE_NEW_SCREEN_FUNC[] = __DRI2_CREATE_NEW_SCREEN_STRING;
+
+static void
+__glXDRIdrawableDestroy(__GLXdrawable *drawable)
+{
+    __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
+
+    (*private->driDrawable.destroyDrawable)(&private->driDrawable);
+
+    /* If the X window was destroyed, the dri DestroyWindow hook will
+     * aready have taken care of this, so only call if pDraw isn't NULL. */
+    if (drawable->pDraw != NULL)
+	DRI2DestroyDrawable(drawable->pDraw->pScreen, drawable->pDraw);
+
+    xfree(private);
+}
+
+static GLboolean
+__glXDRIdrawableResize(__GLXdrawable *glxPriv)
+{
+    /* Nothing to do here, the DRI driver asks the server for drawable
+     * geometry when it sess the SAREA timestamps change.*/
+
+    return GL_TRUE;
+}
+
+static GLboolean
+__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
+{
+    __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
+
+    (*private->driDrawable.swapBuffers)(&private->driDrawable);
+
+    return TRUE;
+}
+
+
+static int
+__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval)
+{
+    __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *)
+	glxGetScreen(baseDrawable->pDraw->pScreen);
+
+    if (screen->swapControl)
+	screen->swapControl->setSwapInterval(&draw->driDrawable, interval);
+
+    return 0;
+}
+
+
+static void
+__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
+			       int x, int y, int w, int h)
+{
+    __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *)
+	glxGetScreen(basePrivate->pDraw->pScreen);
+
+    if (screen->copySubBuffer)
+	screen->copySubBuffer->copySubBuffer(&private->driDrawable,
+					     x, y, w, h);
+}
+
+static void
+__glXDRIcontextDestroy(__GLXcontext *baseContext)
+{
+    __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) baseContext->pGlxScreen;
+
+    context->driContext.destroyContext(&context->driContext);
+    drmDestroyContext(screen->fd, context->hwContext);
+    __glXContextDestroy(&context->base);
+    xfree(context);
+}
+
+static int
+__glXDRIcontextMakeCurrent(__GLXcontext *baseContext)
+{
+    __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+    __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
+    __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
+
+    return (*context->driContext.bindContext)(&context->driContext,
+					      &draw->driDrawable,
+					      &read->driDrawable);
+}					      
+
+static int
+__glXDRIcontextLoseCurrent(__GLXcontext *baseContext)
+{
+    __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+
+    return (*context->driContext.unbindContext)(&context->driContext);
+}
+
+static int
+__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
+		    unsigned long mask)
+{
+    __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst;
+    __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc;
+
+    /* FIXME: We will need to add DRIcontext::copyContext for this. */
+
+    (void) dst;
+    (void) src;
+
+    return FALSE;
+}
+
+static int
+__glXDRIcontextForceCurrent(__GLXcontext *baseContext)
+{
+    __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
+    __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
+    __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
+
+    return (*context->driContext.bindContext)(&context->driContext,
+					      &draw->driDrawable,
+					      &read->driDrawable);
+}
+
+static int
+__glXDRIbindTexImage(__GLXcontext *baseContext,
+		     int buffer,
+		     __GLXdrawable *glxPixmap)
+{
+    return Success;
+}
+
+static int
+__glXDRIreleaseTexImage(__GLXcontext *baseContext,
+			int buffer,
+			__GLXdrawable *pixmap)
+{
+    return Success;
+}
+
+static __GLXtextureFromPixmap __glXDRItextureFromPixmap = {
+    __glXDRIbindTexImage,
+    __glXDRIreleaseTexImage
+};
+
+static void
+__glXDRIscreenDestroy(__GLXscreen *baseScreen)
+{
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
+
+    screen->driScreen.destroyScreen(&screen->driScreen);
+
+    dlclose(screen->driver);
+
+    __glXScreenDestroy(baseScreen);
+
+    xfree(screen);
+}
+
+static __GLXcontext *
+__glXDRIscreenCreateContext(__GLXscreen *baseScreen,
+			    __GLcontextModes *modes,
+			    __GLXcontext *baseShareContext)
+{
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
+    __GLXDRIcontext *context, *shareContext;
+    __DRIcontext *driShare;
+
+    shareContext = (__GLXDRIcontext *) baseShareContext;
+    if (shareContext)
+	driShare = &shareContext->driContext;
+    else
+	driShare = NULL;
+
+    context = xalloc(sizeof *context);
+    if (context == NULL)
+	return NULL;
+
+    memset(context, 0, sizeof *context);
+    context->base.destroy           = __glXDRIcontextDestroy;
+    context->base.makeCurrent       = __glXDRIcontextMakeCurrent;
+    context->base.loseCurrent       = __glXDRIcontextLoseCurrent;
+    context->base.copy              = __glXDRIcontextCopy;
+    context->base.forceCurrent      = __glXDRIcontextForceCurrent;
+    context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
+
+    if (drmCreateContext(screen->fd, &context->hwContext))
+	    return GL_FALSE;
+
+    context->driContext.private =
+	screen->driScreen.createNewContext(&screen->driScreen,
+					   modes,
+					   0, /* render type */
+					   driShare,
+					   context->hwContext,
+					   &context->driContext);
+
+    return &context->base;
+}
+
+static __GLXdrawable *
+__glXDRIscreenCreateDrawable(__GLXscreen *screen,
+			     DrawablePtr pDraw,
+			     int type,
+			     XID drawId,
+			     __GLcontextModes *modes)
+{
+    __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen;
+    __GLXDRIdrawable *private;
+    GLboolean retval;
+    drm_drawable_t hwDrawable;
+
+    private = xalloc(sizeof *private);
+    if (private == NULL)
+	return NULL;
+
+    memset(private, 0, sizeof *private);
+
+    if (!__glXDrawableInit(&private->base, screen,
+			   pDraw, type, drawId, modes)) {
+        xfree(private);
+	return NULL;
+    }
+
+    private->base.destroy       = __glXDRIdrawableDestroy;
+    private->base.resize        = __glXDRIdrawableResize;
+    private->base.swapBuffers   = __glXDRIdrawableSwapBuffers;
+    private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
+
+    retval = DRI2CreateDrawable(screen->pScreen, pDraw, &hwDrawable);
+
+    private->driDrawable.private =
+	(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
+						 modes,
+						 &private->driDrawable,
+						 hwDrawable, 0, NULL);
+
+    return &private->base;
+}
+
+static int
+getUST(int64_t *ust)
+{
+    struct timeval  tv;
+    
+    if (ust == NULL)
+	return -EFAULT;
+
+    if (gettimeofday(&tv, NULL) == 0) {
+	ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec;
+	return 0;
+    } else {
+	return -errno;
+    }
+}
+
+static void __glXReportDamage(__DRIdrawable *driDraw,
+			      int x, int y,
+			      drm_clip_rect_t *rects, int num_rects,
+			      GLboolean front_buffer)
+{
+    __GLXDRIdrawable *drawable =
+	    containerOf(driDraw, __GLXDRIdrawable, driDrawable);
+    DrawablePtr pDraw = drawable->base.pDraw;
+    RegionRec region;
+
+    REGION_INIT(pDraw->pScreen, &region, (BoxPtr) rects, num_rects);
+    REGION_TRANSLATE(pScreen, &region, pDraw->x, pDraw->y);
+    DamageDamageRegion(pDraw, &region);
+    REGION_UNINIT(pDraw->pScreen, &region);
+}
+
+/* Table of functions that we export to the driver. */
+static const __DRIinterfaceMethods interface_methods = {
+    _gl_context_modes_create,
+    _gl_context_modes_destroy,
+
+    NULL,
+
+    getUST,
+    NULL,
+
+    __glXReportDamage,
+};
+
+static const char dri_driver_path[] = DRI_DRIVER_PATH;
+
+static Bool
+glxDRIEnterVT (int index, int flags)
+{
+    __GLXDRIscreen *screen = (__GLXDRIscreen *) 
+	glxGetScreen(screenInfo.screens[index]);
+
+    LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
+
+    if (!(*screen->enterVT) (index, flags))
+	return FALSE;
+    
+    glxResumeClients();
+
+    return TRUE;
+}
+
+static void
+glxDRILeaveVT (int index, int flags)
+{
+    __GLXDRIscreen *screen = (__GLXDRIscreen *)
+	glxGetScreen(screenInfo.screens[index]);
+
+    LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n");
+
+    glxSuspendClients();
+
+    return (*screen->leaveVT) (index, flags);
+}
+
+static void
+initializeExtensions(__GLXDRIscreen *screen)
+{
+    const __DRIextension **extensions;
+    int i;
+
+    extensions = screen->driScreen.getExtensions(&screen->driScreen);
+    for (i = 0; extensions[i]; i++) {
+#ifdef __DRI_COPY_SUB_BUFFER
+	if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
+	    screen->copySubBuffer = (__DRIcopySubBufferExtension *) extensions[i];
+	    __glXEnableExtension(screen->glx_enable_bits,
+				 "GLX_MESA_copy_sub_buffer");
+	    
+	    LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n");
+	}
+#endif
+
+#ifdef __DRI_SWAP_CONTROL
+	if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) {
+	    screen->swapControl = (__DRIswapControlExtension *) extensions[i];
+	    __glXEnableExtension(screen->glx_enable_bits,
+				 "GLX_SGI_swap_control");
+	    __glXEnableExtension(screen->glx_enable_bits,
+				 "GLX_MESA_swap_control");
+	    
+	    LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n");
+	}
+#endif
+	/* Ignore unknown extensions */
+    }
+}
+    
+static __GLXscreen *
+__glXDRIscreenProbe(ScreenPtr pScreen)
+{
+    __DRI2_CREATE_NEW_SCREEN_FUNC *createNewScreen;
+    __DRIversion   ddx_version;
+    __DRIversion   dri_version;
+    __DRIversion   drm_version;
+    drmVersionPtr version;
+    const char *driverName;
+    __GLXDRIscreen *screen;
+    char filename[128];
+    size_t buffer_size;
+    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+    unsigned int sareaHandle;
+
+    screen = xalloc(sizeof *screen);
+    if (screen == NULL)
+      return NULL;
+    memset(screen, 0, sizeof *screen);
+
+    if (!xf86LoaderCheckSymbol("DRI2Connect") ||
+	!DRI2Connect(pScreen,
+		     &screen->fd,
+		     &driverName,
+		     &ddx_version.major,
+		     &ddx_version.minor,
+		     &ddx_version.patch,
+		     &sareaHandle)) {
+	LogMessage(X_INFO,
+		   "AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum);
+	return NULL;
+    }
+
+    screen->base.destroy        = __glXDRIscreenDestroy;
+    screen->base.createContext  = __glXDRIscreenCreateContext;
+    screen->base.createDrawable = __glXDRIscreenCreateDrawable;
+    screen->base.swapInterval   = __glXDRIdrawableSwapInterval;
+    screen->base.pScreen       = pScreen;
+
+    __glXInitExtensionEnableBits(screen->glx_enable_bits);
+
+    /* DRI protocol version. */
+    dri_version.major = XF86DRI_MAJOR_VERSION;
+    dri_version.minor = XF86DRI_MINOR_VERSION;
+    dri_version.patch = XF86DRI_PATCH_VERSION;
+
+    version = drmGetVersion(screen->fd);
+    if (version) {
+	drm_version.major = version->version_major;
+	drm_version.minor = version->version_minor;
+	drm_version.patch = version->version_patchlevel;
+	drmFreeVersion(version);
+    }
+    else {
+	drm_version.major = -1;
+	drm_version.minor = -1;
+	drm_version.patch = -1;
+    }
+
+    snprintf(filename, sizeof filename, "%s/%s_dri.so",
+             dri_driver_path, driverName);
+
+    screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
+    if (screen->driver == NULL) {
+	LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
+		   filename, dlerror());
+        goto handle_error;
+    }
+
+    createNewScreen = dlsym(screen->driver, CREATE_NEW_SCREEN_FUNC);
+    if (createNewScreen == NULL) {
+	LogMessage(X_ERROR, "AIGLX error: dlsym for %s failed (%s)\n",
+		   CREATE_NEW_SCREEN_FUNC, dlerror());
+      goto handle_error;
+    }
+    
+    screen->driScreen.private =
+	(*createNewScreen)(pScreen->myNum,
+			   &screen->driScreen,
+			   &ddx_version,
+			   &dri_version,
+			   &drm_version,
+			   screen->fd,
+			   sareaHandle,
+			   &interface_methods,
+			   &screen->base.fbconfigs);
+
+    if (screen->driScreen.private == NULL) {
+	LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed");
+	goto handle_error;
+    }
+
+    initializeExtensions(screen);
+
+    __glXScreenInit(&screen->base, pScreen);
+
+    buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
+    if (buffer_size > 0) {
+	if (screen->base.GLXextensions != NULL) {
+	    xfree(screen->base.GLXextensions);
+	}
+
+	screen->base.GLXextensions = xnfalloc(buffer_size);
+	(void) __glXGetExtensionString(screen->glx_enable_bits, 
+				       screen->base.GLXextensions);
+    }
+
+    screen->enterVT = pScrn->EnterVT;
+    pScrn->EnterVT = glxDRIEnterVT; 
+    screen->leaveVT = pScrn->LeaveVT;
+    pScrn->LeaveVT = glxDRILeaveVT;
+
+    LogMessage(X_INFO,
+	       "AIGLX: Loaded and initialized %s\n", filename);
+
+    return &screen->base;
+
+ handle_error:
+    if (screen->driver)
+        dlclose(screen->driver);
+
+    xfree(screen);
+
+    LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n");
+
+    return NULL;
+}
+
+__GLXprovider __glXDRI2Provider = {
+    __glXDRIscreenProbe,
+    "DRI2",
+    NULL
+};
diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c
index 88773a7..6575b27 100644
--- a/GL/glx/glxscreens.c
+++ b/GL/glx/glxscreens.c
@@ -280,6 +280,30 @@ void GlxSetVisualConfigs(int nconfigs,
      * call it. */
 }
 
+static void
+filterOutNativeConfigs(__GLXscreen *pGlxScreen)
+{
+    __GLcontextModes *m, *next, *native_modes, **last;
+    ScreenPtr pScreen = pGlxScreen->pScreen;
+    int i, depth;
+
+    last = &pGlxScreen->fbconfigs;
+    for (m = pGlxScreen->fbconfigs; m != NULL; m = next) {
+	next = m->next;
+	depth = m->redBits + m->blueBits + m->greenBits;
+
+	for (i = 0; i < pScreen->numVisuals; i++) {
+	    if (pScreen->visuals[i].nplanes == depth) {
+		*last = m;
+		last = &m->next;
+		break;
+	    }
+	}
+    }
+
+    *last = NULL;
+}
+
 static XID
 findVisualForConfig(ScreenPtr pScreen, __GLcontextModes *m)
 {
@@ -513,6 +537,8 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
     pGlxScreen->CloseScreen = pScreen->CloseScreen;
     pScreen->CloseScreen = glxCloseScreen;
 
+    filterOutNativeConfigs(pGlxScreen);
+
     i = 0;
     for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) {
 	m->fbconfigID = FakeClientID(0);
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index 0ff867d..a1a0886 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -125,6 +125,9 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin)
       provider = LoaderSymbol("__glXDRIProvider");
       if (provider)
 	GlxPushProvider(provider);
+      provider = LoaderSymbol("__glXDRI2Provider");
+      if (provider)
+	GlxPushProvider(provider);
     }
 
     switch (xf86Info.glxVisuals) {
commit b71dc54352bc56a889823040ec19c1d8e118a1f3
Author: Kristian Høgsberg <krh at sasori.boston.redhat.com>
Date:   Mon Feb 4 11:58:24 2008 -0500

    Add DRI2 module.

diff --git a/configure.ac b/configure.ac
index d8b78ea..10aa241 100644
--- a/configure.ac
+++ b/configure.ac
@@ -368,6 +368,7 @@ AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes])
 AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes])
 
 DRI=no
+DRI2=no
 KDRIVE_HW=no
 dnl it would be nice to autodetect these *CONS_SUPPORTs
 case $host_os in
@@ -380,6 +381,7 @@ case $host_os in
 	AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console])
 	AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console])
 	DRI=yes
+	DRI2=yes
 	;;
   *netbsd*)
 	AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
@@ -387,6 +389,7 @@ case $host_os in
 	AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console])
 	AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console])
 	DRI=yes
+	DRI2=yes
 	;;
   *openbsd*)
 	AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
@@ -395,6 +398,7 @@ case $host_os in
 	;;
   *linux*)
 	DRI=yes
+	DRI2=yes
 	KDRIVE_HW=yes
 	;;
   *solaris*)
@@ -535,6 +539,7 @@ AC_ARG_ENABLE(xdmcp,          AS_HELP_STRING([--disable-xdmcp], [Build XDMCP ext
 AC_ARG_ENABLE(xdm-auth-1,     AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto])
 AC_ARG_ENABLE(glx,            AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes])
 AC_ARG_ENABLE(dri,            AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval])
+AC_ARG_ENABLE(dri2,           AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: auto)]), [DRI2=$enableval])
 AC_ARG_ENABLE(xinerama,	      AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
 AC_ARG_ENABLE(xf86vidmode,    AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto])
 AC_ARG_ENABLE(xf86misc,       AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto])
@@ -857,6 +862,14 @@ 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([DRIPROTO], [xf86driproto >= 2.0.3])
+	PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.1])
+fi
+
 AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
 if test "x$XINERAMA" = xyes; then
 	AC_DEFINE(XINERAMA, 1, [Support Xinerama extension])
@@ -2129,6 +2142,7 @@ hw/xfree86/doc/devel/Makefile
 hw/xfree86/doc/man/Makefile
 hw/xfree86/doc/sgml/Makefile
 hw/xfree86/dri/Makefile
+hw/xfree86/dri2/Makefile
 hw/xfree86/dummylib/Makefile
 hw/xfree86/exa/Makefile
 hw/xfree86/fbdevhw/Makefile
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 4afc3a4..03c2c3a 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -4,6 +4,10 @@ if DRI
 DRI_SUBDIR = dri
 endif
 
+if DRI2
+DRI2_SUBDIR = dri2
+endif
+
 if XF86UTILS
 XF86UTILS_SUBDIR = utils
 endif
@@ -21,11 +25,11 @@ DOC_SUBDIR = doc
 SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \
 	  ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \
 	  xf8_16bpp loader dixmods exa modes \
-	  $(DRI_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
+	  $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
 
 DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
                parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \
-               xf8_16bpp xf8_32bpp loader dixmods dri exa modes \
+               xf8_16bpp xf8_32bpp loader dixmods dri dri2 exa modes \
 	       utils doc
 
 bin_PROGRAMS = Xorg
diff --git a/hw/xfree86/dri2/Makefile.am b/hw/xfree86/dri2/Makefile.am
new file mode 100644
index 0000000..be3cea4
--- /dev/null
+++ b/hw/xfree86/dri2/Makefile.am
@@ -0,0 +1,15 @@
+libdri2_la_LTLIBRARIES = libdri2.la
+libdri2_la_CFLAGS = \
+	-DHAVE_XORG_CONFIG_H \
+	-I at MESA_SOURCE@/include \
+	@DIX_CFLAGS@ @DRIPROTO_CFLAGS@ @LIBDRM_CFLAGS@ \
+	-I$(top_srcdir)/hw/xfree86/common \
+	-I$(top_srcdir)/hw/xfree86/os-support/bus
+
+libdri2_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@
+libdri2_ladir = $(moduledir)/extensions
+libdri2_la_SOURCES = \
+	dri2.c \
+	dri2.h
+
+sdk_HEADERS = dri2.h
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
new file mode 100644
index 0000000..7c703a7
--- /dev/null
+++ b/hw/xfree86/dri2/dri2.c
@@ -0,0 +1,448 @@
+/*
+ * 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 "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL 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 PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ *   Kristian Høgsberg (krh at redhat.com)
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <xf86drm.h>
+#include "xf86Module.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include "dri2.h"
+#include <GL/internal/dri_sarea.h>
+
+#include "xf86.h"
+
+static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKey;
+static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKey;
+static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKey;
+
+typedef struct _DRI2DrawablePriv {
+    drm_drawable_t		 drawable;
+    unsigned int		 handle;
+} DRI2DrawablePrivRec, *DRI2DrawablePrivPtr;
+
+typedef struct _DRI2Screen {
+    int				 fd;
+    drmBO			 sareaBO;
+    void			*sarea;
+    unsigned int		 sareaSize;
+    const char			*driverName;
+    int				 ddxVersionMajor;
+    int				 ddxVersionMinor;
+    int				 ddxVersionPatch;
+
+    __DRIEventBuffer		*buffer;
+    int				 locked;
+
+    DRI2GetPixmapHandleProcPtr   getPixmapHandle;
+    DRI2BeginClipNotifyProcPtr	 beginClipNotify;
+    DRI2EndClipNotifyProcPtr	 endClipNotify;
+
+    ClipNotifyProcPtr		 ClipNotify;
+    HandleExposuresProcPtr	 HandleExposures;
+} DRI2ScreenRec, *DRI2ScreenPtr;
+
+static DRI2ScreenPtr
+DRI2GetScreen(ScreenPtr pScreen)
+{
+    return dixLookupPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey);
+}
+
+static void *
+DRI2ScreenAllocEvent(DRI2ScreenPtr ds, size_t size)
+{
+    unsigned int *pad, mask = ds->buffer->size - 1;
+    size_t pad_size;
+    void *p;
+    
+    if ((ds->buffer->head & mask) + size > ds->buffer->size) {
+	/* The requested event size would wrap the buffer, so pad to
+	 * the end and allocate the event from the start. */
+	pad_size = ds->buffer->size - (ds->buffer->head & mask);
+	pad = (unsigned int *)
+	    (ds->buffer->data + (ds->buffer->prealloc & mask));
+	*pad = DRI2_EVENT_HEADER(DRI2_EVENT_PAD, pad_size);
+	ds->buffer->prealloc += pad_size;
+    }
+
+    p = ds->buffer->data + (ds->buffer->prealloc & mask);
+    ds->buffer->prealloc += size;
+
+    return p;
+}
+
+static void
+DRI2ScreenCommitEvents(DRI2ScreenPtr ds)
+{
+    ds->buffer->head = ds->buffer->prealloc;
+}
+
+static void
+DRI2PostDrawableConfig(DrawablePtr pDraw)
+{
+    ScreenPtr			 pScreen = pDraw->pScreen;
+    DRI2ScreenPtr		 ds = DRI2GetScreen(pScreen);
+    DRI2DrawablePrivPtr		 pPriv;
+    WindowPtr			 pWin;
+    PixmapPtr			 pPixmap;
+    BoxPtr			 pBox;
+    BoxRec			 pixmapBox;
+    int				 nBox;
+    int				 i;
+    __DRIDrawableConfigEvent	*e;
+    size_t			 size;
+
+    if (pDraw->type == DRAWABLE_WINDOW) {
+	pWin = (WindowPtr) pDraw;
+	pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey);
+
+	nBox = REGION_NUM_RECTS(&pWin->clipList);
+	pBox = REGION_RECTS(&pWin->clipList);
+
+	pPixmap = pScreen->GetWindowPixmap(pWin);
+    } else {
+	pPixmap = (PixmapPtr) pDraw;
+	pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey);
+
+	pixmapBox.x1 = 0;
+	pixmapBox.y1 = 0;
+	pixmapBox.x2 = pDraw->width;
+	pixmapBox.y2 = pDraw->height;
+	nBox = 1;
+	pBox = &pixmapBox;
+    }
+
+    if (!pPriv)
+	return;
+
+    size = sizeof *e + nBox * sizeof e->rects[0];
+
+    e = DRI2ScreenAllocEvent(ds, size);
+    e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_DRAWABLE_CONFIG, size);
+    e->drawable = pPriv->drawable;
+    e->x = pDraw->x - pPixmap->screen_x;
+    e->y = pDraw->y - pPixmap->screen_y;
+    e->width = pDraw->width;
+    e->height = pDraw->height;
+
+    e->num_rects = nBox;
+    for (i = 0; i < nBox; i++) {
+	e->rects[i].x1 = pBox->x1 - pPixmap->screen_x;
+	e->rects[i].y1 = pBox->y1 - pPixmap->screen_y;
+	e->rects[i].x2 = pBox->x2 - pPixmap->screen_x;
+	e->rects[i].y2 = pBox->y2 - pPixmap->screen_y;
+	pBox++;
+    }
+}
+
+static void
+DRI2PostBufferAttach(DrawablePtr pDraw)
+{
+    ScreenPtr			 pScreen = pDraw->pScreen;
+    DRI2ScreenPtr		 ds = DRI2GetScreen(pScreen);
+    DRI2DrawablePrivPtr		 pPriv;
+    WindowPtr			 pWin;
+    PixmapPtr			 pPixmap;
+    __DRIBufferAttachEvent	*e;
+    size_t			 size;
+    unsigned int		 handle, flags;
+
+    if (pDraw->type == DRAWABLE_WINDOW) {
+	pWin = (WindowPtr) pDraw;
+	pPixmap = pScreen->GetWindowPixmap(pWin);
+	pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey);
+    } else {
+	pPixmap = (PixmapPtr) pDraw;
+	pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey);
+    }
+
+    if (!pPriv)
+	return;
+
+    size = sizeof *e;
+
+    handle = ds->getPixmapHandle(pPixmap, &flags);
+    if (handle == 0 || handle == pPriv->handle)
+	return;
+
+    e = DRI2ScreenAllocEvent(ds, size);
+    e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_BUFFER_ATTACH, size);
+    e->drawable = pPriv->drawable;
+    e->buffer.attachment = DRI_DRAWABLE_BUFFER_FRONT_LEFT;
+    e->buffer.handle = handle;
+    e->buffer.pitch = pPixmap->devKind;
+    e->buffer.cpp = pPixmap->drawable.bitsPerPixel / 8;
+    e->buffer.flags = flags;
+
+    pPriv->handle = handle;
+}
+
+static void
+DRI2ClipNotify(WindowPtr pWin, int dx, int dy)
+{
+    ScreenPtr		pScreen = pWin->drawable.pScreen;
+    DRI2ScreenPtr	ds = DRI2GetScreen(pScreen);
+
+    if (!ds->locked) {
+        ds->beginClipNotify(pScreen);
+	ds->locked = 1;
+    }
+
+    if (ds->ClipNotify) {
+	pScreen->ClipNotify = ds->ClipNotify;
+	pScreen->ClipNotify(pWin, dx, dy);
+	pScreen->ClipNotify = DRI2ClipNotify;
+    }
+
+    DRI2PostDrawableConfig(&pWin->drawable);
+    DRI2PostBufferAttach(&pWin->drawable);
+}
+
+static void
+DRI2HandleExposures(WindowPtr pWin)
+{
+    ScreenPtr		pScreen = pWin->drawable.pScreen;
+    DRI2ScreenPtr	ds = DRI2GetScreen(pScreen);
+
+    if (ds->HandleExposures) {
+	pScreen->HandleExposures = ds->HandleExposures;
+	pScreen->HandleExposures(pWin);
+	pScreen->HandleExposures = DRI2HandleExposures;
+    }
+
+    DRI2ScreenCommitEvents(ds);
+
+    if (ds->locked) {
+        ds->endClipNotify(pScreen);
+	ds->locked = 0;
+    }
+}
+
+void
+DRI2CloseScreen(ScreenPtr pScreen)
+{
+    DRI2ScreenPtr	ds = DRI2GetScreen(pScreen);
+
+    pScreen->ClipNotify		= ds->ClipNotify;
+    pScreen->HandleExposures	= ds->HandleExposures;
+
+    drmBOUnmap(ds->fd, &ds->sareaBO);
+    drmBOUnreference(ds->fd, &ds->sareaBO);
+
+    xfree(ds);
+    dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, NULL);
+}
+
+Bool
+DRI2CreateDrawable(ScreenPtr pScreen,
+		   DrawablePtr pDraw, drm_drawable_t *pDrmDrawable)
+{
+    DRI2ScreenPtr	ds = DRI2GetScreen(pScreen);
+    WindowPtr		pWin;
+    PixmapPtr		pPixmap;
+    DRI2DrawablePrivPtr pPriv;
+    DevPrivateKey	key;
+    PrivateRec		**devPrivates;
+
+    if (pDraw->type == DRAWABLE_WINDOW) {
+	pWin = (WindowPtr) pDraw;
+	devPrivates = &pWin->devPrivates;
+	key = dri2WindowPrivateKey;
+    } else {
+	pPixmap = (PixmapPtr) pDraw;
+	devPrivates = &pPixmap->devPrivates;
+	key = dri2PixmapPrivateKey;
+    }
+
+    pPriv = dixLookupPrivate(devPrivates, key);
+    if (pPriv == NULL) {
+	pPriv = xalloc(sizeof *pPriv);
+	if (drmCreateDrawable(ds->fd, &pPriv->drawable))
+	    return FALSE;
+
+	dixSetPrivate(devPrivates, key, pPriv);
+    }
+
+    *pDrmDrawable = pPriv->drawable;
+
+    DRI2PostDrawableConfig(pDraw);
+    DRI2PostBufferAttach(pDraw);
+    DRI2ScreenCommitEvents(ds);
+
+    return TRUE;
+}
+
+void
+DRI2DestroyDrawable(ScreenPtr pScreen, DrawablePtr pDraw)
+{
+    DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
+    PixmapPtr pPixmap;
+    WindowPtr pWin;
+    DRI2DrawablePrivPtr pPriv;
+
+    if (pDraw->type == DRAWABLE_WINDOW) {
+	pWin = (WindowPtr) pDraw;
+	pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey);
+	dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, NULL);
+    } else {
+	pPixmap = (PixmapPtr) pDraw;
+	pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey);
+	dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL);
+    }
+
+    if (pPriv == NULL)
+	return;
+    
+    drmDestroyDrawable(ds->fd, pPriv->drawable);
+    xfree(pPriv);
+}
+
+Bool
+DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName,
+	    int *ddxMajor, int *ddxMinor, int *ddxPatch,
+	    unsigned int *sareaHandle)
+{
+    DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
+
+    if (ds == NULL)
+	return FALSE;
+
+    *fd = ds->fd;
+    *driverName = ds->driverName;
+    *ddxMajor = ds->ddxVersionMajor;
+    *ddxMinor = ds->ddxVersionMinor;
+    *ddxPatch = ds->ddxVersionPatch;
+    *sareaHandle = ds->sareaBO.handle;
+
+    return TRUE;
+}
+
+static void *
+DRI2SetupSAREA(ScreenPtr pScreen, size_t driverSareaSize)
+{
+    DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
+    unsigned long mask;
+    const size_t event_buffer_size = 32 * 1024;
+
+    ds->sareaSize = 
+	sizeof(*ds->buffer) + event_buffer_size +
+	driverSareaSize +
+	sizeof (unsigned int);
+
+    mask = DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_MAPPABLE |
+	DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_SHAREABLE;
+
+    if (drmBOCreate(ds->fd, ds->sareaSize, 1, NULL, mask, 0, &ds->sareaBO))
+	return NULL;
+
+    if (drmBOMap(ds->fd, &ds->sareaBO,
+		 DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE, 0, &ds->sarea)) {
+	drmBOUnreference(ds->fd, &ds->sareaBO);
+	return NULL;
+    }
+
+    xf86DrvMsg(pScreen->myNum, X_INFO,
+	       "[DRI2] Allocated %d byte SAREA, BO handle 0x%08x\n",
+	       ds->sareaSize, ds->sareaBO.handle);
+    memset(ds->sarea, 0, ds->sareaSize);
+
+    ds->buffer = ds->sarea;
+    ds->buffer->block_header =
+	DRI2_SAREA_BLOCK_HEADER(DRI2_SAREA_BLOCK_EVENT_BUFFER,
+				sizeof *ds->buffer + event_buffer_size);
+    ds->buffer->size = event_buffer_size;
+
+    return DRI2_SAREA_BLOCK_NEXT(ds->buffer);
+}
+
+void *
+DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
+{
+    DRI2ScreenPtr ds;
+    void *p;
+
+    ds = xalloc(sizeof *ds);
+    if (!ds)
+	return NULL;
+
+    ds->fd = info->fd;
+    ds->driverName		= info->driverName;
+    ds->ddxVersionMajor		= info->ddxVersionMajor;
+    ds->ddxVersionMinor		= info->ddxVersionMinor;
+    ds->ddxVersionPatch		= info->ddxVersionPatch;
+
+    ds->getPixmapHandle		= info->getPixmapHandle;
+    ds->beginClipNotify		= info->beginClipNotify;
+    ds->endClipNotify		= info->endClipNotify;
+
+    ds->ClipNotify		= pScreen->ClipNotify;
+    pScreen->ClipNotify		= DRI2ClipNotify;
+    ds->HandleExposures		= pScreen->HandleExposures;
+    pScreen->HandleExposures	= DRI2HandleExposures;
+
+    dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds);
+
+    p = DRI2SetupSAREA(pScreen, info->driverSareaSize);
+    if (p == NULL) {
+	xfree(ds);
+	return NULL;
+    }
+
+    xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n");
+
+    return p;
+}
+
+static pointer
+DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin)
+{
+    return (pointer) 1;
+}
+
+static XF86ModuleVersionInfo DRI2VersRec =
+{
+    "dri2",
+    MODULEVENDORSTRING,
+    MODINFOSTRING1,
+    MODINFOSTRING2,
+    XORG_VERSION_CURRENT,
+    1, 0, 0,
+    ABI_CLASS_EXTENSION,
+    ABI_EXTENSION_VERSION,
+    MOD_CLASS_NONE,
+    { 0, 0, 0, 0 }
+};
+
+_X_EXPORT XF86ModuleData dri2ModuleData = { &DRI2VersRec, DRI2Setup, NULL };
+
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
new file mode 100644
index 0000000..65b4c6b
--- /dev/null
+++ b/hw/xfree86/dri2/dri2.h
@@ -0,0 +1,77 @@
+/*
+ * 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 "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL 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 PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ *   Kristian Høgsberg (krh at redhat.com)
+ */
+
+#ifndef _DRI2_H_
+#define _DRI2_H_
+
+typedef unsigned int	(*DRI2GetPixmapHandleProcPtr)(PixmapPtr p,
+						      unsigned int *flags);
+typedef void		(*DRI2BeginClipNotifyProcPtr)(ScreenPtr pScreen);
+typedef void		(*DRI2EndClipNotifyProcPtr)(ScreenPtr pScreen);
+
+typedef struct {
+    unsigned int version;	/* Version of this struct */
+    int fd;
+    size_t driverSareaSize;
+    const char *driverName;
+    int ddxVersionMajor, ddxVersionMinor, ddxVersionPatch;
+    DRI2GetPixmapHandleProcPtr getPixmapHandle;
+    DRI2BeginClipNotifyProcPtr beginClipNotify;
+    DRI2EndClipNotifyProcPtr endClipNotify;
+}  DRI2InfoRec, *DRI2InfoPtr;
+
+void *DRI2ScreenInit(ScreenPtr	pScreen,
+		     DRI2InfoPtr info);
+
+void DRI2CloseScreen(ScreenPtr pScreen);
+
+Bool DRI2Connect(ScreenPtr pScreen,
+		 int *fd,
+		 const char **driverName,
+		 int *ddxMajor,
+		 int *ddxMinor,
+		 int *ddxPatch,
+		 unsigned int *sareaHandle);
+
+void DRI2Lock(ScreenPtr pScreen);
+void DRI2Unlock(ScreenPtr pScreen);
+
+Bool DRI2CreateDrawable(ScreenPtr	 pScreen,
+			DrawablePtr	 pDraw,
+			drm_drawable_t	*pDrmDrawable);
+
+void DRI2DestroyDrawable(ScreenPtr	pScreen,
+			 DrawablePtr	pDraw);
+
+void DRI2ExtensionInit(void);
+
+#endif
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 068b551..38639d6 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -436,6 +436,9 @@
 
 #undef XEPHYR_DRI
 
+/* Build DRI2 extension */
+#undef DRI2
+
 /* Build DBE support */
 #undef DBE
 
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index b91ea92..0603eab 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -54,6 +54,9 @@
 /* Building DRI-capable DDX. */
 #undef XF86DRI
 
+/* Build DRI2 extension */
+#undef DRI2
+
 /* Solaris 8 or later? */
 #undef __SOL8__
 
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index dc6f1b3..1d41b4c 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -142,6 +142,9 @@
 /* Build DRI extension */
 #undef XF86DRI
 
+/* Build DRI2 extension */
+#undef DRI2
+
 /* Build Xorg server */
 #undef XORGSERVER
 
commit 005e31d3de04e7003f84a94d30f2b75a9636266e
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Fri Feb 15 00:01:32 2008 +0000

    AIGLX: Refactor code common between __glXDRI{drawableDestroy,releaseTexImage}.

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index e405ee0..304fed2 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -180,46 +180,53 @@ __glXDRIenterServer(GLboolean rendering)
     DRIWakeupHandler(NULL, 0, NULL);
 }
 
+
 static void
-__glXDRIdrawableDestroy(__GLXdrawable *drawable)
+__glXDRIdoReleaseTexImage(__GLXDRIscreen *screen, __GLXDRIdrawable *drawable)
 {
-    __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
+    GLuint lastOverride = screen->lastTexOffsetOverride;
 
-    int i;
+    if (lastOverride) {
+	__GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride;
+	int i;
 
-    for (i = 0; i < screenInfo.numScreens; i++) {
-	__GLXDRIscreen * const screen = (__GLXDRIscreen *)
-	    glxGetScreen(screenInfo.screens[i]);
+	for (i = 0; i < lastOverride; i++) {
+	    if (texOffsetOverride[i] == drawable) {
 
-	GLuint lastOverride = screen->lastTexOffsetOverride;
+		texOffsetOverride[i] = NULL;
 
-	if (lastOverride) {
-	    __GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride;
-	    int i;
-	    
-	    for (i = 0; i < lastOverride; i++) {
-		if (texOffsetOverride[i] == private) {
-		    
-		    texOffsetOverride[i] = NULL;
-		    
-		    if (i + 1 == lastOverride) {
-			lastOverride = 0;
-			
-			while (i--) {
-			    if (texOffsetOverride[i]) {
-				lastOverride = i + 1;
-				break;
-			    }
+		if (i + 1 == lastOverride) {
+		    lastOverride = 0;
+
+		    while (i--) {
+			if (texOffsetOverride[i]) {
+			    lastOverride = i + 1;
+			    break;
 			}
-			
-			screen->lastTexOffsetOverride = lastOverride;
-			
-			break;
 		    }
+
+		    screen->lastTexOffsetOverride = lastOverride;
+
+		    break;
 		}
 	    }
 	}
     }
+}
+
+
+static void
+__glXDRIdrawableDestroy(__GLXdrawable *drawable)
+{
+    __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
+
+    int i;
+
+    for (i = 0; i < screenInfo.numScreens; i++) {
+	__glXDRIdoReleaseTexImage((__GLXDRIscreen *)
+				  glxGetScreen(screenInfo.screens[i]),
+				  private);
+    }
 
     (*private->driDrawable.destroyDrawable)(&private->driDrawable);
 
@@ -561,41 +568,9 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext,
 			int buffer,
 			__GLXdrawable *pixmap)
 {
-    ScreenPtr pScreen = pixmap->pDraw->pScreen;
-    __GLXDRIdrawable *driDraw =
-	    containerOf(pixmap, __GLXDRIdrawable, base);
-    __GLXDRIscreen * const screen =
-	(__GLXDRIscreen *) glxGetScreen(pScreen);
-    GLuint lastOverride = screen->lastTexOffsetOverride;
-
-    if (lastOverride) {
-	__GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride;
-	int i;
-
-	for (i = 0; i < lastOverride; i++) {
-	    if (texOffsetOverride[i] == driDraw) {
-		if (screen->texOffsetFinish)
-		    screen->texOffsetFinish((PixmapPtr)pixmap->pDraw);
-
-		texOffsetOverride[i] = NULL;
-
-		if (i + 1 == lastOverride) {
-		    lastOverride = 0;
-
-		    while (i--) {
-			if (texOffsetOverride[i]) {
-			    lastOverride = i + 1;
-			    break;
-			}
-		    }
-
-		    screen->lastTexOffsetOverride = lastOverride;
-
-		    break;
-		}
-	    }
-	}
-    }
+    __glXDRIdoReleaseTexImage((__GLXDRIscreen *)
+			      glxGetScreen(pixmap->pDraw->pScreen),
+			      containerOf(pixmap, __GLXDRIdrawable, base));
 
     return Success;
 }
commit cd78f0d0fc08e4e2339ed09dad1a12802de7729c
Author: Pierre Willenbrock <pierre at pirsoft.de>
Date:   Thu Feb 7 21:28:28 2008 +0100

    AIGLX: Fix crash after client using GLX_EXT_texture_from_pixmap died.

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 6c1a199..e405ee0 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -185,6 +185,42 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
 {
     __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
 
+    int i;
+
+    for (i = 0; i < screenInfo.numScreens; i++) {
+	__GLXDRIscreen * const screen = (__GLXDRIscreen *)
+	    glxGetScreen(screenInfo.screens[i]);
+
+	GLuint lastOverride = screen->lastTexOffsetOverride;
+
+	if (lastOverride) {
+	    __GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride;
+	    int i;
+	    
+	    for (i = 0; i < lastOverride; i++) {
+		if (texOffsetOverride[i] == private) {
+		    
+		    texOffsetOverride[i] = NULL;
+		    
+		    if (i + 1 == lastOverride) {
+			lastOverride = 0;
+			
+			while (i--) {
+			    if (texOffsetOverride[i]) {
+				lastOverride = i + 1;
+				break;
+			    }
+			}
+			
+			screen->lastTexOffsetOverride = lastOverride;
+			
+			break;
+		    }
+		}
+	    }
+	}
+    }
+
     (*private->driDrawable.destroyDrawable)(&private->driDrawable);
 
     /* If the X window was destroyed, the dri DestroyWindow hook will
commit 3e0353c78571890f849a1db47b0540aacc6793bc
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 15 06:42:48 2008 +1100

    Bah, macros are hard.

diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c
index d2ee595..8127afd 100644
--- a/hw/xfree86/dixmods/extmod/xf86misc.c
+++ b/hw/xfree86/dixmods/extmod/xf86misc.c
@@ -108,7 +108,7 @@ static unsigned char XF86MiscReqCode = 0;
 #endif
 
 #ifdef DEBUG
-# define DEBUG_P(x) ErrorF(x"\n");
+# define DEBUG_P(x) ErrorF x;
 #else
 # define DEBUG_P(x) do {} while (0)
 #endif
@@ -120,8 +120,6 @@ XFree86MiscExtensionInit(void)
 {
     ExtensionEntry* extEntry;
 
-    DEBUG_P("XFree86MiscExtensionInit");
-
     if (!xf86GetModInDevEnabled())
 	return;
 
@@ -154,8 +152,6 @@ ProcXF86MiscQueryVersion(client)
     xXF86MiscQueryVersionReply rep;
     register int n;
 
-    DEBUG_P("XF86MiscQueryVersion");
-
     REQUEST_SIZE_MATCH(xXF86MiscQueryVersionReq);
     rep.type = X_Reply;
     rep.length = 0;
@@ -252,8 +248,6 @@ ProcXF86MiscGetMouseSettings(client)
     register int n;
     int devnamelen;
 
-    DEBUG_P("XF86MiscGetMouseSettings");
-
     REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq);
     rep.type = X_Reply;
     rep.sequenceNumber = client->sequence;
@@ -303,8 +297,6 @@ ProcXF86MiscGetKbdSettings(client)
     pointer kbd;
     register int n;
 
-    DEBUG_P("XF86MiscGetKbdSettings");
-
     REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq);
     rep.type = X_Reply;
     rep.length = 0;
@@ -338,19 +330,17 @@ ProcXF86MiscSetMouseSettings(client)
     
     REQUEST(xXF86MiscSetMouseSettingsReq);
 
-    DEBUG_P("XF86MiscSetMouseSettings");
-
     REQUEST_AT_LEAST_SIZE(xXF86MiscSetMouseSettingsReq);
 
     ClientVersion(client, &major, &minor);
     
     if (xf86GetVerbosity() > 1) {
-	DEBUG_P("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n",
+	DEBUG_P(("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n",
 		(int)stuff->mousetype, (int)stuff->baudrate,
-		(int)stuff->samplerate, stuff->chordmiddle);
-	DEBUG_P("                   em3but: %d em3tim: %d res: %d flags: %ld\n",
+		(int)stuff->samplerate, stuff->chordmiddle));
+	DEBUG_P(("                   em3but: %d em3tim: %d res: %d flags: %ld\n",
 		stuff->emulate3buttons, (int)stuff->emulate3timeout,
-		(int)stuff->resolution, (unsigned long)stuff->flags);
+		(int)stuff->resolution, (unsigned long)stuff->flags));
     }
 
     if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (pointer) 0)
@@ -376,7 +366,7 @@ ProcXF86MiscSetMouseSettings(client)
 		return BadAlloc;
 	    strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen);
 	    if (xf86GetVerbosity() > 1)
-		DEBUG_P("SetMouseSettings - device: %s\n",devname);
+		DEBUG_P(("SetMouseSettings - device: %s\n",devname));
 	    MiscExtSetMouseDevice(mouse, devname);
 	}
     }
@@ -395,12 +385,12 @@ ProcXF86MiscSetMouseSettings(client)
         case MISC_RET_BADCOMBO:     return MISCERR(XF86MiscBadMouseCombo);
         case MISC_RET_NOMODULE:     return MISCERR(XF86MiscNoModule);
         default:
-	    DEBUG_P("Unexpected return from MiscExtApply(POINTER) = %d\n", ret);
+	    DEBUG_P(("Unexpected return from MiscExtApply(POINTER) = %d\n", ret));
 	    return BadImplementation;
     }
 
     if (xf86GetVerbosity() > 1)
-	DEBUG_P("SetMouseSettings - Succeeded\n");
+	DEBUG_P(("SetMouseSettings - Succeeded\n"));
     return (client->noClientException);
 }
 
@@ -412,14 +402,12 @@ ProcXF86MiscSetKbdSettings(client)
     pointer kbd;
     REQUEST(xXF86MiscSetKbdSettingsReq);
 
-    DEBUG_P("XF86MiscSetKbdSettings");
-
     REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq);
 
     if (xf86GetVerbosity() > 1)
-	DEBUG_P("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n",
+	DEBUG_P(("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n",
 		(int)stuff->kbdtype, (int)stuff->rate,
-		(int)stuff->delay, stuff->servnumlock);
+		(int)stuff->delay, stuff->servnumlock));
 
     if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (pointer) 0)
 	return BadAlloc;
@@ -434,12 +422,12 @@ ProcXF86MiscSetKbdSettings(client)
 	case MISC_RET_BADVAL:       return BadValue;
 	case MISC_RET_BADKBDTYPE:   return MISCERR(XF86MiscBadKbdType);
 	default:
-	    DEBUG_P("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret);
+	    DEBUG_P(("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret));
 	    return BadImplementation;
     }
 
     if (xf86GetVerbosity() > 1)
-	DEBUG_P("SetKbdSettings - Succeeded\n");
+	DEBUG_P(("SetKbdSettings - Succeeded\n"));
     return (client->noClientException);
 }
 
@@ -451,14 +439,12 @@ ProcXF86MiscSetGrabKeysState(client)
     xXF86MiscSetGrabKeysStateReply rep;
     REQUEST(xXF86MiscSetGrabKeysStateReq);
 
-    DEBUG_P("XF86MiscSetGrabKeysState");
-
     REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq);
 
     if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) {
 	if (xf86GetVerbosity() > 1)
-	    DEBUG_P("SetGrabKeysState - %s\n",
-		   stuff->enable ? "enabled" : "disabled");
+	    DEBUG_P(("SetGrabKeysState - %s\n",
+		   stuff->enable ? "enabled" : "disabled"));
     }
 
     rep.type = X_Reply;
@@ -482,8 +468,6 @@ ProcXF86MiscSetClientVersion(ClientPtr client)
 
     MiscPrivPtr pPriv;
 
-    DEBUG_P("XF86MiscSetClientVersion");
-
     REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq);
 
     if ((pPriv = M_GETPRIV(client)) == NULL) {
@@ -493,7 +477,7 @@ ProcXF86MiscSetClientVersion(ClientPtr client)
 	M_SETPRIV(client, pPriv);
     }
     if (xf86GetVerbosity() > 1) 
-	    DEBUG_P("SetClientVersion: %i %i\n",stuff->major,stuff->minor);
+	    DEBUG_P(("SetClientVersion: %i %i\n",stuff->major,stuff->minor));
     pPriv->major = stuff->major;
     pPriv->minor = stuff->minor;
     
@@ -511,8 +495,6 @@ ProcXF86MiscGetFilePaths(client)
     register int n;
     int configlen, modulelen, loglen;
 
-    DEBUG_P("XF86MiscGetFilePaths");
-
     REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq);
     rep.type = X_Reply;
     rep.sequenceNumber = client->sequence;
@@ -559,8 +541,6 @@ ProcXF86MiscPassMessage(client)
 
     REQUEST(xXF86MiscPassMessageReq);
 
-    DEBUG_P("XF86MiscPassMessage");
-
     REQUEST_AT_LEAST_SIZE(xXF86MiscPassMessageReq);
     size = (sizeof(xXF86MiscPassMessageReq) + 3) >> 2;
     size+= (stuff->typelen + 3) >> 2;
commit c38feeb1492d9a47379b2e4d77dbadd8c421d17f
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Thu Feb 14 18:52:47 2008 +0100

    Fix typo in commit b8b7cdf6df3d338c50db670ce4cfd245f9fa8844.

diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c
index 3164d75..d2ee595 100644
--- a/hw/xfree86/dixmods/extmod/xf86misc.c
+++ b/hw/xfree86/dixmods/extmod/xf86misc.c
@@ -111,7 +111,6 @@ static unsigned char XF86MiscReqCode = 0;
 # define DEBUG_P(x) ErrorF(x"\n");
 #else
 # define DEBUG_P(x) do {} while (0)
-}
 #endif
 
 #define MISCERR(x)	(miscErrorBase + x)
commit b8b7cdf6df3d338c50db670ce4cfd245f9fa8844
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 15 01:31:46 2008 +1100

    Silence useless debug spew from XFree86-Misc extension.

diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c
index 8f44346..3164d75 100644
--- a/hw/xfree86/dixmods/extmod/xf86misc.c
+++ b/hw/xfree86/dixmods/extmod/xf86misc.c
@@ -110,7 +110,8 @@ static unsigned char XF86MiscReqCode = 0;
 #ifdef DEBUG
 # define DEBUG_P(x) ErrorF(x"\n");
 #else
-# define DEBUG_P(x) /**/
+# define DEBUG_P(x) do {} while (0)
+}
 #endif
 
 #define MISCERR(x)	(miscErrorBase + x)
@@ -345,10 +346,10 @@ ProcXF86MiscSetMouseSettings(client)
     ClientVersion(client, &major, &minor);
     
     if (xf86GetVerbosity() > 1) {
-	ErrorF("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n",
+	DEBUG_P("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n",
 		(int)stuff->mousetype, (int)stuff->baudrate,
 		(int)stuff->samplerate, stuff->chordmiddle);
-	ErrorF("                   em3but: %d em3tim: %d res: %d flags: %ld\n",
+	DEBUG_P("                   em3but: %d em3tim: %d res: %d flags: %ld\n",
 		stuff->emulate3buttons, (int)stuff->emulate3timeout,
 		(int)stuff->resolution, (unsigned long)stuff->flags);
     }
@@ -376,7 +377,7 @@ ProcXF86MiscSetMouseSettings(client)
 		return BadAlloc;
 	    strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen);
 	    if (xf86GetVerbosity() > 1)
-		ErrorF("SetMouseSettings - device: %s\n",devname);
+		DEBUG_P("SetMouseSettings - device: %s\n",devname);
 	    MiscExtSetMouseDevice(mouse, devname);
 	}
     }
@@ -395,12 +396,12 @@ ProcXF86MiscSetMouseSettings(client)
         case MISC_RET_BADCOMBO:     return MISCERR(XF86MiscBadMouseCombo);
         case MISC_RET_NOMODULE:     return MISCERR(XF86MiscNoModule);
         default:
-	    ErrorF("Unexpected return from MiscExtApply(POINTER) = %d\n", ret);
+	    DEBUG_P("Unexpected return from MiscExtApply(POINTER) = %d\n", ret);
 	    return BadImplementation;
     }
 
     if (xf86GetVerbosity() > 1)
-	ErrorF("SetMouseSettings - Succeeded\n");
+	DEBUG_P("SetMouseSettings - Succeeded\n");
     return (client->noClientException);
 }
 
@@ -417,7 +418,7 @@ ProcXF86MiscSetKbdSettings(client)
     REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq);
 
     if (xf86GetVerbosity() > 1)
-	ErrorF("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n",
+	DEBUG_P("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n",
 		(int)stuff->kbdtype, (int)stuff->rate,
 		(int)stuff->delay, stuff->servnumlock);
 
@@ -434,12 +435,12 @@ ProcXF86MiscSetKbdSettings(client)
 	case MISC_RET_BADVAL:       return BadValue;
 	case MISC_RET_BADKBDTYPE:   return MISCERR(XF86MiscBadKbdType);
 	default:
-	    ErrorF("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret);
+	    DEBUG_P("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret);
 	    return BadImplementation;
     }
 
     if (xf86GetVerbosity() > 1)
-	ErrorF("SetKbdSettings - Succeeded\n");
+	DEBUG_P("SetKbdSettings - Succeeded\n");
     return (client->noClientException);
 }
 
@@ -457,7 +458,7 @@ ProcXF86MiscSetGrabKeysState(client)
 
     if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) {
 	if (xf86GetVerbosity() > 1)
-	    ErrorF("SetGrabKeysState - %s\n",
+	    DEBUG_P("SetGrabKeysState - %s\n",
 		   stuff->enable ? "enabled" : "disabled");
     }
 
@@ -493,7 +494,7 @@ ProcXF86MiscSetClientVersion(ClientPtr client)
 	M_SETPRIV(client, pPriv);
     }
     if (xf86GetVerbosity() > 1) 
-	    ErrorF("SetClientVersion: %i %i\n",stuff->major,stuff->minor);
+	    DEBUG_P("SetClientVersion: %i %i\n",stuff->major,stuff->minor);
     pPriv->major = stuff->major;
     pPriv->minor = stuff->minor;
     
commit 4573cb2ce4b859744118d9a33de3599f033cdd2b
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Wed Feb 13 20:16:56 2008 -0500

    security: Revise set of permissions granted to untrusted clients.
    
    Bug #14480: untrusted access broken on 7.3.

diff --git a/Xext/security.c b/Xext/security.c
index 0696559..a3cde2c 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -70,10 +70,19 @@ static char *SecurityUntrustedExtensions[] = {
     NULL
 };
 
-/* Access modes that untrusted clients can do to trusted stuff */
-static const Mask SecurityAllowedMask =
-    DixGetAttrAccess | DixListPropAccess | DixGetPropAccess |
-    DixGetFocusAccess | DixListAccess | DixReceiveAccess;
+/*
+ * Access modes that untrusted clients are allowed on trusted objects.
+ */
+static const Mask SecurityResourceMask =
+    DixGetAttrAccess | DixReceiveAccess | DixListPropAccess |
+    DixGetPropAccess | DixListAccess;
+static const Mask SecurityRootWindowExtraMask =
+    DixReceiveAccess | DixSendAccess | DixAddAccess | DixRemoveAccess;
+static const Mask SecurityDeviceMask =
+    DixGetAttrAccess | DixReceiveAccess | DixGetFocusAccess |
+    DixGrabAccess | DixSetAttrAccess | DixUseAccess;
+static const Mask SecurityServerMask = DixGetAttrAccess | DixGrabAccess;
+static const Mask SecurityClientMask = DixGetAttrAccess;
 
 
 /* SecurityAudit
@@ -751,11 +760,15 @@ SecurityDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     XaceDeviceAccessRec *rec = calldata;
     SecurityStateRec *subj, *obj;
     Mask requested = rec->access_mode;
-    Mask allowed = SecurityAllowedMask;
+    Mask allowed = SecurityDeviceMask;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
     obj = dixLookupPrivate(&serverClient->devPrivates, stateKey);
 
+    if (rec->dev != inputInfo.keyboard)
+	/* this extension only supports the core keyboard */
+	allowed = requested;
+
     if (SecurityDoCheck(subj, obj, requested, allowed) != Success) {
 	SecurityAudit("Security denied client %d keyboard access on request "
 		      "%s\n", rec->client->index,
@@ -792,7 +805,7 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     SecurityStateRec *subj, *obj;
     int cid = CLIENT_ID(rec->id);
     Mask requested = rec->access_mode;
-    Mask allowed = SecurityAllowedMask;
+    Mask allowed = SecurityResourceMask;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
     obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey);
@@ -801,11 +814,15 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     if (cid == 0) {
 	if (rec->rtype & RC_DRAWABLE)
 	    /* additional operations allowed on root windows */
-	    allowed |= DixReadAccess|DixSendAccess;
+	    allowed |= SecurityRootWindowExtraMask;
 
 	else if (rec->rtype == RT_COLORMAP)
 	    /* allow access to default colormaps */
 	    allowed = requested;
+
+	else
+	    /* allow read access to other server-owned resources */
+	    allowed |= DixReadAccess;
     }
 
     if (SecurityDoCheck(subj, obj, requested, allowed) == Success)
@@ -816,9 +833,10 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	return;
 #endif
 
-    SecurityAudit("Security: denied client %d access to resource 0x%x "
-		  "of client %d on request %s\n", rec->client->index, rec->id,
-		  cid, SecurityLookupRequestName(rec->client));
+    SecurityAudit("Security: denied client %d access %x to resource 0x%x "
+		  "of client %d on request %s\n", rec->client->index,
+		  requested, rec->id, cid,
+		  SecurityLookupRequestName(rec->client));
     rec->status = BadAccess; /* deny access */
 }
 
@@ -850,7 +868,7 @@ SecurityServer(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     XaceServerAccessRec *rec = calldata;
     SecurityStateRec *subj, *obj;
     Mask requested = rec->access_mode;
-    Mask allowed = SecurityAllowedMask;
+    Mask allowed = SecurityServerMask;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
     obj = dixLookupPrivate(&serverClient->devPrivates, stateKey);
@@ -869,7 +887,7 @@ SecurityClient(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     XaceClientAccessRec *rec = calldata;
     SecurityStateRec *subj, *obj;
     Mask requested = rec->access_mode;
-    Mask allowed = SecurityAllowedMask;
+    Mask allowed = SecurityClientMask;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
     obj = dixLookupPrivate(&rec->target->devPrivates, stateKey);
@@ -889,7 +907,7 @@ SecurityProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     SecurityStateRec *subj, *obj;
     ATOM name = rec->pProp->propertyName;
     Mask requested = rec->access_mode;
-    Mask allowed = SecurityAllowedMask | DixReadAccess;
+    Mask allowed = SecurityResourceMask | DixReadAccess;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
     obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey);
commit e99aadbc2635e87543fc9980d8156c3ede83544f
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Wed Feb 13 19:46:29 2008 -0500

    xselinux: Add use to permission map for devices.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 9acc93c..5aa2ad3 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -138,7 +138,7 @@ static struct security_class_mapping map[] = {
     { "x_selection", { "read", "", "", "", "getattr", "setattr", NULL }},
     { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }},
-    { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "", "manage", "", "bell", NULL }},
+    { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "use", "manage", "", "bell", NULL }},
     { "x_server", { "record", "", "", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "grab", "", "", "", "", "", "", "", "manage", "debug", NULL }},
     { "x_extension", { "", "", "", "", "query", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_event", { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "send", "receive", NULL }},
commit ae43d835bdaef96c3c73d7cee5b105f07340833d
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Wed Feb 13 19:39:49 2008 -0500

    XACE: Change access modes for some device-related requests.
    
    Opening a device is not really "reading" it.
    Requests that globally configure a device should require "manage" access.

diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index e7d04a7..30174f4 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -111,7 +111,7 @@ ProcXChangeDeviceControl(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
 
     len = stuff->length - (sizeof(xChangeDeviceControlReq) >> 2);
-    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
+    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
     if (ret != Success)
         goto out;
 
diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c
index 696b74a..3155e87 100644
--- a/Xi/chgfctl.c
+++ b/Xi/chgfctl.c
@@ -444,7 +444,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
 
     len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2);
-    rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
+    rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
     if (rc != Success)
 	return rc;
 
diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c
index df334c1..3f51648 100644
--- a/Xi/chgkmap.c
+++ b/Xi/chgkmap.c
@@ -106,7 +106,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client)
     count = stuff->keyCodes * stuff->keySymsPerKeyCode;
     REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32));
 
-    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
+    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
     if (ret != Success)
 	return ret;
     len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2);
diff --git a/Xi/closedev.c b/Xi/closedev.c
index b2b5f69..94b7391 100644
--- a/Xi/closedev.c
+++ b/Xi/closedev.c
@@ -146,7 +146,7 @@ ProcXCloseDevice(ClientPtr client)
     REQUEST(xCloseDeviceReq);
     REQUEST_SIZE_MATCH(xCloseDeviceReq);
 
-    rc = dixLookupDevice(&d, stuff->deviceid, client, DixGetAttrAccess);
+    rc = dixLookupDevice(&d, stuff->deviceid, client, DixUseAccess);
     if (rc != Success)
 	return rc;
 
diff --git a/Xi/opendev.c b/Xi/opendev.c
index 128b1bd..acda385 100644
--- a/Xi/opendev.c
+++ b/Xi/opendev.c
@@ -106,7 +106,7 @@ ProcXOpenDevice(ClientPtr client)
 	stuff->deviceid == inputInfo.keyboard->id)
 	return BadDevice;
 
-    status = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess);
+    status = dixLookupDevice(&dev, stuff->deviceid, client, DixUseAccess);
     if (status == BadDevice) {  /* not open */
 	for (dev = inputInfo.off_devices; dev; dev = dev->next)
 	    if (dev->id == stuff->deviceid)
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index 3035c64..f052255 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -109,7 +109,7 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
     rep.sequenceNumber = client->sequence;
     rep.status = MappingSuccess;
 
-    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
+    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
     if (ret != Success)
 	return ret;
 
diff --git a/Xi/setmmap.c b/Xi/setmmap.c
index be3d3cb..34efde5 100644
--- a/Xi/setmmap.c
+++ b/Xi/setmmap.c
@@ -98,7 +98,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
     REQUEST(xSetDeviceModifierMappingReq);
     REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
 
-    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
+    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
     if (ret != Success)
 	return ret;
 
diff --git a/dix/devices.c b/dix/devices.c
index 534a0b9..bdcca5a 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1295,7 +1295,7 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap,
                 }
             }
 
-	    rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess);
+	    rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess);
 	    if (rc != Success)
 		return rc;
 
@@ -1435,7 +1435,7 @@ ProcChangeKeyboardMapping(ClientPtr client)
 
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
         if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) {
-            rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess);
+            rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess);
 	    if (rc != Success)
                 return rc;
         }
@@ -1472,7 +1472,7 @@ DoSetPointerMapping(ClientPtr client, DeviceIntPtr device, BYTE *map, int n)
 
     for (dev = inputInfo.devices; dev; dev = dev->next) {
         if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) {
-	    rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetAttrAccess);
+	    rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess);
 	    if (rc != Success)
 		return rc;
 	}
@@ -1810,7 +1810,7 @@ ProcChangeKeyboardControl (ClientPtr client)
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
         if ((pDev->coreEvents || pDev == inputInfo.keyboard) &&
             pDev->kbdfeed && pDev->kbdfeed->CtrlProc) {
-            ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess);
+            ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess);
 	    if (ret != Success)
                 return ret;
         }
@@ -1961,7 +1961,7 @@ ProcChangePointerControl(ClientPtr client)
     for (mouse = inputInfo.devices; mouse; mouse = mouse->next) {
         if ((mouse->coreEvents || mouse == inputInfo.pointer) &&
             mouse->ptrfeed && mouse->ptrfeed->CtrlProc) {
-	    rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixSetAttrAccess);
+	    rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixManageAccess);
 	    if (rc != Success)
 		return rc;
 	}
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 23e1dc7..26f2812 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -211,7 +211,7 @@ ProcXkbSelectEvents(ClientPtr client)
     if (!(client->xkbClientFlags&_XkbClientInitialized))
 	return BadAccess;
 
-    CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
+    CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixUseAccess);
 
     if (((stuff->affectWhich&XkbMapNotifyMask)!=0)&&(stuff->affectMap)) {
 	client->mapNotifyMask&= ~stuff->affectMap;
@@ -694,7 +694,7 @@ ProcXkbSetControls(ClientPtr client)
     if (!(client->xkbClientFlags & _XkbClientInitialized))
 	return BadAccess;
 
-    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
     CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
 
     for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) {
@@ -2304,7 +2304,7 @@ ProcXkbSetMap(ClientPtr client)
     if (!(client->xkbClientFlags&_XkbClientInitialized))
 	return BadAccess;
 
-    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
     CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask);
 
     XkbSetCauseXkbReq(&cause,X_kbSetMap,client);
@@ -2618,7 +2618,7 @@ ProcXkbSetCompatMap(ClientPtr client)
     if (!(client->xkbClientFlags&_XkbClientInitialized))
 	return BadAccess;
 
-    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
 
     data = (char *)&stuff[1];
     xkbi = dev->key->xkbInfo;
@@ -4844,7 +4844,7 @@ ProcXkbSetGeometry(ClientPtr client)
     if (!(client->xkbClientFlags&_XkbClientInitialized))
 	return BadAccess;
 
-    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+    CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
     CHK_ATOM_OR_NONE(stuff->name);
 
     xkb= dev->key->xkbInfo->desc;
@@ -5126,7 +5126,7 @@ ProcXkbGetKbdByName(ClientPtr client)
     Bool			geom_changed;
     XkbSrvLedInfoPtr            old_sli;
     XkbSrvLedInfoPtr            sli;
-    Mask access_mode = DixGetAttrAccess | DixSetAttrAccess;
+    Mask access_mode = DixGetAttrAccess | DixManageAccess;
 
     REQUEST(xkbGetKbdByNameReq);
     REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq);
@@ -5997,7 +5997,7 @@ xkbExtensionDeviceNotify ed;
 
     change= stuff->change;
 
-    CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
+    CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
     CHK_MASK_LEGAL(0x01,change,XkbXI_AllFeaturesMask);
 
     wire= (char *)&stuff[1];
commit ba69904148acf755bec8fbda2eb869144f0ef7d4
Author: Adam Jackson <ajax at redhat.com>
Date:   Sun Feb 3 22:49:23 2008 +1100

    Simplify dlloader a bit more.

diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c
index 2afdef7..4caefd0 100644
--- a/hw/xfree86/loader/dlloader.c
+++ b/hw/xfree86/loader/dlloader.c
@@ -71,15 +71,9 @@
 #define DLSYM_PREFIX ""
 #endif
 
-typedef struct {
-    int handle;
-    void *dlhandle;
-    int flags;
-} DLModuleRec, *DLModulePtr;
-
 /* Hooray, yet another open coded linked list! FIXME */
 typedef struct DLModuleList {
-    DLModulePtr module;
+    void *module;
     struct DLModuleList *next;
 } DLModuleList;
 
@@ -88,19 +82,22 @@ static DLModuleList *dlModuleList = NULL;
 static void *
 DLFindSymbolLocal(pointer module, const char *name)
 {
-    DLModulePtr dlfile = module;
     void *p;
     char *n;
 
     static const char symPrefix[] = DLSYM_PREFIX;
 
-    n = malloc(strlen(symPrefix) + strlen(name) + 1);
-    if (strlen(symPrefix))
+    if (strlen(symPrefix)) {
+	n = malloc(strlen(symPrefix) + strlen(name) + 1);
 	sprintf(n, "%s%s", symPrefix, name);
-    else
-	sprintf(n, "%s", name);
-    p = dlsym(dlfile->dlhandle, n);
-    free(n);
+    } else {
+	n = name;
+    }
+
+    p = dlsym(module, n);
+
+    if (strlen(symPrefix))
+	free(n);
 
     return p;
 }
@@ -127,7 +124,7 @@ DLFindSymbol(const char *name)
 	global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL);
 
     if (global_scope)
-	return dlsym(global_scope, name);
+	return DLFindSymbolLocal(global_scope, name);
 
     return NULL;
 }
@@ -135,23 +132,17 @@ DLFindSymbol(const char *name)
 void *
 DLLoadModule(loaderPtr modrec, int flags)
 {
-    DLModulePtr dlfile;
+    void * dlfile;
     DLModuleList *l;
     int dlopen_flags;
 
-    if ((dlfile = calloc(1, sizeof(DLModuleRec))) == NULL) {
-	ErrorF("Unable to allocate DLModuleRec\n");
-	return NULL;
-    }
-    dlfile->handle = modrec->handle;
     if (flags & LD_FLAG_GLOBAL)
 	dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL;
     else
 	dlopen_flags = DLOPEN_LAZY;
-    dlfile->dlhandle = dlopen(modrec->name, dlopen_flags);
-    if (dlfile->dlhandle == NULL) {
+    dlfile = dlopen(modrec->name, dlopen_flags);
+    if (dlfile == NULL) {
 	ErrorF("dlopen: %s\n", dlerror());
-	free(dlfile);
 	return NULL;
     }
 
@@ -166,7 +157,6 @@ DLLoadModule(loaderPtr modrec, int flags)
 void
 DLUnloadModule(void *modptr)
 {
-    DLModulePtr dlfile = (DLModulePtr) modptr;
     DLModuleList *l, *p;
 
     /* remove it from dlModuleList. */
@@ -185,6 +175,5 @@ DLUnloadModule(void *modptr)
 	    p = l;
 	}
     }
-    dlclose(dlfile->dlhandle);
-    free(modptr);
+    dlclose(modptr);
 }
commit f750ce53ac450824d0c792d11eafdf311cf8abc0
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 17:33:48 2008 +1100

    Remove some braindamage from ModuleDesc.
    
    Yay dead code elimination.

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 8978f82..1368d04 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
  *
diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h
index b71ad45..9c73db3 100644
--- a/hw/xfree86/loader/loaderProcs.h
+++ b/hw/xfree86/loader/loaderProcs.h
@@ -62,17 +62,11 @@ typedef struct module_desc {
     struct module_desc *child;
     struct module_desc *sib;
     struct module_desc *parent;
-    struct module_desc *demand_next;
     char *name;
-    char *filename;
-    char *identifier;
-    XID client_id;
-    int in_use;
     int handle;
     ModuleSetupProc SetupProc;
     ModuleTearDownProc TearDownProc;
     void *TearDownData;		/* returned from SetupProc */
-    const char *path;
     const XF86ModuleVersionInfo *VersionInfo;
 } ModuleDesc, *ModuleDescPtr;
 
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 45e9cb3..650dcf3 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -786,12 +786,7 @@ NewModuleDesc(const char *name)
 	mdp->child = NULL;
 	mdp->sib = NULL;
 	mdp->parent = NULL;
-	mdp->demand_next = NULL;
 	mdp->name = xstrdup(name);
-	mdp->filename = NULL;
-	mdp->identifier = NULL;
-	mdp->client_id = 0;
-	mdp->in_use = 0;
 	mdp->handle = -1;
 	mdp->SetupProc = NULL;
 	mdp->TearDownProc = NULL;
@@ -816,15 +811,10 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent)
     if (LoaderHandleOpen(mod->handle) == -1)
 	return NULL;
 
-    ret->filename = xstrdup(mod->filename);
-    ret->identifier = mod->identifier;
-    ret->client_id = mod->client_id;
-    ret->in_use = mod->in_use;
     ret->handle = mod->handle;
     ret->SetupProc = mod->SetupProc;
     ret->TearDownProc = mod->TearDownProc;
     ret->TearDownData = NULL;
-    ret->path = mod->path;
     ret->child = DuplicateModule(mod->child, ret);
     ret->sib = DuplicateModule(mod->sib, parent);
     ret->parent = parent;
@@ -943,8 +933,6 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
     if (ret->handle < 0)
 	goto LoadModule_fail;
 
-    ret->filename = xstrdup(found);
-
     /* drop any explicit suffix from the module name */
     p = strchr(name, '.');
     if (p)
@@ -998,7 +986,6 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
 	    ret->SetupProc = setup;
 	if (teardown)
 	    ret->TearDownProc = teardown;
-	ret->path = path;
 	ret->VersionInfo = vers;
     } else {
 	/* No initdata is OK for external modules */
@@ -1120,7 +1107,6 @@ UnloadModuleOrDriver(ModuleDescPtr mod)
     if (mod->sib)
 	UnloadModuleOrDriver(mod->sib);
     TestFree(mod->name);
-    TestFree(mod->filename);
     xfree(mod);
 #ifdef __alpha__
     istream_mem_barrier();
@@ -1145,7 +1131,6 @@ UnloadSubModule(ModuleDescPtr mod)
 	UnloadModuleOrDriver(mod->child);
 
     TestFree(mod->name);
-    TestFree(mod->filename);
     xfree(mod);
 }
 
@@ -1156,12 +1141,6 @@ FreeModuleDesc(ModuleDescPtr head)
 
     if (head == (ModuleDescPtr) 1)
 	return;
-    /*
-     * only free it if it's not marked as in use. In use means that it may
-     * be unloaded someday, and UnloadModule will free it
-     */
-    if (head->in_use)
-	return;
     if (head->child)
 	FreeModuleDesc(head->child);
     sibs = head;
commit e91ff09568c5579818b6641e88e95c6fe122cbe7
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 17:21:34 2008 +1100

    Friends don't let friends call xf86AddModuleInfo.
    
    That code only existed to leak memory.  It can go now, thanks.

diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 4e7d914..4b3e104 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -337,8 +337,8 @@ int  xf86RegisterRootWindowProperty(int ScrnIndex, Atom	property, Atom type,
 				    pointer value);
 Bool xf86IsUnblank(int mode);
 
-void xf86AddModuleInfo(ModuleInfoPtr info, pointer module);
-void xf86DeleteModuleInfo(int idx);
+_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module);
+_X_DEPRECATED void xf86DeleteModuleInfo(int idx);
 void xf86getsecs(long *, long *);
 
 /* xf86Debug.c */
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index ba603f4..0dc42c6 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -153,8 +153,6 @@ DriverPtr *xf86DriverList = NULL;
 int xf86NumDrivers = 0;
 InputDriverPtr *xf86InputDriverList = NULL;
 int xf86NumInputDrivers = 0;
-ModuleInfoPtr *xf86ModuleInfoList = NULL;
-int xf86NumModuleInfos = 0;
 int xf86NumScreens = 0;
 
 const char *xf86VisualNames[] = {
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index ec524e6..8978f82 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -170,37 +170,17 @@ xf86LookupInput(const char *name)
     return NULL;
 }
 
+/* ABI stubs of despair */
 _X_EXPORT void
-xf86AddModuleInfo(ModuleInfoPtr info, pointer module)
+xf86AddModuleInfo(pointer info, pointer module)
 {
-    /* Don't add null entries */
-    if (!module)
-	return;
-
-    if (xf86ModuleInfoList == NULL)
-	xf86NumModuleInfos = 0;
-
-    xf86NumModuleInfos++;
-    xf86ModuleInfoList = xnfrealloc(xf86ModuleInfoList,
-				    xf86NumModuleInfos * sizeof(ModuleInfoPtr));
-    xf86ModuleInfoList[xf86NumModuleInfos - 1] = xnfalloc(sizeof(ModuleInfoRec));
-    *xf86ModuleInfoList[xf86NumModuleInfos - 1] = *info;
-    xf86ModuleInfoList[xf86NumModuleInfos - 1]->module = module;
-    xf86ModuleInfoList[xf86NumModuleInfos - 1]->refCount = 0;
 }
 
 _X_EXPORT void
 xf86DeleteModuleInfo(int idx)
 {
-    if (xf86ModuleInfoList[idx]) {
-	if (xf86ModuleInfoList[idx]->module)
-	    UnloadModule(xf86ModuleInfoList[idx]->module);
-	xfree(xf86ModuleInfoList[idx]);
-	xf86ModuleInfoList[idx] = NULL;
-    }
 }
 
-
 /* Allocate a new ScrnInfoRec in xf86Screens */
 
 _X_EXPORT ScrnInfoPtr
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 4723f5a..32801cb 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
  *
@@ -97,8 +96,6 @@ extern Bool xf86SupportedMouseTypes[];
 extern int xf86NumMouseTypes;
 
 extern DriverPtr *xf86DriverList;
-extern ModuleInfoPtr *xf86ModuleInfoList;
-extern int xf86NumModuleInfos;
 extern int xf86NumDrivers;
 extern Bool xf86Resetting;
 extern Bool xf86Initialising;
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 2e02135..fc94284 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -348,7 +348,7 @@ typedef struct _DriverRec {
  * functions to configuration tools, the Xserver, or any other
  * application/module interested in such information.
  */
-typedef struct _ModuleInfoRec {
+_X_DEPRECATED typedef struct _ModuleInfoRec {
     int			moduleVersion;
     char *		moduleName;
     pointer		module;
diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c
index b8d306e..086639c 100644
--- a/hw/xfree86/exa/examodule.c
+++ b/hw/xfree86/exa/examodule.c
@@ -178,8 +178,6 @@ exaDDXDriverInit(ScreenPtr pScreen)
     
 }
 
-static MODULESETUPPROTO(exaSetup);
-
 /*ARGSUSED*/
 static const OptionInfoRec *
 EXAAvailableOptions(void *unused)
@@ -201,26 +199,4 @@ static XF86ModuleVersionInfo exaVersRec =
 	{0,0,0,0}
 };
 
-_X_EXPORT XF86ModuleData exaModuleData = { &exaVersRec, exaSetup, NULL };
-
-static ModuleInfoRec EXA = {
-    1,
-    "EXA",
-    NULL,
-    0,
-    EXAAvailableOptions,
-};
-
-/*ARGSUSED*/
-static pointer
-exaSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
-{
-    static Bool Initialised = FALSE;
-
-    if (!Initialised) {
-	Initialised = TRUE;
-	xf86AddModuleInfo(&EXA, Module);
-    }
-
-    return (pointer)TRUE;
-}
+_X_EXPORT XF86ModuleData exaModuleData = { &exaVersRec, NULL, NULL };
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 623e87a..754e9c0 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -479,8 +479,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     SYMFUNC(xf86IsScreenPrimary)
     SYMFUNC(xf86RegisterRootWindowProperty)
     SYMFUNC(xf86IsUnblank)
-    SYMFUNC(xf86AddModuleInfo)
-    SYMFUNC(xf86DeleteModuleInfo)
 
 #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
     /* xf86sbusBus.c */
diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c
index fe0b70a..1b7c154 100644
--- a/hw/xfree86/xaa/xaaInitAccel.c
+++ b/hw/xfree86/xaa/xaaInitAccel.c
@@ -93,8 +93,6 @@ static const OptionInfoRec XAAOptions[] = {
 				OPTV_NONE,	{0}, FALSE }
 };
 
-static MODULESETUPPROTO(xaaSetup);
-
 static XF86ModuleVersionInfo xaaVersRec =
 {
 	"xaa",
@@ -109,29 +107,7 @@ static XF86ModuleVersionInfo xaaVersRec =
 	{0,0,0,0}
 };
 
-_X_EXPORT XF86ModuleData xaaModuleData = { &xaaVersRec, xaaSetup, NULL };
-
-ModuleInfoRec XAA = {
-    1,
-    "XAA",
-    NULL,
-    0,
-    XAAAvailableOptions,
-};
-
-/*ARGSUSED*/
-static pointer
-xaaSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
-{
-    static Bool Initialised = FALSE;
-
-    if (!Initialised) {
-	Initialised = TRUE;
-	xf86AddModuleInfo(&XAA, Module);
-    }
-
-    return (pointer)TRUE;
-}
+_X_EXPORT XF86ModuleData xaaModuleData = { &xaaVersRec, NULL, NULL };
 
 /*ARGSUSED*/
 static const OptionInfoRec *
commit 0bdd20a0454c94f902fd4874855125bf7510fcf5
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 16:15:58 2008 +1100

    Eradicate the VTInit code.
    
    "This option should rarely be used."  Never sounds like a better idea.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 622c318..605c6b3 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -733,7 +733,6 @@ typedef enum {
     FLAG_DISABLEMODINDEV,
     FLAG_MODINDEVALLOWNONLOCAL,
     FLAG_ALLOWMOUSEOPENFAIL,
-    FLAG_VTINIT,
     FLAG_VTSYSREQ,
     FLAG_XKBDISABLE,
     FLAG_PCIPROBE1,
@@ -785,8 +784,6 @@ static OptionInfoRec FlagOptions[] = {
 	{0}, FALSE },
   { FLAG_ALLOWMOUSEOPENFAIL,	"AllowMouseOpenFail",		OPTV_BOOLEAN,
 	{0}, FALSE },
-  { FLAG_VTINIT,		"VTInit",			OPTV_STRING,
-	{0}, FALSE },
   { FLAG_VTSYSREQ,		"VTSysReq",			OPTV_BOOLEAN,
 	{0}, FALSE },
   { FLAG_XKBDISABLE,		"XkbDisable",			OPTV_BOOLEAN,
@@ -977,8 +974,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 #endif
     }
 
-    xf86Info.vtinit = xf86GetOptValString(FlagOptions, FLAG_VTINIT);
-
     if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE1))
 	xf86Info.pciFlags = PCIProbe1;
     if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE2))
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index d796d62..ba603f4 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -97,7 +97,6 @@ InputInfoPtr xf86InputDevs = NULL;
 xf86InfoRec xf86Info = {
 	-1,		/* consoleFd */
 	-1,		/* vtno */
-	NULL,		/* vtinit */
 	FALSE,		/* vtSysreq */
 	SKWhenNeeded,	/* ddxSpecialKeys */
 	NULL,		/* pMouse */
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 2a7ecfd..41cf1d1 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -102,7 +102,6 @@ static void xf86PrintBanner(void);
 static void xf86PrintMarkers(void);
 static void xf86PrintDefaultModulePath(void);
 static void xf86PrintDefaultLibraryPath(void);
-static void xf86RunVtInit(void);
 
 static Bool probe_devices_from_device_sections(DriverPtr drvp);
 static Bool add_matching_devices_to_configure_list(DriverPtr drvp);
@@ -238,9 +237,6 @@ PostConfigInit(void)
     xf86OSPMClose = xf86OSPMOpen();
 #endif
     
-    /* Run an external VT Init program if specified in the config file */
-    xf86RunVtInit();
-
     /* Do this after XF86Config is read (it's normally in OsInit()) */
     OsInitColors();
 }
@@ -1915,44 +1911,6 @@ xf86PrintDefaultLibraryPath(void)
   ErrorF("%s\n", DEFAULT_LIBRARY_PATH);
 }
 
-static void
-xf86RunVtInit(void)
-{
-    int i;
-
-    /*
-     * If VTInit was set, run that program with consoleFd as stdin and stdout
-     */
-
-    if (xf86Info.vtinit) {
-      switch(fork()) {
-      case -1:
-          FatalError("xf86RunVtInit: fork failed (%s)\n", strerror(errno));
-          break;
-      case 0:  /* child */
-	  if (setuid(getuid()) == -1) {
-	      xf86Msg(X_ERROR, "xf86RunVtInit: setuid failed (%s)\n",
-			 strerror(errno));
-	      exit(255);
-	  }
-          /* set stdin, stdout to the consoleFd */
-          for (i = 0; i < 2; i++) {
-            if (xf86Info.consoleFd != i) {
-              close(i);
-              dup(xf86Info.consoleFd);
-            }
-          }
-          execl("/bin/sh", "sh", "-c", xf86Info.vtinit, (void *)NULL);
-          xf86Msg(X_WARNING, "exec of /bin/sh failed for VTInit (%s)\n",
-                 strerror(errno));
-          exit(255);
-          break;
-      default:  /* parent */
-          wait(NULL);
-      }
-    }
-}
-
 /*
  * xf86LoadModules iterates over a list that is being passed in.
  */             
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 92a6305..d97ca44 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -75,7 +75,6 @@ typedef enum {
 typedef struct {
     int			consoleFd;
     int			vtno;
-    char *		vtinit;
     Bool		vtSysreq;
     SpecialKeysInDDX	ddxSpecialKeys;
 
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 608ba37..96f30c4 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -507,17 +507,6 @@ This allows the server to start up even if the mouse device can't be
 opened/initialised.
 Default: false.
 .TP 7
-.BI "Option \*qVTInit\*q  \*q" command \*q
-Runs
-.I command
-after the VT used by the server has been opened.
-The command string is passed to \*q/bin/sh \-c\*q, and is run with the real
-user's id with stdin and stdout set to the VT.
-The purpose of this option is to allow system dependent VT initialisation
-commands to be run.
-This option should rarely be needed.
-Default: not set.
-.TP 7
 .BI "Option \*qVTSysReq\*q  \*q" boolean \*q
 enables the SYSV\-style VT switch sequence for non\-SYSV systems
 which support VT switching.
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index 786dac1..6e4fdea 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -208,7 +208,6 @@ typedef enum {
     XKBVARIANT,
     XKBOPTIONS,
     /* The next two have become ServerFlags options */
-    VTINIT,
     VTSYSREQ,
     /* Obsolete keyboard tokens */
     SERVERNUM,
commit 24089b06243101b1bff4f2fd79fcbfd6a93992d5
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 16:11:13 2008 +1100

    Don't bother warning people about the keyboard driver rename, just do it.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index a3ddfd0..2a7ecfd 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1135,12 +1135,6 @@ InitInput(argc, argv)
 	for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) {
 	    /* Replace obsolete keyboard driver with kbd */
 	    if (!xf86NameCmp((*pDev)->driver, "keyboard")) {
-		xf86MsgVerb(X_WARNING, 0,
-			    "*** WARNING the legacy keyboard driver \"%s\" has been removed\n",
-			    (*pDev)->driver);
-		xf86MsgVerb(X_WARNING, 0,
-			    "*** Using the new \"kbd\" driver for \"%s\".\n",
-			    (*pDev)->identifier);
 		strcpy((*pDev)->driver, "kbd");
             }
 
commit 2aaf6ac134fa9f61984b1c03929c7b596c971cc8
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 16:10:23 2008 +1100

    Don't even attempt to parse -bpp in xfree86 DDX option parsing.
    
    This hasn't been valid since 1999.  Get with the times, man.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index d12b6bd..a3ddfd0 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1566,15 +1566,6 @@ ddxProcessArgument(int argc, char **argv, int i)
     xf86sFlag = TRUE;
     return 0;
   }
-  if (!strcmp(argv[i], "-bpp"))
-  {
-    ErrorF("The -bpp option is no longer supported.\n"
-	"\tUse -depth to set the color depth, and use -fbbpp if you really\n"
-	"\tneed to force a non-default framebuffer (hardware) pixel format.\n");
-    if (++i >= argc)
-      return 1;
-    return 2;
-  }
   if (!strcmp(argv[i], "-pixmap24"))
   {
     xf86Pix24 = Pix24Use24;
commit ef77e4c4419703b5a802f3eee92476a43f788a86
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 16:03:01 2008 +1100

    Remove useless commentary from environment and argument processing.

diff --git a/os/utils.c b/os/utils.c
index 22f9541..4041028 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -2002,18 +2002,6 @@ enum BadCode {
 #define BUGADDRESS "xorg at freedesktop.org"
 #endif
 
-#define ARGMSG \
-    "\nIf the arguments used are valid, and have been rejected incorrectly\n" \
-      "please send details of the arguments and why they are valid to\n" \
-      "%s.  In the meantime, you can start the Xserver as\n" \
-      "the \"super user\" (root).\n"   
-
-#define ENVMSG \
-    "\nIf the environment is valid, and have been rejected incorrectly\n" \
-      "please send details of the environment and why it is valid to\n" \
-      "%s.  In the meantime, you can start the Xserver as\n" \
-      "the \"super user\" (root).\n"
-
 void
 CheckUserParameters(int argc, char **argv, char **envp)
 {
@@ -2060,10 +2048,6 @@ CheckUserParameters(int argc, char **argv, char **envp)
 		/* Check for bad environment variables and values */
 #if REMOVE_ENV_LD
 		while (envp[i] && (strncmp(envp[i], "LD", 2) == 0)) {
-#ifdef ENVDEBUG
-		    ErrorF("CheckUserParameters: removing %s from the "
-			   "environment\n", strtok(envp[i], "="));
-#endif
 		    for (j = i; envp[j]; j++) {
 			envp[j] = envp[j+1];
 		    }
@@ -2071,10 +2055,6 @@ CheckUserParameters(int argc, char **argv, char **envp)
 #endif   
 		if (envp[i] && (strlen(envp[i]) > MAX_ENV_LENGTH)) {
 #if REMOVE_LONG_ENV
-#ifdef ENVDEBUG
-		    ErrorF("CheckUserParameters: removing %s from the "
-			   "environment\n", strtok(envp[i], "="));
-#endif
 		    for (j = i; envp[j]; j++) {
 			envp[j] = envp[j+1];
 		    }
@@ -2127,20 +2107,16 @@ CheckUserParameters(int argc, char **argv, char **envp)
 	return;
     case UnsafeArg:
 	ErrorF("Command line argument number %d is unsafe\n", i);
-	ErrorF(ARGMSG, BUGADDRESS);
 	break;
     case ArgTooLong:
 	ErrorF("Command line argument number %d is too long\n", i);
-	ErrorF(ARGMSG, BUGADDRESS);
 	break;
     case UnprintableArg:
 	ErrorF("Command line argument number %d contains unprintable"
 		" characters\n", i);
-	ErrorF(ARGMSG, BUGADDRESS);
 	break;
     case EnvTooLong:
 	ErrorF("Environment variable `%s' is too long\n", e);
-	ErrorF(ENVMSG, BUGADDRESS);
 	break;
     case OutputIsPipe:
 	ErrorF("Stdout and/or stderr is a pipe\n");
@@ -2150,8 +2126,6 @@ CheckUserParameters(int argc, char **argv, char **envp)
 	break;
     default:
 	ErrorF("Unknown error\n");
-	ErrorF(ARGMSG, BUGADDRESS);
-	ErrorF(ENVMSG, BUGADDRESS);
 	break;
     }
     FatalError("X server aborted because of unsafe environment\n");
commit f3b3b37ec6197f8884417fbc26630d3a28f2e319
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 15:36:11 2008 +1100

    Use strerror instead of errno values in user strings.

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 779f3b9..d5c5704 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -236,15 +236,15 @@ shmalloc(
     size = (size + pagesize-1) & -pagesize;
     shmid = shmget(IPC_PRIVATE, size, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
     if (shmid == -1) {
-	ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, errno = %d\n",
-	       size, errno);
+	ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, %s\n",
+	       size, strerror(errno));
 	xfree(pDesc);
 	return (ShmDescPtr) NULL;
     }
 
     if ((addr = shmat(shmid, 0, 0)) == (char *)-1) {
-	ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, errno = %d\n",
-	       size, errno);
+	ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, %s\n",
+	       size, strerror(errno));
 	shmctl(shmid, IPC_RMID, (void *) 0);
 	xfree(pDesc);
 	return (ShmDescPtr) NULL;
diff --git a/hw/dmx/examples/ev.c b/hw/dmx/examples/ev.c
index 1091226..ba45c2b 100644
--- a/hw/dmx/examples/ev.c
+++ b/hw/dmx/examples/ev.c
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
                 }
                 printf("\n");
             }
-            printf("rc = %d, errno = %d (%s)\n", rc, errno, strerror(errno));
+            printf("rc = %d, (%s)\n", rc, strerror(errno));
             close(fd);
         }
     }
diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 23cd8f5..258dc7b 100644
--- a/hw/kdrive/linux/linux.c
+++ b/hw/kdrive/linux/linux.c
@@ -441,7 +441,7 @@ LinuxFini (void)
 	memset (&vts, '\0', sizeof (vts));	/* valgrind */
 	ioctl (fd, VT_GETSTATE, &vts);
 	if (ioctl (fd, VT_DISALLOCATE, vtno) < 0)
-	    fprintf (stderr, "Can't deallocate console %d errno %d\n", vtno, errno);
+	    fprintf (stderr, "Can't deallocate console %d %s\n", vtno, strerror(errno));
 	close (fd);
     }
     return;
diff --git a/hw/kdrive/src/kmap.c b/hw/kdrive/src/kmap.c
index b92c1a8..ce1e28a 100644
--- a/hw/kdrive/src/kmap.c
+++ b/hw/kdrive/src/kmap.c
@@ -132,8 +132,8 @@ KdSetMappedMode (CARD32 addr, CARD32 size, int mode)
 	sentry.type = type;
 	
 	if (ioctl (mtrr, MTRRIOC_ADD_ENTRY, &sentry) < 0)
-	    ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (errno %d)\n",
-		    base, bound - base, type, errno);
+	    ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (%s)\n",
+		    base, bound - base, type, strerror(errno));
     }
 #endif
 }
@@ -171,8 +171,8 @@ KdResetMappedMode (CARD32 addr, CARD32 size, int mode)
 	sentry.type = type;
 	
 	if (ioctl (mtrr, MTRRIOC_DEL_ENTRY, &sentry) < 0)
-	    ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (errno %d)\n",
-		    base, bound - base, type, errno);
+	    ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (%s)\n",
+		    base, bound - base, type, strerror(errno));
     }
 #endif
 }
diff --git a/hw/kdrive/vesa/vm86.c b/hw/kdrive/vesa/vm86.c
index 78fc593..0f7bb22 100644
--- a/hw/kdrive/vesa/vm86.c
+++ b/hw/kdrive/vesa/vm86.c
@@ -567,7 +567,7 @@ vm86_loop(Vm86InfoPtr vi)
                 if(errno == ENOSYS) {
                     ErrorF("No vm86 support.  Are you running on AMD64?\n");
                 } else {
-                    ErrorF("vm86 failed (errno = %d).\n", errno);
+                    ErrorF("vm86 failed (%s).\n", strerror(errno));
                     Vm86Debug(vi);
                 }
             } else {
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index a00f7a5..1edceb9 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -179,8 +179,8 @@ ddxGiveUp()
 	    if (-1 == unlink(vfbScreens[i].mmap_file))
 	    {
 		perror("unlink");
-		ErrorF("unlink %s failed, errno %d",
-		       vfbScreens[i].mmap_file, errno);
+		ErrorF("unlink %s failed, %s",
+		       vfbScreens[i].mmap_file, strerror(errno));
 	    }
 	}
 	break;
@@ -196,7 +196,7 @@ ddxGiveUp()
 	    if (-1 == shmdt((char *)vfbScreens[i].pXWDHeader))
 	    {
 		perror("shmdt");
-		ErrorF("shmdt failed, errno %d", errno);
+		ErrorF("shmdt failed, %s", strerror(errno));
 	    }
 	}
 	break;
@@ -582,7 +582,7 @@ vfbBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask)
 #endif
 	{
 	    perror("msync");
-	    ErrorF("msync failed, errno %d", errno);
+	    ErrorF("msync failed, %s", strerror(errno));
 	}
     }
 }
@@ -605,7 +605,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb)
     if (-1 == (pvfb->mmap_fd = open(pvfb->mmap_file, O_CREAT|O_RDWR, 0666)))
     {
 	perror("open");
-	ErrorF("open %s failed, errno %d", pvfb->mmap_file, errno);
+	ErrorF("open %s failed, %s", pvfb->mmap_file, strerror(errno));
 	return;
     }
 
@@ -621,7 +621,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb)
 	if (-1 == write(pvfb->mmap_fd, dummyBuffer, writeThisTime))
 	{
 	    perror("write");
-	    ErrorF("write %s failed, errno %d", pvfb->mmap_file, errno);
+	    ErrorF("write %s failed, %s", pvfb->mmap_file, strerror(errno));
 	    return;
 	}
     }
@@ -635,7 +635,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb)
     if (-1 == (long)pvfb->pXWDHeader)
     {
 	perror("mmap");
-	ErrorF("mmap %s failed, errno %d", pvfb->mmap_file, errno);
+	ErrorF("mmap %s failed, %s", pvfb->mmap_file, strerror(errno));
 	pvfb->pXWDHeader = NULL;
 	return;
     }
@@ -659,7 +659,7 @@ vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb)
     if (pvfb->shmid < 0)
     {
 	perror("shmget");
-	ErrorF("shmget %d bytes failed, errno %d", pvfb->sizeInBytes, errno);
+	ErrorF("shmget %d bytes failed, %s", pvfb->sizeInBytes, strerror(errno));
 	return;
     }
 
@@ -669,7 +669,7 @@ vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb)
     if (-1 == (long)pvfb->pXWDHeader)
     {
 	perror("shmat");
-	ErrorF("shmat failed, errno %d", errno);
+	ErrorF("shmat failed, %s", strerror(errno));
 	pvfb->pXWDHeader = NULL; 
 	return;
     }
diff --git a/hw/xfree86/os-support/bsd/bsd_apm.c b/hw/xfree86/os-support/bsd/bsd_apm.c
index 6177987..43eda74 100644
--- a/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -66,7 +66,7 @@ bsdPMGetEventFromOS(int fd, pmEvent *events, int num)
 	if (ioctl(fd, APM_IOC_NEXTEVENT, &bsdEvent) < 0) {
 	    if (errno != EAGAIN) {
 		xf86Msg(X_WARNING, "bsdPMGetEventFromOS: APM_IOC_NEXTEVENT"
-			" errno = %d\n", errno);
+			" %s\n", strerror(errno));
 	    }
 	    break;
 	}
diff --git a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
index b0171e2..b37070c 100644
--- a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
@@ -102,7 +102,7 @@ bsdPMGetEventFromOS(int kq, pmEvent *events, int num)
 	    break;
 	} else if (result < 0) {
 	    xf86Msg(X_WARNING, "bsdPMGetEventFromOS: kevent returns"
-		    " errno = %d\n", errno);
+		    " %s\n", strerror(errno));
 	    break;
 	}
 	events[i] = bsdToXF86(APM_EVENT_TYPE(ev.data));
diff --git a/hw/xfree86/os-support/solaris/sun_apm.c b/hw/xfree86/os-support/solaris/sun_apm.c
index a9657fd..7decc90 100644
--- a/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/hw/xfree86/os-support/solaris/sun_apm.c
@@ -149,7 +149,7 @@ sunPMGetEventFromOS(int fd, pmEvent *events, int num)
 	if (ioctl(fd, APM_IOC_NEXTEVENT, &sunEvent) < 0) {
 	    if (errno != EAGAIN) {
 		xf86Msg(X_WARNING, "sunPMGetEventFromOS: APM_IOC_NEXTEVENT"
-			" errno = %d\n", errno);
+			" %s\n", strerror(errno));
 	    }
 	    break;
 	}
@@ -178,7 +178,7 @@ sunPMConfirmEventToOs(int fd, pmEvent event)
             return PM_CONTINUE;
         else {
 	    xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_SUSPEND"
-		" errno = %d\n", errno);
+		" %s\n", strerror(errno));
             return PM_FAILED;
 	}
       case XF86_APM_STANDBY_RESUME:
@@ -191,7 +191,7 @@ sunPMConfirmEventToOs(int fd, pmEvent event)
             return PM_CONTINUE;
         else {
 	    xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_RESUME"
-		" errno = %d\n", errno);
+		" %s\n", strerror(errno));
             return PM_FAILED;
 	}
       default:
diff --git a/hw/xprint/ps/psout_ftpstype1.c b/hw/xprint/ps/psout_ftpstype1.c
index 2d40c18..572e136 100644
--- a/hw/xprint/ps/psout_ftpstype1.c
+++ b/hw/xprint/ps/psout_ftpstype1.c
@@ -124,7 +124,7 @@ int PsOut_DownloadFreeType1(PsOutPtr self, const char *psfontname, FontPtr pFont
   switch(childpid)
   {
     case -1:
-        FatalError("PS DDX internal error: Cannot fork() converter child process, errno=%d\n", (int)errno);
+        FatalError("PS DDX internal error: Cannot fork() converter child process, %s\n", strerror(errno));
         break;
     case 0: /* child */
         fclose(self->Fp);
diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c
index b368fe9..8d1ee8e 100644
--- a/hw/xquartz/darwinKeyboard.c
+++ b/hw/xquartz/darwinKeyboard.c
@@ -344,13 +344,13 @@ static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) {
 
     fref = fopen( darwinKeymapFile, "rb" );
     if (fref == NULL) {
-        ErrorF("Unable to open keymapping file '%s' (errno %d).\n",
-               darwinKeymapFile, errno);
+        ErrorF("Unable to open keymapping file '%s' (%s).\n",
+               darwinKeymapFile, strerror(errno));
         return FALSE;
     }
     if (fstat(fileno(fref), &st) == -1) {
-        ErrorF("Could not stat keymapping file '%s' (errno %d).\n",
-               darwinKeymapFile, errno);
+        ErrorF("Could not stat keymapping file '%s' (%s).\n",
+               darwinKeymapFile, strerror(errno));
         return FALSE;
     }
 
@@ -364,8 +364,8 @@ static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) {
     inBuffer = (char*) xalloc( st.st_size );
     bufferEnd = (int *) (inBuffer + st.st_size);
     if (fread(inBuffer, st.st_size, 1, fref) != 1) {
-        ErrorF("Could not read %qd bytes from keymapping file '%s' (errno %d).\n",
-               st.st_size, darwinKeymapFile, errno);
+        ErrorF("Could not read %qd bytes from keymapping file '%s' (%s).\n",
+               st.st_size, darwinKeymapFile, strerror(errno));
         return FALSE;
     }
 
diff --git a/os/WaitFor.c b/os/WaitFor.c
index c58f248..36e01ca 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -254,13 +254,13 @@ WaitForSomething(int *pClientsReady)
 		}
 		else if (selecterr == EINVAL)
 		{
-		    FatalError("WaitForSomething(): select: errno=%d\n",
-			selecterr);
+		    FatalError("WaitForSomething(): select: %s\n",
+			strerror(selecterr));
             }
 		else if (selecterr != EINTR && selecterr != EAGAIN)
 		{
-		    ErrorF("WaitForSomething(): select: errno=%d\n",
-			selecterr);
+		    ErrorF("WaitForSomething(): select: %s\n",
+			strerror(selecterr));
 		}
 	    }
 #ifdef SMART_SCHEDULE
commit b740b865e4c156a40adc6b63fcf215156fc9151a
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 15:16:01 2008 +1100

    Silence an error message in ConfigureWindow that never happens.

diff --git a/dix/window.c b/dix/window.c
index 1ccf126..b896ef7 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -2155,7 +2155,7 @@ WhereDoIGoInTheStack(
 	    return pWin->nextSib;
       default:
       {
-	ErrorF("Internal error in ConfigureWindow, smode == %d\n",smode );
+	/* should never happen; make something up. */
 	return pWin->nextSib;
       }
     }
commit 89d3249c3e7611b22414bc84b10ca60aab4b9a77
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 15:11:27 2008 +1100

    Silence FreeResource()

diff --git a/dix/resource.c b/dix/resource.c
index 6c1b04d..f318de3 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -535,7 +535,6 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType)
     ResourcePtr *prev, *head;
     int *eltptr;
     int		elements;
-    Bool	gotOne = FALSE;
 
     if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
     {
@@ -563,15 +562,11 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType)
 		xfree(res);
 		if (*eltptr != elements)
 		    prev = head; /* prev may no longer be valid */
-		gotOne = TRUE;
 	    }
 	    else
 		prev = &res->next;
         }
     }
-    if (!gotOne)
-	ErrorF("Freeing resource id=%lX which isn't there.\n",
-		   (unsigned long)id);
 }
 
 
commit 238b816469355159eea98600ca900e3baa8fa313
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 15:08:03 2008 +1100

    X.Org Group -> X.Org Foundation

diff --git a/include/site.h b/include/site.h
index 279cf2d..fec8707 100644
--- a/include/site.h
+++ b/include/site.h
@@ -52,7 +52,7 @@ SOFTWARE.
  * server executable.
  */
 #ifndef VENDOR_STRING
-#define VENDOR_STRING "The X.Org Group"
+#define VENDOR_STRING "The X.Org Foundation"
 #endif
 
 /*
commit 9113fa3de36e84bbae2727cace82b1cf0d709a86
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 15:03:57 2008 +1100

    Silence the harmless FreeFontPath error message.

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 8def6ee..e9a3f39 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1644,9 +1644,6 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force)
 		    found++;
 	    }
 	    if (list[i]->refcount != found) {
-		ErrorF("FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n",
-		       list[i]->name_length, list[i]->name,
-		       list[i]->refcount, found);
 		list[i]->refcount = found; /* ensure it will get freed */
 	    }
 	}
commit 7c0709a736c0f3aa011de67dd2c2962585ab146e
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 14:59:58 2008 +1100

    requestingClient is an xprintism, hide it for other servers.

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 32efff7..e8e650a 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -417,7 +417,9 @@ Dispatch(void)
 	    }
 	    isItTimeToYield = FALSE;
  
+#ifdef XPRINT
             requestingClient = client;
+#endif
 #ifdef SMART_SCHEDULE
 	    start_tick = SmartScheduleTime;
 #endif
@@ -489,7 +491,9 @@ Dispatch(void)
 	    if (client)
 		client->smart_stop_tick = SmartScheduleTime;
 #endif
+#ifdef XPRINT
 	    requestingClient = NULL;
+#endif
 	}
 	dispatchException &= ~DE_PRIORITYCHANGE;
     }
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 04f1f1b..8def6ee 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1934,12 +1934,15 @@ GetDefaultPointSize ()
 FontResolutionPtr
 GetClientResolutions (int *num)
 {
+#ifdef XPRINT
     if (requestingClient && requestingClient->fontResFunc != NULL &&
 	!requestingClient->clientGone)
     {
 	return (*requestingClient->fontResFunc)(requestingClient, num);
     }
-    else {
+    else
+#endif
+    {
 	static struct _FontResolution res;
 	ScreenPtr   pScreen;
 
diff --git a/dix/globals.c b/dix/globals.c
index d76b604..7f95eab 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -143,7 +143,9 @@ Bool loadableFonts = FALSE;
 CursorPtr rootCursor;
 Bool blackRoot=FALSE;
 Bool whiteRoot=FALSE;
+#ifdef XPRINT
 ClientPtr requestingClient;	/* XXX this should be obsolete now, remove? */
+#endif
 
 _X_EXPORT TimeStamp currentTime;
 _X_EXPORT TimeStamp lastDeviceEventTime;
diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c
index 72edcee..9f30085 100644
--- a/hw/xnest/Font.c
+++ b/hw/xnest/Font.c
@@ -44,8 +44,10 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont)
 
   FontSetPrivate(pFont, xnestFontPrivateIndex, NULL);
 
+#ifdef XPRINT
   if (requestingClient && XpClientIsPrintClient(requestingClient, NULL))
       return True;
+#endif
 
   name_atom = MakeAtom("FONT", 4, True);
   value_atom = 0L;
diff --git a/include/dix.h b/include/dix.h
index ec9806a..52212e7 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -116,7 +116,9 @@ typedef struct _Client *ClientPtr; /* also in misc.h */
 
 typedef struct _WorkQueue	*WorkQueuePtr;
 
+#ifdef XPRINT
 extern ClientPtr requestingClient;
+#endif
 extern ClientPtr *clients;
 extern ClientPtr serverClient;
 extern int currentMaxClients;
commit 62cfe8863823c0994f20555cb35ee3bacb9e5225
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Feb 1 14:57:25 2008 +1100

    Redact all mention of PanoramiX from user strings.

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 311a8e7..75277be 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -463,10 +463,8 @@ void PanoramiXExtensionInit(int argc, char *argv[])
 				ProcPanoramiXDispatch,
 				SProcPanoramiXDispatch, PanoramiXResetProc, 
 				StandardMinorOpcode);
-	if (!extEntry) {
-	    ErrorF("PanoramiXExtensionInit(): failed to AddExtension\n");
+	if (!extEntry)
 	    break;
- 	}
 
 	/*
 	 *	First make sure all the basic allocations succeed.  If not,
@@ -514,7 +512,7 @@ void PanoramiXExtensionInit(int argc, char *argv[])
 
     if (!success) {
 	noPanoramiXExtension = TRUE;
-	ErrorF("%s Extension failed to initialize\n", PANORAMIX_PROTOCOL_NAME);
+	ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n");
 	return;
     }
   
@@ -604,14 +602,14 @@ Bool PanoramiXCreateConnectionBlock(void)
      */
 
     if(!PanoramiXNumDepths) {
-	ErrorF("PanoramiX error: Incompatible screens. No common visuals\n");
+	ErrorF("Xinerama error: No common visuals\n");
 	return FALSE;
     }
 
     for(i = 1; i < screenInfo.numScreens; i++) {
 	pScreen = screenInfo.screens[i];
 	if(pScreen->rootDepth != screenInfo.screens[0]->rootDepth) {
-	    ErrorF("PanoramiX error: Incompatible screens. Root window depths differ\n");
+	    ErrorF("Xinerama error: Root window depths differ\n");
 	    return FALSE;
 	}
 	if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport)
commit eb8dc11d19dd0b5354de408578ab0cfb865df672
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Jan 31 21:45:14 2008 +1100

    Remove some MAX* #defines that never get used.

diff --git a/include/misc.h b/include/misc.h
index e6a5e9e..a1cbe86 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -87,10 +87,7 @@ extern unsigned long serverGeneration;
 #define MAXSCREENS	16
 #endif
 #define MAXCLIENTS	256
-#define MAXDITS		1
-#define MAXEXTENSIONS	128
 #define MAXFORMATS	8
-#define MAXVISUALS_PER_SCREEN 50
 
 typedef unsigned long PIXEL;
 typedef unsigned long ATOM;
commit 2ce35f6d45c3e1761d33b786520ff5ba56a3c518
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Jan 31 21:39:48 2008 +1100

    Simplify critical output flushing.

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 3589fba..32efff7 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -424,10 +424,9 @@ Dispatch(void)
 	    while (!isItTimeToYield)
 	    {
 	        if (*icheck[0] != *icheck[1])
-		{
 		    ProcessInputEvents();
-		    FlushIfCriticalOutputPending();
-		}
+		
+		FlushIfCriticalOutputPending();
 #ifdef SMART_SCHEDULE
 		if (!SmartScheduleDisable && 
 		    (SmartScheduleTime - start_tick) >= SmartScheduleSlice)
@@ -483,9 +482,6 @@ Dispatch(void)
 					  client->errorValue, result);
 		    break;
 	        }
-#ifdef DAMAGEEXT
-		FlushIfCriticalOutputPending ();
-#endif
 	    }
 	    FlushAllOutput();
 #ifdef SMART_SCHEDULE
commit 3eaecdd66e791e0f3d86b23ce10be057ca44c044
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Jan 31 21:36:14 2008 +1100

    Disable Record by default.

diff --git a/configure.ac b/configure.ac
index 566ddcb..d8b78ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -526,7 +526,7 @@ AC_ARG_ENABLE(composite,      AS_HELP_STRING([--disable-composite], [Build Compo
 AC_ARG_ENABLE(mitshm,         AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes])
 AC_ARG_ENABLE(xres,           AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes])
 AC_ARG_ENABLE(xtrap,          AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
-AC_ARG_ENABLE(record,         AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes])
+AC_ARG_ENABLE(record,         AS_HELP_STRING([--disable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no])
 AC_ARG_ENABLE(xv,             AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
 AC_ARG_ENABLE(xvmc,           AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
 AC_ARG_ENABLE(dga,            AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
commit aa5216e89797b600f382c04e3eaa657e808a5c3e
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Jan 31 12:05:08 2008 +1100

    Rip out useless indirection in the callback list management.

diff --git a/dix/dixutils.c b/dix/dixutils.c
index dd485d5..aaf5106 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -816,16 +816,8 @@ _DeleteCallbackList(
     *pcbl = NULL;
 }
 
-static CallbackFuncsRec default_cbfuncs =
-{
-    _AddCallback,
-    _DeleteCallback,
-    _CallCallbacks,
-    _DeleteCallbackList
-};
-
 static Bool
-CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
+CreateCallbackList(CallbackListPtr *pcbl)
 {
     CallbackListPtr  cbl;
     int i;
@@ -833,7 +825,6 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
     if (!pcbl) return FALSE;
     cbl = (CallbackListPtr) xalloc(sizeof(CallbackListRec));
     if (!cbl) return FALSE;
-    cbl->funcs = cbfuncs ? *cbfuncs : default_cbfuncs;
     cbl->inCallback = 0;
     cbl->deleted = FALSE;
     cbl->numDeleted = 0;
@@ -864,31 +855,31 @@ AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
     if (!pcbl) return FALSE;
     if (!*pcbl)
     {	/* list hasn't been created yet; go create it */
-	if (!CreateCallbackList(pcbl, (CallbackFuncsPtr)NULL))
+	if (!CreateCallbackList(pcbl))
 	    return FALSE;
     }
-    return ((*(*pcbl)->funcs.AddCallback) (pcbl, callback, data));
+    return _AddCallback(pcbl, callback, data);
 }
 
 _X_EXPORT Bool 
 DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
 {
     if (!pcbl || !*pcbl) return FALSE;
-    return ((*(*pcbl)->funcs.DeleteCallback) (pcbl, callback, data));
+    return _DeleteCallback(pcbl, callback, data);
 }
 
 void 
 CallCallbacks(CallbackListPtr *pcbl, pointer call_data)
 {
     if (!pcbl || !*pcbl) return;
-    (*(*pcbl)->funcs.CallCallbacks) (pcbl, call_data);
+    _CallCallbacks(pcbl, call_data);
 }
 
 void
 DeleteCallbackList(CallbackListPtr *pcbl)
 {
     if (!pcbl || !*pcbl) return;
-    (*(*pcbl)->funcs.DeleteCallbackList) (pcbl);
+    _DeleteCallbackList(pcbl);
 }
 
 void 
diff --git a/include/dix.h b/include/dix.h
index 8cfbbc4..ec9806a 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -498,25 +498,6 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
 typedef void (*CallbackProcPtr) (
     CallbackListPtr *, pointer, pointer);
 
-typedef Bool (*AddCallbackProcPtr) (
-    CallbackListPtr *, CallbackProcPtr, pointer);
-
-typedef Bool (*DeleteCallbackProcPtr) (
-    CallbackListPtr *, CallbackProcPtr, pointer);
-
-typedef void (*CallCallbacksProcPtr) (
-    CallbackListPtr *, pointer);
-
-typedef void (*DeleteCallbackListProcPtr) (
-    CallbackListPtr *);
-
-typedef struct _CallbackProcs {
-    AddCallbackProcPtr		AddCallback;
-    DeleteCallbackProcPtr	DeleteCallback;
-    CallCallbacksProcPtr	CallCallbacks;
-    DeleteCallbackListProcPtr	DeleteCallbackList;
-} CallbackFuncsRec, *CallbackFuncsPtr;
-
 extern Bool AddCallback(
     CallbackListPtr * /*pcbl*/,
     CallbackProcPtr /*callback*/,
diff --git a/include/dixstruct.h b/include/dixstruct.h
index cbeac48..d44b9cf 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -187,7 +187,6 @@ typedef struct _CallbackRec {
 } CallbackRec, *CallbackPtr;
 
 typedef struct _CallbackList {
-  CallbackFuncsRec funcs;
   int inCallback;
   Bool deleted;
   int numDeleted;
commit 0d492b2166c4026b9078ffd86d89a31ebe590be4
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 12 19:59:10 2008 -0500

    XACE: Move the selection access hook to its own function.

diff --git a/Xext/xace.c b/Xext/xace.c
index b2c7e4a..e88debc 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -63,6 +63,13 @@ int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin,
     return rec.status;
 }
 
+int XaceHookSelectionAccess(ClientPtr client, Atom name, Mask access_mode)
+{
+    XaceSelectionAccessRec rec = { client, name, access_mode, Success };
+    CallCallbacks(&XaceHooks[XACE_SELECTION_ACCESS], &rec);
+    return rec.status;
+}
+
 void XaceHookAuditEnd(ClientPtr ptr, int result)
 {
     XaceAuditRec rec = { ptr, result };
@@ -169,17 +176,6 @@ int XaceHook(int hook, ...)
 	    prv = &rec.status;
 	    break;
 	}
-	case XACE_SELECTION_ACCESS: {
-	    XaceSelectionAccessRec rec = {
-		va_arg(ap, ClientPtr),
-		va_arg(ap, Atom),
-		va_arg(ap, Mask),
-		Success /* default allow */
-	    };
-	    calldata = &rec;
-	    prv = &rec.status;
-	    break;
-	}
 	case XACE_SCREEN_ACCESS:
 	case XACE_SCREENSAVER_ACCESS: {
 	    XaceScreenAccessRec rec = {
diff --git a/Xext/xace.h b/Xext/xace.h
index 6f1f267..2016ca3 100644
--- a/Xext/xace.h
+++ b/Xext/xace.h
@@ -69,6 +69,8 @@ extern int XaceHook(
 extern int XaceHookDispatch(ClientPtr ptr, int major);
 extern int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin,
 				  PropertyPtr pProp, Mask access_mode);
+extern int XaceHookSelectionAccess(ClientPtr ptr, Atom name,
+				   Mask access_mode);
 extern void XaceHookAuditEnd(ClientPtr ptr, int result);
 
 /* Register a callback for a given hook.
@@ -106,12 +108,14 @@ extern void XaceCensorImage(
 #define XaceHook(args...) Success
 #define XaceHookDispatch(args...) Success
 #define XaceHookPropertyAccess(args...) Success
+#define XaceHookSelectionAccess(args...) Success
 #define XaceHookAuditEnd(args...) { ; }
 #define XaceCensorImage(args...) { ; }
 #else
 #define XaceHook(...) Success
 #define XaceHookDispatch(...) Success
 #define XaceHookPropertyAccess(...) Success
+#define XaceHookSelectionAccess(...) Success
 #define XaceHookAuditEnd(...) { ; }
 #define XaceCensorImage(...) { ; }
 #endif
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 0bca441..3589fba 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -995,8 +995,8 @@ ProcSetSelectionOwner(ClientPtr client)
     {
 	int i = 0;
 
-	rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection,
-		      DixSetAttrAccess);
+	rc = XaceHookSelectionAccess(client, stuff->selection,
+				     DixSetAttrAccess);
 	if (rc != Success)
 	    return rc;
 
@@ -1081,8 +1081,7 @@ ProcGetSelectionOwner(ClientPtr client)
 	int rc, i;
         xGetSelectionOwnerReply reply;
 
-	rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->id,
-		      DixGetAttrAccess);
+	rc = XaceHookSelectionAccess(client, stuff->id, DixGetAttrAccess);
 	if (rc != Success)
 	    return rc;
 
@@ -1127,8 +1126,7 @@ ProcConvertSelection(ClientPtr client)
     rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess);
     if (rc != Success)
         return rc;
-    rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection,
-		  DixReadAccess);
+    rc = XaceHookSelectionAccess(client, stuff->selection, DixReadAccess);
     if (rc != Success)
 	return rc;
 
commit 4be69e41c07b784f75918141eead70415c0ec4a4
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Mon Feb 11 16:03:25 2008 -0500

    Revert "Bug #8937: Extension setup functions not called on server resets"
    
    This reverts commit 5e946dd853a4ebc2722ae023429ce5797de3d7a6.
    
    The devPrivates rework makes this workaround unnecessary.

diff --git a/mi/miinitext.c b/mi/miinitext.c
index 261fac9..3c55eeb 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -739,16 +739,6 @@ InitExtensions(argc, argv)
 	/* Sort the extensions according the init dependencies. */
 	LoaderSortExtensions();
 	listInitialised = TRUE;
-    } else {
-	/* Call the setup functions on subsequent server resets as well */
-	for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
-	    ext = &ExtensionModuleList[i];
-	    if (ext->setupFunc != NULL &&
-		(ext->disablePtr == NULL ||
-		 (ext->disablePtr != NULL && !*ext->disablePtr))) {
-		(ext->setupFunc)();
-	    }
-	}
     }
 
     for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
commit 8a244c2bc04a4184535e42d1f2f8c9e3e55678b4
Author: Jeremy Huddleston <jeremy at yuffie.local>
Date:   Mon Feb 11 12:09:41 2008 -0800

    XQuartz: Fixed layout of Applications->Customize menu
    
    Now resizing it won't produce weir overlaps of the widgets.  Thanks to
    Pelle Johansson for his help showing me how to do this.
    (cherry picked from commit ef3498e92d13c82633fdbe8120396bfbe1e7489a)

diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
index 08b3810..b5cfcf6 100644
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
@@ -1,18 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.01">
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
 	<data>
 		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">9C31</string>
-		<string key="IBDocument.InterfaceBuilderVersion">629</string>
-		<string key="IBDocument.AppKitVersion">949.26</string>
-		<string key="IBDocument.HIToolboxVersion">352.00</string>
+		<string key="IBDocument.SystemVersion">9B18</string>
+		<string key="IBDocument.InterfaceBuilderVersion">639</string>
+		<string key="IBDocument.AppKitVersion">949</string>
+		<string key="IBDocument.HIToolboxVersion">343.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
+			<integer value="285"/>
 			<integer value="29"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<string id="1013584587">com.apple.InterfaceBuilder.CocoaPlugin</string>
+			<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 		</object>
 		<object class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -22,41 +23,41 @@
 				</object>
 			</object>
 			<object class="NSCustomObject" id="941939442">
-				<string key="NSClassName" id="671773319">FirstResponder</string>
+				<string key="NSClassName">FirstResponder</string>
 			</object>
 			<object class="NSCustomObject" id="951368722">
 				<string key="NSClassName">NSApplication</string>
 			</object>
 			<object class="NSMenu" id="524015605">
-				<string key="NSTitle" id="121567387">MainMenu</string>
+				<string key="NSTitle">MainMenu</string>
 				<object class="NSMutableArray" key="NSMenuItems">
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<object class="NSMenuItem" id="365880285">
 						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle" id="335360021">X11</string>
-						<string key="NSKeyEquiv" id="331740794"/>
+						<string key="NSTitle">X11</string>
+						<string key="NSKeyEquiv"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<object class="NSCustomResource" key="NSOnImage" id="531645050">
-							<string key="NSClassName" id="1072749539">NSImage</string>
+							<string key="NSClassName">NSImage</string>
 							<string key="NSResourceName">NSMenuCheckmark</string>
 						</object>
-						<object class="NSCustomResource" key="NSMixedImage" id="246283459">
-							<reference key="NSClassName" ref="1072749539"/>
+						<object class="NSCustomResource" key="NSMixedImage" id="351811234">
+							<string key="NSClassName">NSImage</string>
 							<string key="NSResourceName">NSMenuMixedState</string>
 						</object>
 						<string key="NSAction">submenuAction:</string>
 						<object class="NSMenu" key="NSSubmenu" id="576521955">
-							<reference key="NSTitle" ref="335360021"/>
+							<string key="NSTitle">X11</string>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
 								<object class="NSMenuItem" id="139290918">
 									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">About X11</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="386173216">
 									<reference key="NSMenu" ref="576521955"/>
@@ -65,27 +66,27 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="272876017">
 									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="32285361">
 									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Services</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 									<string key="NSAction">submenuAction:</string>
 									<object class="NSMenu" key="NSSubmenu" id="821388474">
 										<object class="NSMutableString" key="NSTitle">
@@ -101,32 +102,32 @@
 									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="6876565">
 									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Toggle Full Screen</string>
-									<string key="NSKeyEquiv" id="934453074">a</string>
+									<string key="NSKeyEquiv">a</string>
 									<int key="NSKeyEquivModMask">1572864</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="479677589">
 									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="301008465">
 									<reference key="NSMenu" ref="576521955"/>
@@ -135,38 +136,38 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 									<int key="NSTag">42</int>
 								</object>
 								<object class="NSMenuItem" id="206802571">
 									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Hide Others</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="1023546148">
 									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Show All</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 									<int key="NSTag">42</int>
 								</object>
 								<object class="NSMenuItem" id="848095279">
 									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="274138642">
 									<reference key="NSMenu" ref="576521955"/>
@@ -175,7 +176,7 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 							</object>
 							<string key="NSName">_NSAppleMenu</string>
@@ -183,51 +184,51 @@
 					</object>
 					<object class="NSMenuItem" id="868031522">
 						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle" id="667842658">Applications</string>
-						<reference key="NSKeyEquiv" ref="331740794"/>
+						<string key="NSTitle">Applications</string>
+						<string key="NSKeyEquiv"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="246283459"/>
+						<reference key="NSMixedImage" ref="351811234"/>
 						<string key="NSAction">submenuAction:</string>
 						<object class="NSMenu" key="NSSubmenu" id="981161348">
-							<reference key="NSTitle" ref="667842658"/>
+							<string key="NSTitle">Applications</string>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
 								<object class="NSMenuItem" id="390088328">
 									<reference key="NSMenu" ref="981161348"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="1065386165">
 									<reference key="NSMenu" ref="981161348"/>
 									<string key="NSTitle">Customize...</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 							</object>
 						</object>
 					</object>
 					<object class="NSMenuItem" id="200491363">
 						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle" id="934359734">Edit</string>
-						<reference key="NSKeyEquiv" ref="331740794"/>
+						<string key="NSTitle">Edit</string>
+						<string key="NSKeyEquiv"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="246283459"/>
+						<reference key="NSMixedImage" ref="351811234"/>
 						<string key="NSAction">submenuAction:</string>
 						<object class="NSMenu" key="NSSubmenu" id="526778998">
-							<reference key="NSTitle" ref="934359734"/>
+							<string key="NSTitle">Edit</string>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
 								<object class="NSMenuItem" id="1010221707">
@@ -237,7 +238,7 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="535038564">
 									<reference key="NSMenu" ref="526778998"/>
@@ -246,18 +247,18 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="839739619">
 									<reference key="NSMenu" ref="526778998"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="581727829">
 									<reference key="NSMenu" ref="526778998"/>
@@ -266,7 +267,7 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="185296989">
 									<reference key="NSMenu" ref="526778998"/>
@@ -275,7 +276,7 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="924678073">
 									<reference key="NSMenu" ref="526778998"/>
@@ -284,25 +285,25 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="994817848">
 									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Delete</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="322866464">
 									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Select All</string>
-									<reference key="NSKeyEquiv" ref="934453074"/>
+									<string key="NSKeyEquiv">a</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 							</object>
 						</object>
@@ -310,11 +311,11 @@
 					<object class="NSMenuItem" id="931553638">
 						<reference key="NSMenu" ref="524015605"/>
 						<string key="NSTitle">Window</string>
-						<reference key="NSKeyEquiv" ref="331740794"/>
+						<string key="NSKeyEquiv"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="246283459"/>
+						<reference key="NSMixedImage" ref="351811234"/>
 						<string key="NSAction">submenuAction:</string>
 						<object class="NSMenu" key="NSSubmenu" id="96874957">
 							<object class="NSMutableString" key="NSTitle">
@@ -329,16 +330,16 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="1066447520">
 									<reference key="NSMenu" ref="96874957"/>
 									<string key="NSTitle">Zoom</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="1036389925">
 									<reference key="NSMenu" ref="96874957"/>
@@ -347,7 +348,7 @@
 									<int key="NSKeyEquivModMask">1048840</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="369641893">
 									<reference key="NSMenu" ref="96874957"/>
@@ -356,18 +357,18 @@
 									<int key="NSKeyEquivModMask">1179914</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="280172320">
 									<reference key="NSMenu" ref="96874957"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="984461797">
 									<reference key="NSMenu" ref="96874957"/>
@@ -376,38 +377,38 @@
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="155085383">
 									<reference key="NSMenu" ref="96874957"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="276216762">
 									<reference key="NSMenu" ref="96874957"/>
 									<string key="NSTitle">Bring All to Front</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="444952046">
 									<reference key="NSMenu" ref="96874957"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 							</object>
 							<string key="NSName">_NSWindowsMenu</string>
@@ -415,25 +416,25 @@
 					</object>
 					<object class="NSMenuItem" id="551174276">
 						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle" id="214661970">Help</string>
-						<reference key="NSKeyEquiv" ref="331740794"/>
+						<string key="NSTitle">Help</string>
+						<string key="NSKeyEquiv"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="246283459"/>
+						<reference key="NSMixedImage" ref="351811234"/>
 						<string key="NSAction">submenuAction:</string>
 						<object class="NSMenu" key="NSSubmenu" id="511848303">
-							<reference key="NSTitle" ref="214661970"/>
+							<string key="NSTitle">Help</string>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
 								<object class="NSMenuItem" id="504984881">
 									<reference key="NSMenu" ref="511848303"/>
 									<string key="NSTitle">X11 Help</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 							</object>
 						</object>
@@ -442,15 +443,15 @@
 				<string key="NSName">_NSMainMenu</string>
 			</object>
 			<object class="NSCustomObject" id="485884620">
-				<string key="NSClassName" id="865849805">X11Controller</string>
+				<string key="NSClassName">X11Controller</string>
 			</object>
 			<object class="NSWindowTemplate" id="124913468">
 				<int key="NSWindowStyleMask">3</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{319, 294}, {481, 345}}</string>
+				<string key="NSWindowRect">{{479, 459}, {481, 345}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Preferences</string>
-				<string key="NSWindowClass" id="666842945">NSPanel</string>
+				<string key="NSWindowClass">NSPanel</string>
 				<object class="NSMutableString" key="NSViewClass">
 					<characters key="NS.bytes">View</characters>
 				</object>
@@ -464,202 +465,198 @@
 						<object class="NSTabView" id="448510093">
 							<reference key="NSNextResponder" ref="941366957"/>
 							<int key="NSvFlags">256</int>
-							<object class="NSMutableArray" key="NSSubviews">
+							<string key="NSFrame">{{10, 10}, {458, 325}}</string>
+							<reference key="NSSuperview" ref="941366957"/>
+							<object class="NSMutableArray" key="NSTabViewItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSView" id="596750588">
-									<reference key="NSNextResponder" ref="448510093"/>
-									<int key="NSvFlags">256</int>
-									<object class="NSMutableArray" key="NSSubviews">
-										<bool key="EncodedWithXMLCoder">YES</bool>
-										<object class="NSButton" id="119157981">
-											<reference key="NSNextResponder" ref="596750588"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{18, 243}, {402, 18}}</string>
-											<reference key="NSSuperview" ref="596750588"/>
-											<bool key="NSEnabled">YES</bool>
-											<object class="NSButtonCell" key="NSCell" id="990762273">
-												<int key="NSCellFlags">67239424</int>
-												<int key="NSCellFlags2">0</int>
-												<string key="NSContents">Emulate three button mouse</string>
-												<object class="NSFont" key="NSSupport" id="463863101">
-													<string key="NSName" id="512586816">LucidaGrande</string>
-													<double key="NSSize">1.300000e+01</double>
-													<int key="NSfFlags">1044</int>
-												</object>
-												<reference key="NSControlView" ref="119157981"/>
-												<int key="NSButtonFlags">1211912703</int>
-												<int key="NSButtonFlags2">2</int>
-												<object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
-													<string key="NSImageName">NSSwitch</string>
+								<object class="NSTabViewItem" id="287591690">
+									<object class="NSMutableString" key="NSIdentifier">
+										<characters key="NS.bytes">1</characters>
+									</object>
+									<object class="NSView" key="NSView" id="596750588">
+										<reference key="NSNextResponder" ref="448510093"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSButton" id="119157981">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 243}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="990762273">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Emulate three button mouse</string>
+													<object class="NSFont" key="NSSupport" id="463863101">
+														<string key="NSName">LucidaGrande</string>
+														<double key="NSSize">1.300000e+01</double>
+														<int key="NSfFlags">1044</int>
+													</object>
+													<reference key="NSControlView" ref="119157981"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
+														<string key="NSImageName">NSSwitch</string>
+													</object>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
 												</object>
-												<reference key="NSAlternateContents" ref="331740794"/>
-												<reference key="NSKeyEquivalent" ref="331740794"/>
-												<int key="NSPeriodicDelay">200</int>
-												<int key="NSPeriodicInterval">25</int>
 											</object>
-										</object>
-										<object class="NSTextField" id="443008216">
-											<reference key="NSNextResponder" ref="596750588"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{36, 93}, {385, 31}}</string>
-											<reference key="NSSuperview" ref="596750588"/>
-											<bool key="NSEnabled">YES</bool>
-											<object class="NSTextFieldCell" key="NSCell" id="391919450">
-												<int key="NSCellFlags">67239424</int>
-												<int key="NSCellFlags2">4194304</int>
-												<string key="NSContents">When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.</string>
-												<object class="NSFont" key="NSSupport" id="26">
-													<reference key="NSName" ref="512586816"/>
-													<double key="NSSize">1.100000e+01</double>
-													<int key="NSfFlags">3100</int>
-												</object>
-												<reference key="NSControlView" ref="443008216"/>
-												<object class="NSColor" key="NSBackgroundColor" id="57160303">
-													<int key="NSColorSpace">6</int>
-													<string key="NSCatalogName" id="905527164">System</string>
-													<string key="NSColorName">controlColor</string>
-													<object class="NSColor" key="NSColor" id="590688762">
-														<int key="NSColorSpace">3</int>
-														<bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+											<object class="NSTextField" id="443008216">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 93}, {385, 31}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="391919450">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.</string>
+													<object class="NSFont" key="NSSupport" id="26">
+														<string key="NSName">LucidaGrande</string>
+														<double key="NSSize">1.100000e+01</double>
+														<int key="NSfFlags">3100</int>
 													</object>
-												</object>
-												<object class="NSColor" key="NSTextColor" id="930815747">
-													<int key="NSColorSpace">6</int>
-													<reference key="NSCatalogName" ref="905527164"/>
-													<string key="NSColorName">controlTextColor</string>
-													<object class="NSColor" key="NSColor" id="214098874">
-														<int key="NSColorSpace">3</int>
-														<bytes key="NSWhite">MAA</bytes>
+													<reference key="NSControlView" ref="443008216"/>
+													<object class="NSColor" key="NSBackgroundColor" id="57160303">
+														<int key="NSColorSpace">6</int>
+														<string key="NSCatalogName">System</string>
+														<string key="NSColorName">controlColor</string>
+														<object class="NSColor" key="NSColor" id="590688762">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+														</object>
+													</object>
+													<object class="NSColor" key="NSTextColor" id="930815747">
+														<int key="NSColorSpace">6</int>
+														<string key="NSCatalogName">System</string>
+														<string key="NSColorName">controlTextColor</string>
+														<object class="NSColor" key="NSColor" id="214098874">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MAA</bytes>
+														</object>
 													</object>
 												</object>
 											</object>
-										</object>
-										<object class="NSTextField" id="282885445">
-											<reference key="NSNextResponder" ref="596750588"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{36, 208}, {385, 29}}</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
+											<object class="NSTextField" id="282885445">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 208}, {385, 29}}</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>
-												<reference key="NSSupport" ref="26"/>
-												<reference key="NSControlView" ref="282885445"/>
-												<reference key="NSBackgroundColor" ref="57160303"/>
-												<reference key="NSTextColor" ref="930815747"/>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="282885445"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
 											</object>
-										</object>
-										<object class="NSButton" id="842100515">
-											<reference key="NSNextResponder" ref="596750588"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{18, 130}, {402, 18}}</string>
-											<reference key="NSSuperview" ref="596750588"/>
-											<bool key="NSEnabled">YES</bool>
-											<object class="NSButtonCell" key="NSCell" id="940564599">
-												<int key="NSCellFlags">67239424</int>
-												<int key="NSCellFlags2">0</int>
-												<string key="NSContents">Enable key equivalents under X11</string>
-												<reference key="NSSupport" ref="463863101"/>
-												<reference key="NSControlView" ref="842100515"/>
-												<int key="NSButtonFlags">1211912703</int>
-												<int key="NSButtonFlags2">2</int>
-												<reference key="NSAlternateImage" ref="391434389"/>
-												<reference key="NSAlternateContents" ref="331740794"/>
-												<reference key="NSKeyEquivalent" ref="331740794"/>
-												<int key="NSPeriodicDelay">200</int>
-												<int key="NSPeriodicInterval">25</int>
+											<object class="NSButton" id="842100515">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 130}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="940564599">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Enable key equivalents under X11</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="842100515"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
 											</object>
-										</object>
-										<object class="NSTextField" id="31160162">
-											<reference key="NSNextResponder" ref="596750588"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{36, 159}, {385, 14}}</string>
-											<reference key="NSSuperview" ref="596750588"/>
-											<bool key="NSEnabled">YES</bool>
-											<object class="NSTextFieldCell" key="NSCell" id="666057093">
-												<int key="NSCellFlags">67239424</int>
-												<int key="NSCellFlags2">4194304</int>
-												<string key="NSContents">Allows input menu changes to overwrite the current X11 keymap.</string>
-												<reference key="NSSupport" ref="26"/>
-												<reference key="NSControlView" ref="31160162"/>
-												<reference key="NSBackgroundColor" ref="57160303"/>
-												<reference key="NSTextColor" ref="930815747"/>
+											<object class="NSTextField" id="31160162">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 159}, {385, 14}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="666057093">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">Allows input menu changes to overwrite the current X11 keymap.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="31160162"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
 											</object>
-										</object>
-										<object class="NSButton" id="179949713">
-											<reference key="NSNextResponder" ref="596750588"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{18, 179}, {402, 18}}</string>
-											<reference key="NSSuperview" ref="596750588"/>
-											<bool key="NSEnabled">YES</bool>
-											<object class="NSButtonCell" key="NSCell" id="967619578">
-												<int key="NSCellFlags">67239424</int>
-												<int key="NSCellFlags2">0</int>
-												<string key="NSContents">Follow system keyboard layout</string>
-												<reference key="NSSupport" ref="463863101"/>
-												<reference key="NSControlView" ref="179949713"/>
-												<int key="NSButtonFlags">1211912703</int>
-												<int key="NSButtonFlags2">2</int>
-												<reference key="NSAlternateImage" ref="391434389"/>
-												<reference key="NSAlternateContents" ref="331740794"/>
-												<reference key="NSKeyEquivalent" ref="331740794"/>
-												<int key="NSPeriodicDelay">200</int>
-												<int key="NSPeriodicInterval">25</int>
+											<object class="NSButton" id="179949713">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 179}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="967619578">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Follow system keyboard layout</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="179949713"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
 											</object>
-										</object>
-										<object class="NSButton" id="915448994">
-											<reference key="NSNextResponder" ref="596750588"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{18, 69}, {402, 18}}</string>
-											<reference key="NSSuperview" ref="596750588"/>
-											<bool key="NSEnabled">YES</bool>
-											<object class="NSButtonCell" key="NSCell" id="117056849">
-												<int key="NSCellFlags">67239424</int>
-												<int key="NSCellFlags2">0</int>
-												<string key="NSContents">Click-through Inactive Windows</string>
-												<reference key="NSSupport" ref="463863101"/>
-												<reference key="NSControlView" ref="915448994"/>
-												<int key="NSButtonFlags">1211912703</int>
-												<int key="NSButtonFlags2">2</int>
-												<reference key="NSAlternateImage" ref="391434389"/>
-												<reference key="NSAlternateContents" ref="331740794"/>
-												<reference key="NSKeyEquivalent" ref="331740794"/>
-												<int key="NSPeriodicDelay">200</int>
-												<int key="NSPeriodicInterval">25</int>
+											<object class="NSButton" id="915448994">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 69}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="117056849">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Click-through Inactive Windows</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="915448994"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
 											</object>
-										</object>
-										<object class="NSTextField" id="707276799">
-											<reference key="NSNextResponder" ref="596750588"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{33, 32}, {385, 31}}</string>
-											<reference key="NSSuperview" ref="596750588"/>
-											<bool key="NSEnabled">YES</bool>
-											<object class="NSTextFieldCell" key="NSCell" id="318286890">
-												<int key="NSCellFlags">67239424</int>
-												<int key="NSCellFlags2">4194304</int>
-												<string key="NSContents">When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.</string>
-												<reference key="NSSupport" ref="26"/>
-												<reference key="NSControlView" ref="707276799"/>
-												<reference key="NSBackgroundColor" ref="57160303"/>
-												<reference key="NSTextColor" ref="930815747"/>
+											<object class="NSTextField" id="707276799">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{33, 32}, {385, 31}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="318286890">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="707276799"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
 											</object>
 										</object>
+										<string key="NSFrame">{{10, 33}, {438, 279}}</string>
+										<reference key="NSSuperview" ref="448510093"/>
 									</object>
-									<string key="NSFrame">{{10, 33}, {438, 279}}</string>
-									<reference key="NSSuperview" ref="448510093"/>
-								</object>
-							</object>
-							<string key="NSFrame">{{10, 10}, {458, 325}}</string>
-							<reference key="NSSuperview" ref="941366957"/>
-							<object class="NSMutableArray" key="NSTabViewItems">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSTabViewItem" id="287591690">
-									<object class="NSMutableString" key="NSIdentifier">
-										<characters key="NS.bytes">1</characters>
-									</object>
-									<reference key="NSView" ref="596750588"/>
 									<string key="NSLabel">Input</string>
 									<reference key="NSColor" ref="57160303"/>
 									<reference key="NSTabView" ref="448510093"/>
@@ -688,8 +685,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 													<int key="NSButtonFlags">1211912703</int>
 													<int key="NSButtonFlags2">2</int>
 													<reference key="NSAlternateImage" ref="391434389"/>
-													<reference key="NSAlternateContents" ref="331740794"/>
-													<reference key="NSKeyEquivalent" ref="331740794"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
 													<int key="NSPeriodicDelay">200</int>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
@@ -724,7 +721,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 													<int key="NSButtonFlags">109199615</int>
 													<int key="NSButtonFlags2">1</int>
 													<object class="NSFont" key="NSAlternateImage">
-														<reference key="NSName" ref="512586816"/>
+														<string key="NSName">LucidaGrande</string>
 														<double key="NSSize">1.300000e+01</double>
 														<int key="NSfFlags">16</int>
 													</object>
@@ -739,12 +736,12 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 													<object class="NSMenuItem" key="NSMenuItem" id="616492372">
 														<reference key="NSMenu" ref="341113515"/>
 														<string key="NSTitle">From Display</string>
-														<reference key="NSKeyEquiv" ref="331740794"/>
+														<string key="NSKeyEquiv"/>
 														<int key="NSKeyEquivModMask">1048576</int>
 														<int key="NSMnemonicLoc">2147483647</int>
 														<int key="NSState">1</int>
 														<reference key="NSOnImage" ref="531645050"/>
-														<reference key="NSMixedImage" ref="246283459"/>
+														<reference key="NSMixedImage" ref="351811234"/>
 														<string key="NSAction">_popUpItemAction:</string>
 														<int key="NSTag">-1</int>
 														<reference key="NSTarget" ref="633115429"/>
@@ -760,11 +757,11 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 															<object class="NSMenuItem" id="759499526">
 																<reference key="NSMenu" ref="341113515"/>
 																<string key="NSTitle">256 Colors</string>
-																<reference key="NSKeyEquiv" ref="331740794"/>
+																<string key="NSKeyEquiv"/>
 																<int key="NSKeyEquivModMask">1048576</int>
 																<int key="NSMnemonicLoc">2147483647</int>
 																<reference key="NSOnImage" ref="531645050"/>
-																<reference key="NSMixedImage" ref="246283459"/>
+																<reference key="NSMixedImage" ref="351811234"/>
 																<string key="NSAction">_popUpItemAction:</string>
 																<int key="NSTag">8</int>
 																<reference key="NSTarget" ref="633115429"/>
@@ -772,11 +769,11 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 															<object class="NSMenuItem" id="543935434">
 																<reference key="NSMenu" ref="341113515"/>
 																<string key="NSTitle">Thousands</string>
-																<reference key="NSKeyEquiv" ref="331740794"/>
+																<string key="NSKeyEquiv"/>
 																<int key="NSKeyEquivModMask">1048576</int>
 																<int key="NSMnemonicLoc">2147483647</int>
 																<reference key="NSOnImage" ref="531645050"/>
-																<reference key="NSMixedImage" ref="246283459"/>
+																<reference key="NSMixedImage" ref="351811234"/>
 																<string key="NSAction">_popUpItemAction:</string>
 																<int key="NSTag">15</int>
 																<reference key="NSTarget" ref="633115429"/>
@@ -784,11 +781,11 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 															<object class="NSMenuItem" id="836673018">
 																<reference key="NSMenu" ref="341113515"/>
 																<string key="NSTitle">Millions</string>
-																<reference key="NSKeyEquiv" ref="331740794"/>
+																<string key="NSKeyEquiv"/>
 																<int key="NSKeyEquivModMask">1048576</int>
 																<int key="NSMnemonicLoc">2147483647</int>
 																<reference key="NSOnImage" ref="531645050"/>
-																<reference key="NSMixedImage" ref="246283459"/>
+																<reference key="NSMixedImage" ref="351811234"/>
 																<string key="NSAction">_popUpItemAction:</string>
 																<int key="NSTag">24</int>
 																<reference key="NSTarget" ref="633115429"/>
@@ -848,8 +845,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 													<int key="NSButtonFlags">1211912703</int>
 													<int key="NSButtonFlags2">2</int>
 													<reference key="NSAlternateImage" ref="391434389"/>
-													<reference key="NSAlternateContents" ref="331740794"/>
-													<reference key="NSKeyEquivalent" ref="331740794"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
 													<int key="NSPeriodicDelay">200</int>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
@@ -898,8 +895,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 													<int key="NSButtonFlags">1211912703</int>
 													<int key="NSButtonFlags2">2</int>
 													<reference key="NSAlternateImage" ref="391434389"/>
-													<reference key="NSAlternateContents" ref="331740794"/>
-													<reference key="NSKeyEquivalent" ref="331740794"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
 													<int key="NSPeriodicDelay">200</int>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
@@ -919,8 +916,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
 													<int key="NSButtonFlags">1211912703</int>
 													<int key="NSButtonFlags2">2</int>
 													<reference key="NSAlternateImage" ref="391434389"/>
-													<reference key="NSAlternateContents" ref="331740794"/>
-													<reference key="NSKeyEquivalent" ref="331740794"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
 													<int key="NSPeriodicDelay">200</int>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
@@ -988,11 +985,15 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<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"/>
+							</object>
 						</object>
 					</object>
 					<string key="NSFrameSize">{481, 345}</string>
 				</object>
-				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+				<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
 				<string key="NSMinSize">{213, 129}</string>
 				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSFrameAutosaveName">x11_prefs</string>
@@ -1000,51 +1001,24 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 			<object class="NSWindowTemplate" id="604417141">
 				<int key="NSWindowStyleMask">11</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{279, 253}, {486, 327}}</string>
+				<string key="NSWindowRect">{{537, 554}, {454, 311}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Application Menu</string>
-				<reference key="NSWindowClass" ref="666842945"/>
+				<string key="NSWindowClass">NSPanel</string>
 				<object class="NSMutableString" key="NSViewClass">
 					<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="NSWindowContentMaxSize">{10000, 10000}</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="724002248">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">303</int>
-							<string key="NSFrame">{{268, 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>
-								<object class="NSFont" key="NSAlternateImage" id="549406736">
-									<string key="NSName">Helvetica</string>
-									<double key="NSSize">1.300000e+01</double>
-									<int key="NSfFlags">16</int>
-								</object>
-								<reference key="NSAlternateContents" ref="331740794"/>
-								<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="671954382">
 							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">301</int>
-							<string key="NSFrame">{{372, 247}, {100, 32}}</string>
+							<int key="NSvFlags">265</int>
+							<string key="NSFrame">{{340, 231}, {100, 32}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSButtonCell" key="NSCell" id="143554520">
@@ -1055,7 +1029,11 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								<reference key="NSControlView" ref="671954382"/>
 								<int key="NSButtonFlags">-2038284033</int>
 								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="549406736"/>
+								<object class="NSFont" key="NSAlternateImage" id="549406736">
+									<string key="NSName">Helvetica</string>
+									<double key="NSSize">1.300000e+01</double>
+									<int key="NSfFlags">16</int>
+								</object>
 								<object class="NSMutableString" key="NSAlternateContents">
 									<characters key="NS.bytes"/>
 								</object>
@@ -1068,8 +1046,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 						<object class="NSButton" id="492358940">
 							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">301</int>
-							<string key="NSFrame">{{372, 215}, {100, 32}}</string>
+							<int key="NSvFlags">265</int>
+							<string key="NSFrame">{{340, 199}, {100, 32}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSButtonCell" key="NSCell" id="8201128">
@@ -1093,7 +1071,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 						<object class="NSScrollView" id="1063387772">
 							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">307</int>
+							<int key="NSvFlags">274</int>
 							<object class="NSMutableArray" key="NSSubviews">
 								<bool key="EncodedWithXMLCoder">YES</bool>
 								<object class="NSClipView" id="580565898">
@@ -1104,26 +1082,26 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 										<object class="NSTableView" id="905092943">
 											<reference key="NSNextResponder" ref="580565898"/>
 											<int key="NSvFlags">256</int>
-											<string key="NSFrameSize">{333, 197}</string>
+											<string key="NSFrameSize">{301, 198}</string>
 											<reference key="NSSuperview" ref="580565898"/>
 											<bool key="NSEnabled">YES</bool>
 											<object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
 												<reference key="NSNextResponder" ref="672307654"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrameSize">{333, 17}</string>
+												<string key="NSFrameSize">{301, 17}</string>
 												<reference key="NSSuperview" ref="672307654"/>
 												<reference key="NSTableView" ref="905092943"/>
 											</object>
 											<object class="_NSCornerView" key="NSCornerView" id="898633680">
 												<reference key="NSNextResponder" ref="1063387772"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{334, 0}, {16, 17}}</string>
+												<string key="NSFrame">{{302, 0}, {16, 17}}</string>
 												<reference key="NSSuperview" ref="1063387772"/>
 											</object>
 											<object class="NSMutableArray" key="NSTableColumns">
 												<bool key="EncodedWithXMLCoder">YES</bool>
 												<object class="NSTableColumn" id="84282687">
-													<double key="NSWidth">1.110000e+02</double>
+													<double key="NSWidth">9.900000e+01</double>
 													<double key="NSMinWidth">4.000000e+01</double>
 													<double key="NSMaxWidth">1.000000e+03</double>
 													<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -1137,7 +1115,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 														</object>
 														<object class="NSColor" key="NSTextColor" id="249576247">
 															<int key="NSColorSpace">6</int>
-															<reference key="NSCatalogName" ref="905527164"/>
+															<string key="NSCatalogName">System</string>
 															<string key="NSColorName">headerTextColor</string>
 															<reference key="NSColor" ref="214098874"/>
 														</object>
@@ -1145,7 +1123,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 													<object class="NSTextFieldCell" key="NSDataCell" id="432610585">
 														<int key="NSCellFlags">338820672</int>
 														<int key="NSCellFlags2">1024</int>
-														<string key="NSContents" id="548220387">Text Cell</string>
+														<string key="NSContents">Text Cell</string>
 														<reference key="NSSupport" ref="463863101"/>
 														<reference key="NSControlView" ref="905092943"/>
 														<object class="NSColor" key="NSBackgroundColor" id="822946413">
@@ -1160,7 +1138,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 													<reference key="NSTableView" ref="905092943"/>
 												</object>
 												<object class="NSTableColumn" id="938444323">
-													<double key="NSWidth">1.327310e+02</double>
+													<double key="NSWidth">1.217310e+02</double>
 													<double key="NSMinWidth">6.273100e+01</double>
 													<double key="NSMaxWidth">1.000000e+03</double>
 													<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -1174,7 +1152,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 													<object class="NSTextFieldCell" key="NSDataCell" id="825378892">
 														<int key="NSCellFlags">338820672</int>
 														<int key="NSCellFlags2">1024</int>
-														<reference key="NSContents" ref="548220387"/>
+														<string key="NSContents">Text Cell</string>
 														<reference key="NSSupport" ref="463863101"/>
 														<reference key="NSControlView" ref="905092943"/>
 														<reference key="NSBackgroundColor" ref="822946413"/>
@@ -1186,7 +1164,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 													<reference key="NSTableView" ref="905092943"/>
 												</object>
 												<object class="NSTableColumn" id="242608782">
-													<double key="NSWidth">8.000000e+01</double>
+													<double key="NSWidth">7.100000e+01</double>
 													<double key="NSMinWidth">1.000000e+01</double>
 													<double key="NSMaxWidth">1.000000e+03</double>
 													<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -1196,7 +1174,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 														<reference key="NSSupport" ref="26"/>
 														<object class="NSColor" key="NSBackgroundColor">
 															<int key="NSColorSpace">6</int>
-															<reference key="NSCatalogName" ref="905527164"/>
+															<string key="NSCatalogName">System</string>
 															<string key="NSColorName">headerColor</string>
 															<reference key="NSColor" ref="822946413"/>
 														</object>
@@ -1205,9 +1183,9 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 													<object class="NSTextFieldCell" key="NSDataCell" id="34714764">
 														<int key="NSCellFlags">338820672</int>
 														<int key="NSCellFlags2">1024</int>
-														<reference key="NSContents" ref="548220387"/>
+														<string key="NSContents">Text Cell</string>
 														<object class="NSFont" key="NSSupport">
-															<reference key="NSName" ref="512586816"/>
+															<string key="NSName">LucidaGrande</string>
 															<double key="NSSize">1.200000e+01</double>
 															<int key="NSfFlags">16</int>
 														</object>
@@ -1215,7 +1193,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 														<bool key="NSDrawsBackground">YES</bool>
 														<object class="NSColor" key="NSBackgroundColor" id="812484075">
 															<int key="NSColorSpace">6</int>
-															<reference key="NSCatalogName" ref="905527164"/>
+															<string key="NSCatalogName">System</string>
 															<string key="NSColorName">controlBackgroundColor</string>
 															<reference key="NSColor" ref="590688762"/>
 														</object>
@@ -1232,7 +1210,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 											<reference key="NSBackgroundColor" ref="822946413"/>
 											<object class="NSColor" key="NSGridColor">
 												<int key="NSColorSpace">6</int>
-												<reference key="NSCatalogName" ref="905527164"/>
+												<string key="NSCatalogName">System</string>
 												<string key="NSColorName">gridColor</string>
 												<object class="NSColor" key="NSColor">
 													<int key="NSColorSpace">3</int>
@@ -1247,7 +1225,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 											<bool key="NSAllowsTypeSelect">YES</bool>
 										</object>
 									</object>
-									<string key="NSFrame">{{1, 17}, {333, 197}}</string>
+									<string key="NSFrame">{{1, 17}, {301, 198}}</string>
 									<reference key="NSSuperview" ref="1063387772"/>
 									<reference key="NSNextKeyView" ref="905092943"/>
 									<reference key="NSDocView" ref="905092943"/>
@@ -1257,20 +1235,20 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								<object class="NSScroller" id="842897584">
 									<reference key="NSNextResponder" ref="1063387772"/>
 									<int key="NSvFlags">256</int>
-									<string key="NSFrame">{{334, 17}, {15, 197}}</string>
+									<string key="NSFrame">{{302, 17}, {15, 198}}</string>
 									<reference key="NSSuperview" ref="1063387772"/>
 									<reference key="NSTarget" ref="1063387772"/>
-									<string key="NSAction" id="365694962">_doScroller:</string>
+									<string key="NSAction">_doScroller:</string>
 									<double key="NSPercent">9.949238e-01</double>
 								</object>
 								<object class="NSScroller" id="17278747">
 									<reference key="NSNextResponder" ref="1063387772"/>
 									<int key="NSvFlags">256</int>
-									<string key="NSFrame">{{1, 214}, {333, 15}}</string>
+									<string key="NSFrame">{{1, 215}, {301, 15}}</string>
 									<reference key="NSSuperview" ref="1063387772"/>
 									<int key="NSsFlags">1</int>
 									<reference key="NSTarget" ref="1063387772"/>
-									<reference key="NSAction" ref="365694962"/>
+									<string key="NSAction">_doScroller:</string>
 									<double key="NSPercent">6.885246e-01</double>
 								</object>
 								<object class="NSClipView" id="672307654">
@@ -1280,7 +1258,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 										<bool key="EncodedWithXMLCoder">YES</bool>
 										<reference ref="792419186"/>
 									</object>
-									<string key="NSFrame">{{1, 0}, {333, 17}}</string>
+									<string key="NSFrame">{{1, 0}, {301, 17}}</string>
 									<reference key="NSSuperview" ref="1063387772"/>
 									<reference key="NSNextKeyView" ref="792419186"/>
 									<reference key="NSDocView" ref="792419186"/>
@@ -1289,7 +1267,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								</object>
 								<reference ref="898633680"/>
 							</object>
-							<string key="NSFrame">{{20, 77}, {350, 230}}</string>
+							<string key="NSFrame">{{20, 60}, {318, 231}}</string>
 							<reference key="NSSuperview" ref="85544634"/>
 							<reference key="NSNextKeyView" ref="580565898"/>
 							<int key="NSsFlags">50</int>
@@ -1300,10 +1278,35 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<reference key="NSCornerView" ref="898633680"/>
 							<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
 						</object>
+						<object class="NSButton" id="758204686">
+							<reference key="NSNextResponder" ref="85544634"/>
+							<int key="NSvFlags">265</int>
+							<string key="NSFrame">{{340, 263}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="1025474039">
+								<int key="NSCellFlags">-2080244224</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Add Item</string>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="758204686"/>
+								<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="125703429">
 							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">303</int>
-							<string key="NSFrame">{{352, 12}, {84, 32}}</string>
+							<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">
@@ -1325,24 +1328,22 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								<int key="NSPeriodicInterval">25</int>
 							</object>
 						</object>
-						<object class="NSButton" id="758204686">
+						<object class="NSButton" id="724002248">
 							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">301</int>
-							<string key="NSFrame">{{372, 279}, {100, 32}}</string>
+							<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="1025474039">
-								<int key="NSCellFlags">67239424</int>
+							<object class="NSButtonCell" key="NSCell" id="809610613">
+								<int key="NSCellFlags">-2080244224</int>
 								<int key="NSCellFlags2">137887744</int>
-								<string key="NSContents">Add Item</string>
+								<string key="NSContents">Done</string>
 								<reference key="NSSupport" ref="463863101"/>
-								<reference key="NSControlView" ref="758204686"/>
+								<reference key="NSControlView" ref="724002248"/>
 								<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>
+								<string key="NSAlternateContents"/>
 								<object class="NSMutableString" key="NSKeyEquivalent">
 									<characters key="NS.bytes"/>
 								</object>
@@ -1351,11 +1352,11 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							</object>
 						</object>
 					</object>
-					<string key="NSFrameSize">{486, 327}</string>
+					<string key="NSFrameSize">{454, 311}</string>
+					<reference key="NSSuperview"/>
 				</object>
-				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
-				<string key="NSMinSize">{213, 129}</string>
-				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+				<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+				<string key="NSMinSize">{320, 262}</string>
 				<string key="NSFrameAutosaveName">x11_apps</string>
 			</object>
 			<object class="NSMenu" id="294137138">
@@ -1366,51 +1367,51 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<reference key="NSMenu" ref="294137138"/>
 						<bool key="NSIsDisabled">YES</bool>
 						<bool key="NSIsSeparator">YES</bool>
-						<reference key="NSTitle" ref="331740794"/>
-						<reference key="NSKeyEquiv" ref="331740794"/>
+						<string key="NSTitle"/>
+						<string key="NSKeyEquiv"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="246283459"/>
+						<reference key="NSMixedImage" ref="351811234"/>
 					</object>
 					<object class="NSMenuItem" id="511651072">
 						<reference key="NSMenu" ref="294137138"/>
-						<reference key="NSTitle" ref="667842658"/>
-						<reference key="NSKeyEquiv" ref="331740794"/>
+						<string key="NSTitle">Applications</string>
+						<string key="NSKeyEquiv"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
 						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="246283459"/>
+						<reference key="NSMixedImage" ref="351811234"/>
 						<string key="NSAction">submenuAction:</string>
 						<object class="NSMenu" key="NSSubmenu" id="48278059">
-							<reference key="NSTitle" ref="667842658"/>
+							<string key="NSTitle">Applications</string>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
 								<object class="NSMenuItem" id="563798000">
 									<reference key="NSMenu" ref="48278059"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="331740794"/>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 								<object class="NSMenuItem" id="1032342329">
 									<reference key="NSMenu" ref="48278059"/>
 									<string type="base64-UTF8" key="NSTitle">Q3VzdG9taXpl4oCmA</string>
-									<reference key="NSKeyEquiv" ref="331740794"/>
+									<string key="NSKeyEquiv"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
 									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="246283459"/>
+									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
 							</object>
 						</object>
 					</object>
 				</object>
-				<reference key="NSName" ref="331740794"/>
+				<string key="NSName"/>
 			</object>
 		</object>
 		<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -1554,7 +1555,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label" id="75505755">apps_table_show:</string>
+						<string key="label">apps_table_show:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="1065386165"/>
 					</object>
@@ -1650,7 +1651,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label" id="582333102">prefs_changed:</string>
+						<string key="label">prefs_changed:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="119157981"/>
 					</object>
@@ -1658,7 +1659,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="582333102"/>
+						<string key="label">prefs_changed:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="179949713"/>
 					</object>
@@ -1666,7 +1667,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="582333102"/>
+						<string key="label">prefs_changed:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="842100515"/>
 					</object>
@@ -1674,7 +1675,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="582333102"/>
+						<string key="label">prefs_changed:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="418227126"/>
 					</object>
@@ -1682,7 +1683,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="582333102"/>
+						<string key="label">prefs_changed:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="709074847"/>
 					</object>
@@ -1690,7 +1691,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="582333102"/>
+						<string key="label">prefs_changed:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="989050925"/>
 					</object>
@@ -1698,7 +1699,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="582333102"/>
+						<string key="label">prefs_changed:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="700826966"/>
 					</object>
@@ -1786,7 +1787,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="75505755"/>
+						<string key="label">apps_table_show:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="1032342329"/>
 					</object>
@@ -1842,7 +1843,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="582333102"/>
+						<string key="label">prefs_changed:</string>
 						<reference key="source" ref="485884620"/>
 						<reference key="destination" ref="915448994"/>
 					</object>
@@ -1922,7 +1923,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<reference ref="551174276"/>
 						</object>
 						<reference key="parent" ref="330408435"/>
-						<reference key="objectName" ref="121567387"/>
+						<string key="objectName">MainMenu</string>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">19</int>
@@ -2209,7 +2210,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<int key="objectID">196</int>
 						<reference key="object" ref="485884620"/>
 						<reference key="parent" ref="330408435"/>
-						<reference key="objectName" ref="865849805"/>
+						<string key="objectName">X11Controller</string>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">244</int>
@@ -2935,18 +2936,21 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>270.editorWindowContentRectSynchronizationRect</string>
 					<string>272.IBPluginDependency</string>
 					<string>272.ImportedFromIB2</string>
+					<string>285.IBEditorWindowLastContentRect</string>
 					<string>285.IBPluginDependency</string>
 					<string>285.IBViewEditorWindowController.showingBoundsRectangles</string>
 					<string>285.IBViewEditorWindowController.showingLayoutRectangles</string>
 					<string>285.IBWindowTemplateEditedContentRect</string>
 					<string>285.ImportedFromIB2</string>
 					<string>285.editorWindowContentRectSynchronizationRect</string>
+					<string>285.lastResizeAction</string>
 					<string>285.windowTemplate.hasMaxSize</string>
 					<string>285.windowTemplate.hasMinSize</string>
 					<string>285.windowTemplate.maxSize</string>
 					<string>285.windowTemplate.minSize</string>
 					<string>286.IBPluginDependency</string>
 					<string>286.ImportedFromIB2</string>
+					<string>29.IBEditorWindowLastContentRect</string>
 					<string>29.IBPluginDependency</string>
 					<string>29.ImportedFromIB2</string>
 					<string>29.editorWindowContentRectSynchronizationRect</string>
@@ -3087,231 +3091,246 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="NSMutableArray" key="dict.values">
 					<bool key="EncodedWithXMLCoder">YES</bool>
-					<reference ref="1013584587"/>
-					<reference ref="1013584587"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<integer value="1" id="9"/>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{202, 626}, {154, 153}}</string>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{271, 666}, {301, 153}}</string>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>{{184, 290}, {481, 345}}</string>
 					<reference ref="9"/>
 					<string>{{184, 290}, {481, 345}}</string>
 					<reference ref="9"/>
 					<reference ref="9"/>
-					<string id="169660368">{3.40282e+38, 3.40282e+38}</string>
-					<string id="432763037">{213, 107}</string>
-					<reference ref="1013584587"/>
+					<string>{3.40282e+38, 3.40282e+38}</string>
+					<string>{213, 107}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{100, 746}, {155, 33}}</string>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>{{537, 554}, {454, 311}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<reference ref="9"/>
-					<string id="678991548">{{433, 406}, {486, 327}}</string>
-					<reference ref="9"/>
-					<reference ref="678991548"/>
+					<string>{{537, 554}, {454, 311}}</string>
 					<reference ref="9"/>
+					<string>{{433, 406}, {486, 327}}</string>
+					<object class="NSDictionary">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSMutableArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>IBResizeActionFinalFrame</string>
+							<string>IBResizeActionInitialFrame</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>{{537, 554}, {454, 311}}</string>
+							<string>{{537, 576}, {471, 289}}</string>
+						</object>
+					</object>
+					<integer value="0"/>
 					<reference ref="9"/>
-					<reference ref="169660368"/>
-					<reference ref="432763037"/>
-					<reference ref="1013584587"/>
+					<string>{3.40282e+38, 3.40282e+38}</string>
+					<string>{320, 240}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>{{0, 1114}, {336, 20}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{67, 819}, {336, 20}}</string>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{79, 616}, {218, 203}}</string>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<reference ref="1013584587"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 				</object>
 			</object>
@@ -3341,29 +3360,17 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<object class="IBPartialClassDescription">
-					<reference key="className" ref="671773319"/>
-					<nil key="superclassName"/>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
+					<string key="className">FirstResponder</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
 					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSFormatter</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey" id="360524387">IBUserSource</string>
-						<reference key="minorKey" ref="331740794"/>
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
@@ -3394,24 +3401,24 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 						<object class="NSMutableArray" key="dict.values">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string id="678582588">id</string>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
-							<reference ref="678582588"/>
+							<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">
@@ -3439,24 +3446,24 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 						<object class="NSMutableArray" key="dict.values">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string id="133216019">NSMenuItem</string>
+							<string>NSMenuItem</string>
 							<string>NSTableView</string>
-							<string id="623744785">NSButton</string>
+							<string>NSButton</string>
 							<string>NSPopUpButton</string>
-							<string id="455827649">NSMenu</string>
-							<reference ref="455827649"/>
-							<reference ref="133216019"/>
-							<reference ref="623744785"/>
-							<reference ref="623744785"/>
-							<reference ref="623744785"/>
-							<reference ref="623744785"/>
-							<reference ref="623744785"/>
+							<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>NSPanel</string>
-							<reference ref="623744785"/>
-							<reference ref="133216019"/>
-							<reference ref="623744785"/>
-							<reference ref="133216019"/>
-							<reference ref="133216019"/>
+							<string>NSButton</string>
+							<string>NSMenuItem</string>
+							<string>NSButton</string>
+							<string>NSMenuItem</string>
+							<string>NSMenuItem</string>
 						</object>
 					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -3464,628 +3471,10 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<string key="minorKey"/>
 					</object>
 				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSFormatter</string>
-					<nil key="superclassName"/>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<reference key="majorKey" ref="360524387"/>
-						<reference key="minorKey" ref="331740794"/>
-					</object>
-				</object>
 			</object>
 		</object>
 		<int key="IBDocument.localizationMode">0</int>
 		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<object class="NSMutableData" key="IBDocument.RunnableNib">
-			<bytes key="NS.bytes">YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQkdG9wWSRhcmNoaXZlclgkb2JqZWN0cxIA
-AYag0QAHAAhdSUIub2JqZWN0ZGF0YYABXxAPTlNLZXllZEFyY2hpdmVyrxEDQgALAAwAMQA1ADkAQABD
-AEQASABMAIkAkQCZAJoAnwCyALMAuAC5ALoAvQDBAMIAxQDQANEA0gDWANsA5ADrAOwA8ADyAPMA9wD8
-AQoBEgETAS0BLgE1ATYBOQE9AT4BQAFCAUYBTAFPAVABUQFUAVkBYAFlAWYBZwFsAXMBeAF5AXoBewGA
-AYcBjQGOAZkBmgGeAZ8BogGjAagBrwGwAbgBuQG6Ab8BwAHFAcwB0QHSAekB7AHuAfAB/QIBAgICAwIG
-Ag0CFwICAhgCIgICAiMCLQICAi4CMgI1AjYCOwJDAkQCRQJKAlMCVwJYAl0CZAJlAm0CbgJzAnsCfAJ9
-An4CgwKIAo8ClAKVAp0CngKjAqoCqwKzArQCuQLBAsICwwLEAskC0QLSAtMC1ALZAtoC3wLgAuQC6wLv
-AvAC8QL1Avw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0mvVa9hr22vea+Fr5Gvna+pr7Wvwa/Nr9mv5
-a/xr/2wCbAVsCGwLbA5sEWwUbBdsGmwdbCBsI2wmbClsLGwvbDJsNWw4bDtsPmxBbERsR2xKbE1sUGxT
-bFZsWWxcbF9sYmxlbGhsa2xubHFsdGx3bHpsfWyAbINshmyJbIxsj2ySbJVsmGybbJ5soWykbKdsqmyt
-bLBss2y2bLlsvGy/bMJsxWzIbMtszmzRbNRs12zabN1s4GzjbOZs6WzsbO9s8mz1bPhs+2z+bQFtBG0H
-bQptDW0QbRNtFm0ZbRxtH20ibSVtKG0rbS5tMW00bTdtOm09bUBtQ21GbUltTG1ObVBtU21WbVltXG1f
-bWRtZ21pbWxtb210bXltfG1/bYRth22KbYxtjm2RbZRtmW2ebaNtqG2rba5tsW2zbbZtuW28bb9txG3H
-bcptzW3QbdVt2G3dbeBt423mbelt7G3vbfJt9236bf9uBG4HbgxuEW4UbhduGm4cbh9uIm4lbiduKm4t
-bjBuM244bjpuPG4+bkFuRG5JbkxuT25SblduWm5cbl9uYW5kbmZuaG5qbmxubm5xbnNudm55bnxugW6E
-boduim6NbpBulW6Ybptunm6gbqJupG6mbqlurG6vbrFutG63brpuvG6+bsBuxW7HbspuzW7PbtJu127a
-bt1u4m7kbulu627wbvNu9m74bvtu/W8AbwVvCG8Kbw1vEG8TbxZvGW8ebydvLG8ubzNvNm84bztvPm9D
-b0VvR29Mb1FvVG9Wb1tvXW9gb2NvZm9pb2xvbm9xb3Rvd296b31vgG+Cb4dvjG+Rb5NvlW+Yb5tvpG+m
-b6dvsG+zb7RvvW/Ab8Fvym/PAAAAAAAAAgIAAAAAAAANIAAAAAAAAAAAAAAAAAAAb94</bytes>
-		</object>
 	</data>
 </archive>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index 4306102..5223c9a 100644
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib differ
commit 3570ca1cb76f084272f7d8bd22c4cfdf03201a77
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Sun Feb 10 18:27:52 2008 -0800

    XQuartz: Added option for setting quartz-wm click-through preference
    (cherry picked from commit bf54c267cba97b2b3b9a621da0575776a388b2cb)

diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h
index af5aea2..86da67f 100644
--- a/hw/xquartz/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -98,5 +98,6 @@ extern int quartzHasRoot, quartzEnableRootless;
 #define PREFS_XP_OPTIONS            "xp_options"
 #define PREFS_ENABLE_STEREO         "enable_stereo"
 #define PREFS_LOGIN_SHELL           "login_shell"
+#define PREFS_QUARTZ_WM_CLICK_THROUGH "wm_click_through"
 
 #endif /* X11APPLICATION_H */
diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index 47f5220..64d5cd1 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -37,29 +37,30 @@
 
 @interface X11Controller : NSObject
 {
-    NSPanel *prefs_panel;
-
-    NSButton *fake_buttons;
-    NSButton *enable_fullscreen;
-    NSButton *use_sysbeep;
-    NSButton *enable_keyequivs;
-    NSButton *sync_keymap;
-    NSButton *enable_auth;
-    NSButton *enable_tcp;
-    NSPopUpButton *depth;
-
-    NSMenuItem *x11_about_item;
-    NSMenuItem *window_separator;
-    NSMenuItem *dock_window_separator;
-    NSMenuItem *apps_separator;
-    NSMenuItem *toggle_fullscreen_item;
-    NSMenu *dock_apps_menu;
-    NSTableView *apps_table;
+    IBOutlet NSPanel *prefs_panel;
+
+    IBOutlet NSButton *fake_buttons;
+    IBOutlet NSButton *enable_fullscreen;
+    IBOutlet NSButton *use_sysbeep;
+    IBOutlet NSButton *enable_keyequivs;
+    IBOutlet NSButton *sync_keymap;
+    IBOutlet NSButton *click_through;
+    IBOutlet NSButton *enable_auth;
+    IBOutlet NSButton *enable_tcp;
+    IBOutlet NSPopUpButton *depth;
+
+    IBOutlet NSMenuItem *x11_about_item;
+    IBOutlet NSMenuItem *window_separator;
+    IBOutlet NSMenuItem *dock_window_separator;
+    IBOutlet NSMenuItem *apps_separator;
+    IBOutlet NSMenuItem *toggle_fullscreen_item;
+    IBOutlet NSMenu *dock_apps_menu;
+    IBOutlet NSTableView *apps_table;
 
     NSArray *apps;
     NSMutableArray *table_apps;
 
-    NSMenu *dock_menu;
+    IBOutlet NSMenu *dock_menu;
 
     int checked_window_item;
     x_list *pending_apps;
@@ -74,6 +75,25 @@
 - (void) set_can_quit:(BOOL)state;
 - (void) server_ready;
 
+- (IBAction) apps_table_show:(id)sender;
+- (IBAction) apps_table_cancel:(id)sender;
+- (IBAction) apps_table_done:(id)sender;
+- (IBAction) apps_table_new:(id)sender;
+- (IBAction) apps_table_duplicate:(id)sender;
+- (IBAction) apps_table_delete:(id)sender;
+- (IBAction) bring_to_front:(id)sender;
+- (IBAction) close_window:(id)sender;
+- (IBAction) minimize_window:(id)sender;
+- (IBAction) zoom_window:(id)sender;
+- (IBAction) next_window:(id)sender;
+- (IBAction) previous_window:(id)sender;
+- (IBAction) enable_fullscreen_changed:(id)sender;
+- (IBAction) toggle_fullscreen:(id)sender;
+- (IBAction) prefs_changed:(id)sender;
+- (IBAction) prefs_show:(id)sender;
+- (IBAction) quit:(id)sender;
+- (IBAction) x11_help:(id)sender;
+
 @end
 
 #endif /* __OBJC__ */
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index d3f8365..5111eaf 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -613,7 +613,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
   quartzUseSysBeep = [use_sysbeep intValue];
   X11EnableKeyEquivalents = [enable_keyequivs intValue];
   darwinSyncKeymap = [sync_keymap intValue];
-	
+
   /* after adding prefs here, also add to [X11Application read_defaults]
      and below */
 	
@@ -621,6 +621,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
   [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep];
   [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents];
   [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap];
+  [NSApp prefs_set_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH value:[click_through intValue]];
   [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]];
   [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]];
   [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]];
@@ -635,6 +636,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
   [enable_keyequivs setIntValue:X11EnableKeyEquivalents];
   [sync_keymap setIntValue:darwinSyncKeymap];
   [sync_keymap setEnabled:darwinKeymapFile == NULL];
+  [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH default:NO]];
 	
   [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]];
   [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
index c267e45..08b3810 100644
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
@@ -8,85 +8,86 @@
 		<string key="IBDocument.HIToolboxVersion">352.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
+			<integer value="29"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<string id="874199827">com.apple.InterfaceBuilder.CocoaPlugin</string>
+			<string id="1013584587">com.apple.InterfaceBuilder.CocoaPlugin</string>
 		</object>
-		<object class="NSMutableArray" key="IBDocument.RootObjects" id="874420287">
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSCustomObject" id="584863936">
+			<object class="NSCustomObject" id="815810918">
 				<object class="NSMutableString" key="NSClassName">
 					<characters key="NS.bytes">NSApplication</characters>
 				</object>
 			</object>
-			<object class="NSCustomObject" id="518703249">
-				<string key="NSClassName">FirstResponder</string>
+			<object class="NSCustomObject" id="941939442">
+				<string key="NSClassName" id="671773319">FirstResponder</string>
 			</object>
-			<object class="NSCustomObject" id="166373373">
+			<object class="NSCustomObject" id="951368722">
 				<string key="NSClassName">NSApplication</string>
 			</object>
-			<object class="NSMenu" id="496556081">
-				<string key="NSTitle" id="414137626">MainMenu</string>
+			<object class="NSMenu" id="524015605">
+				<string key="NSTitle" id="121567387">MainMenu</string>
 				<object class="NSMutableArray" key="NSMenuItems">
 					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="NSMenuItem" id="385138428">
-						<reference key="NSMenu" ref="496556081"/>
-						<string key="NSTitle" id="845099910">X11</string>
-						<string key="NSKeyEquiv" id="1005878359"/>
+					<object class="NSMenuItem" id="365880285">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle" id="335360021">X11</string>
+						<string key="NSKeyEquiv" id="331740794"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
-						<object class="NSCustomResource" key="NSOnImage" id="732862070">
-							<string key="NSClassName" id="642323532">NSImage</string>
+						<object class="NSCustomResource" key="NSOnImage" id="531645050">
+							<string key="NSClassName" id="1072749539">NSImage</string>
 							<string key="NSResourceName">NSMenuCheckmark</string>
 						</object>
-						<object class="NSCustomResource" key="NSMixedImage" id="154462367">
-							<reference key="NSClassName" ref="642323532"/>
+						<object class="NSCustomResource" key="NSMixedImage" id="246283459">
+							<reference key="NSClassName" ref="1072749539"/>
 							<string key="NSResourceName">NSMenuMixedState</string>
 						</object>
 						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="856655711">
-							<reference key="NSTitle" ref="845099910"/>
+						<object class="NSMenu" key="NSSubmenu" id="576521955">
+							<reference key="NSTitle" ref="335360021"/>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="588913325">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="139290918">
+									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">About X11</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="836585695">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="386173216">
+									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Preferences...</string>
 									<string key="NSKeyEquiv">,</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="562920394">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="272876017">
+									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="63158341">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="32285361">
+									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Services</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="502073457">
+									<object class="NSMenu" key="NSSubmenu" id="821388474">
 										<object class="NSMutableString" key="NSTitle">
 											<characters key="NS.bytes">Services</characters>
 										</object>
@@ -96,343 +97,343 @@
 										<string key="NSName">_NSServicesMenu</string>
 									</object>
 								</object>
-								<object class="NSMenuItem" id="635454008">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="431301145">
+									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="101686423">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="6876565">
+									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Toggle Full Screen</string>
-									<string key="NSKeyEquiv" id="982375500">a</string>
+									<string key="NSKeyEquiv" id="934453074">a</string>
 									<int key="NSKeyEquivModMask">1572864</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="754231570">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="479677589">
+									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="147703239">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="301008465">
+									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Hide X11</string>
 									<string key="NSKeyEquiv">h</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 									<int key="NSTag">42</int>
 								</object>
-								<object class="NSMenuItem" id="191312176">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="206802571">
+									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Hide Others</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="392807560">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="1023546148">
+									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Show All</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 									<int key="NSTag">42</int>
 								</object>
-								<object class="NSMenuItem" id="648021277">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="848095279">
+									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="275459236">
-									<reference key="NSMenu" ref="856655711"/>
+								<object class="NSMenuItem" id="274138642">
+									<reference key="NSMenu" ref="576521955"/>
 									<string key="NSTitle">Quit X11</string>
 									<string key="NSKeyEquiv">q</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
 							</object>
 							<string key="NSName">_NSAppleMenu</string>
 						</object>
 					</object>
-					<object class="NSMenuItem" id="940914550">
-						<reference key="NSMenu" ref="496556081"/>
-						<string key="NSTitle" id="942587293">Applications</string>
-						<reference key="NSKeyEquiv" ref="1005878359"/>
+					<object class="NSMenuItem" id="868031522">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle" id="667842658">Applications</string>
+						<reference key="NSKeyEquiv" ref="331740794"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="732862070"/>
-						<reference key="NSMixedImage" ref="154462367"/>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="246283459"/>
 						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="684156653">
-							<reference key="NSTitle" ref="942587293"/>
+						<object class="NSMenu" key="NSSubmenu" id="981161348">
+							<reference key="NSTitle" ref="667842658"/>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="940363272">
-									<reference key="NSMenu" ref="684156653"/>
+								<object class="NSMenuItem" id="390088328">
+									<reference key="NSMenu" ref="981161348"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="767830074">
-									<reference key="NSMenu" ref="684156653"/>
+								<object class="NSMenuItem" id="1065386165">
+									<reference key="NSMenu" ref="981161348"/>
 									<string key="NSTitle">Customize...</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
 							</object>
 						</object>
 					</object>
-					<object class="NSMenuItem" id="326076563">
-						<reference key="NSMenu" ref="496556081"/>
-						<string key="NSTitle" id="38701994">Edit</string>
-						<reference key="NSKeyEquiv" ref="1005878359"/>
+					<object class="NSMenuItem" id="200491363">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle" id="934359734">Edit</string>
+						<reference key="NSKeyEquiv" ref="331740794"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="732862070"/>
-						<reference key="NSMixedImage" ref="154462367"/>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="246283459"/>
 						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="932839819">
-							<reference key="NSTitle" ref="38701994"/>
+						<object class="NSMenu" key="NSSubmenu" id="526778998">
+							<reference key="NSTitle" ref="934359734"/>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="159704190">
-									<reference key="NSMenu" ref="932839819"/>
+								<object class="NSMenuItem" id="1010221707">
+									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Undo</string>
 									<string key="NSKeyEquiv">z</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="634656440">
-									<reference key="NSMenu" ref="932839819"/>
+								<object class="NSMenuItem" id="535038564">
+									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Redo</string>
 									<string key="NSKeyEquiv">Z</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="342107529">
-									<reference key="NSMenu" ref="932839819"/>
+								<object class="NSMenuItem" id="839739619">
+									<reference key="NSMenu" ref="526778998"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="590926585">
-									<reference key="NSMenu" ref="932839819"/>
+								<object class="NSMenuItem" id="581727829">
+									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Cut</string>
 									<string key="NSKeyEquiv">x</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="204575684">
-									<reference key="NSMenu" ref="932839819"/>
+								<object class="NSMenuItem" id="185296989">
+									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Copy</string>
 									<string key="NSKeyEquiv">c</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="739720090">
-									<reference key="NSMenu" ref="932839819"/>
+								<object class="NSMenuItem" id="924678073">
+									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Paste</string>
 									<string key="NSKeyEquiv">v</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="549812830">
-									<reference key="NSMenu" ref="932839819"/>
+								<object class="NSMenuItem" id="994817848">
+									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Delete</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="584461964">
-									<reference key="NSMenu" ref="932839819"/>
+								<object class="NSMenuItem" id="322866464">
+									<reference key="NSMenu" ref="526778998"/>
 									<string key="NSTitle">Select All</string>
-									<reference key="NSKeyEquiv" ref="982375500"/>
+									<reference key="NSKeyEquiv" ref="934453074"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
 							</object>
 						</object>
 					</object>
-					<object class="NSMenuItem" id="736341863">
-						<reference key="NSMenu" ref="496556081"/>
+					<object class="NSMenuItem" id="931553638">
+						<reference key="NSMenu" ref="524015605"/>
 						<string key="NSTitle">Window</string>
-						<reference key="NSKeyEquiv" ref="1005878359"/>
+						<reference key="NSKeyEquiv" ref="331740794"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="732862070"/>
-						<reference key="NSMixedImage" ref="154462367"/>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="246283459"/>
 						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="943404979">
+						<object class="NSMenu" key="NSSubmenu" id="96874957">
 							<object class="NSMutableString" key="NSTitle">
 								<characters key="NS.bytes">Window</characters>
 							</object>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="915861349">
-									<reference key="NSMenu" ref="943404979"/>
-									<string key="NSTitle">Minimize Window</string>
+								<object class="NSMenuItem" id="677652931">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Minimize</string>
 									<string key="NSKeyEquiv">m</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="442007350">
-									<reference key="NSMenu" ref="943404979"/>
-									<string key="NSTitle">Close Window</string>
-									<string key="NSKeyEquiv">w</string>
+								<object class="NSMenuItem" id="1066447520">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Zoom</string>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="722764538">
-									<reference key="NSMenu" ref="943404979"/>
-									<string key="NSTitle">Zoom Window</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
-									<int key="NSKeyEquivModMask">1048576</int>
+								<object class="NSMenuItem" id="1036389925">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Cycle Through Windows</string>
+									<string key="NSKeyEquiv">`</string>
+									<int key="NSKeyEquivModMask">1048840</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="783034074">
-									<reference key="NSMenu" ref="943404979"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
-									<int key="NSKeyEquivModMask">1048576</int>
+								<object class="NSMenuItem" id="369641893">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Reverse Cycle Through Windows</string>
+									<string key="NSKeyEquiv">~</string>
+									<int key="NSKeyEquivModMask">1179914</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="283496700">
-									<reference key="NSMenu" ref="943404979"/>
-									<string key="NSTitle">Next Window</string>
-									<string type="base64-UTF8" key="NSKeyEquiv">75yDA</string>
+								<object class="NSMenuItem" id="280172320">
+									<reference key="NSMenu" ref="96874957"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="500397106">
-									<reference key="NSMenu" ref="943404979"/>
-									<string key="NSTitle">Previous Window</string>
-									<string type="base64-UTF8" key="NSKeyEquiv">75yCA</string>
+								<object class="NSMenuItem" id="984461797">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Close</string>
+									<string key="NSKeyEquiv">w</string>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="303213786">
-									<reference key="NSMenu" ref="943404979"/>
+								<object class="NSMenuItem" id="155085383">
+									<reference key="NSMenu" ref="96874957"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="853630143">
-									<reference key="NSMenu" ref="943404979"/>
+								<object class="NSMenuItem" id="276216762">
+									<reference key="NSMenu" ref="96874957"/>
 									<string key="NSTitle">Bring All to Front</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="332241222">
-									<reference key="NSMenu" ref="943404979"/>
+								<object class="NSMenuItem" id="444952046">
+									<reference key="NSMenu" ref="96874957"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
 							</object>
 							<string key="NSName">_NSWindowsMenu</string>
 						</object>
 					</object>
-					<object class="NSMenuItem" id="934950259">
-						<reference key="NSMenu" ref="496556081"/>
-						<string key="NSTitle" id="955297347">Help</string>
-						<reference key="NSKeyEquiv" ref="1005878359"/>
+					<object class="NSMenuItem" id="551174276">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle" id="214661970">Help</string>
+						<reference key="NSKeyEquiv" ref="331740794"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="732862070"/>
-						<reference key="NSMixedImage" ref="154462367"/>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="246283459"/>
 						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="1052262524">
-							<reference key="NSTitle" ref="955297347"/>
+						<object class="NSMenu" key="NSSubmenu" id="511848303">
+							<reference key="NSTitle" ref="214661970"/>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="122992289">
-									<reference key="NSMenu" ref="1052262524"/>
+								<object class="NSMenuItem" id="504984881">
+									<reference key="NSMenu" ref="511848303"/>
 									<string key="NSTitle">X11 Help</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
 							</object>
 						</object>
@@ -440,562 +441,599 @@
 				</object>
 				<string key="NSName">_NSMainMenu</string>
 			</object>
-			<object class="NSCustomObject" id="88064061">
-				<string key="NSClassName" id="517073442">X11Controller</string>
+			<object class="NSCustomObject" id="485884620">
+				<string key="NSClassName" id="865849805">X11Controller</string>
 			</object>
-			<object class="NSWindowTemplate" id="210544761">
+			<object class="NSWindowTemplate" id="124913468">
 				<int key="NSWindowStyleMask">3</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{319, 323}, {478, 316}}</string>
+				<string key="NSWindowRect">{{319, 294}, {481, 345}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Preferences</string>
-				<string key="NSWindowClass" id="643663067">NSPanel</string>
+				<string key="NSWindowClass" id="666842945">NSPanel</string>
 				<object class="NSMutableString" key="NSViewClass">
 					<characters key="NS.bytes">View</characters>
 				</object>
 				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSWindowContentMinSize">{213, 107}</string>
-				<object class="NSView" key="NSWindowView" id="404125972">
+				<object class="NSView" key="NSWindowView" id="941366957">
 					<nil key="NSNextResponder"/>
 					<int key="NSvFlags">256</int>
 					<object class="NSMutableArray" key="NSSubviews">
 						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSTabView" id="75927203">
-							<reference key="NSNextResponder" ref="404125972"/>
+						<object class="NSTabView" id="448510093">
+							<reference key="NSNextResponder" ref="941366957"/>
 							<int key="NSvFlags">256</int>
 							<object class="NSMutableArray" key="NSSubviews">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSView" id="527709877">
-									<reference key="NSNextResponder" ref="75927203"/>
+								<object class="NSView" id="596750588">
+									<reference key="NSNextResponder" ref="448510093"/>
 									<int key="NSvFlags">256</int>
 									<object class="NSMutableArray" key="NSSubviews">
 										<bool key="EncodedWithXMLCoder">YES</bool>
-										<object class="NSButton" id="1045559310">
-											<reference key="NSNextResponder" ref="527709877"/>
+										<object class="NSButton" id="119157981">
+											<reference key="NSNextResponder" ref="596750588"/>
 											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{18, 90}, {402, 18}}</string>
-											<reference key="NSSuperview" ref="527709877"/>
+											<string key="NSFrame">{{18, 243}, {402, 18}}</string>
+											<reference key="NSSuperview" ref="596750588"/>
 											<bool key="NSEnabled">YES</bool>
-											<object class="NSButtonCell" key="NSCell" id="225158677">
+											<object class="NSButtonCell" key="NSCell" id="990762273">
 												<int key="NSCellFlags">67239424</int>
 												<int key="NSCellFlags2">0</int>
-												<string key="NSContents">Use system alert effect</string>
-												<object class="NSFont" key="NSSupport" id="706343604">
-													<string key="NSName" id="508374773">LucidaGrande</string>
+												<string key="NSContents">Emulate three button mouse</string>
+												<object class="NSFont" key="NSSupport" id="463863101">
+													<string key="NSName" id="512586816">LucidaGrande</string>
 													<double key="NSSize">1.300000e+01</double>
 													<int key="NSfFlags">1044</int>
 												</object>
-												<reference key="NSControlView" ref="1045559310"/>
+												<reference key="NSControlView" ref="119157981"/>
 												<int key="NSButtonFlags">1211912703</int>
 												<int key="NSButtonFlags2">2</int>
-												<object class="NSButtonImageSource" key="NSAlternateImage" id="876172194">
+												<object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
 													<string key="NSImageName">NSSwitch</string>
 												</object>
-												<reference key="NSAlternateContents" ref="1005878359"/>
-												<reference key="NSKeyEquivalent" ref="1005878359"/>
+												<reference key="NSAlternateContents" ref="331740794"/>
+												<reference key="NSKeyEquivalent" ref="331740794"/>
 												<int key="NSPeriodicDelay">200</int>
 												<int key="NSPeriodicInterval">25</int>
 											</object>
 										</object>
-										<object class="NSTextField" id="67626595">
-											<reference key="NSNextResponder" ref="527709877"/>
+										<object class="NSTextField" id="443008216">
+											<reference key="NSNextResponder" ref="596750588"/>
 											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{36, 56}, {385, 28}}</string>
-											<reference key="NSSuperview" ref="527709877"/>
+											<string key="NSFrame">{{36, 93}, {385, 31}}</string>
+											<reference key="NSSuperview" ref="596750588"/>
 											<bool key="NSEnabled">YES</bool>
-											<object class="NSTextFieldCell" key="NSCell" id="1072420481">
+											<object class="NSTextFieldCell" key="NSCell" id="391919450">
 												<int key="NSCellFlags">67239424</int>
 												<int key="NSCellFlags2">4194304</int>
-												<string key="NSContents">X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel.</string>
+												<string key="NSContents">When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.</string>
 												<object class="NSFont" key="NSSupport" id="26">
-													<reference key="NSName" ref="508374773"/>
+													<reference key="NSName" ref="512586816"/>
 													<double key="NSSize">1.100000e+01</double>
 													<int key="NSfFlags">3100</int>
 												</object>
-												<reference key="NSControlView" ref="67626595"/>
-												<object class="NSColor" key="NSBackgroundColor" id="320865741">
+												<reference key="NSControlView" ref="443008216"/>
+												<object class="NSColor" key="NSBackgroundColor" id="57160303">
 													<int key="NSColorSpace">6</int>
-													<string key="NSCatalogName" id="1000587476">System</string>
+													<string key="NSCatalogName" id="905527164">System</string>
 													<string key="NSColorName">controlColor</string>
-													<object class="NSColor" key="NSColor" id="1000384962">
+													<object class="NSColor" key="NSColor" id="590688762">
 														<int key="NSColorSpace">3</int>
 														<bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
 													</object>
 												</object>
-												<object class="NSColor" key="NSTextColor" id="233849662">
+												<object class="NSColor" key="NSTextColor" id="930815747">
 													<int key="NSColorSpace">6</int>
-													<reference key="NSCatalogName" ref="1000587476"/>
+													<reference key="NSCatalogName" ref="905527164"/>
 													<string key="NSColorName">controlTextColor</string>
-													<object class="NSColor" key="NSColor" id="608123050">
+													<object class="NSColor" key="NSColor" id="214098874">
 														<int key="NSColorSpace">3</int>
 														<bytes key="NSWhite">MAA</bytes>
 													</object>
 												</object>
 											</object>
 										</object>
-										<object class="NSPopUpButton" id="300224954">
-											<reference key="NSNextResponder" ref="527709877"/>
+										<object class="NSTextField" id="282885445">
+											<reference key="NSNextResponder" ref="596750588"/>
 											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{74, 209}, {128, 26}}</string>
-											<reference key="NSSuperview" ref="527709877"/>
+											<string key="NSFrame">{{36, 208}, {385, 29}}</string>
+											<reference key="NSSuperview" ref="596750588"/>
 											<bool key="NSEnabled">YES</bool>
-											<object class="NSPopUpButtonCell" key="NSCell" id="301142744">
-												<int key="NSCellFlags">-2076049856</int>
-												<int key="NSCellFlags2">1024</int>
-												<reference key="NSSupport" ref="706343604"/>
-												<reference key="NSControlView" ref="300224954"/>
-												<int key="NSButtonFlags">109199615</int>
-												<int key="NSButtonFlags2">1</int>
-												<object class="NSFont" key="NSAlternateImage">
-													<reference key="NSName" ref="508374773"/>
-													<double key="NSSize">1.300000e+01</double>
-													<int key="NSfFlags">16</int>
-												</object>
-												<object class="NSMutableString" key="NSAlternateContents">
-													<characters key="NS.bytes"/>
-												</object>
-												<object class="NSMutableString" key="NSKeyEquivalent">
-													<characters key="NS.bytes"/>
-												</object>
-												<int key="NSPeriodicDelay">400</int>
-												<int key="NSPeriodicInterval">75</int>
-												<object class="NSMenuItem" key="NSMenuItem" id="473657062">
-													<reference key="NSMenu" ref="1071781177"/>
-													<string key="NSTitle">From Display</string>
-													<reference key="NSKeyEquiv" ref="1005878359"/>
-													<int key="NSKeyEquivModMask">1048576</int>
-													<int key="NSMnemonicLoc">2147483647</int>
-													<int key="NSState">1</int>
-													<reference key="NSOnImage" ref="732862070"/>
-													<reference key="NSMixedImage" ref="154462367"/>
-													<string key="NSAction">_popUpItemAction:</string>
-													<int key="NSTag">-1</int>
-													<reference key="NSTarget" ref="301142744"/>
-												</object>
-												<bool key="NSMenuItemRespectAlignment">YES</bool>
-												<object class="NSMenu" key="NSMenu" id="1071781177">
-													<object class="NSMutableString" key="NSTitle">
-														<characters key="NS.bytes">OtherViews</characters>
-													</object>
-													<object class="NSMutableArray" key="NSMenuItems">
-														<bool key="EncodedWithXMLCoder">YES</bool>
-														<reference ref="473657062"/>
-														<object class="NSMenuItem" id="827519886">
-															<reference key="NSMenu" ref="1071781177"/>
-															<string key="NSTitle">256 Colors</string>
-															<reference key="NSKeyEquiv" ref="1005878359"/>
-															<int key="NSKeyEquivModMask">1048576</int>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="732862070"/>
-															<reference key="NSMixedImage" ref="154462367"/>
-															<string key="NSAction">_popUpItemAction:</string>
-															<int key="NSTag">8</int>
-															<reference key="NSTarget" ref="301142744"/>
-														</object>
-														<object class="NSMenuItem" id="247508345">
-															<reference key="NSMenu" ref="1071781177"/>
-															<string key="NSTitle">Thousands</string>
-															<reference key="NSKeyEquiv" ref="1005878359"/>
-															<int key="NSKeyEquivModMask">1048576</int>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="732862070"/>
-															<reference key="NSMixedImage" ref="154462367"/>
-															<string key="NSAction">_popUpItemAction:</string>
-															<int key="NSTag">15</int>
-															<reference key="NSTarget" ref="301142744"/>
-														</object>
-														<object class="NSMenuItem" id="611307925">
-															<reference key="NSMenu" ref="1071781177"/>
-															<string key="NSTitle">Millions</string>
-															<reference key="NSKeyEquiv" ref="1005878359"/>
-															<int key="NSKeyEquivModMask">1048576</int>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="732862070"/>
-															<reference key="NSMixedImage" ref="154462367"/>
-															<string key="NSAction">_popUpItemAction:</string>
-															<int key="NSTag">24</int>
-															<reference key="NSTarget" ref="301142744"/>
-														</object>
-													</object>
-												</object>
-												<int key="NSPreferredEdge">3</int>
-												<bool key="NSUsesItemFromMenu">YES</bool>
-												<bool key="NSAltersState">YES</bool>
-												<int key="NSArrowPosition">1</int>
+											<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>
+												<reference key="NSSupport" ref="26"/>
+												<reference key="NSControlView" ref="282885445"/>
+												<reference key="NSBackgroundColor" ref="57160303"/>
+												<reference key="NSTextColor" ref="930815747"/>
 											</object>
 										</object>
-										<object class="NSTextField" id="717889178">
-											<reference key="NSNextResponder" ref="527709877"/>
+										<object class="NSButton" id="842100515">
+											<reference key="NSNextResponder" ref="596750588"/>
 											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{17, 212}, {55, 20}}</string>
-											<reference key="NSSuperview" ref="527709877"/>
+											<string key="NSFrame">{{18, 130}, {402, 18}}</string>
+											<reference key="NSSuperview" ref="596750588"/>
 											<bool key="NSEnabled">YES</bool>
-											<object class="NSTextFieldCell" key="NSCell" id="749756205">
+											<object class="NSButtonCell" key="NSCell" id="940564599">
 												<int key="NSCellFlags">67239424</int>
-												<int key="NSCellFlags2">4194304</int>
-												<string type="base64-UTF8" key="NSContents">Q29sb3JzOgo</string>
-												<reference key="NSSupport" ref="706343604"/>
-												<reference key="NSControlView" ref="717889178"/>
-												<reference key="NSBackgroundColor" ref="320865741"/>
-												<reference key="NSTextColor" ref="233849662"/>
+												<int key="NSCellFlags2">0</int>
+												<string key="NSContents">Enable key equivalents under X11</string>
+												<reference key="NSSupport" ref="463863101"/>
+												<reference key="NSControlView" ref="842100515"/>
+												<int key="NSButtonFlags">1211912703</int>
+												<int key="NSButtonFlags2">2</int>
+												<reference key="NSAlternateImage" ref="391434389"/>
+												<reference key="NSAlternateContents" ref="331740794"/>
+												<reference key="NSKeyEquivalent" ref="331740794"/>
+												<int key="NSPeriodicDelay">200</int>
+												<int key="NSPeriodicInterval">25</int>
 											</object>
 										</object>
-										<object class="NSTextField" id="114173823">
-											<reference key="NSNextResponder" ref="527709877"/>
+										<object class="NSTextField" id="31160162">
+											<reference key="NSNextResponder" ref="596750588"/>
 											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{36, 190}, {392, 14}}</string>
-											<reference key="NSSuperview" ref="527709877"/>
+											<string key="NSFrame">{{36, 159}, {385, 14}}</string>
+											<reference key="NSSuperview" ref="596750588"/>
 											<bool key="NSEnabled">YES</bool>
-											<object class="NSTextFieldCell" key="NSCell" id="725554783">
+											<object class="NSTextFieldCell" key="NSCell" id="666057093">
 												<int key="NSCellFlags">67239424</int>
 												<int key="NSCellFlags2">4194304</int>
-												<string key="NSContents">This option takes effect when X11 is launched again.</string>
+												<string key="NSContents">Allows input menu changes to overwrite the current X11 keymap.</string>
 												<reference key="NSSupport" ref="26"/>
-												<reference key="NSControlView" ref="114173823"/>
-												<reference key="NSBackgroundColor" ref="320865741"/>
-												<reference key="NSTextColor" ref="233849662"/>
+												<reference key="NSControlView" ref="31160162"/>
+												<reference key="NSBackgroundColor" ref="57160303"/>
+												<reference key="NSTextColor" ref="930815747"/>
+											</object>
+										</object>
+										<object class="NSButton" id="179949713">
+											<reference key="NSNextResponder" ref="596750588"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrame">{{18, 179}, {402, 18}}</string>
+											<reference key="NSSuperview" ref="596750588"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSButtonCell" key="NSCell" id="967619578">
+												<int key="NSCellFlags">67239424</int>
+												<int key="NSCellFlags2">0</int>
+												<string key="NSContents">Follow system keyboard layout</string>
+												<reference key="NSSupport" ref="463863101"/>
+												<reference key="NSControlView" ref="179949713"/>
+												<int key="NSButtonFlags">1211912703</int>
+												<int key="NSButtonFlags2">2</int>
+												<reference key="NSAlternateImage" ref="391434389"/>
+												<reference key="NSAlternateContents" ref="331740794"/>
+												<reference key="NSKeyEquivalent" ref="331740794"/>
+												<int key="NSPeriodicDelay">200</int>
+												<int key="NSPeriodicInterval">25</int>
 											</object>
 										</object>
-										<object class="NSButton" id="817420822">
-											<reference key="NSNextResponder" ref="527709877"/>
+										<object class="NSButton" id="915448994">
+											<reference key="NSNextResponder" ref="596750588"/>
 											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{18, 156}, {409, 23}}</string>
-											<reference key="NSSuperview" ref="527709877"/>
+											<string key="NSFrame">{{18, 69}, {402, 18}}</string>
+											<reference key="NSSuperview" ref="596750588"/>
 											<bool key="NSEnabled">YES</bool>
-											<object class="NSButtonCell" key="NSCell" id="100363081">
+											<object class="NSButtonCell" key="NSCell" id="117056849">
 												<int key="NSCellFlags">67239424</int>
 												<int key="NSCellFlags2">0</int>
-												<string key="NSContents">Full screen mode</string>
-												<reference key="NSSupport" ref="706343604"/>
-												<reference key="NSControlView" ref="817420822"/>
+												<string key="NSContents">Click-through Inactive Windows</string>
+												<reference key="NSSupport" ref="463863101"/>
+												<reference key="NSControlView" ref="915448994"/>
 												<int key="NSButtonFlags">1211912703</int>
 												<int key="NSButtonFlags2">2</int>
-												<reference key="NSAlternateImage" ref="876172194"/>
-												<reference key="NSAlternateContents" ref="1005878359"/>
-												<reference key="NSKeyEquivalent" ref="1005878359"/>
+												<reference key="NSAlternateImage" ref="391434389"/>
+												<reference key="NSAlternateContents" ref="331740794"/>
+												<reference key="NSKeyEquivalent" ref="331740794"/>
 												<int key="NSPeriodicDelay">200</int>
 												<int key="NSPeriodicInterval">25</int>
 											</object>
 										</object>
-										<object class="NSTextField" id="959270736">
-											<reference key="NSNextResponder" ref="527709877"/>
+										<object class="NSTextField" id="707276799">
+											<reference key="NSNextResponder" ref="596750588"/>
 											<int key="NSvFlags">256</int>
-											<string key="NSFrame">{{36, 119}, {385, 31}}</string>
-											<reference key="NSSuperview" ref="527709877"/>
+											<string key="NSFrame">{{33, 32}, {385, 31}}</string>
+											<reference key="NSSuperview" ref="596750588"/>
 											<bool key="NSEnabled">YES</bool>
-											<object class="NSTextFieldCell" key="NSCell" id="550432669">
+											<object class="NSTextFieldCell" key="NSCell" id="318286890">
 												<int key="NSCellFlags">67239424</int>
 												<int key="NSCellFlags2">4194304</int>
-												<string key="NSContents">Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode.</string>
+												<string key="NSContents">When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.</string>
 												<reference key="NSSupport" ref="26"/>
-												<reference key="NSControlView" ref="959270736"/>
-												<reference key="NSBackgroundColor" ref="320865741"/>
-												<reference key="NSTextColor" ref="233849662"/>
+												<reference key="NSControlView" ref="707276799"/>
+												<reference key="NSBackgroundColor" ref="57160303"/>
+												<reference key="NSTextColor" ref="930815747"/>
 											</object>
 										</object>
 									</object>
-									<string key="NSFrame">{{10, 33}, {438, 253}}</string>
-									<reference key="NSSuperview" ref="75927203"/>
+									<string key="NSFrame">{{10, 33}, {438, 279}}</string>
+									<reference key="NSSuperview" ref="448510093"/>
 								</object>
 							</object>
-							<string key="NSFrame">{{10, 7}, {458, 299}}</string>
-							<reference key="NSSuperview" ref="404125972"/>
+							<string key="NSFrame">{{10, 10}, {458, 325}}</string>
+							<reference key="NSSuperview" ref="941366957"/>
 							<object class="NSMutableArray" key="NSTabViewItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSTabViewItem" id="17244958">
+								<object class="NSTabViewItem" id="287591690">
 									<object class="NSMutableString" key="NSIdentifier">
 										<characters key="NS.bytes">1</characters>
 									</object>
-									<object class="NSView" key="NSView" id="600332710">
+									<reference key="NSView" ref="596750588"/>
+									<string key="NSLabel">Input</string>
+									<reference key="NSColor" ref="57160303"/>
+									<reference key="NSTabView" ref="448510093"/>
+								</object>
+								<object class="NSTabViewItem" id="960678392">
+									<object class="NSMutableString" key="NSIdentifier">
+										<characters key="NS.bytes">2</characters>
+									</object>
+									<object class="NSView" key="NSView" id="515308735">
 										<nil key="NSNextResponder"/>
 										<int key="NSvFlags">256</int>
 										<object class="NSMutableArray" key="NSSubviews">
 											<bool key="EncodedWithXMLCoder">YES</bool>
-											<object class="NSButton" id="808306730">
-												<reference key="NSNextResponder" ref="600332710"/>
+											<object class="NSButton" id="418227126">
+												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 217}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="600332710"/>
+												<string key="NSFrame">{{18, 116}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="727617204">
+												<object class="NSButtonCell" key="NSCell" id="1016069354">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Emulate three button mouse</string>
-													<reference key="NSSupport" ref="706343604"/>
-													<reference key="NSControlView" ref="808306730"/>
+													<string key="NSContents">Use system alert effect</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="418227126"/>
 													<int key="NSButtonFlags">1211912703</int>
 													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="876172194"/>
-													<reference key="NSAlternateContents" ref="1005878359"/>
-													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<reference key="NSAlternateContents" ref="331740794"/>
+													<reference key="NSKeyEquivalent" ref="331740794"/>
 													<int key="NSPeriodicDelay">200</int>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
 											</object>
-											<object class="NSTextField" id="618388983">
-												<reference key="NSNextResponder" ref="600332710"/>
+											<object class="NSTextField" id="1039016593">
+												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 67}, {385, 31}}</string>
-												<reference key="NSSuperview" ref="600332710"/>
+												<string key="NSFrame">{{36, 82}, {385, 28}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="140236247">
+												<object class="NSTextFieldCell" key="NSCell" id="624655599">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.</string>
+													<string key="NSContents">X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel.</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="618388983"/>
-													<reference key="NSBackgroundColor" ref="320865741"/>
-													<reference key="NSTextColor" ref="233849662"/>
+													<reference key="NSControlView" ref="1039016593"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
 												</object>
 											</object>
-											<object class="NSTextField" id="754792079">
-												<reference key="NSNextResponder" ref="600332710"/>
+											<object class="NSPopUpButton" id="709074847">
+												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 182}, {385, 29}}</string>
-												<reference key="NSSuperview" ref="600332710"/>
+												<string key="NSFrame">{{74, 235}, {128, 26}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="110537159">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs
-ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="754792079"/>
-													<reference key="NSBackgroundColor" ref="320865741"/>
-													<reference key="NSTextColor" ref="233849662"/>
+												<object class="NSPopUpButtonCell" key="NSCell" id="633115429">
+													<int key="NSCellFlags">-2076049856</int>
+													<int key="NSCellFlags2">1024</int>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="709074847"/>
+													<int key="NSButtonFlags">109199615</int>
+													<int key="NSButtonFlags2">1</int>
+													<object class="NSFont" key="NSAlternateImage">
+														<reference key="NSName" ref="512586816"/>
+														<double key="NSSize">1.300000e+01</double>
+														<int key="NSfFlags">16</int>
+													</object>
+													<object class="NSMutableString" key="NSAlternateContents">
+														<characters key="NS.bytes"/>
+													</object>
+													<object class="NSMutableString" key="NSKeyEquivalent">
+														<characters key="NS.bytes"/>
+													</object>
+													<int key="NSPeriodicDelay">400</int>
+													<int key="NSPeriodicInterval">75</int>
+													<object class="NSMenuItem" key="NSMenuItem" id="616492372">
+														<reference key="NSMenu" ref="341113515"/>
+														<string key="NSTitle">From Display</string>
+														<reference key="NSKeyEquiv" ref="331740794"/>
+														<int key="NSKeyEquivModMask">1048576</int>
+														<int key="NSMnemonicLoc">2147483647</int>
+														<int key="NSState">1</int>
+														<reference key="NSOnImage" ref="531645050"/>
+														<reference key="NSMixedImage" ref="246283459"/>
+														<string key="NSAction">_popUpItemAction:</string>
+														<int key="NSTag">-1</int>
+														<reference key="NSTarget" ref="633115429"/>
+													</object>
+													<bool key="NSMenuItemRespectAlignment">YES</bool>
+													<object class="NSMenu" key="NSMenu" id="341113515">
+														<object class="NSMutableString" key="NSTitle">
+															<characters key="NS.bytes">OtherViews</characters>
+														</object>
+														<object class="NSMutableArray" key="NSMenuItems">
+															<bool key="EncodedWithXMLCoder">YES</bool>
+															<reference ref="616492372"/>
+															<object class="NSMenuItem" id="759499526">
+																<reference key="NSMenu" ref="341113515"/>
+																<string key="NSTitle">256 Colors</string>
+																<reference key="NSKeyEquiv" ref="331740794"/>
+																<int key="NSKeyEquivModMask">1048576</int>
+																<int key="NSMnemonicLoc">2147483647</int>
+																<reference key="NSOnImage" ref="531645050"/>
+																<reference key="NSMixedImage" ref="246283459"/>
+																<string key="NSAction">_popUpItemAction:</string>
+																<int key="NSTag">8</int>
+																<reference key="NSTarget" ref="633115429"/>
+															</object>
+															<object class="NSMenuItem" id="543935434">
+																<reference key="NSMenu" ref="341113515"/>
+																<string key="NSTitle">Thousands</string>
+																<reference key="NSKeyEquiv" ref="331740794"/>
+																<int key="NSKeyEquivModMask">1048576</int>
+																<int key="NSMnemonicLoc">2147483647</int>
+																<reference key="NSOnImage" ref="531645050"/>
+																<reference key="NSMixedImage" ref="246283459"/>
+																<string key="NSAction">_popUpItemAction:</string>
+																<int key="NSTag">15</int>
+																<reference key="NSTarget" ref="633115429"/>
+															</object>
+															<object class="NSMenuItem" id="836673018">
+																<reference key="NSMenu" ref="341113515"/>
+																<string key="NSTitle">Millions</string>
+																<reference key="NSKeyEquiv" ref="331740794"/>
+																<int key="NSKeyEquivModMask">1048576</int>
+																<int key="NSMnemonicLoc">2147483647</int>
+																<reference key="NSOnImage" ref="531645050"/>
+																<reference key="NSMixedImage" ref="246283459"/>
+																<string key="NSAction">_popUpItemAction:</string>
+																<int key="NSTag">24</int>
+																<reference key="NSTarget" ref="633115429"/>
+															</object>
+														</object>
+													</object>
+													<int key="NSPreferredEdge">3</int>
+													<bool key="NSUsesItemFromMenu">YES</bool>
+													<bool key="NSAltersState">YES</bool>
+													<int key="NSArrowPosition">1</int>
 												</object>
 											</object>
-											<object class="NSButton" id="677150201">
-												<reference key="NSNextResponder" ref="600332710"/>
+											<object class="NSTextField" id="201731424">
+												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 104}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="600332710"/>
+												<string key="NSFrame">{{17, 238}, {55, 20}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="46680941">
+												<object class="NSTextFieldCell" key="NSCell" id="930265681">
 													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Enable key equivalents under X11</string>
-													<reference key="NSSupport" ref="706343604"/>
-													<reference key="NSControlView" ref="677150201"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="876172194"/>
-													<reference key="NSAlternateContents" ref="1005878359"/>
-													<reference key="NSKeyEquivalent" ref="1005878359"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string type="base64-UTF8" key="NSContents">Q29sb3JzOgo</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="201731424"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
 												</object>
 											</object>
-											<object class="NSTextField" id="228801813">
-												<reference key="NSNextResponder" ref="600332710"/>
+											<object class="NSTextField" id="86150604">
+												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 133}, {385, 14}}</string>
-												<reference key="NSSuperview" ref="600332710"/>
+												<string key="NSFrame">{{36, 216}, {392, 14}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="415694484">
+												<object class="NSTextFieldCell" key="NSCell" id="311969422">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">Allows input menu changes to overwrite the current X11 keymap.</string>
+													<string key="NSContents">This option takes effect when X11 is launched again.</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="228801813"/>
-													<reference key="NSBackgroundColor" ref="320865741"/>
-													<reference key="NSTextColor" ref="233849662"/>
+													<reference key="NSControlView" ref="86150604"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
 												</object>
 											</object>
-											<object class="NSButton" id="793493073">
-												<reference key="NSNextResponder" ref="600332710"/>
+											<object class="NSButton" id="477203622">
+												<reference key="NSNextResponder" ref="515308735"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 153}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="600332710"/>
+												<string key="NSFrame">{{18, 182}, {409, 23}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="466260504">
+												<object class="NSButtonCell" key="NSCell" id="631531164">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Follow system keyboard layout</string>
-													<reference key="NSSupport" ref="706343604"/>
-													<reference key="NSControlView" ref="793493073"/>
+													<string key="NSContents">Full screen mode</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="477203622"/>
 													<int key="NSButtonFlags">1211912703</int>
 													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="876172194"/>
-													<reference key="NSAlternateContents" ref="1005878359"/>
-													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<reference key="NSAlternateContents" ref="331740794"/>
+													<reference key="NSKeyEquivalent" ref="331740794"/>
 													<int key="NSPeriodicDelay">200</int>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
 											</object>
+											<object class="NSTextField" id="298603383">
+												<reference key="NSNextResponder" ref="515308735"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 145}, {385, 31}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="761107402">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="298603383"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
 										</object>
-										<string key="NSFrame">{{10, 33}, {438, 253}}</string>
-									</object>
-									<string key="NSLabel">Input</string>
-									<reference key="NSColor" ref="320865741"/>
-									<reference key="NSTabView" ref="75927203"/>
-								</object>
-								<object class="NSTabViewItem" id="493727923">
-									<object class="NSMutableString" key="NSIdentifier">
-										<characters key="NS.bytes">2</characters>
+										<string key="NSFrame">{{10, 33}, {438, 279}}</string>
 									</object>
-									<reference key="NSView" ref="527709877"/>
 									<string key="NSLabel">Output</string>
-									<reference key="NSColor" ref="320865741"/>
-									<reference key="NSTabView" ref="75927203"/>
+									<reference key="NSColor" ref="57160303"/>
+									<reference key="NSTabView" ref="448510093"/>
 								</object>
-								<object class="NSTabViewItem" id="1036577743">
-									<object class="NSView" key="NSView" id="536248195">
+								<object class="NSTabViewItem" id="348328898">
+									<object class="NSView" key="NSView" id="300811574">
 										<nil key="NSNextResponder"/>
 										<int key="NSvFlags">256</int>
 										<object class="NSMutableArray" key="NSSubviews">
 											<bool key="EncodedWithXMLCoder">YES</bool>
-											<object class="NSButton" id="137435489">
-												<reference key="NSNextResponder" ref="536248195"/>
+											<object class="NSButton" id="989050925">
+												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 217}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="536248195"/>
+												<string key="NSFrame">{{18, 243}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="891925158">
+												<object class="NSButtonCell" key="NSCell" id="189594322">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
 													<string key="NSContents">Authenticate connections</string>
-													<reference key="NSSupport" ref="706343604"/>
-													<reference key="NSControlView" ref="137435489"/>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="989050925"/>
 													<int key="NSButtonFlags">1211912703</int>
 													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="876172194"/>
-													<reference key="NSAlternateContents" ref="1005878359"/>
-													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<reference key="NSAlternateContents" ref="331740794"/>
+													<reference key="NSKeyEquivalent" ref="331740794"/>
 													<int key="NSPeriodicDelay">200</int>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
 											</object>
-											<object class="NSButton" id="663154230">
-												<reference key="NSNextResponder" ref="536248195"/>
+											<object class="NSButton" id="700826966">
+												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 140}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="536248195"/>
+												<string key="NSFrame">{{18, 166}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="836703945">
+												<object class="NSButtonCell" key="NSCell" id="489340979">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">0</int>
 													<string key="NSContents">Allow connections from network clients</string>
-													<reference key="NSSupport" ref="706343604"/>
-													<reference key="NSControlView" ref="663154230"/>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="700826966"/>
 													<int key="NSButtonFlags">1211912703</int>
 													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="876172194"/>
-													<reference key="NSAlternateContents" ref="1005878359"/>
-													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<reference key="NSAlternateContents" ref="331740794"/>
+													<reference key="NSKeyEquivalent" ref="331740794"/>
 													<int key="NSPeriodicDelay">200</int>
 													<int key="NSPeriodicInterval">25</int>
 												</object>
 											</object>
-											<object class="NSTextField" id="417801719">
-												<reference key="NSNextResponder" ref="536248195"/>
+											<object class="NSTextField" id="168436707">
+												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 169}, {385, 42}}</string>
-												<reference key="NSSuperview" ref="536248195"/>
+												<string key="NSFrame">{{36, 195}, {385, 42}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="935570098">
+												<object class="NSTextFieldCell" key="NSCell" id="53243865">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
 													<string type="base64-UTF8" key="NSContents">TGF1bmNoaW5nIFgxMSB3aWxsIGNyZWF0ZSBYYXV0aG9yaXR5IGFjY2Vzcy1jb250cm9sIGtleXMuIElm
 IHRoZSBzeXN0ZW0ncyBJUCBhZGRyZXNzIGNoYW5nZXMsIHRoZXNlIGtleXMgYmVjb21lIGludmFsaWQg
 d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="417801719"/>
-													<reference key="NSBackgroundColor" ref="320865741"/>
-													<reference key="NSTextColor" ref="233849662"/>
+													<reference key="NSControlView" ref="168436707"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
 												</object>
 											</object>
-											<object class="NSTextField" id="115954190">
-												<reference key="NSNextResponder" ref="536248195"/>
+											<object class="NSTextField" id="363817195">
+												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 92}, {385, 42}}</string>
-												<reference key="NSSuperview" ref="536248195"/>
+												<string key="NSFrame">{{36, 118}, {385, 42}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="144257898">
+												<object class="NSTextFieldCell" key="NSCell" id="390084685">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
 													<string key="NSContents">If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed.</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="115954190"/>
-													<reference key="NSBackgroundColor" ref="320865741"/>
-													<reference key="NSTextColor" ref="233849662"/>
+													<reference key="NSControlView" ref="363817195"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
 												</object>
 											</object>
-											<object class="NSTextField" id="1067279202">
-												<reference key="NSNextResponder" ref="536248195"/>
+											<object class="NSTextField" id="223835729">
+												<reference key="NSNextResponder" ref="300811574"/>
 												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{17, 20}, {404, 14}}</string>
-												<reference key="NSSuperview" ref="536248195"/>
+												<string key="NSFrame">{{20, 17}, {404, 14}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
 												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="703874672">
+												<object class="NSTextFieldCell" key="NSCell" id="283628678">
 													<int key="NSCellFlags">67239424</int>
 													<int key="NSCellFlags2">4194304</int>
 													<string key="NSContents">These options take effect when X11 is next launched.</string>
 													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="1067279202"/>
-													<reference key="NSBackgroundColor" ref="320865741"/>
-													<reference key="NSTextColor" ref="233849662"/>
+													<reference key="NSControlView" ref="223835729"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
 												</object>
 											</object>
 										</object>
-										<string key="NSFrame">{{10, 33}, {438, 253}}</string>
+										<string key="NSFrame">{{10, 33}, {438, 279}}</string>
 									</object>
 									<string key="NSLabel">Security</string>
-									<reference key="NSColor" ref="320865741"/>
-									<reference key="NSTabView" ref="75927203"/>
+									<reference key="NSColor" ref="57160303"/>
+									<reference key="NSTabView" ref="448510093"/>
 								</object>
 							</object>
-							<reference key="NSSelectedTabViewItem" ref="493727923"/>
-							<reference key="NSFont" ref="706343604"/>
+							<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>
 					</object>
-					<string key="NSFrameSize">{478, 316}</string>
+					<string key="NSFrameSize">{481, 345}</string>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
 				<string key="NSMinSize">{213, 129}</string>
 				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSFrameAutosaveName">x11_prefs</string>
 			</object>
-			<object class="NSWindowTemplate" id="796776534">
+			<object class="NSWindowTemplate" id="604417141">
 				<int key="NSWindowStyleMask">11</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{279, 270}, {486, 310}}</string>
+				<string key="NSWindowRect">{{279, 253}, {486, 327}}</string>
 				<int key="NSWTFlags">1350041600</int>
 				<string key="NSWindowTitle">X11 Application Menu</string>
-				<reference key="NSWindowClass" ref="643663067"/>
+				<reference key="NSWindowClass" ref="666842945"/>
 				<object class="NSMutableString" key="NSViewClass">
 					<characters key="NS.bytes">View</characters>
 				</object>
 				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSWindowContentMinSize">{213, 107}</string>
-				<object class="NSView" key="NSWindowView" id="1039094689">
+				<object class="NSView" key="NSWindowView" id="85544634">
 					<nil key="NSNextResponder"/>
 					<int key="NSvFlags">256</int>
 					<object class="NSMutableArray" key="NSSubviews">
 						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSButton" id="1002101696">
-							<reference key="NSNextResponder" ref="1039094689"/>
+						<object class="NSButton" id="724002248">
+							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">303</int>
-							<string key="NSFrame">{{388, 12}, {84, 32}}</string>
-							<reference key="NSSuperview" ref="1039094689"/>
+							<string key="NSFrame">{{268, 12}, {84, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="558394524">
+							<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="706343604"/>
-								<reference key="NSControlView" ref="1002101696"/>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="724002248"/>
 								<int key="NSButtonFlags">-2038284033</int>
 								<int key="NSButtonFlags2">1</int>
-								<object class="NSFont" key="NSAlternateImage" id="965938342">
+								<object class="NSFont" key="NSAlternateImage" id="549406736">
 									<string key="NSName">Helvetica</string>
 									<double key="NSSize">1.300000e+01</double>
 									<int key="NSfFlags">16</int>
 								</object>
-								<reference key="NSAlternateContents" ref="1005878359"/>
+								<reference key="NSAlternateContents" ref="331740794"/>
 								<object class="NSMutableString" key="NSKeyEquivalent">
 									<characters key="NS.bytes"/>
 								</object>
@@ -1003,21 +1041,21 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								<int key="NSPeriodicInterval">25</int>
 							</object>
 						</object>
-						<object class="NSButton" id="711288662">
-							<reference key="NSNextResponder" ref="1039094689"/>
+						<object class="NSButton" id="671954382">
+							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">301</int>
-							<string key="NSFrame">{{372, 230}, {100, 32}}</string>
-							<reference key="NSSuperview" ref="1039094689"/>
+							<string key="NSFrame">{{372, 247}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="413164923">
+							<object class="NSButtonCell" key="NSCell" id="143554520">
 								<int key="NSCellFlags">67239424</int>
 								<int key="NSCellFlags2">137887744</int>
 								<string key="NSContents">Duplicate</string>
-								<reference key="NSSupport" ref="706343604"/>
-								<reference key="NSControlView" ref="711288662"/>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="671954382"/>
 								<int key="NSButtonFlags">-2038284033</int>
 								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="965938342"/>
+								<reference key="NSAlternateImage" ref="549406736"/>
 								<object class="NSMutableString" key="NSAlternateContents">
 									<characters key="NS.bytes"/>
 								</object>
@@ -1028,21 +1066,21 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								<int key="NSPeriodicInterval">25</int>
 							</object>
 						</object>
-						<object class="NSButton" id="634701477">
-							<reference key="NSNextResponder" ref="1039094689"/>
+						<object class="NSButton" id="492358940">
+							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">301</int>
-							<string key="NSFrame">{{372, 198}, {100, 32}}</string>
-							<reference key="NSSuperview" ref="1039094689"/>
+							<string key="NSFrame">{{372, 215}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="26248495">
+							<object class="NSButtonCell" key="NSCell" id="8201128">
 								<int key="NSCellFlags">67239424</int>
 								<int key="NSCellFlags2">137887744</int>
 								<string key="NSContents">Remove</string>
-								<reference key="NSSupport" ref="706343604"/>
-								<reference key="NSControlView" ref="634701477"/>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="492358940"/>
 								<int key="NSButtonFlags">-2038284033</int>
 								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="965938342"/>
+								<reference key="NSAlternateImage" ref="549406736"/>
 								<object class="NSMutableString" key="NSAlternateContents">
 									<characters key="NS.bytes"/>
 								</object>
@@ -1053,39 +1091,39 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								<int key="NSPeriodicInterval">25</int>
 							</object>
 						</object>
-						<object class="NSScrollView" id="1011512617">
-							<reference key="NSNextResponder" ref="1039094689"/>
+						<object class="NSScrollView" id="1063387772">
+							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">307</int>
 							<object class="NSMutableArray" key="NSSubviews">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSClipView" id="963977695">
-									<reference key="NSNextResponder" ref="1011512617"/>
+								<object class="NSClipView" id="580565898">
+									<reference key="NSNextResponder" ref="1063387772"/>
 									<int key="NSvFlags">2304</int>
 									<object class="NSMutableArray" key="NSSubviews">
 										<bool key="EncodedWithXMLCoder">YES</bool>
-										<object class="NSTableView" id="411425856">
-											<reference key="NSNextResponder" ref="963977695"/>
+										<object class="NSTableView" id="905092943">
+											<reference key="NSNextResponder" ref="580565898"/>
 											<int key="NSvFlags">256</int>
 											<string key="NSFrameSize">{333, 197}</string>
-											<reference key="NSSuperview" ref="963977695"/>
+											<reference key="NSSuperview" ref="580565898"/>
 											<bool key="NSEnabled">YES</bool>
-											<object class="NSTableHeaderView" key="NSHeaderView" id="526973850">
-												<reference key="NSNextResponder" ref="935843221"/>
+											<object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
+												<reference key="NSNextResponder" ref="672307654"/>
 												<int key="NSvFlags">256</int>
 												<string key="NSFrameSize">{333, 17}</string>
-												<reference key="NSSuperview" ref="935843221"/>
-												<reference key="NSTableView" ref="411425856"/>
+												<reference key="NSSuperview" ref="672307654"/>
+												<reference key="NSTableView" ref="905092943"/>
 											</object>
-											<object class="_NSCornerView" key="NSCornerView" id="182265797">
-												<reference key="NSNextResponder" ref="1011512617"/>
+											<object class="_NSCornerView" key="NSCornerView" id="898633680">
+												<reference key="NSNextResponder" ref="1063387772"/>
 												<int key="NSvFlags">256</int>
 												<string key="NSFrame">{{334, 0}, {16, 17}}</string>
-												<reference key="NSSuperview" ref="1011512617"/>
+												<reference key="NSSuperview" ref="1063387772"/>
 											</object>
 											<object class="NSMutableArray" key="NSTableColumns">
 												<bool key="EncodedWithXMLCoder">YES</bool>
-												<object class="NSTableColumn" id="621551865">
-													<double key="NSWidth">7.900000e+01</double>
+												<object class="NSTableColumn" id="84282687">
+													<double key="NSWidth">1.110000e+02</double>
 													<double key="NSMinWidth">4.000000e+01</double>
 													<double key="NSMaxWidth">1.000000e+03</double>
 													<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -1093,35 +1131,36 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 														<int key="NSCellFlags2">0</int>
 														<string key="NSContents">Name</string>
 														<reference key="NSSupport" ref="26"/>
-														<object class="NSColor" key="NSBackgroundColor" id="182967138">
+														<object class="NSColor" key="NSBackgroundColor" id="113872566">
 															<int key="NSColorSpace">3</int>
 															<bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
 														</object>
-														<object class="NSColor" key="NSTextColor" id="645274518">
+														<object class="NSColor" key="NSTextColor" id="249576247">
 															<int key="NSColorSpace">6</int>
-															<reference key="NSCatalogName" ref="1000587476"/>
+															<reference key="NSCatalogName" ref="905527164"/>
 															<string key="NSColorName">headerTextColor</string>
-															<reference key="NSColor" ref="608123050"/>
+															<reference key="NSColor" ref="214098874"/>
 														</object>
 													</object>
-													<object class="NSTextFieldCell" key="NSDataCell" id="195831317">
+													<object class="NSTextFieldCell" key="NSDataCell" id="432610585">
 														<int key="NSCellFlags">338820672</int>
 														<int key="NSCellFlags2">1024</int>
-														<reference key="NSSupport" ref="706343604"/>
-														<reference key="NSControlView" ref="411425856"/>
-														<object class="NSColor" key="NSBackgroundColor" id="722293876">
+														<string key="NSContents" id="548220387">Text Cell</string>
+														<reference key="NSSupport" ref="463863101"/>
+														<reference key="NSControlView" ref="905092943"/>
+														<object class="NSColor" key="NSBackgroundColor" id="822946413">
 															<int key="NSColorSpace">3</int>
 															<bytes key="NSWhite">MQA</bytes>
 														</object>
-														<reference key="NSTextColor" ref="233849662"/>
+														<reference key="NSTextColor" ref="930815747"/>
 													</object>
 													<int key="NSResizingMask">3</int>
 													<bool key="NSIsResizeable">YES</bool>
 													<bool key="NSIsEditable">YES</bool>
-													<reference key="NSTableView" ref="411425856"/>
+													<reference key="NSTableView" ref="905092943"/>
 												</object>
-												<object class="NSTableColumn" id="976084317">
-													<double key="NSWidth">1.937310e+02</double>
+												<object class="NSTableColumn" id="938444323">
+													<double key="NSWidth">1.327310e+02</double>
 													<double key="NSMinWidth">6.273100e+01</double>
 													<double key="NSMaxWidth">1.000000e+03</double>
 													<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -1129,24 +1168,25 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 														<int key="NSCellFlags2">0</int>
 														<string key="NSContents">Command</string>
 														<reference key="NSSupport" ref="26"/>
-														<reference key="NSBackgroundColor" ref="182967138"/>
-														<reference key="NSTextColor" ref="645274518"/>
+														<reference key="NSBackgroundColor" ref="113872566"/>
+														<reference key="NSTextColor" ref="249576247"/>
 													</object>
-													<object class="NSTextFieldCell" key="NSDataCell" id="656574062">
+													<object class="NSTextFieldCell" key="NSDataCell" id="825378892">
 														<int key="NSCellFlags">338820672</int>
 														<int key="NSCellFlags2">1024</int>
-														<reference key="NSSupport" ref="706343604"/>
-														<reference key="NSControlView" ref="411425856"/>
-														<reference key="NSBackgroundColor" ref="722293876"/>
-														<reference key="NSTextColor" ref="233849662"/>
+														<reference key="NSContents" ref="548220387"/>
+														<reference key="NSSupport" ref="463863101"/>
+														<reference key="NSControlView" ref="905092943"/>
+														<reference key="NSBackgroundColor" ref="822946413"/>
+														<reference key="NSTextColor" ref="930815747"/>
 													</object>
 													<int key="NSResizingMask">3</int>
 													<bool key="NSIsResizeable">YES</bool>
 													<bool key="NSIsEditable">YES</bool>
-													<reference key="NSTableView" ref="411425856"/>
+													<reference key="NSTableView" ref="905092943"/>
 												</object>
-												<object class="NSTableColumn" id="661701503">
-													<double key="NSWidth">5.100000e+01</double>
+												<object class="NSTableColumn" id="242608782">
+													<double key="NSWidth">8.000000e+01</double>
 													<double key="NSMinWidth">1.000000e+01</double>
 													<double key="NSMaxWidth">1.000000e+03</double>
 													<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -1156,42 +1196,43 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 														<reference key="NSSupport" ref="26"/>
 														<object class="NSColor" key="NSBackgroundColor">
 															<int key="NSColorSpace">6</int>
-															<reference key="NSCatalogName" ref="1000587476"/>
+															<reference key="NSCatalogName" ref="905527164"/>
 															<string key="NSColorName">headerColor</string>
-															<reference key="NSColor" ref="722293876"/>
+															<reference key="NSColor" ref="822946413"/>
 														</object>
-														<reference key="NSTextColor" ref="645274518"/>
+														<reference key="NSTextColor" ref="249576247"/>
 													</object>
-													<object class="NSTextFieldCell" key="NSDataCell" id="90031137">
+													<object class="NSTextFieldCell" key="NSDataCell" id="34714764">
 														<int key="NSCellFlags">338820672</int>
 														<int key="NSCellFlags2">1024</int>
+														<reference key="NSContents" ref="548220387"/>
 														<object class="NSFont" key="NSSupport">
-															<reference key="NSName" ref="508374773"/>
+															<reference key="NSName" ref="512586816"/>
 															<double key="NSSize">1.200000e+01</double>
 															<int key="NSfFlags">16</int>
 														</object>
-														<reference key="NSControlView" ref="411425856"/>
+														<reference key="NSControlView" ref="905092943"/>
 														<bool key="NSDrawsBackground">YES</bool>
-														<object class="NSColor" key="NSBackgroundColor" id="447702889">
+														<object class="NSColor" key="NSBackgroundColor" id="812484075">
 															<int key="NSColorSpace">6</int>
-															<reference key="NSCatalogName" ref="1000587476"/>
+															<reference key="NSCatalogName" ref="905527164"/>
 															<string key="NSColorName">controlBackgroundColor</string>
-															<reference key="NSColor" ref="1000384962"/>
+															<reference key="NSColor" ref="590688762"/>
 														</object>
-														<reference key="NSTextColor" ref="233849662"/>
+														<reference key="NSTextColor" ref="930815747"/>
 													</object>
 													<int key="NSResizingMask">3</int>
 													<bool key="NSIsResizeable">YES</bool>
 													<bool key="NSIsEditable">YES</bool>
-													<reference key="NSTableView" ref="411425856"/>
+													<reference key="NSTableView" ref="905092943"/>
 												</object>
 											</object>
 											<double key="NSIntercellSpacingWidth">3.000000e+00</double>
 											<double key="NSIntercellSpacingHeight">2.000000e+00</double>
-											<reference key="NSBackgroundColor" ref="722293876"/>
+											<reference key="NSBackgroundColor" ref="822946413"/>
 											<object class="NSColor" key="NSGridColor">
 												<int key="NSColorSpace">6</int>
-												<reference key="NSCatalogName" ref="1000587476"/>
+												<reference key="NSCatalogName" ref="905527164"/>
 												<string key="NSColorName">gridColor</string>
 												<object class="NSColor" key="NSColor">
 													<int key="NSColorSpace">3</int>
@@ -1207,72 +1248,73 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 										</object>
 									</object>
 									<string key="NSFrame">{{1, 17}, {333, 197}}</string>
-									<reference key="NSSuperview" ref="1011512617"/>
-									<reference key="NSNextKeyView" ref="411425856"/>
-									<reference key="NSDocView" ref="411425856"/>
-									<reference key="NSBGColor" ref="447702889"/>
+									<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>
 								</object>
-								<object class="NSScroller" id="152467947">
-									<reference key="NSNextResponder" ref="1011512617"/>
+								<object class="NSScroller" id="842897584">
+									<reference key="NSNextResponder" ref="1063387772"/>
 									<int key="NSvFlags">256</int>
 									<string key="NSFrame">{{334, 17}, {15, 197}}</string>
-									<reference key="NSSuperview" ref="1011512617"/>
-									<reference key="NSTarget" ref="1011512617"/>
-									<string key="NSAction" id="607822787">_doScroller:</string>
+									<reference key="NSSuperview" ref="1063387772"/>
+									<reference key="NSTarget" ref="1063387772"/>
+									<string key="NSAction" id="365694962">_doScroller:</string>
 									<double key="NSPercent">9.949238e-01</double>
 								</object>
-								<object class="NSScroller" id="208024104">
-									<reference key="NSNextResponder" ref="1011512617"/>
+								<object class="NSScroller" id="17278747">
+									<reference key="NSNextResponder" ref="1063387772"/>
 									<int key="NSvFlags">256</int>
 									<string key="NSFrame">{{1, 214}, {333, 15}}</string>
-									<reference key="NSSuperview" ref="1011512617"/>
+									<reference key="NSSuperview" ref="1063387772"/>
 									<int key="NSsFlags">1</int>
-									<reference key="NSTarget" ref="1011512617"/>
-									<reference key="NSAction" ref="607822787"/>
-									<double key="NSPercent">9.940299e-01</double>
+									<reference key="NSTarget" ref="1063387772"/>
+									<reference key="NSAction" ref="365694962"/>
+									<double key="NSPercent">6.885246e-01</double>
 								</object>
-								<object class="NSClipView" id="935843221">
-									<reference key="NSNextResponder" ref="1011512617"/>
+								<object class="NSClipView" id="672307654">
+									<reference key="NSNextResponder" ref="1063387772"/>
 									<int key="NSvFlags">2304</int>
 									<object class="NSMutableArray" key="NSSubviews">
 										<bool key="EncodedWithXMLCoder">YES</bool>
-										<reference ref="526973850"/>
+										<reference ref="792419186"/>
 									</object>
 									<string key="NSFrame">{{1, 0}, {333, 17}}</string>
-									<reference key="NSSuperview" ref="1011512617"/>
-									<reference key="NSNextKeyView" ref="526973850"/>
-									<reference key="NSDocView" ref="526973850"/>
-									<reference key="NSBGColor" ref="447702889"/>
+									<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>
 								</object>
-								<reference ref="182265797"/>
+								<reference ref="898633680"/>
 							</object>
-							<string key="NSFrame">{{20, 60}, {350, 230}}</string>
-							<reference key="NSSuperview" ref="1039094689"/>
-							<reference key="NSNextKeyView" ref="963977695"/>
+							<string key="NSFrame">{{20, 77}, {350, 230}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
+							<reference key="NSNextKeyView" ref="580565898"/>
 							<int key="NSsFlags">50</int>
-							<reference key="NSVScroller" ref="152467947"/>
-							<reference key="NSHScroller" ref="208024104"/>
-							<reference key="NSContentView" ref="963977695"/>
-							<reference key="NSHeaderClipView" ref="935843221"/>
+							<reference key="NSVScroller" ref="842897584"/>
+							<reference key="NSHScroller" ref="17278747"/>
+							<reference key="NSContentView" ref="580565898"/>
+							<reference key="NSHeaderClipView" ref="672307654"/>
+							<reference key="NSCornerView" ref="898633680"/>
 							<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
 						</object>
-						<object class="NSButton" id="859414998">
-							<reference key="NSNextResponder" ref="1039094689"/>
+						<object class="NSButton" id="125703429">
+							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">303</int>
-							<string key="NSFrame">{{304, 12}, {84, 32}}</string>
-							<reference key="NSSuperview" ref="1039094689"/>
+							<string key="NSFrame">{{352, 12}, {84, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="537937846">
-								<int key="NSCellFlags">67239424</int>
+							<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="706343604"/>
-								<reference key="NSControlView" ref="859414998"/>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="125703429"/>
 								<int key="NSButtonFlags">-2038284033</int>
 								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="965938342"/>
+								<reference key="NSAlternateImage" ref="549406736"/>
 								<object class="NSMutableString" key="NSAlternateContents">
 									<characters key="NS.bytes"/>
 								</object>
@@ -1283,21 +1325,21 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 								<int key="NSPeriodicInterval">25</int>
 							</object>
 						</object>
-						<object class="NSButton" id="381268760">
-							<reference key="NSNextResponder" ref="1039094689"/>
+						<object class="NSButton" id="758204686">
+							<reference key="NSNextResponder" ref="85544634"/>
 							<int key="NSvFlags">301</int>
-							<string key="NSFrame">{{372, 262}, {100, 32}}</string>
-							<reference key="NSSuperview" ref="1039094689"/>
+							<string key="NSFrame">{{372, 279}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
 							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="99903682">
+							<object class="NSButtonCell" key="NSCell" id="1025474039">
 								<int key="NSCellFlags">67239424</int>
 								<int key="NSCellFlags2">137887744</int>
 								<string key="NSContents">Add Item</string>
-								<reference key="NSSupport" ref="706343604"/>
-								<reference key="NSControlView" ref="381268760"/>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="758204686"/>
 								<int key="NSButtonFlags">-2038284033</int>
 								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="965938342"/>
+								<reference key="NSAlternateImage" ref="549406736"/>
 								<object class="NSMutableString" key="NSAlternateContents">
 									<characters key="NS.bytes"/>
 								</object>
@@ -1309,66 +1351,66 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							</object>
 						</object>
 					</object>
-					<string key="NSFrame">{{1, 1}, {486, 310}}</string>
+					<string key="NSFrameSize">{486, 327}</string>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
 				<string key="NSMinSize">{213, 129}</string>
 				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
 				<string key="NSFrameAutosaveName">x11_apps</string>
 			</object>
-			<object class="NSMenu" id="1001514180">
+			<object class="NSMenu" id="294137138">
 				<string key="NSTitle">Menu</string>
 				<object class="NSMutableArray" key="NSMenuItems">
 					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="NSMenuItem" id="355724345">
-						<reference key="NSMenu" ref="1001514180"/>
+					<object class="NSMenuItem" id="318286212">
+						<reference key="NSMenu" ref="294137138"/>
 						<bool key="NSIsDisabled">YES</bool>
 						<bool key="NSIsSeparator">YES</bool>
-						<reference key="NSTitle" ref="1005878359"/>
-						<reference key="NSKeyEquiv" ref="1005878359"/>
+						<reference key="NSTitle" ref="331740794"/>
+						<reference key="NSKeyEquiv" ref="331740794"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="732862070"/>
-						<reference key="NSMixedImage" ref="154462367"/>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="246283459"/>
 					</object>
-					<object class="NSMenuItem" id="107275095">
-						<reference key="NSMenu" ref="1001514180"/>
-						<reference key="NSTitle" ref="942587293"/>
-						<reference key="NSKeyEquiv" ref="1005878359"/>
+					<object class="NSMenuItem" id="511651072">
+						<reference key="NSMenu" ref="294137138"/>
+						<reference key="NSTitle" ref="667842658"/>
+						<reference key="NSKeyEquiv" ref="331740794"/>
 						<int key="NSKeyEquivModMask">1048576</int>
 						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="732862070"/>
-						<reference key="NSMixedImage" ref="154462367"/>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="246283459"/>
 						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="321919370">
-							<reference key="NSTitle" ref="942587293"/>
+						<object class="NSMenu" key="NSSubmenu" id="48278059">
+							<reference key="NSTitle" ref="667842658"/>
 							<object class="NSMutableArray" key="NSMenuItems">
 								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="500771766">
-									<reference key="NSMenu" ref="321919370"/>
+								<object class="NSMenuItem" id="563798000">
+									<reference key="NSMenu" ref="48278059"/>
 									<bool key="NSIsDisabled">YES</bool>
 									<bool key="NSIsSeparator">YES</bool>
-									<reference key="NSTitle" ref="1005878359"/>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSTitle" ref="331740794"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
-								<object class="NSMenuItem" id="656726997">
-									<reference key="NSMenu" ref="321919370"/>
+								<object class="NSMenuItem" id="1032342329">
+									<reference key="NSMenu" ref="48278059"/>
 									<string type="base64-UTF8" key="NSTitle">Q3VzdG9taXpl4oCmA</string>
-									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="331740794"/>
 									<int key="NSKeyEquivModMask">1048576</int>
 									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="732862070"/>
-									<reference key="NSMixedImage" ref="154462367"/>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="246283459"/>
 								</object>
 							</object>
 						</object>
 					</object>
 				</object>
-				<reference key="NSName" ref="1005878359"/>
+				<reference key="NSName" ref="331740794"/>
 			</object>
 		</object>
 		<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -1377,1384 +1419,1438 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">cut:</string>
-						<reference key="source" ref="518703249"/>
-						<reference key="destination" ref="590926585"/>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="581727829"/>
 					</object>
 					<int key="connectionID">175</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">paste:</string>
-						<reference key="source" ref="518703249"/>
-						<reference key="destination" ref="739720090"/>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="924678073"/>
 					</object>
 					<int key="connectionID">176</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">redo:</string>
-						<reference key="source" ref="518703249"/>
-						<reference key="destination" ref="634656440"/>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="535038564"/>
 					</object>
 					<int key="connectionID">178</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">selectAll:</string>
-						<reference key="source" ref="518703249"/>
-						<reference key="destination" ref="584461964"/>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="322866464"/>
 					</object>
 					<int key="connectionID">179</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">undo:</string>
-						<reference key="source" ref="518703249"/>
-						<reference key="destination" ref="159704190"/>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="1010221707"/>
 					</object>
 					<int key="connectionID">180</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">copy:</string>
-						<reference key="source" ref="518703249"/>
-						<reference key="destination" ref="204575684"/>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="185296989"/>
 					</object>
 					<int key="connectionID">181</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">delete:</string>
-						<reference key="source" ref="518703249"/>
-						<reference key="destination" ref="549812830"/>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="994817848"/>
 					</object>
 					<int key="connectionID">195</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">minimize_window:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="915861349"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="677652931"/>
 					</object>
 					<int key="connectionID">202</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">close_window:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="442007350"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="984461797"/>
 					</object>
 					<int key="connectionID">205</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">zoom_window:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="722764538"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="1066447520"/>
 					</object>
 					<int key="connectionID">206</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">bring_to_front:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="853630143"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="276216762"/>
 					</object>
 					<int key="connectionID">207</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">window_separator</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="332241222"/>
-					</object>
-					<int key="connectionID">260</int>
-				</object>
-				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">hideOtherApplications:</string>
-						<reference key="source" ref="584863936"/>
-						<reference key="destination" ref="191312176"/>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="206802571"/>
 					</object>
 					<int key="connectionID">263</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">apps_separator</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="940363272"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="390088328"/>
 					</object>
 					<int key="connectionID">273</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">apps_table</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="411425856"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="905092943"/>
 					</object>
 					<int key="connectionID">301</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">apps_table_done:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="1002101696"/>
+						<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="88064061"/>
-						<reference key="destination" ref="634701477"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="492358940"/>
 					</object>
 					<int key="connectionID">303</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">apps_table_duplicate:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="711288662"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="671954382"/>
 					</object>
 					<int key="connectionID">304</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label" id="178478735">apps_table_show:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="767830074"/>
+						<string key="label" id="75505755">apps_table_show:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="1065386165"/>
 					</object>
 					<int key="connectionID">308</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">apps_table_cancel:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="859414998"/>
+						<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="88064061"/>
-						<reference key="destination" ref="381268760"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="758204686"/>
 					</object>
 					<int key="connectionID">311</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">prefs_show:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="836585695"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="386173216"/>
 					</object>
 					<int key="connectionID">318</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">x11_about_item</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="588913325"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="139290918"/>
 					</object>
 					<int key="connectionID">321</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">enable_auth</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="137435489"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="989050925"/>
 					</object>
 					<int key="connectionID">387</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">enable_tcp</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="663154230"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="700826966"/>
 					</object>
 					<int key="connectionID">388</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">depth</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="300224954"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="709074847"/>
 					</object>
 					<int key="connectionID">389</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">use_sysbeep</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="1045559310"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="418227126"/>
 					</object>
 					<int key="connectionID">390</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">fake_buttons</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="808306730"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="119157981"/>
 					</object>
 					<int key="connectionID">391</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">sync_keymap</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="793493073"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="179949713"/>
 					</object>
 					<int key="connectionID">392</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">enable_keyequivs</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="677150201"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="842100515"/>
 					</object>
 					<int key="connectionID">393</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label" id="694471214">prefs_changed:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="808306730"/>
+						<string key="label" id="582333102">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="119157981"/>
 					</object>
 					<int key="connectionID">394</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="694471214"/>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="793493073"/>
+						<reference key="label" ref="582333102"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="179949713"/>
 					</object>
 					<int key="connectionID">395</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="694471214"/>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="677150201"/>
+						<reference key="label" ref="582333102"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="842100515"/>
 					</object>
 					<int key="connectionID">396</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="694471214"/>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="1045559310"/>
+						<reference key="label" ref="582333102"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="418227126"/>
 					</object>
 					<int key="connectionID">397</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="694471214"/>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="300224954"/>
+						<reference key="label" ref="582333102"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="709074847"/>
 					</object>
 					<int key="connectionID">398</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="694471214"/>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="137435489"/>
+						<reference key="label" ref="582333102"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="989050925"/>
 					</object>
 					<int key="connectionID">399</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="694471214"/>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="663154230"/>
+						<reference key="label" ref="582333102"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="700826966"/>
 					</object>
 					<int key="connectionID">401</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">prefs_panel</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="210544761"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="124913468"/>
 					</object>
 					<int key="connectionID">402</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">x11_help:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="122992289"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="504984881"/>
 					</object>
 					<int key="connectionID">422</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">dockMenu</string>
-						<reference key="source" ref="584863936"/>
-						<reference key="destination" ref="1001514180"/>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="294137138"/>
 					</object>
 					<int key="connectionID">426</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">dock_menu</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="1001514180"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="294137138"/>
 					</object>
 					<int key="connectionID">428</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">delegate</string>
-						<reference key="source" ref="584863936"/>
-						<reference key="destination" ref="88064061"/>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="485884620"/>
 					</object>
 					<int key="connectionID">429</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">hide:</string>
-						<reference key="source" ref="584863936"/>
-						<reference key="destination" ref="147703239"/>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="301008465"/>
 					</object>
 					<int key="connectionID">430</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">unhideAllApplications:</string>
-						<reference key="source" ref="584863936"/>
-						<reference key="destination" ref="392807560"/>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="1023546148"/>
 					</object>
 					<int key="connectionID">431</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<string key="label">terminate:</string>
-						<reference key="source" ref="584863936"/>
-						<reference key="destination" ref="275459236"/>
-					</object>
-					<int key="connectionID">432</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
 						<string key="label">orderFrontStandardAboutPanel:</string>
-						<reference key="source" ref="584863936"/>
-						<reference key="destination" ref="588913325"/>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="139290918"/>
 					</object>
 					<int key="connectionID">433</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">dock_apps_menu</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="321919370"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="48278059"/>
 					</object>
 					<int key="connectionID">530</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">dock_window_separator</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="355724345"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="318286212"/>
 					</object>
 					<int key="connectionID">531</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
-						<reference key="label" ref="178478735"/>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="656726997"/>
+						<reference key="label" ref="75505755"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="1032342329"/>
 					</object>
 					<int key="connectionID">534</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">next_window:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="283496700"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="1036389925"/>
 					</object>
 					<int key="connectionID">539</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">previous_window:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="500397106"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="369641893"/>
 					</object>
 					<int key="connectionID">540</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">enable_fullscreen</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="817420822"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="477203622"/>
 					</object>
 					<int key="connectionID">546</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">enable_fullscreen_changed:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="817420822"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="477203622"/>
 					</object>
 					<int key="connectionID">547</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">toggle_fullscreen:</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="101686423"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="6876565"/>
 					</object>
 					<int key="connectionID">548</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
 						<string key="label">toggle_fullscreen_item</string>
-						<reference key="source" ref="88064061"/>
-						<reference key="destination" ref="101686423"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="6876565"/>
 					</object>
 					<int key="connectionID">549</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<reference key="label" ref="582333102"/>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="915448994"/>
+					</object>
+					<int key="connectionID">300300</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">window_separator</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="444952046"/>
+					</object>
+					<int key="connectionID">300331</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">click_through</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="915448994"/>
+					</object>
+					<int key="connectionID">300332</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">quit:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="274138642"/>
+					</object>
+					<int key="connectionID">300333</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">menu</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="524015605"/>
+					</object>
+					<int key="connectionID">300334</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<object class="IBObjectRecord">
 						<int key="objectID">0</int>
-						<object class="NSArray" key="object" id="0">
+						<object class="NSArray" key="object" id="330408435">
 							<bool key="EncodedWithXMLCoder">YES</bool>
 						</object>
-						<reference key="children" ref="874420287"/>
+						<reference key="children" ref="904585544"/>
 						<nil key="parent"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">-2</int>
-						<reference key="object" ref="584863936"/>
-						<reference key="parent" ref="0"/>
+						<reference key="object" ref="815810918"/>
+						<reference key="parent" ref="330408435"/>
 						<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">-1</int>
-						<reference key="object" ref="518703249"/>
-						<reference key="parent" ref="0"/>
+						<reference key="object" ref="941939442"/>
+						<reference key="parent" ref="330408435"/>
 						<string key="objectName">First Responder</string>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">-3</int>
-						<reference key="object" ref="166373373"/>
-						<reference key="parent" ref="0"/>
+						<reference key="object" ref="951368722"/>
+						<reference key="parent" ref="330408435"/>
 						<string key="objectName">Application</string>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">29</int>
-						<reference key="object" ref="496556081"/>
+						<reference key="object" ref="524015605"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="736341863"/>
-							<reference ref="385138428"/>
-							<reference ref="326076563"/>
-							<reference ref="940914550"/>
-							<reference ref="934950259"/>
+							<reference ref="931553638"/>
+							<reference ref="365880285"/>
+							<reference ref="200491363"/>
+							<reference ref="868031522"/>
+							<reference ref="551174276"/>
 						</object>
-						<reference key="parent" ref="0"/>
-						<reference key="objectName" ref="414137626"/>
+						<reference key="parent" ref="330408435"/>
+						<reference key="objectName" ref="121567387"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">19</int>
-						<reference key="object" ref="736341863"/>
+						<reference key="object" ref="931553638"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="943404979"/>
+							<reference ref="96874957"/>
 						</object>
-						<reference key="parent" ref="496556081"/>
+						<reference key="parent" ref="524015605"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">24</int>
-						<reference key="object" ref="943404979"/>
+						<reference key="object" ref="96874957"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="853630143"/>
-							<reference ref="915861349"/>
-							<reference ref="783034074"/>
-							<reference ref="442007350"/>
-							<reference ref="722764538"/>
-							<reference ref="332241222"/>
-							<reference ref="303213786"/>
-							<reference ref="283496700"/>
-							<reference ref="500397106"/>
+							<reference ref="677652931"/>
+							<reference ref="276216762"/>
+							<reference ref="1066447520"/>
+							<reference ref="1036389925"/>
+							<reference ref="280172320"/>
+							<reference ref="369641893"/>
+							<reference ref="984461797"/>
+							<reference ref="155085383"/>
+							<reference ref="444952046"/>
 						</object>
-						<reference key="parent" ref="736341863"/>
+						<reference key="parent" ref="931553638"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">5</int>
-						<reference key="object" ref="853630143"/>
-						<reference key="parent" ref="943404979"/>
+						<reference key="object" ref="276216762"/>
+						<reference key="parent" ref="96874957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">23</int>
-						<reference key="object" ref="915861349"/>
-						<reference key="parent" ref="943404979"/>
+						<reference key="object" ref="677652931"/>
+						<reference key="parent" ref="96874957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">92</int>
-						<reference key="object" ref="783034074"/>
-						<reference key="parent" ref="943404979"/>
+						<reference key="object" ref="280172320"/>
+						<reference key="parent" ref="96874957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">203</int>
-						<reference key="object" ref="442007350"/>
-						<reference key="parent" ref="943404979"/>
+						<reference key="object" ref="984461797"/>
+						<reference key="parent" ref="96874957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">204</int>
-						<reference key="object" ref="722764538"/>
-						<reference key="parent" ref="943404979"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">208</int>
-						<reference key="object" ref="332241222"/>
-						<reference key="parent" ref="943404979"/>
+						<reference key="object" ref="1066447520"/>
+						<reference key="parent" ref="96874957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">536</int>
-						<reference key="object" ref="303213786"/>
-						<reference key="parent" ref="943404979"/>
+						<reference key="object" ref="155085383"/>
+						<reference key="parent" ref="96874957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">537</int>
-						<reference key="object" ref="283496700"/>
-						<reference key="parent" ref="943404979"/>
+						<reference key="object" ref="1036389925"/>
+						<reference key="parent" ref="96874957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">538</int>
-						<reference key="object" ref="500397106"/>
-						<reference key="parent" ref="943404979"/>
+						<reference key="object" ref="369641893"/>
+						<reference key="parent" ref="96874957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">56</int>
-						<reference key="object" ref="385138428"/>
+						<reference key="object" ref="365880285"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="856655711"/>
+							<reference ref="576521955"/>
 						</object>
-						<reference key="parent" ref="496556081"/>
+						<reference key="parent" ref="524015605"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">57</int>
-						<reference key="object" ref="856655711"/>
+						<reference key="object" ref="576521955"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="588913325"/>
-							<reference ref="836585695"/>
-							<reference ref="63158341"/>
-							<reference ref="147703239"/>
-							<reference ref="275459236"/>
-							<reference ref="562920394"/>
-							<reference ref="635454008"/>
-							<reference ref="191312176"/>
-							<reference ref="648021277"/>
-							<reference ref="392807560"/>
-							<reference ref="101686423"/>
-							<reference ref="754231570"/>
+							<reference ref="139290918"/>
+							<reference ref="386173216"/>
+							<reference ref="32285361"/>
+							<reference ref="301008465"/>
+							<reference ref="274138642"/>
+							<reference ref="272876017"/>
+							<reference ref="431301145"/>
+							<reference ref="206802571"/>
+							<reference ref="848095279"/>
+							<reference ref="1023546148"/>
+							<reference ref="6876565"/>
+							<reference ref="479677589"/>
 						</object>
-						<reference key="parent" ref="385138428"/>
+						<reference key="parent" ref="365880285"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">58</int>
-						<reference key="object" ref="588913325"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="139290918"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">129</int>
-						<reference key="object" ref="836585695"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="386173216"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">131</int>
-						<reference key="object" ref="63158341"/>
+						<reference key="object" ref="32285361"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="502073457"/>
+							<reference ref="821388474"/>
 						</object>
-						<reference key="parent" ref="856655711"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">130</int>
-						<reference key="object" ref="502073457"/>
-						<reference key="parent" ref="63158341"/>
+						<reference key="object" ref="821388474"/>
+						<reference key="parent" ref="32285361"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">134</int>
-						<reference key="object" ref="147703239"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="301008465"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">136</int>
-						<reference key="object" ref="275459236"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="274138642"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">143</int>
-						<reference key="object" ref="562920394"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="272876017"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">144</int>
-						<reference key="object" ref="635454008"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="431301145"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">145</int>
-						<reference key="object" ref="191312176"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="206802571"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">149</int>
-						<reference key="object" ref="648021277"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="848095279"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">150</int>
-						<reference key="object" ref="392807560"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="1023546148"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">544</int>
-						<reference key="object" ref="101686423"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="6876565"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">545</int>
-						<reference key="object" ref="754231570"/>
-						<reference key="parent" ref="856655711"/>
+						<reference key="object" ref="479677589"/>
+						<reference key="parent" ref="576521955"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">163</int>
-						<reference key="object" ref="326076563"/>
+						<reference key="object" ref="200491363"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="932839819"/>
+							<reference ref="526778998"/>
 						</object>
-						<reference key="parent" ref="496556081"/>
+						<reference key="parent" ref="524015605"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">169</int>
-						<reference key="object" ref="932839819"/>
+						<reference key="object" ref="526778998"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="342107529"/>
-							<reference ref="204575684"/>
-							<reference ref="159704190"/>
-							<reference ref="590926585"/>
-							<reference ref="549812830"/>
-							<reference ref="739720090"/>
-							<reference ref="584461964"/>
-							<reference ref="634656440"/>
+							<reference ref="839739619"/>
+							<reference ref="185296989"/>
+							<reference ref="1010221707"/>
+							<reference ref="581727829"/>
+							<reference ref="994817848"/>
+							<reference ref="924678073"/>
+							<reference ref="322866464"/>
+							<reference ref="535038564"/>
 						</object>
-						<reference key="parent" ref="326076563"/>
+						<reference key="parent" ref="200491363"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">156</int>
-						<reference key="object" ref="342107529"/>
-						<reference key="parent" ref="932839819"/>
+						<reference key="object" ref="839739619"/>
+						<reference key="parent" ref="526778998"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">157</int>
-						<reference key="object" ref="204575684"/>
-						<reference key="parent" ref="932839819"/>
+						<reference key="object" ref="185296989"/>
+						<reference key="parent" ref="526778998"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">158</int>
-						<reference key="object" ref="159704190"/>
-						<reference key="parent" ref="932839819"/>
+						<reference key="object" ref="1010221707"/>
+						<reference key="parent" ref="526778998"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">160</int>
-						<reference key="object" ref="590926585"/>
-						<reference key="parent" ref="932839819"/>
+						<reference key="object" ref="581727829"/>
+						<reference key="parent" ref="526778998"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">164</int>
-						<reference key="object" ref="549812830"/>
-						<reference key="parent" ref="932839819"/>
+						<reference key="object" ref="994817848"/>
+						<reference key="parent" ref="526778998"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">171</int>
-						<reference key="object" ref="739720090"/>
-						<reference key="parent" ref="932839819"/>
+						<reference key="object" ref="924678073"/>
+						<reference key="parent" ref="526778998"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">172</int>
-						<reference key="object" ref="584461964"/>
-						<reference key="parent" ref="932839819"/>
+						<reference key="object" ref="322866464"/>
+						<reference key="parent" ref="526778998"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">173</int>
-						<reference key="object" ref="634656440"/>
-						<reference key="parent" ref="932839819"/>
+						<reference key="object" ref="535038564"/>
+						<reference key="parent" ref="526778998"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">269</int>
-						<reference key="object" ref="940914550"/>
+						<reference key="object" ref="868031522"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="684156653"/>
+							<reference ref="981161348"/>
 						</object>
-						<reference key="parent" ref="496556081"/>
+						<reference key="parent" ref="524015605"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">270</int>
-						<reference key="object" ref="684156653"/>
+						<reference key="object" ref="981161348"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="940363272"/>
-							<reference ref="767830074"/>
+							<reference ref="390088328"/>
+							<reference ref="1065386165"/>
 						</object>
-						<reference key="parent" ref="940914550"/>
+						<reference key="parent" ref="868031522"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">272</int>
-						<reference key="object" ref="940363272"/>
-						<reference key="parent" ref="684156653"/>
+						<reference key="object" ref="390088328"/>
+						<reference key="parent" ref="981161348"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">305</int>
-						<reference key="object" ref="767830074"/>
-						<reference key="parent" ref="684156653"/>
+						<reference key="object" ref="1065386165"/>
+						<reference key="parent" ref="981161348"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">419</int>
-						<reference key="object" ref="934950259"/>
+						<reference key="object" ref="551174276"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1052262524"/>
+							<reference ref="511848303"/>
 						</object>
-						<reference key="parent" ref="496556081"/>
+						<reference key="parent" ref="524015605"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">420</int>
-						<reference key="object" ref="1052262524"/>
+						<reference key="object" ref="511848303"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="122992289"/>
+							<reference ref="504984881"/>
 						</object>
-						<reference key="parent" ref="934950259"/>
+						<reference key="parent" ref="551174276"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">421</int>
-						<reference key="object" ref="122992289"/>
-						<reference key="parent" ref="1052262524"/>
+						<reference key="object" ref="504984881"/>
+						<reference key="parent" ref="511848303"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">196</int>
-						<reference key="object" ref="88064061"/>
-						<reference key="parent" ref="0"/>
-						<reference key="objectName" ref="517073442"/>
+						<reference key="object" ref="485884620"/>
+						<reference key="parent" ref="330408435"/>
+						<reference key="objectName" ref="865849805"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">244</int>
-						<reference key="object" ref="210544761"/>
+						<reference key="object" ref="124913468"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="404125972"/>
+							<reference ref="941366957"/>
 						</object>
-						<reference key="parent" ref="0"/>
+						<reference key="parent" ref="330408435"/>
 						<string key="objectName">PrefsPanel</string>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">245</int>
-						<reference key="object" ref="404125972"/>
+						<reference key="object" ref="941366957"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="75927203"/>
+							<reference ref="448510093"/>
 						</object>
-						<reference key="parent" ref="210544761"/>
+						<reference key="parent" ref="124913468"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">348</int>
-						<reference key="object" ref="75927203"/>
+						<reference key="object" ref="448510093"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="17244958"/>
-							<reference ref="493727923"/>
-							<reference ref="1036577743"/>
+							<reference ref="287591690"/>
+							<reference ref="960678392"/>
+							<reference ref="348328898"/>
 						</object>
-						<reference key="parent" ref="404125972"/>
+						<reference key="parent" ref="941366957"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">349</int>
-						<reference key="object" ref="17244958"/>
+						<reference key="object" ref="287591690"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="600332710"/>
+							<reference ref="596750588"/>
 						</object>
-						<reference key="parent" ref="75927203"/>
+						<reference key="parent" ref="448510093"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">351</int>
-						<reference key="object" ref="600332710"/>
+						<reference key="object" ref="596750588"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="808306730"/>
-							<reference ref="618388983"/>
-							<reference ref="754792079"/>
-							<reference ref="677150201"/>
-							<reference ref="228801813"/>
-							<reference ref="793493073"/>
+							<reference ref="119157981"/>
+							<reference ref="443008216"/>
+							<reference ref="282885445"/>
+							<reference ref="842100515"/>
+							<reference ref="31160162"/>
+							<reference ref="179949713"/>
+							<reference ref="915448994"/>
+							<reference ref="707276799"/>
 						</object>
-						<reference key="parent" ref="17244958"/>
+						<reference key="parent" ref="287591690"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">363</int>
-						<reference key="object" ref="808306730"/>
+						<reference key="object" ref="119157981"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="727617204"/>
+							<reference ref="990762273"/>
 						</object>
-						<reference key="parent" ref="600332710"/>
+						<reference key="parent" ref="596750588"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">364</int>
-						<reference key="object" ref="618388983"/>
+						<reference key="object" ref="443008216"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="140236247"/>
+							<reference ref="391919450"/>
 						</object>
-						<reference key="parent" ref="600332710"/>
+						<reference key="parent" ref="596750588"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">365</int>
-						<reference key="object" ref="754792079"/>
+						<reference key="object" ref="282885445"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="110537159"/>
+							<reference ref="649334366"/>
 						</object>
-						<reference key="parent" ref="600332710"/>
+						<reference key="parent" ref="596750588"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">368</int>
-						<reference key="object" ref="677150201"/>
+						<reference key="object" ref="842100515"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="46680941"/>
+							<reference ref="940564599"/>
 						</object>
-						<reference key="parent" ref="600332710"/>
+						<reference key="parent" ref="596750588"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">369</int>
-						<reference key="object" ref="228801813"/>
+						<reference key="object" ref="31160162"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="415694484"/>
+							<reference ref="666057093"/>
 						</object>
-						<reference key="parent" ref="600332710"/>
+						<reference key="parent" ref="596750588"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">370</int>
-						<reference key="object" ref="793493073"/>
+						<reference key="object" ref="179949713"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="466260504"/>
+							<reference ref="967619578"/>
 						</object>
-						<reference key="parent" ref="600332710"/>
+						<reference key="parent" ref="596750588"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">352</int>
-						<reference key="object" ref="493727923"/>
+						<reference key="object" ref="960678392"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="527709877"/>
+							<reference ref="515308735"/>
 						</object>
-						<reference key="parent" ref="75927203"/>
+						<reference key="parent" ref="448510093"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">350</int>
-						<reference key="object" ref="527709877"/>
+						<reference key="object" ref="515308735"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1045559310"/>
-							<reference ref="67626595"/>
-							<reference ref="300224954"/>
-							<reference ref="717889178"/>
-							<reference ref="114173823"/>
-							<reference ref="817420822"/>
-							<reference ref="959270736"/>
+							<reference ref="418227126"/>
+							<reference ref="1039016593"/>
+							<reference ref="709074847"/>
+							<reference ref="201731424"/>
+							<reference ref="86150604"/>
+							<reference ref="477203622"/>
+							<reference ref="298603383"/>
 						</object>
-						<reference key="parent" ref="493727923"/>
+						<reference key="parent" ref="960678392"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">371</int>
-						<reference key="object" ref="1045559310"/>
+						<reference key="object" ref="418227126"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="225158677"/>
+							<reference ref="1016069354"/>
 						</object>
-						<reference key="parent" ref="527709877"/>
+						<reference key="parent" ref="515308735"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">372</int>
-						<reference key="object" ref="67626595"/>
+						<reference key="object" ref="1039016593"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1072420481"/>
+							<reference ref="624655599"/>
 						</object>
-						<reference key="parent" ref="527709877"/>
+						<reference key="parent" ref="515308735"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">382</int>
-						<reference key="object" ref="300224954"/>
+						<reference key="object" ref="709074847"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="301142744"/>
+							<reference ref="633115429"/>
 						</object>
-						<reference key="parent" ref="527709877"/>
+						<reference key="parent" ref="515308735"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">385</int>
-						<reference key="object" ref="717889178"/>
+						<reference key="object" ref="201731424"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="749756205"/>
+							<reference ref="930265681"/>
 						</object>
-						<reference key="parent" ref="527709877"/>
+						<reference key="parent" ref="515308735"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">386</int>
-						<reference key="object" ref="114173823"/>
+						<reference key="object" ref="86150604"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="725554783"/>
+							<reference ref="311969422"/>
 						</object>
-						<reference key="parent" ref="527709877"/>
+						<reference key="parent" ref="515308735"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">541</int>
-						<reference key="object" ref="817420822"/>
+						<reference key="object" ref="477203622"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="100363081"/>
+							<reference ref="631531164"/>
 						</object>
-						<reference key="parent" ref="527709877"/>
+						<reference key="parent" ref="515308735"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">543</int>
-						<reference key="object" ref="959270736"/>
+						<reference key="object" ref="298603383"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="550432669"/>
+							<reference ref="761107402"/>
 						</object>
-						<reference key="parent" ref="527709877"/>
+						<reference key="parent" ref="515308735"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">353</int>
-						<reference key="object" ref="1036577743"/>
+						<reference key="object" ref="348328898"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="536248195"/>
+							<reference ref="300811574"/>
 						</object>
-						<reference key="parent" ref="75927203"/>
+						<reference key="parent" ref="448510093"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">354</int>
-						<reference key="object" ref="536248195"/>
+						<reference key="object" ref="300811574"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="137435489"/>
-							<reference ref="663154230"/>
-							<reference ref="417801719"/>
-							<reference ref="115954190"/>
-							<reference ref="1067279202"/>
+							<reference ref="989050925"/>
+							<reference ref="700826966"/>
+							<reference ref="168436707"/>
+							<reference ref="363817195"/>
+							<reference ref="223835729"/>
 						</object>
-						<reference key="parent" ref="1036577743"/>
+						<reference key="parent" ref="348328898"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">374</int>
-						<reference key="object" ref="137435489"/>
+						<reference key="object" ref="989050925"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="891925158"/>
+							<reference ref="189594322"/>
 						</object>
-						<reference key="parent" ref="536248195"/>
+						<reference key="parent" ref="300811574"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">375</int>
-						<reference key="object" ref="663154230"/>
+						<reference key="object" ref="700826966"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="836703945"/>
+							<reference ref="489340979"/>
 						</object>
-						<reference key="parent" ref="536248195"/>
+						<reference key="parent" ref="300811574"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">376</int>
-						<reference key="object" ref="417801719"/>
+						<reference key="object" ref="168436707"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="935570098"/>
+							<reference ref="53243865"/>
 						</object>
-						<reference key="parent" ref="536248195"/>
+						<reference key="parent" ref="300811574"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">377</int>
-						<reference key="object" ref="115954190"/>
+						<reference key="object" ref="363817195"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="144257898"/>
+							<reference ref="390084685"/>
 						</object>
-						<reference key="parent" ref="536248195"/>
+						<reference key="parent" ref="300811574"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">379</int>
-						<reference key="object" ref="1067279202"/>
+						<reference key="object" ref="223835729"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="703874672"/>
+							<reference ref="283628678"/>
 						</object>
-						<reference key="parent" ref="536248195"/>
+						<reference key="parent" ref="300811574"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">285</int>
-						<reference key="object" ref="796776534"/>
+						<reference key="object" ref="604417141"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1039094689"/>
+							<reference ref="85544634"/>
 						</object>
-						<reference key="parent" ref="0"/>
+						<reference key="parent" ref="330408435"/>
 						<string key="objectName">EditPrograms</string>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">286</int>
-						<reference key="object" ref="1039094689"/>
+						<reference key="object" ref="85544634"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1002101696"/>
-							<reference ref="711288662"/>
-							<reference ref="634701477"/>
-							<reference ref="1011512617"/>
-							<reference ref="859414998"/>
-							<reference ref="381268760"/>
+							<reference ref="1063387772"/>
+							<reference ref="758204686"/>
+							<reference ref="671954382"/>
+							<reference ref="492358940"/>
+							<reference ref="125703429"/>
+							<reference ref="724002248"/>
 						</object>
-						<reference key="parent" ref="796776534"/>
+						<reference key="parent" ref="604417141"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">291</int>
-						<reference key="object" ref="1002101696"/>
+						<int key="objectID">423</int>
+						<reference key="object" ref="294137138"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="558394524"/>
+							<reference ref="318286212"/>
+							<reference ref="511651072"/>
 						</object>
-						<reference key="parent" ref="1039094689"/>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">DockMenu</string>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">292</int>
-						<reference key="object" ref="711288662"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="413164923"/>
-						</object>
-						<reference key="parent" ref="1039094689"/>
+						<int key="objectID">524</int>
+						<reference key="object" ref="318286212"/>
+						<reference key="parent" ref="294137138"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">293</int>
-						<reference key="object" ref="634701477"/>
+						<int key="objectID">526</int>
+						<reference key="object" ref="511651072"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="26248495"/>
+							<reference ref="48278059"/>
 						</object>
-						<reference key="parent" ref="1039094689"/>
+						<reference key="parent" ref="294137138"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">295</int>
-						<reference key="object" ref="1011512617"/>
+						<int key="objectID">527</int>
+						<reference key="object" ref="48278059"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="411425856"/>
-							<reference ref="152467947"/>
-							<reference ref="208024104"/>
-							<reference ref="526973850"/>
+							<reference ref="1032342329"/>
+							<reference ref="563798000"/>
 						</object>
-						<reference key="parent" ref="1039094689"/>
+						<reference key="parent" ref="511651072"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">296</int>
-						<reference key="object" ref="411425856"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="621551865"/>
-							<reference ref="976084317"/>
-							<reference ref="661701503"/>
-						</object>
-						<reference key="parent" ref="1011512617"/>
+						<int key="objectID">532</int>
+						<reference key="object" ref="1032342329"/>
+						<reference key="parent" ref="48278059"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">297</int>
-						<reference key="object" ref="621551865"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="195831317"/>
-						</object>
-						<reference key="parent" ref="411425856"/>
+						<int key="objectID">533</int>
+						<reference key="object" ref="563798000"/>
+						<reference key="parent" ref="48278059"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">574</int>
-						<reference key="object" ref="195831317"/>
-						<reference key="parent" ref="621551865"/>
+						<int key="objectID">100363</int>
+						<reference key="object" ref="990762273"/>
+						<reference key="parent" ref="119157981"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">298</int>
-						<reference key="object" ref="976084317"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="656574062"/>
-						</object>
-						<reference key="parent" ref="411425856"/>
+						<int key="objectID">100364</int>
+						<reference key="object" ref="391919450"/>
+						<reference key="parent" ref="443008216"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">573</int>
-						<reference key="object" ref="656574062"/>
-						<reference key="parent" ref="976084317"/>
+						<int key="objectID">100365</int>
+						<reference key="object" ref="649334366"/>
+						<reference key="parent" ref="282885445"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">535</int>
-						<reference key="object" ref="661701503"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="90031137"/>
-						</object>
-						<reference key="parent" ref="411425856"/>
+						<int key="objectID">100368</int>
+						<reference key="object" ref="940564599"/>
+						<reference key="parent" ref="842100515"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">575</int>
-						<reference key="object" ref="90031137"/>
-						<reference key="parent" ref="661701503"/>
+						<int key="objectID">100369</int>
+						<reference key="object" ref="666057093"/>
+						<reference key="parent" ref="31160162"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">299</int>
-						<reference key="object" ref="859414998"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="537937846"/>
-						</object>
-						<reference key="parent" ref="1039094689"/>
+						<int key="objectID">100370</int>
+						<reference key="object" ref="967619578"/>
+						<reference key="parent" ref="179949713"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">310</int>
-						<reference key="object" ref="381268760"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="99903682"/>
-						</object>
-						<reference key="parent" ref="1039094689"/>
+						<int key="objectID">100371</int>
+						<reference key="object" ref="1016069354"/>
+						<reference key="parent" ref="418227126"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">423</int>
-						<reference key="object" ref="1001514180"/>
+						<int key="objectID">100372</int>
+						<reference key="object" ref="624655599"/>
+						<reference key="parent" ref="1039016593"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100382</int>
+						<reference key="object" ref="633115429"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="355724345"/>
-							<reference ref="107275095"/>
+							<reference ref="341113515"/>
 						</object>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">DockMenu</string>
+						<reference key="parent" ref="709074847"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">524</int>
-						<reference key="object" ref="355724345"/>
-						<reference key="parent" ref="1001514180"/>
+						<int key="objectID">100385</int>
+						<reference key="object" ref="930265681"/>
+						<reference key="parent" ref="201731424"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">526</int>
-						<reference key="object" ref="107275095"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="321919370"/>
-						</object>
-						<reference key="parent" ref="1001514180"/>
+						<int key="objectID">100386</int>
+						<reference key="object" ref="311969422"/>
+						<reference key="parent" ref="86150604"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">527</int>
-						<reference key="object" ref="321919370"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="656726997"/>
-							<reference ref="500771766"/>
-						</object>
-						<reference key="parent" ref="107275095"/>
+						<int key="objectID">100541</int>
+						<reference key="object" ref="631531164"/>
+						<reference key="parent" ref="477203622"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">532</int>
-						<reference key="object" ref="656726997"/>
-						<reference key="parent" ref="321919370"/>
+						<int key="objectID">100543</int>
+						<reference key="object" ref="761107402"/>
+						<reference key="parent" ref="298603383"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">533</int>
-						<reference key="object" ref="500771766"/>
-						<reference key="parent" ref="321919370"/>
+						<int key="objectID">100374</int>
+						<reference key="object" ref="189594322"/>
+						<reference key="parent" ref="989050925"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100363</int>
-						<reference key="object" ref="727617204"/>
-						<reference key="parent" ref="808306730"/>
+						<int key="objectID">100375</int>
+						<reference key="object" ref="489340979"/>
+						<reference key="parent" ref="700826966"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100364</int>
-						<reference key="object" ref="140236247"/>
-						<reference key="parent" ref="618388983"/>
+						<int key="objectID">100376</int>
+						<reference key="object" ref="53243865"/>
+						<reference key="parent" ref="168436707"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100365</int>
-						<reference key="object" ref="110537159"/>
-						<reference key="parent" ref="754792079"/>
+						<int key="objectID">100377</int>
+						<reference key="object" ref="390084685"/>
+						<reference key="parent" ref="363817195"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100368</int>
-						<reference key="object" ref="46680941"/>
-						<reference key="parent" ref="677150201"/>
+						<int key="objectID">100379</int>
+						<reference key="object" ref="283628678"/>
+						<reference key="parent" ref="223835729"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100369</int>
-						<reference key="object" ref="415694484"/>
-						<reference key="parent" ref="228801813"/>
+						<int key="objectID">380</int>
+						<reference key="object" ref="341113515"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="759499526"/>
+							<reference ref="616492372"/>
+							<reference ref="543935434"/>
+							<reference ref="836673018"/>
+						</object>
+						<reference key="parent" ref="633115429"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100370</int>
-						<reference key="object" ref="466260504"/>
-						<reference key="parent" ref="793493073"/>
+						<int key="objectID">435</int>
+						<reference key="object" ref="759499526"/>
+						<reference key="parent" ref="341113515"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100371</int>
-						<reference key="object" ref="225158677"/>
-						<reference key="parent" ref="1045559310"/>
+						<int key="objectID">384</int>
+						<reference key="object" ref="616492372"/>
+						<reference key="parent" ref="341113515"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100372</int>
-						<reference key="object" ref="1072420481"/>
-						<reference key="parent" ref="67626595"/>
+						<int key="objectID">383</int>
+						<reference key="object" ref="543935434"/>
+						<reference key="parent" ref="341113515"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100382</int>
-						<reference key="object" ref="301142744"/>
+						<int key="objectID">381</int>
+						<reference key="object" ref="836673018"/>
+						<reference key="parent" ref="341113515"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300296</int>
+						<reference key="object" ref="915448994"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1071781177"/>
+							<reference ref="117056849"/>
 						</object>
-						<reference key="parent" ref="300224954"/>
+						<reference key="parent" ref="596750588"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100385</int>
-						<reference key="object" ref="749756205"/>
-						<reference key="parent" ref="717889178"/>
+						<int key="objectID">300297</int>
+						<reference key="object" ref="117056849"/>
+						<reference key="parent" ref="915448994"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100386</int>
-						<reference key="object" ref="725554783"/>
-						<reference key="parent" ref="114173823"/>
+						<int key="objectID">300298</int>
+						<reference key="object" ref="707276799"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="318286890"/>
+						</object>
+						<reference key="parent" ref="596750588"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100541</int>
-						<reference key="object" ref="100363081"/>
-						<reference key="parent" ref="817420822"/>
+						<int key="objectID">300299</int>
+						<reference key="object" ref="318286890"/>
+						<reference key="parent" ref="707276799"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100543</int>
-						<reference key="object" ref="550432669"/>
-						<reference key="parent" ref="959270736"/>
+						<int key="objectID">295</int>
+						<reference key="object" ref="1063387772"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="792419186"/>
+							<reference ref="17278747"/>
+							<reference ref="842897584"/>
+							<reference ref="905092943"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100374</int>
-						<reference key="object" ref="891925158"/>
-						<reference key="parent" ref="137435489"/>
+						<int key="objectID">300295</int>
+						<reference key="object" ref="792419186"/>
+						<reference key="parent" ref="1063387772"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100375</int>
-						<reference key="object" ref="836703945"/>
-						<reference key="parent" ref="663154230"/>
+						<int key="objectID">200295</int>
+						<reference key="object" ref="17278747"/>
+						<reference key="parent" ref="1063387772"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100376</int>
-						<reference key="object" ref="935570098"/>
-						<reference key="parent" ref="417801719"/>
+						<int key="objectID">100295</int>
+						<reference key="object" ref="842897584"/>
+						<reference key="parent" ref="1063387772"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100377</int>
-						<reference key="object" ref="144257898"/>
-						<reference key="parent" ref="115954190"/>
+						<int key="objectID">296</int>
+						<reference key="object" ref="905092943"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="242608782"/>
+							<reference ref="938444323"/>
+							<reference ref="84282687"/>
+						</object>
+						<reference key="parent" ref="1063387772"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100379</int>
-						<reference key="object" ref="703874672"/>
-						<reference key="parent" ref="1067279202"/>
+						<int key="objectID">535</int>
+						<reference key="object" ref="242608782"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="34714764"/>
+						</object>
+						<reference key="parent" ref="905092943"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100291</int>
-						<reference key="object" ref="558394524"/>
-						<reference key="parent" ref="1002101696"/>
+						<int key="objectID">575</int>
+						<reference key="object" ref="34714764"/>
+						<reference key="parent" ref="242608782"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100292</int>
-						<reference key="object" ref="413164923"/>
-						<reference key="parent" ref="711288662"/>
+						<int key="objectID">298</int>
+						<reference key="object" ref="938444323"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="825378892"/>
+						</object>
+						<reference key="parent" ref="905092943"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100293</int>
-						<reference key="object" ref="26248495"/>
-						<reference key="parent" ref="634701477"/>
+						<int key="objectID">573</int>
+						<reference key="object" ref="825378892"/>
+						<reference key="parent" ref="938444323"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">100299</int>
-						<reference key="object" ref="537937846"/>
-						<reference key="parent" ref="859414998"/>
+						<int key="objectID">297</int>
+						<reference key="object" ref="84282687"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="432610585"/>
+						</object>
+						<reference key="parent" ref="905092943"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">574</int>
+						<reference key="object" ref="432610585"/>
+						<reference key="parent" ref="84282687"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">310</int>
+						<reference key="object" ref="758204686"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1025474039"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">100310</int>
-						<reference key="object" ref="99903682"/>
-						<reference key="parent" ref="381268760"/>
+						<reference key="object" ref="1025474039"/>
+						<reference key="parent" ref="758204686"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">380</int>
-						<reference key="object" ref="1071781177"/>
+						<int key="objectID">292</int>
+						<reference key="object" ref="671954382"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="827519886"/>
-							<reference ref="473657062"/>
-							<reference ref="247508345"/>
-							<reference ref="611307925"/>
+							<reference ref="143554520"/>
 						</object>
-						<reference key="parent" ref="301142744"/>
+						<reference key="parent" ref="85544634"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">435</int>
-						<reference key="object" ref="827519886"/>
-						<reference key="parent" ref="1071781177"/>
+						<int key="objectID">100292</int>
+						<reference key="object" ref="143554520"/>
+						<reference key="parent" ref="671954382"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">384</int>
-						<reference key="object" ref="473657062"/>
-						<reference key="parent" ref="1071781177"/>
+						<int key="objectID">293</int>
+						<reference key="object" ref="492358940"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="8201128"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">383</int>
-						<reference key="object" ref="247508345"/>
-						<reference key="parent" ref="1071781177"/>
+						<int key="objectID">100293</int>
+						<reference key="object" ref="8201128"/>
+						<reference key="parent" ref="492358940"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">381</int>
-						<reference key="object" ref="611307925"/>
-						<reference key="parent" ref="1071781177"/>
+						<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">100295</int>
-						<reference key="object" ref="152467947"/>
-						<reference key="parent" ref="1011512617"/>
+						<int key="objectID">100299</int>
+						<reference key="object" ref="892296813"/>
+						<reference key="parent" ref="125703429"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">200295</int>
-						<reference key="object" ref="208024104"/>
-						<reference key="parent" ref="1011512617"/>
+						<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">300295</int>
-						<reference key="object" ref="526973850"/>
-						<reference key="parent" ref="1011512617"/>
+						<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"/>
 					</object>
 				</object>
 			</object>
@@ -2801,6 +2897,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>164.ImportedFromIB2</string>
 					<string>169.IBPluginDependency</string>
 					<string>169.ImportedFromIB2</string>
+					<string>169.editorWindowContentRectSynchronizationRect</string>
 					<string>171.IBPluginDependency</string>
 					<string>171.ImportedFromIB2</string>
 					<string>172.IBPluginDependency</string>
@@ -2816,14 +2913,15 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>203.ImportedFromIB2</string>
 					<string>204.IBPluginDependency</string>
 					<string>204.ImportedFromIB2</string>
-					<string>208.IBPluginDependency</string>
-					<string>208.ImportedFromIB2</string>
 					<string>23.IBPluginDependency</string>
 					<string>23.ImportedFromIB2</string>
 					<string>24.IBPluginDependency</string>
 					<string>24.ImportedFromIB2</string>
+					<string>24.editorWindowContentRectSynchronizationRect</string>
 					<string>244.IBPluginDependency</string>
+					<string>244.IBWindowTemplateEditedContentRect</string>
 					<string>244.ImportedFromIB2</string>
+					<string>244.editorWindowContentRectSynchronizationRect</string>
 					<string>244.windowTemplate.hasMaxSize</string>
 					<string>244.windowTemplate.hasMinSize</string>
 					<string>244.windowTemplate.maxSize</string>
@@ -2834,10 +2932,15 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>269.ImportedFromIB2</string>
 					<string>270.IBPluginDependency</string>
 					<string>270.ImportedFromIB2</string>
+					<string>270.editorWindowContentRectSynchronizationRect</string>
 					<string>272.IBPluginDependency</string>
 					<string>272.ImportedFromIB2</string>
 					<string>285.IBPluginDependency</string>
+					<string>285.IBViewEditorWindowController.showingBoundsRectangles</string>
+					<string>285.IBViewEditorWindowController.showingLayoutRectangles</string>
+					<string>285.IBWindowTemplateEditedContentRect</string>
 					<string>285.ImportedFromIB2</string>
+					<string>285.editorWindowContentRectSynchronizationRect</string>
 					<string>285.windowTemplate.hasMaxSize</string>
 					<string>285.windowTemplate.hasMinSize</string>
 					<string>285.windowTemplate.maxSize</string>
@@ -2846,6 +2949,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>286.ImportedFromIB2</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>
@@ -2863,6 +2967,12 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>299.IBPluginDependency</string>
 					<string>299.ImportedFromIB2</string>
 					<string>300295.IBShouldRemoveOnLegacySave</string>
+					<string>300296.IBPluginDependency</string>
+					<string>300296.ImportedFromIB2</string>
+					<string>300298.IBPluginDependency</string>
+					<string>300298.ImportedFromIB2</string>
+					<string>300330.IBPluginDependency</string>
+					<string>300330.ImportedFromIB2</string>
 					<string>305.IBPluginDependency</string>
 					<string>305.ImportedFromIB2</string>
 					<string>310.IBPluginDependency</string>
@@ -2963,6 +3073,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>56.ImportedFromIB2</string>
 					<string>57.IBPluginDependency</string>
 					<string>57.ImportedFromIB2</string>
+					<string>57.editorWindowContentRectSynchronizationRect</string>
 					<string>573.IBPluginDependency</string>
 					<string>573.ImportedFromIB2</string>
 					<string>574.IBPluginDependency</string>
@@ -2976,217 +3087,232 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="NSMutableArray" key="dict.values">
 					<bool key="EncodedWithXMLCoder">YES</bool>
-					<reference ref="874199827"/>
-					<reference ref="874199827"/>
-					<reference ref="874199827"/>
-					<integer value="1" id="5"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="5"/>
-					<reference ref="5"/>
-					<string>{3.40282e+38, 3.40282e+38}</string>
-					<string>{213, 107}</string>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="5"/>
-					<reference ref="5"/>
-					<string>{3.40282e+38, 3.40282e+38}</string>
-					<string>{213, 107}</string>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
-					<reference ref="874199827"/>
-					<reference ref="5"/>
+					<reference ref="1013584587"/>
+					<reference ref="1013584587"/>
+					<reference ref="1013584587"/>
+					<integer value="1" id="9"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<string>{{202, 626}, {154, 153}}</string>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<string>{{271, 666}, {301, 153}}</string>
+					<reference ref="1013584587"/>
+					<string>{{184, 290}, {481, 345}}</string>
+					<reference ref="9"/>
+					<string>{{184, 290}, {481, 345}}</string>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<string id="169660368">{3.40282e+38, 3.40282e+38}</string>
+					<string id="432763037">{213, 107}</string>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<string>{{100, 746}, {155, 33}}</string>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<string id="678991548">{{433, 406}, {486, 327}}</string>
+					<reference ref="9"/>
+					<reference ref="678991548"/>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<reference ref="169660368"/>
+					<reference ref="432763037"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<string>{{67, 819}, {336, 20}}</string>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<string>{{79, 616}, {218, 203}}</string>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
+					<reference ref="1013584587"/>
+					<reference ref="9"/>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -3209,13 +3335,13 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">300295</int>
+			<int key="maxID">300334</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<object class="IBPartialClassDescription">
-					<string key="className">NSFormatter</string>
+					<reference key="className" ref="671773319"/>
 					<nil key="superclassName"/>
 					<object class="NSMutableDictionary" key="actions">
 						<bool key="EncodedWithXMLCoder">YES</bool>
@@ -3236,196 +3362,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey" id="3826605">IBUserSource</string>
-						<string key="minorKey" id="25614681"/>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">FirstResponder</string>
-					<nil key="superclassName"/>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSMutableArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>alignCenter:</string>
-							<string>alignJustified:</string>
-							<string>alignLeft:</string>
-							<string>alignRight:</string>
-							<string>arrangeInFront:</string>
-							<string>centerSelectionInVisibleArea:</string>
-							<string>changeFont:</string>
-							<string>checkSpelling:</string>
-							<string>clear:</string>
-							<string>clearRecentDocuments:</string>
-							<string>complete:</string>
-							<string>copy:</string>
-							<string>copyFont:</string>
-							<string>copyRuler:</string>
-							<string>cut:</string>
-							<string>delete:</string>
-							<string>deminiaturize:</string>
-							<string>fax:</string>
-							<string>hide:</string>
-							<string>hideOtherApplications:</string>
-							<string>loosenKerning:</string>
-							<string>lowerBaseline:</string>
-							<string>makeKeyAndOrderFront:</string>
-							<string>miniaturize:</string>
-							<string>newDocument:</string>
-							<string>openDocument:</string>
-							<string>orderBack:</string>
-							<string>orderFront:</string>
-							<string>orderFrontColorPanel:</string>
-							<string>orderFrontHelpPanel:</string>
-							<string>orderOut:</string>
-							<string>outline:</string>
-							<string>paste:</string>
-							<string>pasteAsPlainText:</string>
-							<string>pasteAsRichText:</string>
-							<string>pasteFont:</string>
-							<string>pasteRuler:</string>
-							<string>pause:</string>
-							<string>performClose:</string>
-							<string>performFindPanelAction:</string>
-							<string>performMiniaturize:</string>
-							<string>performZoom:</string>
-							<string>play:</string>
-							<string>print:</string>
-							<string>printDocument:</string>
-							<string>raiseBaseline:</string>
-							<string>record:</string>
-							<string>redo:</string>
-							<string>resume:</string>
-							<string>revertDocumentToSaved:</string>
-							<string>run:</string>
-							<string>runPageLayout:</string>
-							<string>runToolbarCustomizationPalette:</string>
-							<string>saveAllDocuments:</string>
-							<string>saveDocument:</string>
-							<string>saveDocumentAs:</string>
-							<string>saveDocumentTo:</string>
-							<string>selectAll:</string>
-							<string>selectText:</string>
-							<string>showGuessPanel:</string>
-							<string>showHelp:</string>
-							<string>start:</string>
-							<string>startSpeaking:</string>
-							<string>stop:</string>
-							<string>stopSpeaking:</string>
-							<string>subscript:</string>
-							<string>superscript:</string>
-							<string>terminate:</string>
-							<string>tightenKerning:</string>
-							<string>toggleContinuousSpellChecking:</string>
-							<string>toggleRuler:</string>
-							<string>toggleToolbarShown:</string>
-							<string>turnOffKerning:</string>
-							<string>turnOffLigatures:</string>
-							<string>underline:</string>
-							<string>undo:</string>
-							<string>unhideAllApplications:</string>
-							<string>unscript:</string>
-							<string>useAllLigatures:</string>
-							<string>useStandardKerning:</string>
-							<string>useStandardLigatures:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string id="663201829">id</string>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<reference key="majorKey" ref="3826605"/>
-						<reference key="minorKey" ref="25614681"/>
+						<string key="majorKey" id="360524387">IBUserSource</string>
+						<reference key="minorKey" ref="331740794"/>
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
@@ -3449,29 +3387,31 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</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>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
+							<string id="678582588">id</string>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
+							<reference ref="678582588"/>
 						</object>
 					</object>
 					<object class="NSMutableDictionary" key="outlets">
@@ -3480,6 +3420,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<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>
@@ -3498,28 +3439,55 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						</object>
 						<object class="NSMutableArray" key="dict.values">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
-							<reference ref="663201829"/>
+							<string id="133216019">NSMenuItem</string>
+							<string>NSTableView</string>
+							<string id="623744785">NSButton</string>
+							<string>NSPopUpButton</string>
+							<string id="455827649">NSMenu</string>
+							<reference ref="455827649"/>
+							<reference ref="133216019"/>
+							<reference ref="623744785"/>
+							<reference ref="623744785"/>
+							<reference ref="623744785"/>
+							<reference ref="623744785"/>
+							<reference ref="623744785"/>
+							<string>NSPanel</string>
+							<reference ref="623744785"/>
+							<reference ref="133216019"/>
+							<reference ref="623744785"/>
+							<reference ref="133216019"/>
+							<reference ref="133216019"/>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSFormatter</string>
+					<nil key="superclassName"/>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
 						</object>
 					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<reference key="majorKey" ref="3826605"/>
-						<reference key="minorKey" ref="25614681"/>
+						<reference key="majorKey" ref="360524387"/>
+						<reference key="minorKey" ref="331740794"/>
 					</object>
 				</object>
 			</object>
@@ -3529,570 +3497,595 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 		<object class="NSMutableData" key="IBDocument.RunnableNib">
 			<bytes key="NS.bytes">YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQk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hsa2xubHFsdGx3bHpsfWyAbINshmyJbIxsj2ySbJVsmGybbJ5soWykbKdsqmyt
+bLBss2y2bLlsvGy/bMJsxWzIbMtszmzRbNRs12zabN1s4GzjbOZs6WzsbO9s8mz1bPhs+2z+bQFtBG0H
+bQptDW0QbRNtFm0ZbRxtH20ibSVtKG0rbS5tMW00bTdtOm09bUBtQ21GbUltTG1ObVBtU21WbVltXG1f
+bWRtZ21pbWxtb210bXltfG1/bYRth22KbYxtjm2RbZRtmW2ebaNtqG2rba5tsW2zbbZtuW28bb9txG3H
+bcptzW3QbdVt2G3dbeBt423mbelt7G3vbfJt9236bf9uBG4HbgxuEW4UbhduGm4cbh9uIm4lbiduKm4t
+bjBuM244bjpuPG4+bkFuRG5JbkxuT25SblduWm5cbl9uYW5kbmZuaG5qbmxubm5xbnNudm55bnxugW6E
+boduim6NbpBulW6Ybptunm6gbqJupG6mbqlurG6vbrFutG63brpuvG6+bsBuxW7HbspuzW7PbtJu127a
+bt1u4m7kbulu627wbvNu9m74bvtu/W8AbwVvCG8Kbw1vEG8TbxZvGW8ebydvLG8ubzNvNm84bztvPm9D
+b0VvR29Mb1FvVG9Wb1tvXW9gb2NvZm9pb2xvbm9xb3Rvd296b31vgG+Cb4dvjG+Rb5NvlW+Yb5tvpG+m
+b6dvsG+zb7RvvW/Ab8Fvym/PAAAAAAAAAgIAAAAAAAANIAAAAAAAAAAAAAAAAAAAb94</bytes>
 		</object>
 	</data>
 </archive>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index 194f4df..4306102 100644
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib differ
commit 8004e160fa8cc75a3f1b7385fee64e5864b3b50a
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Sun Feb 10 16:34:40 2008 -0800

    XQuartz: Converted interface to nib 3.x format
    (cherry picked from commit 656aaab95773bd70fc3504b68bf7e1d292891d93)

diff --git a/hw/xquartz/bundle/English.lproj/main.nib/classes.nib b/hw/xquartz/bundle/English.lproj/main.nib/classes.nib
deleted file mode 100644
index a82159b..0000000
--- a/hw/xquartz/bundle/English.lproj/main.nib/classes.nib
+++ /dev/null
@@ -1,318 +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>IBClasses</key>
-	<array>
-		<dict>
-			<key>CLASS</key>
-			<string>IBLibraryObjectTemplate</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>OUTLETS</key>
-			<dict>
-				<key>draggedView</key>
-				<string>NSView</string>
-				<key>representedObject</key>
-				<string>NSObject</string>
-			</dict>
-			<key>SUPERCLASS</key>
-			<string>NSView</string>
-		</dict>
-		<dict>
-			<key>CLASS</key>
-			<string>IBInspector</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>OUTLETS</key>
-			<dict>
-				<key>inspectorView</key>
-				<string>NSView</string>
-			</dict>
-			<key>SUPERCLASS</key>
-			<string>NSObject</string>
-		</dict>
-		<dict>
-			<key>CLASS</key>
-			<string>NSDateFormatter</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>SUPERCLASS</key>
-			<string>NSFormatter</string>
-		</dict>
-		<dict>
-			<key>ACTIONS</key>
-			<dict>
-				<key>apps_table_cancel</key>
-				<string>id</string>
-				<key>apps_table_delete</key>
-				<string>id</string>
-				<key>apps_table_done</key>
-				<string>id</string>
-				<key>apps_table_duplicate</key>
-				<string>id</string>
-				<key>apps_table_new</key>
-				<string>id</string>
-				<key>apps_table_show</key>
-				<string>id</string>
-				<key>bring_to_front</key>
-				<string>id</string>
-				<key>close_window</key>
-				<string>id</string>
-				<key>enable_fullscreen_changed</key>
-				<string>id</string>
-				<key>minimize_window</key>
-				<string>id</string>
-				<key>next_window</key>
-				<string>id</string>
-				<key>prefs_changed</key>
-				<string>id</string>
-				<key>prefs_show</key>
-				<string>id</string>
-				<key>previous_window</key>
-				<string>id</string>
-				<key>toggle_fullscreen</key>
-				<string>id</string>
-				<key>x11_help</key>
-				<string>id</string>
-				<key>zoom_window</key>
-				<string>id</string>
-			</dict>
-			<key>CLASS</key>
-			<string>X11Controller</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>OUTLETS</key>
-			<dict>
-				<key>apps_separator</key>
-				<string>id</string>
-				<key>apps_table</key>
-				<string>id</string>
-				<key>depth</key>
-				<string>id</string>
-				<key>dock_apps_menu</key>
-				<string>id</string>
-				<key>dock_menu</key>
-				<string>id</string>
-				<key>dock_window_separator</key>
-				<string>id</string>
-				<key>enable_auth</key>
-				<string>id</string>
-				<key>enable_fullscreen</key>
-				<string>id</string>
-				<key>enable_keyequivs</key>
-				<string>id</string>
-				<key>enable_tcp</key>
-				<string>id</string>
-				<key>fake_buttons</key>
-				<string>id</string>
-				<key>prefs_panel</key>
-				<string>id</string>
-				<key>sync_keymap</key>
-				<string>id</string>
-				<key>toggle_fullscreen_item</key>
-				<string>id</string>
-				<key>use_sysbeep</key>
-				<string>id</string>
-				<key>window_separator</key>
-				<string>id</string>
-				<key>x11_about_item</key>
-				<string>id</string>
-			</dict>
-			<key>SUPERCLASS</key>
-			<string>NSObject</string>
-		</dict>
-		<dict>
-			<key>CLASS</key>
-			<string>NSNumberFormatter</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>SUPERCLASS</key>
-			<string>NSFormatter</string>
-		</dict>
-		<dict>
-			<key>CLASS</key>
-			<string>NSFormatter</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>SUPERCLASS</key>
-			<string>NSObject</string>
-		</dict>
-		<dict>
-			<key>ACTIONS</key>
-			<dict>
-				<key>alignCenter:</key>
-				<string>id</string>
-				<key>alignJustified:</key>
-				<string>id</string>
-				<key>alignLeft:</key>
-				<string>id</string>
-				<key>alignRight:</key>
-				<string>id</string>
-				<key>arrangeInFront:</key>
-				<string>id</string>
-				<key>centerSelectionInVisibleArea:</key>
-				<string>id</string>
-				<key>changeFont:</key>
-				<string>id</string>
-				<key>checkSpelling:</key>
-				<string>id</string>
-				<key>clear:</key>
-				<string>id</string>
-				<key>clearRecentDocuments:</key>
-				<string>id</string>
-				<key>complete:</key>
-				<string>id</string>
-				<key>copy:</key>
-				<string>id</string>
-				<key>copyFont:</key>
-				<string>id</string>
-				<key>copyRuler:</key>
-				<string>id</string>
-				<key>cut:</key>
-				<string>id</string>
-				<key>delete:</key>
-				<string>id</string>
-				<key>deminiaturize:</key>
-				<string>id</string>
-				<key>fax:</key>
-				<string>id</string>
-				<key>hide:</key>
-				<string>id</string>
-				<key>hideOtherApplications:</key>
-				<string>id</string>
-				<key>loosenKerning:</key>
-				<string>id</string>
-				<key>lowerBaseline:</key>
-				<string>id</string>
-				<key>makeKeyAndOrderFront:</key>
-				<string>id</string>
-				<key>miniaturize:</key>
-				<string>id</string>
-				<key>newDocument:</key>
-				<string>id</string>
-				<key>openDocument:</key>
-				<string>id</string>
-				<key>orderBack:</key>
-				<string>id</string>
-				<key>orderFront:</key>
-				<string>id</string>
-				<key>orderFrontColorPanel:</key>
-				<string>id</string>
-				<key>orderFrontHelpPanel:</key>
-				<string>id</string>
-				<key>orderOut:</key>
-				<string>id</string>
-				<key>outline:</key>
-				<string>id</string>
-				<key>paste:</key>
-				<string>id</string>
-				<key>pasteAsPlainText:</key>
-				<string>id</string>
-				<key>pasteAsRichText:</key>
-				<string>id</string>
-				<key>pasteFont:</key>
-				<string>id</string>
-				<key>pasteRuler:</key>
-				<string>id</string>
-				<key>pause:</key>
-				<string>id</string>
-				<key>performClose:</key>
-				<string>id</string>
-				<key>performFindPanelAction:</key>
-				<string>id</string>
-				<key>performMiniaturize:</key>
-				<string>id</string>
-				<key>performZoom:</key>
-				<string>id</string>
-				<key>play:</key>
-				<string>id</string>
-				<key>print:</key>
-				<string>id</string>
-				<key>printDocument:</key>
-				<string>id</string>
-				<key>raiseBaseline:</key>
-				<string>id</string>
-				<key>record:</key>
-				<string>id</string>
-				<key>redo:</key>
-				<string>id</string>
-				<key>resume:</key>
-				<string>id</string>
-				<key>revertDocumentToSaved:</key>
-				<string>id</string>
-				<key>run:</key>
-				<string>id</string>
-				<key>runPageLayout:</key>
-				<string>id</string>
-				<key>runToolbarCustomizationPalette:</key>
-				<string>id</string>
-				<key>saveAllDocuments:</key>
-				<string>id</string>
-				<key>saveDocument:</key>
-				<string>id</string>
-				<key>saveDocumentAs:</key>
-				<string>id</string>
-				<key>saveDocumentTo:</key>
-				<string>id</string>
-				<key>selectAll:</key>
-				<string>id</string>
-				<key>selectText:</key>
-				<string>id</string>
-				<key>showGuessPanel:</key>
-				<string>id</string>
-				<key>showHelp:</key>
-				<string>id</string>
-				<key>start:</key>
-				<string>id</string>
-				<key>startSpeaking:</key>
-				<string>id</string>
-				<key>stop:</key>
-				<string>id</string>
-				<key>stopSpeaking:</key>
-				<string>id</string>
-				<key>subscript:</key>
-				<string>id</string>
-				<key>superscript:</key>
-				<string>id</string>
-				<key>terminate:</key>
-				<string>id</string>
-				<key>tightenKerning:</key>
-				<string>id</string>
-				<key>toggleContinuousSpellChecking:</key>
-				<string>id</string>
-				<key>toggleRuler:</key>
-				<string>id</string>
-				<key>toggleToolbarShown:</key>
-				<string>id</string>
-				<key>turnOffKerning:</key>
-				<string>id</string>
-				<key>turnOffLigatures:</key>
-				<string>id</string>
-				<key>underline:</key>
-				<string>id</string>
-				<key>undo:</key>
-				<string>id</string>
-				<key>unhideAllApplications:</key>
-				<string>id</string>
-				<key>unscript:</key>
-				<string>id</string>
-				<key>useAllLigatures:</key>
-				<string>id</string>
-				<key>useStandardKerning:</key>
-				<string>id</string>
-				<key>useStandardLigatures:</key>
-				<string>id</string>
-			</dict>
-			<key>CLASS</key>
-			<string>FirstResponder</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>SUPERCLASS</key>
-			<string>NSObject</string>
-		</dict>
-	</array>
-	<key>IBVersion</key>
-	<integer>1</integer>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
new file mode 100644
index 0000000..c267e45
--- /dev/null
+++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
@@ -0,0 +1,4098 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.01">
+	<data>
+		<int key="IBDocument.SystemTarget">1050</int>
+		<string key="IBDocument.SystemVersion">9C31</string>
+		<string key="IBDocument.InterfaceBuilderVersion">629</string>
+		<string key="IBDocument.AppKitVersion">949.26</string>
+		<string key="IBDocument.HIToolboxVersion">352.00</string>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string id="874199827">com.apple.InterfaceBuilder.CocoaPlugin</string>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="874420287">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSCustomObject" id="584863936">
+				<object class="NSMutableString" key="NSClassName">
+					<characters key="NS.bytes">NSApplication</characters>
+				</object>
+			</object>
+			<object class="NSCustomObject" id="518703249">
+				<string key="NSClassName">FirstResponder</string>
+			</object>
+			<object class="NSCustomObject" id="166373373">
+				<string key="NSClassName">NSApplication</string>
+			</object>
+			<object class="NSMenu" id="496556081">
+				<string key="NSTitle" id="414137626">MainMenu</string>
+				<object class="NSMutableArray" key="NSMenuItems">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="NSMenuItem" id="385138428">
+						<reference key="NSMenu" ref="496556081"/>
+						<string key="NSTitle" id="845099910">X11</string>
+						<string key="NSKeyEquiv" id="1005878359"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<object class="NSCustomResource" key="NSOnImage" id="732862070">
+							<string key="NSClassName" id="642323532">NSImage</string>
+							<string key="NSResourceName">NSMenuCheckmark</string>
+						</object>
+						<object class="NSCustomResource" key="NSMixedImage" id="154462367">
+							<reference key="NSClassName" ref="642323532"/>
+							<string key="NSResourceName">NSMenuMixedState</string>
+						</object>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="856655711">
+							<reference key="NSTitle" ref="845099910"/>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="588913325">
+									<reference key="NSMenu" ref="856655711"/>
+									<string key="NSTitle">About X11</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="836585695">
+									<reference key="NSMenu" ref="856655711"/>
+									<string key="NSTitle">Preferences...</string>
+									<string key="NSKeyEquiv">,</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="562920394">
+									<reference key="NSMenu" ref="856655711"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="63158341">
+									<reference key="NSMenu" ref="856655711"/>
+									<string key="NSTitle">Services</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+									<string key="NSAction">submenuAction:</string>
+									<object class="NSMenu" key="NSSubmenu" id="502073457">
+										<object class="NSMutableString" key="NSTitle">
+											<characters key="NS.bytes">Services</characters>
+										</object>
+										<object class="NSMutableArray" key="NSMenuItems">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+										</object>
+										<string key="NSName">_NSServicesMenu</string>
+									</object>
+								</object>
+								<object class="NSMenuItem" id="635454008">
+									<reference key="NSMenu" ref="856655711"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="101686423">
+									<reference key="NSMenu" ref="856655711"/>
+									<string key="NSTitle">Toggle Full Screen</string>
+									<string key="NSKeyEquiv" id="982375500">a</string>
+									<int key="NSKeyEquivModMask">1572864</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="754231570">
+									<reference key="NSMenu" ref="856655711"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="147703239">
+									<reference key="NSMenu" ref="856655711"/>
+									<string key="NSTitle">Hide X11</string>
+									<string key="NSKeyEquiv">h</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+									<int key="NSTag">42</int>
+								</object>
+								<object class="NSMenuItem" id="191312176">
+									<reference key="NSMenu" ref="856655711"/>
+									<string key="NSTitle">Hide Others</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="392807560">
+									<reference key="NSMenu" ref="856655711"/>
+									<string key="NSTitle">Show All</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+									<int key="NSTag">42</int>
+								</object>
+								<object class="NSMenuItem" id="648021277">
+									<reference key="NSMenu" ref="856655711"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="275459236">
+									<reference key="NSMenu" ref="856655711"/>
+									<string key="NSTitle">Quit X11</string>
+									<string key="NSKeyEquiv">q</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+							</object>
+							<string key="NSName">_NSAppleMenu</string>
+						</object>
+					</object>
+					<object class="NSMenuItem" id="940914550">
+						<reference key="NSMenu" ref="496556081"/>
+						<string key="NSTitle" id="942587293">Applications</string>
+						<reference key="NSKeyEquiv" ref="1005878359"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="732862070"/>
+						<reference key="NSMixedImage" ref="154462367"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="684156653">
+							<reference key="NSTitle" ref="942587293"/>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="940363272">
+									<reference key="NSMenu" ref="684156653"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="767830074">
+									<reference key="NSMenu" ref="684156653"/>
+									<string key="NSTitle">Customize...</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+							</object>
+						</object>
+					</object>
+					<object class="NSMenuItem" id="326076563">
+						<reference key="NSMenu" ref="496556081"/>
+						<string key="NSTitle" id="38701994">Edit</string>
+						<reference key="NSKeyEquiv" ref="1005878359"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="732862070"/>
+						<reference key="NSMixedImage" ref="154462367"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="932839819">
+							<reference key="NSTitle" ref="38701994"/>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="159704190">
+									<reference key="NSMenu" ref="932839819"/>
+									<string key="NSTitle">Undo</string>
+									<string key="NSKeyEquiv">z</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="634656440">
+									<reference key="NSMenu" ref="932839819"/>
+									<string key="NSTitle">Redo</string>
+									<string key="NSKeyEquiv">Z</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="342107529">
+									<reference key="NSMenu" ref="932839819"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="590926585">
+									<reference key="NSMenu" ref="932839819"/>
+									<string key="NSTitle">Cut</string>
+									<string key="NSKeyEquiv">x</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="204575684">
+									<reference key="NSMenu" ref="932839819"/>
+									<string key="NSTitle">Copy</string>
+									<string key="NSKeyEquiv">c</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="739720090">
+									<reference key="NSMenu" ref="932839819"/>
+									<string key="NSTitle">Paste</string>
+									<string key="NSKeyEquiv">v</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="549812830">
+									<reference key="NSMenu" ref="932839819"/>
+									<string key="NSTitle">Delete</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="584461964">
+									<reference key="NSMenu" ref="932839819"/>
+									<string key="NSTitle">Select All</string>
+									<reference key="NSKeyEquiv" ref="982375500"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+							</object>
+						</object>
+					</object>
+					<object class="NSMenuItem" id="736341863">
+						<reference key="NSMenu" ref="496556081"/>
+						<string key="NSTitle">Window</string>
+						<reference key="NSKeyEquiv" ref="1005878359"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="732862070"/>
+						<reference key="NSMixedImage" ref="154462367"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="943404979">
+							<object class="NSMutableString" key="NSTitle">
+								<characters key="NS.bytes">Window</characters>
+							</object>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="915861349">
+									<reference key="NSMenu" ref="943404979"/>
+									<string key="NSTitle">Minimize Window</string>
+									<string key="NSKeyEquiv">m</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="442007350">
+									<reference key="NSMenu" ref="943404979"/>
+									<string key="NSTitle">Close Window</string>
+									<string key="NSKeyEquiv">w</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="722764538">
+									<reference key="NSMenu" ref="943404979"/>
+									<string key="NSTitle">Zoom Window</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="783034074">
+									<reference key="NSMenu" ref="943404979"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="283496700">
+									<reference key="NSMenu" ref="943404979"/>
+									<string key="NSTitle">Next Window</string>
+									<string type="base64-UTF8" key="NSKeyEquiv">75yDA</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="500397106">
+									<reference key="NSMenu" ref="943404979"/>
+									<string key="NSTitle">Previous Window</string>
+									<string type="base64-UTF8" key="NSKeyEquiv">75yCA</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="303213786">
+									<reference key="NSMenu" ref="943404979"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="853630143">
+									<reference key="NSMenu" ref="943404979"/>
+									<string key="NSTitle">Bring All to Front</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="332241222">
+									<reference key="NSMenu" ref="943404979"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+							</object>
+							<string key="NSName">_NSWindowsMenu</string>
+						</object>
+					</object>
+					<object class="NSMenuItem" id="934950259">
+						<reference key="NSMenu" ref="496556081"/>
+						<string key="NSTitle" id="955297347">Help</string>
+						<reference key="NSKeyEquiv" ref="1005878359"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="732862070"/>
+						<reference key="NSMixedImage" ref="154462367"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="1052262524">
+							<reference key="NSTitle" ref="955297347"/>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="122992289">
+									<reference key="NSMenu" ref="1052262524"/>
+									<string key="NSTitle">X11 Help</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+							</object>
+						</object>
+					</object>
+				</object>
+				<string key="NSName">_NSMainMenu</string>
+			</object>
+			<object class="NSCustomObject" id="88064061">
+				<string key="NSClassName" id="517073442">X11Controller</string>
+			</object>
+			<object class="NSWindowTemplate" id="210544761">
+				<int key="NSWindowStyleMask">3</int>
+				<int key="NSWindowBacking">2</int>
+				<string key="NSWindowRect">{{319, 323}, {478, 316}}</string>
+				<int key="NSWTFlags">1350041600</int>
+				<string key="NSWindowTitle">X11 Preferences</string>
+				<string key="NSWindowClass" id="643663067">NSPanel</string>
+				<object class="NSMutableString" key="NSViewClass">
+					<characters key="NS.bytes">View</characters>
+				</object>
+				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+				<string key="NSWindowContentMinSize">{213, 107}</string>
+				<object class="NSView" key="NSWindowView" id="404125972">
+					<nil key="NSNextResponder"/>
+					<int key="NSvFlags">256</int>
+					<object class="NSMutableArray" key="NSSubviews">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSTabView" id="75927203">
+							<reference key="NSNextResponder" ref="404125972"/>
+							<int key="NSvFlags">256</int>
+							<object class="NSMutableArray" key="NSSubviews">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSView" id="527709877">
+									<reference key="NSNextResponder" ref="75927203"/>
+									<int key="NSvFlags">256</int>
+									<object class="NSMutableArray" key="NSSubviews">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<object class="NSButton" id="1045559310">
+											<reference key="NSNextResponder" ref="527709877"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrame">{{18, 90}, {402, 18}}</string>
+											<reference key="NSSuperview" ref="527709877"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSButtonCell" key="NSCell" id="225158677">
+												<int key="NSCellFlags">67239424</int>
+												<int key="NSCellFlags2">0</int>
+												<string key="NSContents">Use system alert effect</string>
+												<object class="NSFont" key="NSSupport" id="706343604">
+													<string key="NSName" id="508374773">LucidaGrande</string>
+													<double key="NSSize">1.300000e+01</double>
+													<int key="NSfFlags">1044</int>
+												</object>
+												<reference key="NSControlView" ref="1045559310"/>
+												<int key="NSButtonFlags">1211912703</int>
+												<int key="NSButtonFlags2">2</int>
+												<object class="NSButtonImageSource" key="NSAlternateImage" id="876172194">
+													<string key="NSImageName">NSSwitch</string>
+												</object>
+												<reference key="NSAlternateContents" ref="1005878359"/>
+												<reference key="NSKeyEquivalent" ref="1005878359"/>
+												<int key="NSPeriodicDelay">200</int>
+												<int key="NSPeriodicInterval">25</int>
+											</object>
+										</object>
+										<object class="NSTextField" id="67626595">
+											<reference key="NSNextResponder" ref="527709877"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrame">{{36, 56}, {385, 28}}</string>
+											<reference key="NSSuperview" ref="527709877"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSTextFieldCell" key="NSCell" id="1072420481">
+												<int key="NSCellFlags">67239424</int>
+												<int key="NSCellFlags2">4194304</int>
+												<string key="NSContents">X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel.</string>
+												<object class="NSFont" key="NSSupport" id="26">
+													<reference key="NSName" ref="508374773"/>
+													<double key="NSSize">1.100000e+01</double>
+													<int key="NSfFlags">3100</int>
+												</object>
+												<reference key="NSControlView" ref="67626595"/>
+												<object class="NSColor" key="NSBackgroundColor" id="320865741">
+													<int key="NSColorSpace">6</int>
+													<string key="NSCatalogName" id="1000587476">System</string>
+													<string key="NSColorName">controlColor</string>
+													<object class="NSColor" key="NSColor" id="1000384962">
+														<int key="NSColorSpace">3</int>
+														<bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+													</object>
+												</object>
+												<object class="NSColor" key="NSTextColor" id="233849662">
+													<int key="NSColorSpace">6</int>
+													<reference key="NSCatalogName" ref="1000587476"/>
+													<string key="NSColorName">controlTextColor</string>
+													<object class="NSColor" key="NSColor" id="608123050">
+														<int key="NSColorSpace">3</int>
+														<bytes key="NSWhite">MAA</bytes>
+													</object>
+												</object>
+											</object>
+										</object>
+										<object class="NSPopUpButton" id="300224954">
+											<reference key="NSNextResponder" ref="527709877"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrame">{{74, 209}, {128, 26}}</string>
+											<reference key="NSSuperview" ref="527709877"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSPopUpButtonCell" key="NSCell" id="301142744">
+												<int key="NSCellFlags">-2076049856</int>
+												<int key="NSCellFlags2">1024</int>
+												<reference key="NSSupport" ref="706343604"/>
+												<reference key="NSControlView" ref="300224954"/>
+												<int key="NSButtonFlags">109199615</int>
+												<int key="NSButtonFlags2">1</int>
+												<object class="NSFont" key="NSAlternateImage">
+													<reference key="NSName" ref="508374773"/>
+													<double key="NSSize">1.300000e+01</double>
+													<int key="NSfFlags">16</int>
+												</object>
+												<object class="NSMutableString" key="NSAlternateContents">
+													<characters key="NS.bytes"/>
+												</object>
+												<object class="NSMutableString" key="NSKeyEquivalent">
+													<characters key="NS.bytes"/>
+												</object>
+												<int key="NSPeriodicDelay">400</int>
+												<int key="NSPeriodicInterval">75</int>
+												<object class="NSMenuItem" key="NSMenuItem" id="473657062">
+													<reference key="NSMenu" ref="1071781177"/>
+													<string key="NSTitle">From Display</string>
+													<reference key="NSKeyEquiv" ref="1005878359"/>
+													<int key="NSKeyEquivModMask">1048576</int>
+													<int key="NSMnemonicLoc">2147483647</int>
+													<int key="NSState">1</int>
+													<reference key="NSOnImage" ref="732862070"/>
+													<reference key="NSMixedImage" ref="154462367"/>
+													<string key="NSAction">_popUpItemAction:</string>
+													<int key="NSTag">-1</int>
+													<reference key="NSTarget" ref="301142744"/>
+												</object>
+												<bool key="NSMenuItemRespectAlignment">YES</bool>
+												<object class="NSMenu" key="NSMenu" id="1071781177">
+													<object class="NSMutableString" key="NSTitle">
+														<characters key="NS.bytes">OtherViews</characters>
+													</object>
+													<object class="NSMutableArray" key="NSMenuItems">
+														<bool key="EncodedWithXMLCoder">YES</bool>
+														<reference ref="473657062"/>
+														<object class="NSMenuItem" id="827519886">
+															<reference key="NSMenu" ref="1071781177"/>
+															<string key="NSTitle">256 Colors</string>
+															<reference key="NSKeyEquiv" ref="1005878359"/>
+															<int key="NSKeyEquivModMask">1048576</int>
+															<int key="NSMnemonicLoc">2147483647</int>
+															<reference key="NSOnImage" ref="732862070"/>
+															<reference key="NSMixedImage" ref="154462367"/>
+															<string key="NSAction">_popUpItemAction:</string>
+															<int key="NSTag">8</int>
+															<reference key="NSTarget" ref="301142744"/>
+														</object>
+														<object class="NSMenuItem" id="247508345">
+															<reference key="NSMenu" ref="1071781177"/>
+															<string key="NSTitle">Thousands</string>
+															<reference key="NSKeyEquiv" ref="1005878359"/>
+															<int key="NSKeyEquivModMask">1048576</int>
+															<int key="NSMnemonicLoc">2147483647</int>
+															<reference key="NSOnImage" ref="732862070"/>
+															<reference key="NSMixedImage" ref="154462367"/>
+															<string key="NSAction">_popUpItemAction:</string>
+															<int key="NSTag">15</int>
+															<reference key="NSTarget" ref="301142744"/>
+														</object>
+														<object class="NSMenuItem" id="611307925">
+															<reference key="NSMenu" ref="1071781177"/>
+															<string key="NSTitle">Millions</string>
+															<reference key="NSKeyEquiv" ref="1005878359"/>
+															<int key="NSKeyEquivModMask">1048576</int>
+															<int key="NSMnemonicLoc">2147483647</int>
+															<reference key="NSOnImage" ref="732862070"/>
+															<reference key="NSMixedImage" ref="154462367"/>
+															<string key="NSAction">_popUpItemAction:</string>
+															<int key="NSTag">24</int>
+															<reference key="NSTarget" ref="301142744"/>
+														</object>
+													</object>
+												</object>
+												<int key="NSPreferredEdge">3</int>
+												<bool key="NSUsesItemFromMenu">YES</bool>
+												<bool key="NSAltersState">YES</bool>
+												<int key="NSArrowPosition">1</int>
+											</object>
+										</object>
+										<object class="NSTextField" id="717889178">
+											<reference key="NSNextResponder" ref="527709877"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrame">{{17, 212}, {55, 20}}</string>
+											<reference key="NSSuperview" ref="527709877"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSTextFieldCell" key="NSCell" id="749756205">
+												<int key="NSCellFlags">67239424</int>
+												<int key="NSCellFlags2">4194304</int>
+												<string type="base64-UTF8" key="NSContents">Q29sb3JzOgo</string>
+												<reference key="NSSupport" ref="706343604"/>
+												<reference key="NSControlView" ref="717889178"/>
+												<reference key="NSBackgroundColor" ref="320865741"/>
+												<reference key="NSTextColor" ref="233849662"/>
+											</object>
+										</object>
+										<object class="NSTextField" id="114173823">
+											<reference key="NSNextResponder" ref="527709877"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrame">{{36, 190}, {392, 14}}</string>
+											<reference key="NSSuperview" ref="527709877"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSTextFieldCell" key="NSCell" id="725554783">
+												<int key="NSCellFlags">67239424</int>
+												<int key="NSCellFlags2">4194304</int>
+												<string key="NSContents">This option takes effect when X11 is launched again.</string>
+												<reference key="NSSupport" ref="26"/>
+												<reference key="NSControlView" ref="114173823"/>
+												<reference key="NSBackgroundColor" ref="320865741"/>
+												<reference key="NSTextColor" ref="233849662"/>
+											</object>
+										</object>
+										<object class="NSButton" id="817420822">
+											<reference key="NSNextResponder" ref="527709877"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrame">{{18, 156}, {409, 23}}</string>
+											<reference key="NSSuperview" ref="527709877"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSButtonCell" key="NSCell" id="100363081">
+												<int key="NSCellFlags">67239424</int>
+												<int key="NSCellFlags2">0</int>
+												<string key="NSContents">Full screen mode</string>
+												<reference key="NSSupport" ref="706343604"/>
+												<reference key="NSControlView" ref="817420822"/>
+												<int key="NSButtonFlags">1211912703</int>
+												<int key="NSButtonFlags2">2</int>
+												<reference key="NSAlternateImage" ref="876172194"/>
+												<reference key="NSAlternateContents" ref="1005878359"/>
+												<reference key="NSKeyEquivalent" ref="1005878359"/>
+												<int key="NSPeriodicDelay">200</int>
+												<int key="NSPeriodicInterval">25</int>
+											</object>
+										</object>
+										<object class="NSTextField" id="959270736">
+											<reference key="NSNextResponder" ref="527709877"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrame">{{36, 119}, {385, 31}}</string>
+											<reference key="NSSuperview" ref="527709877"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSTextFieldCell" key="NSCell" id="550432669">
+												<int key="NSCellFlags">67239424</int>
+												<int key="NSCellFlags2">4194304</int>
+												<string key="NSContents">Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode.</string>
+												<reference key="NSSupport" ref="26"/>
+												<reference key="NSControlView" ref="959270736"/>
+												<reference key="NSBackgroundColor" ref="320865741"/>
+												<reference key="NSTextColor" ref="233849662"/>
+											</object>
+										</object>
+									</object>
+									<string key="NSFrame">{{10, 33}, {438, 253}}</string>
+									<reference key="NSSuperview" ref="75927203"/>
+								</object>
+							</object>
+							<string key="NSFrame">{{10, 7}, {458, 299}}</string>
+							<reference key="NSSuperview" ref="404125972"/>
+							<object class="NSMutableArray" key="NSTabViewItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSTabViewItem" id="17244958">
+									<object class="NSMutableString" key="NSIdentifier">
+										<characters key="NS.bytes">1</characters>
+									</object>
+									<object class="NSView" key="NSView" id="600332710">
+										<nil key="NSNextResponder"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSButton" id="808306730">
+												<reference key="NSNextResponder" ref="600332710"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 217}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="600332710"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="727617204">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Emulate three button mouse</string>
+													<reference key="NSSupport" ref="706343604"/>
+													<reference key="NSControlView" ref="808306730"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="876172194"/>
+													<reference key="NSAlternateContents" ref="1005878359"/>
+													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="618388983">
+												<reference key="NSNextResponder" ref="600332710"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 67}, {385, 31}}</string>
+												<reference key="NSSuperview" ref="600332710"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="140236247">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="618388983"/>
+													<reference key="NSBackgroundColor" ref="320865741"/>
+													<reference key="NSTextColor" ref="233849662"/>
+												</object>
+											</object>
+											<object class="NSTextField" id="754792079">
+												<reference key="NSNextResponder" ref="600332710"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 182}, {385, 29}}</string>
+												<reference key="NSSuperview" ref="600332710"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="110537159">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs
+ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="754792079"/>
+													<reference key="NSBackgroundColor" ref="320865741"/>
+													<reference key="NSTextColor" ref="233849662"/>
+												</object>
+											</object>
+											<object class="NSButton" id="677150201">
+												<reference key="NSNextResponder" ref="600332710"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 104}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="600332710"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="46680941">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Enable key equivalents under X11</string>
+													<reference key="NSSupport" ref="706343604"/>
+													<reference key="NSControlView" ref="677150201"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="876172194"/>
+													<reference key="NSAlternateContents" ref="1005878359"/>
+													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="228801813">
+												<reference key="NSNextResponder" ref="600332710"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 133}, {385, 14}}</string>
+												<reference key="NSSuperview" ref="600332710"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="415694484">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">Allows input menu changes to overwrite the current X11 keymap.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="228801813"/>
+													<reference key="NSBackgroundColor" ref="320865741"/>
+													<reference key="NSTextColor" ref="233849662"/>
+												</object>
+											</object>
+											<object class="NSButton" id="793493073">
+												<reference key="NSNextResponder" ref="600332710"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 153}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="600332710"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="466260504">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Follow system keyboard layout</string>
+													<reference key="NSSupport" ref="706343604"/>
+													<reference key="NSControlView" ref="793493073"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="876172194"/>
+													<reference key="NSAlternateContents" ref="1005878359"/>
+													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+										</object>
+										<string key="NSFrame">{{10, 33}, {438, 253}}</string>
+									</object>
+									<string key="NSLabel">Input</string>
+									<reference key="NSColor" ref="320865741"/>
+									<reference key="NSTabView" ref="75927203"/>
+								</object>
+								<object class="NSTabViewItem" id="493727923">
+									<object class="NSMutableString" key="NSIdentifier">
+										<characters key="NS.bytes">2</characters>
+									</object>
+									<reference key="NSView" ref="527709877"/>
+									<string key="NSLabel">Output</string>
+									<reference key="NSColor" ref="320865741"/>
+									<reference key="NSTabView" ref="75927203"/>
+								</object>
+								<object class="NSTabViewItem" id="1036577743">
+									<object class="NSView" key="NSView" id="536248195">
+										<nil key="NSNextResponder"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSButton" id="137435489">
+												<reference key="NSNextResponder" ref="536248195"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 217}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="536248195"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="891925158">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Authenticate connections</string>
+													<reference key="NSSupport" ref="706343604"/>
+													<reference key="NSControlView" ref="137435489"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="876172194"/>
+													<reference key="NSAlternateContents" ref="1005878359"/>
+													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSButton" id="663154230">
+												<reference key="NSNextResponder" ref="536248195"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 140}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="536248195"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="836703945">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Allow connections from network clients</string>
+													<reference key="NSSupport" ref="706343604"/>
+													<reference key="NSControlView" ref="663154230"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="876172194"/>
+													<reference key="NSAlternateContents" ref="1005878359"/>
+													<reference key="NSKeyEquivalent" ref="1005878359"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="417801719">
+												<reference key="NSNextResponder" ref="536248195"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 169}, {385, 42}}</string>
+												<reference key="NSSuperview" ref="536248195"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="935570098">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string type="base64-UTF8" key="NSContents">TGF1bmNoaW5nIFgxMSB3aWxsIGNyZWF0ZSBYYXV0aG9yaXR5IGFjY2Vzcy1jb250cm9sIGtleXMuIElm
+IHRoZSBzeXN0ZW0ncyBJUCBhZGRyZXNzIGNoYW5nZXMsIHRoZXNlIGtleXMgYmVjb21lIGludmFsaWQg
+d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="417801719"/>
+													<reference key="NSBackgroundColor" ref="320865741"/>
+													<reference key="NSTextColor" ref="233849662"/>
+												</object>
+											</object>
+											<object class="NSTextField" id="115954190">
+												<reference key="NSNextResponder" ref="536248195"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 92}, {385, 42}}</string>
+												<reference key="NSSuperview" ref="536248195"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="144257898">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="115954190"/>
+													<reference key="NSBackgroundColor" ref="320865741"/>
+													<reference key="NSTextColor" ref="233849662"/>
+												</object>
+											</object>
+											<object class="NSTextField" id="1067279202">
+												<reference key="NSNextResponder" ref="536248195"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{17, 20}, {404, 14}}</string>
+												<reference key="NSSuperview" ref="536248195"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="703874672">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">These options take effect when X11 is next launched.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="1067279202"/>
+													<reference key="NSBackgroundColor" ref="320865741"/>
+													<reference key="NSTextColor" ref="233849662"/>
+												</object>
+											</object>
+										</object>
+										<string key="NSFrame">{{10, 33}, {438, 253}}</string>
+									</object>
+									<string key="NSLabel">Security</string>
+									<reference key="NSColor" ref="320865741"/>
+									<reference key="NSTabView" ref="75927203"/>
+								</object>
+							</object>
+							<reference key="NSSelectedTabViewItem" ref="493727923"/>
+							<reference key="NSFont" ref="706343604"/>
+							<int key="NSTvFlags">0</int>
+							<bool key="NSAllowTruncatedLabels">YES</bool>
+							<bool key="NSDrawsBackground">YES</bool>
+						</object>
+					</object>
+					<string key="NSFrameSize">{478, 316}</string>
+				</object>
+				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+				<string key="NSMinSize">{213, 129}</string>
+				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+				<string key="NSFrameAutosaveName">x11_prefs</string>
+			</object>
+			<object class="NSWindowTemplate" id="796776534">
+				<int key="NSWindowStyleMask">11</int>
+				<int key="NSWindowBacking">2</int>
+				<string key="NSWindowRect">{{279, 270}, {486, 310}}</string>
+				<int key="NSWTFlags">1350041600</int>
+				<string key="NSWindowTitle">X11 Application Menu</string>
+				<reference key="NSWindowClass" ref="643663067"/>
+				<object class="NSMutableString" key="NSViewClass">
+					<characters key="NS.bytes">View</characters>
+				</object>
+				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+				<string key="NSWindowContentMinSize">{213, 107}</string>
+				<object class="NSView" key="NSWindowView" id="1039094689">
+					<nil key="NSNextResponder"/>
+					<int key="NSvFlags">256</int>
+					<object class="NSMutableArray" key="NSSubviews">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSButton" id="1002101696">
+							<reference key="NSNextResponder" ref="1039094689"/>
+							<int key="NSvFlags">303</int>
+							<string key="NSFrame">{{388, 12}, {84, 32}}</string>
+							<reference key="NSSuperview" ref="1039094689"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="558394524">
+								<int key="NSCellFlags">-2080244224</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Done</string>
+								<reference key="NSSupport" ref="706343604"/>
+								<reference key="NSControlView" ref="1002101696"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<object class="NSFont" key="NSAlternateImage" id="965938342">
+									<string key="NSName">Helvetica</string>
+									<double key="NSSize">1.300000e+01</double>
+									<int key="NSfFlags">16</int>
+								</object>
+								<reference key="NSAlternateContents" ref="1005878359"/>
+								<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="711288662">
+							<reference key="NSNextResponder" ref="1039094689"/>
+							<int key="NSvFlags">301</int>
+							<string key="NSFrame">{{372, 230}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="1039094689"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="413164923">
+								<int key="NSCellFlags">67239424</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Duplicate</string>
+								<reference key="NSSupport" ref="706343604"/>
+								<reference key="NSControlView" ref="711288662"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<reference key="NSAlternateImage" ref="965938342"/>
+								<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="634701477">
+							<reference key="NSNextResponder" ref="1039094689"/>
+							<int key="NSvFlags">301</int>
+							<string key="NSFrame">{{372, 198}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="1039094689"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="26248495">
+								<int key="NSCellFlags">67239424</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Remove</string>
+								<reference key="NSSupport" ref="706343604"/>
+								<reference key="NSControlView" ref="634701477"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<reference key="NSAlternateImage" ref="965938342"/>
+								<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="NSScrollView" id="1011512617">
+							<reference key="NSNextResponder" ref="1039094689"/>
+							<int key="NSvFlags">307</int>
+							<object class="NSMutableArray" key="NSSubviews">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSClipView" id="963977695">
+									<reference key="NSNextResponder" ref="1011512617"/>
+									<int key="NSvFlags">2304</int>
+									<object class="NSMutableArray" key="NSSubviews">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<object class="NSTableView" id="411425856">
+											<reference key="NSNextResponder" ref="963977695"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrameSize">{333, 197}</string>
+											<reference key="NSSuperview" ref="963977695"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSTableHeaderView" key="NSHeaderView" id="526973850">
+												<reference key="NSNextResponder" ref="935843221"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrameSize">{333, 17}</string>
+												<reference key="NSSuperview" ref="935843221"/>
+												<reference key="NSTableView" ref="411425856"/>
+											</object>
+											<object class="_NSCornerView" key="NSCornerView" id="182265797">
+												<reference key="NSNextResponder" ref="1011512617"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{334, 0}, {16, 17}}</string>
+												<reference key="NSSuperview" ref="1011512617"/>
+											</object>
+											<object class="NSMutableArray" key="NSTableColumns">
+												<bool key="EncodedWithXMLCoder">YES</bool>
+												<object class="NSTableColumn" id="621551865">
+													<double key="NSWidth">7.900000e+01</double>
+													<double key="NSMinWidth">4.000000e+01</double>
+													<double key="NSMaxWidth">1.000000e+03</double>
+													<object class="NSTableHeaderCell" key="NSHeaderCell">
+														<int key="NSCellFlags">75628032</int>
+														<int key="NSCellFlags2">0</int>
+														<string key="NSContents">Name</string>
+														<reference key="NSSupport" ref="26"/>
+														<object class="NSColor" key="NSBackgroundColor" id="182967138">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+														</object>
+														<object class="NSColor" key="NSTextColor" id="645274518">
+															<int key="NSColorSpace">6</int>
+															<reference key="NSCatalogName" ref="1000587476"/>
+															<string key="NSColorName">headerTextColor</string>
+															<reference key="NSColor" ref="608123050"/>
+														</object>
+													</object>
+													<object class="NSTextFieldCell" key="NSDataCell" id="195831317">
+														<int key="NSCellFlags">338820672</int>
+														<int key="NSCellFlags2">1024</int>
+														<reference key="NSSupport" ref="706343604"/>
+														<reference key="NSControlView" ref="411425856"/>
+														<object class="NSColor" key="NSBackgroundColor" id="722293876">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MQA</bytes>
+														</object>
+														<reference key="NSTextColor" ref="233849662"/>
+													</object>
+													<int key="NSResizingMask">3</int>
+													<bool key="NSIsResizeable">YES</bool>
+													<bool key="NSIsEditable">YES</bool>
+													<reference key="NSTableView" ref="411425856"/>
+												</object>
+												<object class="NSTableColumn" id="976084317">
+													<double key="NSWidth">1.937310e+02</double>
+													<double key="NSMinWidth">6.273100e+01</double>
+													<double key="NSMaxWidth">1.000000e+03</double>
+													<object class="NSTableHeaderCell" key="NSHeaderCell">
+														<int key="NSCellFlags">75628032</int>
+														<int key="NSCellFlags2">0</int>
+														<string key="NSContents">Command</string>
+														<reference key="NSSupport" ref="26"/>
+														<reference key="NSBackgroundColor" ref="182967138"/>
+														<reference key="NSTextColor" ref="645274518"/>
+													</object>
+													<object class="NSTextFieldCell" key="NSDataCell" id="656574062">
+														<int key="NSCellFlags">338820672</int>
+														<int key="NSCellFlags2">1024</int>
+														<reference key="NSSupport" ref="706343604"/>
+														<reference key="NSControlView" ref="411425856"/>
+														<reference key="NSBackgroundColor" ref="722293876"/>
+														<reference key="NSTextColor" ref="233849662"/>
+													</object>
+													<int key="NSResizingMask">3</int>
+													<bool key="NSIsResizeable">YES</bool>
+													<bool key="NSIsEditable">YES</bool>
+													<reference key="NSTableView" ref="411425856"/>
+												</object>
+												<object class="NSTableColumn" id="661701503">
+													<double key="NSWidth">5.100000e+01</double>
+													<double key="NSMinWidth">1.000000e+01</double>
+													<double key="NSMaxWidth">1.000000e+03</double>
+													<object class="NSTableHeaderCell" key="NSHeaderCell">
+														<int key="NSCellFlags">67239424</int>
+														<int key="NSCellFlags2">0</int>
+														<string key="NSContents">Shortcut</string>
+														<reference key="NSSupport" ref="26"/>
+														<object class="NSColor" key="NSBackgroundColor">
+															<int key="NSColorSpace">6</int>
+															<reference key="NSCatalogName" ref="1000587476"/>
+															<string key="NSColorName">headerColor</string>
+															<reference key="NSColor" ref="722293876"/>
+														</object>
+														<reference key="NSTextColor" ref="645274518"/>
+													</object>
+													<object class="NSTextFieldCell" key="NSDataCell" id="90031137">
+														<int key="NSCellFlags">338820672</int>
+														<int key="NSCellFlags2">1024</int>
+														<object class="NSFont" key="NSSupport">
+															<reference key="NSName" ref="508374773"/>
+															<double key="NSSize">1.200000e+01</double>
+															<int key="NSfFlags">16</int>
+														</object>
+														<reference key="NSControlView" ref="411425856"/>
+														<bool key="NSDrawsBackground">YES</bool>
+														<object class="NSColor" key="NSBackgroundColor" id="447702889">
+															<int key="NSColorSpace">6</int>
+															<reference key="NSCatalogName" ref="1000587476"/>
+															<string key="NSColorName">controlBackgroundColor</string>
+															<reference key="NSColor" ref="1000384962"/>
+														</object>
+														<reference key="NSTextColor" ref="233849662"/>
+													</object>
+													<int key="NSResizingMask">3</int>
+													<bool key="NSIsResizeable">YES</bool>
+													<bool key="NSIsEditable">YES</bool>
+													<reference key="NSTableView" ref="411425856"/>
+												</object>
+											</object>
+											<double key="NSIntercellSpacingWidth">3.000000e+00</double>
+											<double key="NSIntercellSpacingHeight">2.000000e+00</double>
+											<reference key="NSBackgroundColor" ref="722293876"/>
+											<object class="NSColor" key="NSGridColor">
+												<int key="NSColorSpace">6</int>
+												<reference key="NSCatalogName" ref="1000587476"/>
+												<string key="NSColorName">gridColor</string>
+												<object class="NSColor" key="NSColor">
+													<int key="NSColorSpace">3</int>
+													<bytes key="NSWhite">MC41AA</bytes>
+												</object>
+											</object>
+											<double key="NSRowHeight">1.700000e+01</double>
+											<int key="NSTvFlags">1379958784</int>
+											<int key="NSColumnAutoresizingStyle">1</int>
+											<int key="NSDraggingSourceMaskForLocal">-1</int>
+											<int key="NSDraggingSourceMaskForNonLocal">0</int>
+											<bool key="NSAllowsTypeSelect">YES</bool>
+										</object>
+									</object>
+									<string key="NSFrame">{{1, 17}, {333, 197}}</string>
+									<reference key="NSSuperview" ref="1011512617"/>
+									<reference key="NSNextKeyView" ref="411425856"/>
+									<reference key="NSDocView" ref="411425856"/>
+									<reference key="NSBGColor" ref="447702889"/>
+									<int key="NScvFlags">4</int>
+								</object>
+								<object class="NSScroller" id="152467947">
+									<reference key="NSNextResponder" ref="1011512617"/>
+									<int key="NSvFlags">256</int>
+									<string key="NSFrame">{{334, 17}, {15, 197}}</string>
+									<reference key="NSSuperview" ref="1011512617"/>
+									<reference key="NSTarget" ref="1011512617"/>
+									<string key="NSAction" id="607822787">_doScroller:</string>
+									<double key="NSPercent">9.949238e-01</double>
+								</object>
+								<object class="NSScroller" id="208024104">
+									<reference key="NSNextResponder" ref="1011512617"/>
+									<int key="NSvFlags">256</int>
+									<string key="NSFrame">{{1, 214}, {333, 15}}</string>
+									<reference key="NSSuperview" ref="1011512617"/>
+									<int key="NSsFlags">1</int>
+									<reference key="NSTarget" ref="1011512617"/>
+									<reference key="NSAction" ref="607822787"/>
+									<double key="NSPercent">9.940299e-01</double>
+								</object>
+								<object class="NSClipView" id="935843221">
+									<reference key="NSNextResponder" ref="1011512617"/>
+									<int key="NSvFlags">2304</int>
+									<object class="NSMutableArray" key="NSSubviews">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<reference ref="526973850"/>
+									</object>
+									<string key="NSFrame">{{1, 0}, {333, 17}}</string>
+									<reference key="NSSuperview" ref="1011512617"/>
+									<reference key="NSNextKeyView" ref="526973850"/>
+									<reference key="NSDocView" ref="526973850"/>
+									<reference key="NSBGColor" ref="447702889"/>
+									<int key="NScvFlags">4</int>
+								</object>
+								<reference ref="182265797"/>
+							</object>
+							<string key="NSFrame">{{20, 60}, {350, 230}}</string>
+							<reference key="NSSuperview" ref="1039094689"/>
+							<reference key="NSNextKeyView" ref="963977695"/>
+							<int key="NSsFlags">50</int>
+							<reference key="NSVScroller" ref="152467947"/>
+							<reference key="NSHScroller" ref="208024104"/>
+							<reference key="NSContentView" ref="963977695"/>
+							<reference key="NSHeaderClipView" ref="935843221"/>
+							<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+						</object>
+						<object class="NSButton" id="859414998">
+							<reference key="NSNextResponder" ref="1039094689"/>
+							<int key="NSvFlags">303</int>
+							<string key="NSFrame">{{304, 12}, {84, 32}}</string>
+							<reference key="NSSuperview" ref="1039094689"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="537937846">
+								<int key="NSCellFlags">67239424</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Cancel</string>
+								<reference key="NSSupport" ref="706343604"/>
+								<reference key="NSControlView" ref="859414998"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<reference key="NSAlternateImage" ref="965938342"/>
+								<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="381268760">
+							<reference key="NSNextResponder" ref="1039094689"/>
+							<int key="NSvFlags">301</int>
+							<string key="NSFrame">{{372, 262}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="1039094689"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="99903682">
+								<int key="NSCellFlags">67239424</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Add Item</string>
+								<reference key="NSSupport" ref="706343604"/>
+								<reference key="NSControlView" ref="381268760"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<reference key="NSAlternateImage" ref="965938342"/>
+								<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>
+					<string key="NSFrame">{{1, 1}, {486, 310}}</string>
+				</object>
+				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+				<string key="NSMinSize">{213, 129}</string>
+				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+				<string key="NSFrameAutosaveName">x11_apps</string>
+			</object>
+			<object class="NSMenu" id="1001514180">
+				<string key="NSTitle">Menu</string>
+				<object class="NSMutableArray" key="NSMenuItems">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="NSMenuItem" id="355724345">
+						<reference key="NSMenu" ref="1001514180"/>
+						<bool key="NSIsDisabled">YES</bool>
+						<bool key="NSIsSeparator">YES</bool>
+						<reference key="NSTitle" ref="1005878359"/>
+						<reference key="NSKeyEquiv" ref="1005878359"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="732862070"/>
+						<reference key="NSMixedImage" ref="154462367"/>
+					</object>
+					<object class="NSMenuItem" id="107275095">
+						<reference key="NSMenu" ref="1001514180"/>
+						<reference key="NSTitle" ref="942587293"/>
+						<reference key="NSKeyEquiv" ref="1005878359"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="732862070"/>
+						<reference key="NSMixedImage" ref="154462367"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="321919370">
+							<reference key="NSTitle" ref="942587293"/>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="500771766">
+									<reference key="NSMenu" ref="321919370"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<reference key="NSTitle" ref="1005878359"/>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+								<object class="NSMenuItem" id="656726997">
+									<reference key="NSMenu" ref="321919370"/>
+									<string type="base64-UTF8" key="NSTitle">Q3VzdG9taXpl4oCmA</string>
+									<reference key="NSKeyEquiv" ref="1005878359"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="732862070"/>
+									<reference key="NSMixedImage" ref="154462367"/>
+								</object>
+							</object>
+						</object>
+					</object>
+				</object>
+				<reference key="NSName" ref="1005878359"/>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">cut:</string>
+						<reference key="source" ref="518703249"/>
+						<reference key="destination" ref="590926585"/>
+					</object>
+					<int key="connectionID">175</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">paste:</string>
+						<reference key="source" ref="518703249"/>
+						<reference key="destination" ref="739720090"/>
+					</object>
+					<int key="connectionID">176</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">redo:</string>
+						<reference key="source" ref="518703249"/>
+						<reference key="destination" ref="634656440"/>
+					</object>
+					<int key="connectionID">178</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">selectAll:</string>
+						<reference key="source" ref="518703249"/>
+						<reference key="destination" ref="584461964"/>
+					</object>
+					<int key="connectionID">179</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">undo:</string>
+						<reference key="source" ref="518703249"/>
+						<reference key="destination" ref="159704190"/>
+					</object>
+					<int key="connectionID">180</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">copy:</string>
+						<reference key="source" ref="518703249"/>
+						<reference key="destination" ref="204575684"/>
+					</object>
+					<int key="connectionID">181</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">delete:</string>
+						<reference key="source" ref="518703249"/>
+						<reference key="destination" ref="549812830"/>
+					</object>
+					<int key="connectionID">195</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">minimize_window:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="915861349"/>
+					</object>
+					<int key="connectionID">202</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">close_window:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="442007350"/>
+					</object>
+					<int key="connectionID">205</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">zoom_window:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="722764538"/>
+					</object>
+					<int key="connectionID">206</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">bring_to_front:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="853630143"/>
+					</object>
+					<int key="connectionID">207</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">window_separator</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="332241222"/>
+					</object>
+					<int key="connectionID">260</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">hideOtherApplications:</string>
+						<reference key="source" ref="584863936"/>
+						<reference key="destination" ref="191312176"/>
+					</object>
+					<int key="connectionID">263</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">apps_separator</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="940363272"/>
+					</object>
+					<int key="connectionID">273</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">apps_table</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="411425856"/>
+					</object>
+					<int key="connectionID">301</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_done:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="1002101696"/>
+					</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="88064061"/>
+						<reference key="destination" ref="634701477"/>
+					</object>
+					<int key="connectionID">303</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_duplicate:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="711288662"/>
+					</object>
+					<int key="connectionID">304</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label" id="178478735">apps_table_show:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="767830074"/>
+					</object>
+					<int key="connectionID">308</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_cancel:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="859414998"/>
+					</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="88064061"/>
+						<reference key="destination" ref="381268760"/>
+					</object>
+					<int key="connectionID">311</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_show:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="836585695"/>
+					</object>
+					<int key="connectionID">318</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">x11_about_item</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="588913325"/>
+					</object>
+					<int key="connectionID">321</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">enable_auth</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="137435489"/>
+					</object>
+					<int key="connectionID">387</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">enable_tcp</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="663154230"/>
+					</object>
+					<int key="connectionID">388</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">depth</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="300224954"/>
+					</object>
+					<int key="connectionID">389</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">use_sysbeep</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="1045559310"/>
+					</object>
+					<int key="connectionID">390</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">fake_buttons</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="808306730"/>
+					</object>
+					<int key="connectionID">391</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">sync_keymap</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="793493073"/>
+					</object>
+					<int key="connectionID">392</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">enable_keyequivs</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="677150201"/>
+					</object>
+					<int key="connectionID">393</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label" id="694471214">prefs_changed:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="808306730"/>
+					</object>
+					<int key="connectionID">394</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<reference key="label" ref="694471214"/>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="793493073"/>
+					</object>
+					<int key="connectionID">395</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<reference key="label" ref="694471214"/>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="677150201"/>
+					</object>
+					<int key="connectionID">396</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<reference key="label" ref="694471214"/>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="1045559310"/>
+					</object>
+					<int key="connectionID">397</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<reference key="label" ref="694471214"/>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="300224954"/>
+					</object>
+					<int key="connectionID">398</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<reference key="label" ref="694471214"/>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="137435489"/>
+					</object>
+					<int key="connectionID">399</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<reference key="label" ref="694471214"/>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="663154230"/>
+					</object>
+					<int key="connectionID">401</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">prefs_panel</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="210544761"/>
+					</object>
+					<int key="connectionID">402</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">x11_help:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="122992289"/>
+					</object>
+					<int key="connectionID">422</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">dockMenu</string>
+						<reference key="source" ref="584863936"/>
+						<reference key="destination" ref="1001514180"/>
+					</object>
+					<int key="connectionID">426</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">dock_menu</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="1001514180"/>
+					</object>
+					<int key="connectionID">428</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="584863936"/>
+						<reference key="destination" ref="88064061"/>
+					</object>
+					<int key="connectionID">429</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">hide:</string>
+						<reference key="source" ref="584863936"/>
+						<reference key="destination" ref="147703239"/>
+					</object>
+					<int key="connectionID">430</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">unhideAllApplications:</string>
+						<reference key="source" ref="584863936"/>
+						<reference key="destination" ref="392807560"/>
+					</object>
+					<int key="connectionID">431</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">terminate:</string>
+						<reference key="source" ref="584863936"/>
+						<reference key="destination" ref="275459236"/>
+					</object>
+					<int key="connectionID">432</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">orderFrontStandardAboutPanel:</string>
+						<reference key="source" ref="584863936"/>
+						<reference key="destination" ref="588913325"/>
+					</object>
+					<int key="connectionID">433</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">dock_apps_menu</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="321919370"/>
+					</object>
+					<int key="connectionID">530</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">dock_window_separator</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="355724345"/>
+					</object>
+					<int key="connectionID">531</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<reference key="label" ref="178478735"/>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="656726997"/>
+					</object>
+					<int key="connectionID">534</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">next_window:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="283496700"/>
+					</object>
+					<int key="connectionID">539</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">previous_window:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="500397106"/>
+					</object>
+					<int key="connectionID">540</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">enable_fullscreen</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="817420822"/>
+					</object>
+					<int key="connectionID">546</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">enable_fullscreen_changed:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="817420822"/>
+					</object>
+					<int key="connectionID">547</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">toggle_fullscreen:</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="101686423"/>
+					</object>
+					<int key="connectionID">548</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">toggle_fullscreen_item</string>
+						<reference key="source" ref="88064061"/>
+						<reference key="destination" ref="101686423"/>
+					</object>
+					<int key="connectionID">549</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<object class="NSArray" key="object" id="0">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<reference key="children" ref="874420287"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="584863936"/>
+						<reference key="parent" ref="0"/>
+						<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="518703249"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">First Responder</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-3</int>
+						<reference key="object" ref="166373373"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">Application</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">29</int>
+						<reference key="object" ref="496556081"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="736341863"/>
+							<reference ref="385138428"/>
+							<reference ref="326076563"/>
+							<reference ref="940914550"/>
+							<reference ref="934950259"/>
+						</object>
+						<reference key="parent" ref="0"/>
+						<reference key="objectName" ref="414137626"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">19</int>
+						<reference key="object" ref="736341863"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="943404979"/>
+						</object>
+						<reference key="parent" ref="496556081"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">24</int>
+						<reference key="object" ref="943404979"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="853630143"/>
+							<reference ref="915861349"/>
+							<reference ref="783034074"/>
+							<reference ref="442007350"/>
+							<reference ref="722764538"/>
+							<reference ref="332241222"/>
+							<reference ref="303213786"/>
+							<reference ref="283496700"/>
+							<reference ref="500397106"/>
+						</object>
+						<reference key="parent" ref="736341863"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">5</int>
+						<reference key="object" ref="853630143"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">23</int>
+						<reference key="object" ref="915861349"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">92</int>
+						<reference key="object" ref="783034074"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">203</int>
+						<reference key="object" ref="442007350"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">204</int>
+						<reference key="object" ref="722764538"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">208</int>
+						<reference key="object" ref="332241222"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">536</int>
+						<reference key="object" ref="303213786"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">537</int>
+						<reference key="object" ref="283496700"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">538</int>
+						<reference key="object" ref="500397106"/>
+						<reference key="parent" ref="943404979"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">56</int>
+						<reference key="object" ref="385138428"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="856655711"/>
+						</object>
+						<reference key="parent" ref="496556081"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">57</int>
+						<reference key="object" ref="856655711"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="588913325"/>
+							<reference ref="836585695"/>
+							<reference ref="63158341"/>
+							<reference ref="147703239"/>
+							<reference ref="275459236"/>
+							<reference ref="562920394"/>
+							<reference ref="635454008"/>
+							<reference ref="191312176"/>
+							<reference ref="648021277"/>
+							<reference ref="392807560"/>
+							<reference ref="101686423"/>
+							<reference ref="754231570"/>
+						</object>
+						<reference key="parent" ref="385138428"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">58</int>
+						<reference key="object" ref="588913325"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">129</int>
+						<reference key="object" ref="836585695"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">131</int>
+						<reference key="object" ref="63158341"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="502073457"/>
+						</object>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">130</int>
+						<reference key="object" ref="502073457"/>
+						<reference key="parent" ref="63158341"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">134</int>
+						<reference key="object" ref="147703239"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">136</int>
+						<reference key="object" ref="275459236"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">143</int>
+						<reference key="object" ref="562920394"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">144</int>
+						<reference key="object" ref="635454008"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">145</int>
+						<reference key="object" ref="191312176"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">149</int>
+						<reference key="object" ref="648021277"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">150</int>
+						<reference key="object" ref="392807560"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">544</int>
+						<reference key="object" ref="101686423"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">545</int>
+						<reference key="object" ref="754231570"/>
+						<reference key="parent" ref="856655711"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">163</int>
+						<reference key="object" ref="326076563"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="932839819"/>
+						</object>
+						<reference key="parent" ref="496556081"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">169</int>
+						<reference key="object" ref="932839819"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="342107529"/>
+							<reference ref="204575684"/>
+							<reference ref="159704190"/>
+							<reference ref="590926585"/>
+							<reference ref="549812830"/>
+							<reference ref="739720090"/>
+							<reference ref="584461964"/>
+							<reference ref="634656440"/>
+						</object>
+						<reference key="parent" ref="326076563"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">156</int>
+						<reference key="object" ref="342107529"/>
+						<reference key="parent" ref="932839819"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">157</int>
+						<reference key="object" ref="204575684"/>
+						<reference key="parent" ref="932839819"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">158</int>
+						<reference key="object" ref="159704190"/>
+						<reference key="parent" ref="932839819"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">160</int>
+						<reference key="object" ref="590926585"/>
+						<reference key="parent" ref="932839819"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">164</int>
+						<reference key="object" ref="549812830"/>
+						<reference key="parent" ref="932839819"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">171</int>
+						<reference key="object" ref="739720090"/>
+						<reference key="parent" ref="932839819"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">172</int>
+						<reference key="object" ref="584461964"/>
+						<reference key="parent" ref="932839819"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">173</int>
+						<reference key="object" ref="634656440"/>
+						<reference key="parent" ref="932839819"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">269</int>
+						<reference key="object" ref="940914550"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="684156653"/>
+						</object>
+						<reference key="parent" ref="496556081"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">270</int>
+						<reference key="object" ref="684156653"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="940363272"/>
+							<reference ref="767830074"/>
+						</object>
+						<reference key="parent" ref="940914550"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">272</int>
+						<reference key="object" ref="940363272"/>
+						<reference key="parent" ref="684156653"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">305</int>
+						<reference key="object" ref="767830074"/>
+						<reference key="parent" ref="684156653"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">419</int>
+						<reference key="object" ref="934950259"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1052262524"/>
+						</object>
+						<reference key="parent" ref="496556081"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">420</int>
+						<reference key="object" ref="1052262524"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="122992289"/>
+						</object>
+						<reference key="parent" ref="934950259"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">421</int>
+						<reference key="object" ref="122992289"/>
+						<reference key="parent" ref="1052262524"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">196</int>
+						<reference key="object" ref="88064061"/>
+						<reference key="parent" ref="0"/>
+						<reference key="objectName" ref="517073442"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">244</int>
+						<reference key="object" ref="210544761"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="404125972"/>
+						</object>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">PrefsPanel</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">245</int>
+						<reference key="object" ref="404125972"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="75927203"/>
+						</object>
+						<reference key="parent" ref="210544761"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">348</int>
+						<reference key="object" ref="75927203"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="17244958"/>
+							<reference ref="493727923"/>
+							<reference ref="1036577743"/>
+						</object>
+						<reference key="parent" ref="404125972"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">349</int>
+						<reference key="object" ref="17244958"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="600332710"/>
+						</object>
+						<reference key="parent" ref="75927203"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">351</int>
+						<reference key="object" ref="600332710"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="808306730"/>
+							<reference ref="618388983"/>
+							<reference ref="754792079"/>
+							<reference ref="677150201"/>
+							<reference ref="228801813"/>
+							<reference ref="793493073"/>
+						</object>
+						<reference key="parent" ref="17244958"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">363</int>
+						<reference key="object" ref="808306730"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="727617204"/>
+						</object>
+						<reference key="parent" ref="600332710"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">364</int>
+						<reference key="object" ref="618388983"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="140236247"/>
+						</object>
+						<reference key="parent" ref="600332710"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">365</int>
+						<reference key="object" ref="754792079"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="110537159"/>
+						</object>
+						<reference key="parent" ref="600332710"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">368</int>
+						<reference key="object" ref="677150201"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="46680941"/>
+						</object>
+						<reference key="parent" ref="600332710"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">369</int>
+						<reference key="object" ref="228801813"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="415694484"/>
+						</object>
+						<reference key="parent" ref="600332710"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">370</int>
+						<reference key="object" ref="793493073"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="466260504"/>
+						</object>
+						<reference key="parent" ref="600332710"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">352</int>
+						<reference key="object" ref="493727923"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="527709877"/>
+						</object>
+						<reference key="parent" ref="75927203"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">350</int>
+						<reference key="object" ref="527709877"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1045559310"/>
+							<reference ref="67626595"/>
+							<reference ref="300224954"/>
+							<reference ref="717889178"/>
+							<reference ref="114173823"/>
+							<reference ref="817420822"/>
+							<reference ref="959270736"/>
+						</object>
+						<reference key="parent" ref="493727923"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">371</int>
+						<reference key="object" ref="1045559310"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="225158677"/>
+						</object>
+						<reference key="parent" ref="527709877"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">372</int>
+						<reference key="object" ref="67626595"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1072420481"/>
+						</object>
+						<reference key="parent" ref="527709877"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">382</int>
+						<reference key="object" ref="300224954"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="301142744"/>
+						</object>
+						<reference key="parent" ref="527709877"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">385</int>
+						<reference key="object" ref="717889178"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="749756205"/>
+						</object>
+						<reference key="parent" ref="527709877"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">386</int>
+						<reference key="object" ref="114173823"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="725554783"/>
+						</object>
+						<reference key="parent" ref="527709877"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">541</int>
+						<reference key="object" ref="817420822"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="100363081"/>
+						</object>
+						<reference key="parent" ref="527709877"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">543</int>
+						<reference key="object" ref="959270736"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="550432669"/>
+						</object>
+						<reference key="parent" ref="527709877"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">353</int>
+						<reference key="object" ref="1036577743"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="536248195"/>
+						</object>
+						<reference key="parent" ref="75927203"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">354</int>
+						<reference key="object" ref="536248195"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="137435489"/>
+							<reference ref="663154230"/>
+							<reference ref="417801719"/>
+							<reference ref="115954190"/>
+							<reference ref="1067279202"/>
+						</object>
+						<reference key="parent" ref="1036577743"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">374</int>
+						<reference key="object" ref="137435489"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="891925158"/>
+						</object>
+						<reference key="parent" ref="536248195"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">375</int>
+						<reference key="object" ref="663154230"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="836703945"/>
+						</object>
+						<reference key="parent" ref="536248195"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">376</int>
+						<reference key="object" ref="417801719"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="935570098"/>
+						</object>
+						<reference key="parent" ref="536248195"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">377</int>
+						<reference key="object" ref="115954190"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="144257898"/>
+						</object>
+						<reference key="parent" ref="536248195"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">379</int>
+						<reference key="object" ref="1067279202"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="703874672"/>
+						</object>
+						<reference key="parent" ref="536248195"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">285</int>
+						<reference key="object" ref="796776534"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1039094689"/>
+						</object>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">EditPrograms</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">286</int>
+						<reference key="object" ref="1039094689"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1002101696"/>
+							<reference ref="711288662"/>
+							<reference ref="634701477"/>
+							<reference ref="1011512617"/>
+							<reference ref="859414998"/>
+							<reference ref="381268760"/>
+						</object>
+						<reference key="parent" ref="796776534"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">291</int>
+						<reference key="object" ref="1002101696"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="558394524"/>
+						</object>
+						<reference key="parent" ref="1039094689"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">292</int>
+						<reference key="object" ref="711288662"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="413164923"/>
+						</object>
+						<reference key="parent" ref="1039094689"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">293</int>
+						<reference key="object" ref="634701477"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="26248495"/>
+						</object>
+						<reference key="parent" ref="1039094689"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">295</int>
+						<reference key="object" ref="1011512617"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="411425856"/>
+							<reference ref="152467947"/>
+							<reference ref="208024104"/>
+							<reference ref="526973850"/>
+						</object>
+						<reference key="parent" ref="1039094689"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">296</int>
+						<reference key="object" ref="411425856"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="621551865"/>
+							<reference ref="976084317"/>
+							<reference ref="661701503"/>
+						</object>
+						<reference key="parent" ref="1011512617"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">297</int>
+						<reference key="object" ref="621551865"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="195831317"/>
+						</object>
+						<reference key="parent" ref="411425856"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">574</int>
+						<reference key="object" ref="195831317"/>
+						<reference key="parent" ref="621551865"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">298</int>
+						<reference key="object" ref="976084317"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="656574062"/>
+						</object>
+						<reference key="parent" ref="411425856"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">573</int>
+						<reference key="object" ref="656574062"/>
+						<reference key="parent" ref="976084317"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">535</int>
+						<reference key="object" ref="661701503"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="90031137"/>
+						</object>
+						<reference key="parent" ref="411425856"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">575</int>
+						<reference key="object" ref="90031137"/>
+						<reference key="parent" ref="661701503"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">299</int>
+						<reference key="object" ref="859414998"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="537937846"/>
+						</object>
+						<reference key="parent" ref="1039094689"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">310</int>
+						<reference key="object" ref="381268760"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="99903682"/>
+						</object>
+						<reference key="parent" ref="1039094689"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">423</int>
+						<reference key="object" ref="1001514180"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="355724345"/>
+							<reference ref="107275095"/>
+						</object>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">DockMenu</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">524</int>
+						<reference key="object" ref="355724345"/>
+						<reference key="parent" ref="1001514180"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">526</int>
+						<reference key="object" ref="107275095"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="321919370"/>
+						</object>
+						<reference key="parent" ref="1001514180"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">527</int>
+						<reference key="object" ref="321919370"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="656726997"/>
+							<reference ref="500771766"/>
+						</object>
+						<reference key="parent" ref="107275095"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">532</int>
+						<reference key="object" ref="656726997"/>
+						<reference key="parent" ref="321919370"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">533</int>
+						<reference key="object" ref="500771766"/>
+						<reference key="parent" ref="321919370"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100363</int>
+						<reference key="object" ref="727617204"/>
+						<reference key="parent" ref="808306730"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100364</int>
+						<reference key="object" ref="140236247"/>
+						<reference key="parent" ref="618388983"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100365</int>
+						<reference key="object" ref="110537159"/>
+						<reference key="parent" ref="754792079"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100368</int>
+						<reference key="object" ref="46680941"/>
+						<reference key="parent" ref="677150201"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100369</int>
+						<reference key="object" ref="415694484"/>
+						<reference key="parent" ref="228801813"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100370</int>
+						<reference key="object" ref="466260504"/>
+						<reference key="parent" ref="793493073"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100371</int>
+						<reference key="object" ref="225158677"/>
+						<reference key="parent" ref="1045559310"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100372</int>
+						<reference key="object" ref="1072420481"/>
+						<reference key="parent" ref="67626595"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100382</int>
+						<reference key="object" ref="301142744"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1071781177"/>
+						</object>
+						<reference key="parent" ref="300224954"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100385</int>
+						<reference key="object" ref="749756205"/>
+						<reference key="parent" ref="717889178"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100386</int>
+						<reference key="object" ref="725554783"/>
+						<reference key="parent" ref="114173823"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100541</int>
+						<reference key="object" ref="100363081"/>
+						<reference key="parent" ref="817420822"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100543</int>
+						<reference key="object" ref="550432669"/>
+						<reference key="parent" ref="959270736"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100374</int>
+						<reference key="object" ref="891925158"/>
+						<reference key="parent" ref="137435489"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100375</int>
+						<reference key="object" ref="836703945"/>
+						<reference key="parent" ref="663154230"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100376</int>
+						<reference key="object" ref="935570098"/>
+						<reference key="parent" ref="417801719"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100377</int>
+						<reference key="object" ref="144257898"/>
+						<reference key="parent" ref="115954190"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100379</int>
+						<reference key="object" ref="703874672"/>
+						<reference key="parent" ref="1067279202"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100291</int>
+						<reference key="object" ref="558394524"/>
+						<reference key="parent" ref="1002101696"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100292</int>
+						<reference key="object" ref="413164923"/>
+						<reference key="parent" ref="711288662"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100293</int>
+						<reference key="object" ref="26248495"/>
+						<reference key="parent" ref="634701477"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100299</int>
+						<reference key="object" ref="537937846"/>
+						<reference key="parent" ref="859414998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100310</int>
+						<reference key="object" ref="99903682"/>
+						<reference key="parent" ref="381268760"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">380</int>
+						<reference key="object" ref="1071781177"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="827519886"/>
+							<reference ref="473657062"/>
+							<reference ref="247508345"/>
+							<reference ref="611307925"/>
+						</object>
+						<reference key="parent" ref="301142744"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">435</int>
+						<reference key="object" ref="827519886"/>
+						<reference key="parent" ref="1071781177"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">384</int>
+						<reference key="object" ref="473657062"/>
+						<reference key="parent" ref="1071781177"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">383</int>
+						<reference key="object" ref="247508345"/>
+						<reference key="parent" ref="1071781177"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">381</int>
+						<reference key="object" ref="611307925"/>
+						<reference key="parent" ref="1071781177"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100295</int>
+						<reference key="object" ref="152467947"/>
+						<reference key="parent" ref="1011512617"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">200295</int>
+						<reference key="object" ref="208024104"/>
+						<reference key="parent" ref="1011512617"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300295</int>
+						<reference key="object" ref="526973850"/>
+						<reference key="parent" ref="1011512617"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSMutableArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.IBPluginDependency</string>
+					<string>-2.IBPluginDependency</string>
+					<string>-3.IBPluginDependency</string>
+					<string>-3.ImportedFromIB2</string>
+					<string>100295.IBShouldRemoveOnLegacySave</string>
+					<string>129.IBPluginDependency</string>
+					<string>129.ImportedFromIB2</string>
+					<string>130.IBPluginDependency</string>
+					<string>130.ImportedFromIB2</string>
+					<string>131.IBPluginDependency</string>
+					<string>131.ImportedFromIB2</string>
+					<string>134.IBPluginDependency</string>
+					<string>134.ImportedFromIB2</string>
+					<string>136.IBPluginDependency</string>
+					<string>136.ImportedFromIB2</string>
+					<string>143.IBPluginDependency</string>
+					<string>143.ImportedFromIB2</string>
+					<string>144.IBPluginDependency</string>
+					<string>144.ImportedFromIB2</string>
+					<string>145.IBPluginDependency</string>
+					<string>145.ImportedFromIB2</string>
+					<string>149.IBPluginDependency</string>
+					<string>149.ImportedFromIB2</string>
+					<string>150.IBPluginDependency</string>
+					<string>150.ImportedFromIB2</string>
+					<string>156.IBPluginDependency</string>
+					<string>156.ImportedFromIB2</string>
+					<string>157.IBPluginDependency</string>
+					<string>157.ImportedFromIB2</string>
+					<string>158.IBPluginDependency</string>
+					<string>158.ImportedFromIB2</string>
+					<string>160.IBPluginDependency</string>
+					<string>160.ImportedFromIB2</string>
+					<string>163.IBPluginDependency</string>
+					<string>163.ImportedFromIB2</string>
+					<string>164.IBPluginDependency</string>
+					<string>164.ImportedFromIB2</string>
+					<string>169.IBPluginDependency</string>
+					<string>169.ImportedFromIB2</string>
+					<string>171.IBPluginDependency</string>
+					<string>171.ImportedFromIB2</string>
+					<string>172.IBPluginDependency</string>
+					<string>172.ImportedFromIB2</string>
+					<string>173.IBPluginDependency</string>
+					<string>173.ImportedFromIB2</string>
+					<string>19.IBPluginDependency</string>
+					<string>19.ImportedFromIB2</string>
+					<string>196.IBPluginDependency</string>
+					<string>196.ImportedFromIB2</string>
+					<string>200295.IBShouldRemoveOnLegacySave</string>
+					<string>203.IBPluginDependency</string>
+					<string>203.ImportedFromIB2</string>
+					<string>204.IBPluginDependency</string>
+					<string>204.ImportedFromIB2</string>
+					<string>208.IBPluginDependency</string>
+					<string>208.ImportedFromIB2</string>
+					<string>23.IBPluginDependency</string>
+					<string>23.ImportedFromIB2</string>
+					<string>24.IBPluginDependency</string>
+					<string>24.ImportedFromIB2</string>
+					<string>244.IBPluginDependency</string>
+					<string>244.ImportedFromIB2</string>
+					<string>244.windowTemplate.hasMaxSize</string>
+					<string>244.windowTemplate.hasMinSize</string>
+					<string>244.windowTemplate.maxSize</string>
+					<string>244.windowTemplate.minSize</string>
+					<string>245.IBPluginDependency</string>
+					<string>245.ImportedFromIB2</string>
+					<string>269.IBPluginDependency</string>
+					<string>269.ImportedFromIB2</string>
+					<string>270.IBPluginDependency</string>
+					<string>270.ImportedFromIB2</string>
+					<string>272.IBPluginDependency</string>
+					<string>272.ImportedFromIB2</string>
+					<string>285.IBPluginDependency</string>
+					<string>285.ImportedFromIB2</string>
+					<string>285.windowTemplate.hasMaxSize</string>
+					<string>285.windowTemplate.hasMinSize</string>
+					<string>285.windowTemplate.maxSize</string>
+					<string>285.windowTemplate.minSize</string>
+					<string>286.IBPluginDependency</string>
+					<string>286.ImportedFromIB2</string>
+					<string>29.IBPluginDependency</string>
+					<string>29.ImportedFromIB2</string>
+					<string>291.IBPluginDependency</string>
+					<string>291.ImportedFromIB2</string>
+					<string>292.IBPluginDependency</string>
+					<string>292.ImportedFromIB2</string>
+					<string>293.IBPluginDependency</string>
+					<string>293.ImportedFromIB2</string>
+					<string>295.IBPluginDependency</string>
+					<string>295.ImportedFromIB2</string>
+					<string>296.IBPluginDependency</string>
+					<string>296.ImportedFromIB2</string>
+					<string>297.IBPluginDependency</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>305.IBPluginDependency</string>
+					<string>305.ImportedFromIB2</string>
+					<string>310.IBPluginDependency</string>
+					<string>310.ImportedFromIB2</string>
+					<string>348.IBPluginDependency</string>
+					<string>348.ImportedFromIB2</string>
+					<string>349.IBPluginDependency</string>
+					<string>349.ImportedFromIB2</string>
+					<string>350.IBPluginDependency</string>
+					<string>350.ImportedFromIB2</string>
+					<string>351.IBPluginDependency</string>
+					<string>351.ImportedFromIB2</string>
+					<string>352.IBPluginDependency</string>
+					<string>352.ImportedFromIB2</string>
+					<string>353.IBPluginDependency</string>
+					<string>353.ImportedFromIB2</string>
+					<string>354.IBPluginDependency</string>
+					<string>354.ImportedFromIB2</string>
+					<string>363.IBPluginDependency</string>
+					<string>363.ImportedFromIB2</string>
+					<string>364.IBPluginDependency</string>
+					<string>364.ImportedFromIB2</string>
+					<string>365.IBPluginDependency</string>
+					<string>365.ImportedFromIB2</string>
+					<string>368.IBPluginDependency</string>
+					<string>368.ImportedFromIB2</string>
+					<string>369.IBPluginDependency</string>
+					<string>369.ImportedFromIB2</string>
+					<string>370.IBPluginDependency</string>
+					<string>370.ImportedFromIB2</string>
+					<string>371.IBPluginDependency</string>
+					<string>371.ImportedFromIB2</string>
+					<string>372.IBPluginDependency</string>
+					<string>372.ImportedFromIB2</string>
+					<string>374.IBPluginDependency</string>
+					<string>374.ImportedFromIB2</string>
+					<string>375.IBPluginDependency</string>
+					<string>375.ImportedFromIB2</string>
+					<string>376.IBPluginDependency</string>
+					<string>376.ImportedFromIB2</string>
+					<string>377.IBPluginDependency</string>
+					<string>377.ImportedFromIB2</string>
+					<string>379.IBPluginDependency</string>
+					<string>379.ImportedFromIB2</string>
+					<string>380.IBPluginDependency</string>
+					<string>380.ImportedFromIB2</string>
+					<string>381.IBPluginDependency</string>
+					<string>381.ImportedFromIB2</string>
+					<string>382.IBPluginDependency</string>
+					<string>382.ImportedFromIB2</string>
+					<string>383.IBPluginDependency</string>
+					<string>383.ImportedFromIB2</string>
+					<string>384.IBPluginDependency</string>
+					<string>384.ImportedFromIB2</string>
+					<string>385.IBPluginDependency</string>
+					<string>385.ImportedFromIB2</string>
+					<string>386.IBPluginDependency</string>
+					<string>386.ImportedFromIB2</string>
+					<string>419.IBPluginDependency</string>
+					<string>419.ImportedFromIB2</string>
+					<string>420.IBPluginDependency</string>
+					<string>420.ImportedFromIB2</string>
+					<string>421.IBPluginDependency</string>
+					<string>421.ImportedFromIB2</string>
+					<string>423.IBPluginDependency</string>
+					<string>423.ImportedFromIB2</string>
+					<string>435.IBPluginDependency</string>
+					<string>435.ImportedFromIB2</string>
+					<string>5.IBPluginDependency</string>
+					<string>5.ImportedFromIB2</string>
+					<string>524.IBPluginDependency</string>
+					<string>524.ImportedFromIB2</string>
+					<string>526.IBPluginDependency</string>
+					<string>526.ImportedFromIB2</string>
+					<string>527.IBPluginDependency</string>
+					<string>527.ImportedFromIB2</string>
+					<string>532.IBPluginDependency</string>
+					<string>532.ImportedFromIB2</string>
+					<string>533.IBPluginDependency</string>
+					<string>533.ImportedFromIB2</string>
+					<string>535.IBPluginDependency</string>
+					<string>535.ImportedFromIB2</string>
+					<string>536.IBPluginDependency</string>
+					<string>536.ImportedFromIB2</string>
+					<string>537.IBPluginDependency</string>
+					<string>537.ImportedFromIB2</string>
+					<string>538.IBPluginDependency</string>
+					<string>538.ImportedFromIB2</string>
+					<string>541.IBPluginDependency</string>
+					<string>541.ImportedFromIB2</string>
+					<string>543.IBPluginDependency</string>
+					<string>543.ImportedFromIB2</string>
+					<string>544.IBPluginDependency</string>
+					<string>544.ImportedFromIB2</string>
+					<string>545.IBPluginDependency</string>
+					<string>545.ImportedFromIB2</string>
+					<string>56.IBPluginDependency</string>
+					<string>56.ImportedFromIB2</string>
+					<string>57.IBPluginDependency</string>
+					<string>57.ImportedFromIB2</string>
+					<string>573.IBPluginDependency</string>
+					<string>573.ImportedFromIB2</string>
+					<string>574.IBPluginDependency</string>
+					<string>574.ImportedFromIB2</string>
+					<string>575.IBPluginDependency</string>
+					<string>575.ImportedFromIB2</string>
+					<string>58.IBPluginDependency</string>
+					<string>58.ImportedFromIB2</string>
+					<string>92.IBPluginDependency</string>
+					<string>92.ImportedFromIB2</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<reference ref="874199827"/>
+					<reference ref="874199827"/>
+					<reference ref="874199827"/>
+					<integer value="1" id="5"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="5"/>
+					<reference ref="5"/>
+					<string>{3.40282e+38, 3.40282e+38}</string>
+					<string>{213, 107}</string>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="5"/>
+					<reference ref="5"/>
+					<string>{3.40282e+38, 3.40282e+38}</string>
+					<string>{213, 107}</string>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+					<reference ref="874199827"/>
+					<reference ref="5"/>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">300295</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSFormatter</string>
+					<nil key="superclassName"/>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey" id="3826605">IBUserSource</string>
+						<string key="minorKey" id="25614681"/>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">FirstResponder</string>
+					<nil key="superclassName"/>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSMutableArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>alignCenter:</string>
+							<string>alignJustified:</string>
+							<string>alignLeft:</string>
+							<string>alignRight:</string>
+							<string>arrangeInFront:</string>
+							<string>centerSelectionInVisibleArea:</string>
+							<string>changeFont:</string>
+							<string>checkSpelling:</string>
+							<string>clear:</string>
+							<string>clearRecentDocuments:</string>
+							<string>complete:</string>
+							<string>copy:</string>
+							<string>copyFont:</string>
+							<string>copyRuler:</string>
+							<string>cut:</string>
+							<string>delete:</string>
+							<string>deminiaturize:</string>
+							<string>fax:</string>
+							<string>hide:</string>
+							<string>hideOtherApplications:</string>
+							<string>loosenKerning:</string>
+							<string>lowerBaseline:</string>
+							<string>makeKeyAndOrderFront:</string>
+							<string>miniaturize:</string>
+							<string>newDocument:</string>
+							<string>openDocument:</string>
+							<string>orderBack:</string>
+							<string>orderFront:</string>
+							<string>orderFrontColorPanel:</string>
+							<string>orderFrontHelpPanel:</string>
+							<string>orderOut:</string>
+							<string>outline:</string>
+							<string>paste:</string>
+							<string>pasteAsPlainText:</string>
+							<string>pasteAsRichText:</string>
+							<string>pasteFont:</string>
+							<string>pasteRuler:</string>
+							<string>pause:</string>
+							<string>performClose:</string>
+							<string>performFindPanelAction:</string>
+							<string>performMiniaturize:</string>
+							<string>performZoom:</string>
+							<string>play:</string>
+							<string>print:</string>
+							<string>printDocument:</string>
+							<string>raiseBaseline:</string>
+							<string>record:</string>
+							<string>redo:</string>
+							<string>resume:</string>
+							<string>revertDocumentToSaved:</string>
+							<string>run:</string>
+							<string>runPageLayout:</string>
+							<string>runToolbarCustomizationPalette:</string>
+							<string>saveAllDocuments:</string>
+							<string>saveDocument:</string>
+							<string>saveDocumentAs:</string>
+							<string>saveDocumentTo:</string>
+							<string>selectAll:</string>
+							<string>selectText:</string>
+							<string>showGuessPanel:</string>
+							<string>showHelp:</string>
+							<string>start:</string>
+							<string>startSpeaking:</string>
+							<string>stop:</string>
+							<string>stopSpeaking:</string>
+							<string>subscript:</string>
+							<string>superscript:</string>
+							<string>terminate:</string>
+							<string>tightenKerning:</string>
+							<string>toggleContinuousSpellChecking:</string>
+							<string>toggleRuler:</string>
+							<string>toggleToolbarShown:</string>
+							<string>turnOffKerning:</string>
+							<string>turnOffLigatures:</string>
+							<string>underline:</string>
+							<string>undo:</string>
+							<string>unhideAllApplications:</string>
+							<string>unscript:</string>
+							<string>useAllLigatures:</string>
+							<string>useStandardKerning:</string>
+							<string>useStandardLigatures:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string id="663201829">id</string>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<reference key="majorKey" ref="3826605"/>
+						<reference key="minorKey" ref="25614681"/>
+					</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>toggle_fullscreen:</string>
+							<string>x11_help:</string>
+							<string>zoom_window:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+						</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>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>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>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+							<reference ref="663201829"/>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<reference key="majorKey" ref="3826605"/>
+						<reference key="minorKey" ref="25614681"/>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<object class="NSMutableData" key="IBDocument.RunnableNib">
+			<bytes key="NS.bytes">YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQkdG9wWSRhcmNoaXZlclgkb2JqZWN0cxIA
+AYag0QAHAAhdSUIub2JqZWN0ZGF0YYABXxAPTlNLZXllZEFyY2hpdmVyrxEDKQALAAwAMQA1ADkAQABD
+AEQASABMAIYAjACcAKEAogCjAKgAqQCqAK0AsQCyALUAtgC6AMAAzgDUANUA7wDwAPgA+QD8AQABAQEE
+A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pcGlzaXVpeml9aYBp
+gmmFaYdpimmNaZBpk2mYaZppn2miaaVpqGmraa5ps2m1abhpu2nAacNpxmnJacxpz2nRadRp1mnZadtp
+3mnhaeNp5Wnnaepp72nyafVp+Gn9agJqBWoIagtqEGoTahVqF2oaah1qIGoiaiVqKmotajJqNWo3ajpq
+PWo/akJqRWpIaktqTWpPalRqV2paal1qYGpjamVqaGptanBqdWp4anpqf2qCaoRqhmqPapFqkmqbap5q
+n2qoaqtqrGq1aroAAAAAAAACAgAAAAAAAAy5AAAAAAAAAAAAAAAAAABqyQ</bytes>
+		</object>
+	</data>
+</archive>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/info.nib b/hw/xquartz/bundle/English.lproj/main.nib/info.nib
deleted file mode 100644
index 88bc626..0000000
--- a/hw/xquartz/bundle/English.lproj/main.nib/info.nib
+++ /dev/null
@@ -1,18 +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>IBFramework Version</key>
-	<string>588</string>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>244</integer>
-		<integer>29</integer>
-		<integer>423</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>9A356</string>
-	<key>targetFramework</key>
-	<string>IBCocoaFramework</string>
-</dict>
-</plist>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index 8b31450..194f4df 100644
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib differ
commit 7018f280406eb0ef899a4046de274cfdd582881b
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Thu Feb 7 15:48:04 2008 +1030

    xkb: when copying the keymap, make sure the structs default to 0/NULL.
    
    It actually does help if a pointer is NULL rather than pointing to nirvana
    when you're trying to free it lateron. Who would have thought?

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 9f813e5..3cedf82 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1730,9 +1730,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
         else {
             if (dst->geom->sz_shapes) {
                 xfree(dst->geom->shapes);
-                dst->geom->shapes = NULL;
             }
-            
+            dst->geom->shapes = NULL;
             dst->geom->num_shapes = 0;
             dst->geom->sz_shapes = 0;
         }
@@ -1781,6 +1780,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             }
 
             dst->geom->num_sections = 0;
+            dst->geom->sections = NULL;
         }
 
         if (src->geom->num_sections) {
@@ -1792,6 +1792,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                 tmp = xalloc(src->geom->num_sections * sizeof(XkbSectionRec));
             if (!tmp)
                 return FALSE;
+            memset(tmp, 0, src->geom->num_sections * sizeof(XkbSectionRec));
             dst->geom->sections = tmp;
             dst->geom->num_sections = src->geom->num_sections;
 
@@ -1828,6 +1829,10 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                         return FALSE;
                     dsection->doodads = tmp;
                 }
+                else {
+                    dsection->doodads = NULL;
+                }
+
                 for (k = 0,
                       sdoodad = ssection->doodads,
                       ddoodad = dsection->doodads;
@@ -1855,9 +1860,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
         else {
             if (dst->geom->sz_sections) {
                 xfree(dst->geom->sections);
-                dst->geom->sections = NULL;
             }
 
+            dst->geom->sections = NULL;
             dst->geom->num_sections = 0;
             dst->geom->sz_sections = 0;
         }
@@ -1886,6 +1891,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                     }
                 }
             }
+            dst->geom->num_doodads = 0;
+            dst->geom->doodads = NULL;
         }
 
         if (src->geom->num_doodads) {
@@ -1898,7 +1905,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                               sizeof(XkbDoodadRec));
             if (!tmp)
                 return FALSE;
-            bzero(tmp, src->geom->num_doodads * sizeof(XkbDoodadRec));
+            memset(tmp, 0, src->geom->num_doodads * sizeof(XkbDoodadRec));
             dst->geom->doodads = tmp;
 
             dst->geom->sz_doodads = src->geom->num_doodads;
@@ -1927,9 +1934,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
         else {
             if (dst->geom->sz_doodads) {
                 xfree(dst->geom->doodads);
-                dst->geom->doodads = NULL;
             }
 
+            dst->geom->doodads = NULL;
             dst->geom->num_doodads = 0;
             dst->geom->sz_doodads = 0;
         }
@@ -1957,10 +1964,10 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             dst->geom->num_key_aliases = dst->geom->sz_key_aliases;
         }
         else {
-            if (dst->geom->sz_key_aliases && dst->geom->key_aliases) {
+            if (dst->geom->key_aliases) {
                 xfree(dst->geom->key_aliases);
-                dst->geom->key_aliases = NULL;
             }
+            dst->geom->key_aliases = NULL;
             dst->geom->num_key_aliases = 0;
             dst->geom->sz_key_aliases = 0;
         }
@@ -1991,8 +1998,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
         else {
             if (dst->geom->label_font) {
                 xfree(dst->geom->label_font);
-                dst->geom->label_font = NULL;
             }
+            dst->geom->label_font = NULL;
             dst->geom->label_color = NULL;
             dst->geom->base_color = NULL;
         }
commit 66f8001b61d12eaf4905ac71ccbb3f304914d00d
Author: Bart Trojanowski <bart at symbio-technologies.com>
Date:   Thu Feb 7 21:26:54 2008 -0500

    X86EMU: handle CPUID instruction
    
    After trying to switch from X to VT (or just quit) the video-amd driver
    attempts to issue INT 10/0 to go to mode 3 (VGA).  The emulator, running
    the BIOS code, would then spit out:
    
            c000:0282: A2 ILLEGAL EXTENDED X86 OPCODE!
    
    The opcode was 0F A2, or CPUID; it was not implemented in the emulator.
    This simple patch, against 1.3.0.0, handles the CPUID instruction in one of
    two ways:
     1) if ran on __i386__ or __x86_64__ then it calls the CPUID instruction
         directly.
     2) if ran elsewhere it returns a canned 486dx4 set of values for
         function 1.
    
    This fix allows the video-amd driver to switch back to console mode,
    with the GSW BIOS.
    
    Thanks to Symbio Technologies for funding my work, and ThinCan for
    providing hardware :)
    
    Signed-off-by: Bart Trojanowski <bart at jukie.net>
    Acked-by: Eric Anholt <eric at anholt.net>

diff --git a/hw/xfree86/x86emu/ops2.c b/hw/xfree86/x86emu/ops2.c
index 8c6c535..324de8a 100644
--- a/hw/xfree86/x86emu/ops2.c
+++ b/hw/xfree86/x86emu/ops2.c
@@ -328,6 +328,20 @@ static void x86emuOp2_pop_FS(u8 X86EMU_UNUSED(op2))
 }
 
 /****************************************************************************
+REMARKS: CPUID takes EAX/ECX as inputs, writes EAX/EBX/ECX/EDX as output
+Handles opcode 0x0f,0xa2
+****************************************************************************/
+static void x86emuOp2_cpuid(u8 X86EMU_UNUSED(op2))
+{
+    START_OF_INSTR();
+    DECODE_PRINTF("CPUID\n");
+    TRACE_AND_STEP();
+    cpuid();
+    DECODE_CLEAR_SEGOVR();
+    END_OF_INSTR();
+}
+
+/****************************************************************************
 REMARKS:
 Handles opcode 0x0f,0xa3
 ****************************************************************************/
@@ -2734,7 +2748,7 @@ void (*x86emu_optab2[256])(u8) =
 
 /*  0xa0 */ x86emuOp2_push_FS,
 /*  0xa1 */ x86emuOp2_pop_FS,
-/*  0xa2 */ x86emuOp2_illegal_op,
+/*  0xa2 */ x86emuOp2_cpuid,
 /*  0xa3 */ x86emuOp2_bt_R,
 /*  0xa4 */ x86emuOp2_shld_IMM,
 /*  0xa5 */ x86emuOp2_shld_CL,
diff --git a/hw/xfree86/x86emu/prim_ops.c b/hw/xfree86/x86emu/prim_ops.c
index b9e7257..b42cdc0 100644
--- a/hw/xfree86/x86emu/prim_ops.c
+++ b/hw/xfree86/x86emu/prim_ops.c
@@ -102,6 +102,12 @@
 #define	PRIM_OPS_NO_REDEFINE_ASM
 #include "x86emu/x86emui.h"
 
+#if defined(__GNUC__)
+# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__)
+#  include "x86emu/prim_x86_gcc.h"
+# endif
+#endif
+
 /*------------------------- Global Variables ------------------------------*/
 
 static u32 x86emu_parity_tab[8] =
@@ -2654,3 +2660,63 @@ DB(	if (CHECK_SP_ACCESS())
     return res;
 }
 
+/****************************************************************************
+REMARKS:
+CPUID takes EAX/ECX as inputs, writes EAX/EBX/ECX/EDX as output
+****************************************************************************/
+void cpuid (void)
+{
+    u32 feature = M.x86.R_EAX;
+
+#ifdef X86EMU_HAS_HW_CPUID
+    /* If the platform allows it, we will base our values on the real
+     * results from the CPUID instruction.  We limit support to the
+     * first two features, and the results of those are sanitized.
+     */
+    if (feature <= 1)
+	hw_cpuid(&M.x86.R_EAX, &M.x86.R_EBX, &M.x86.R_ECX, &M.x86.R_EDX);
+#endif
+
+    switch (feature) {
+    case 0:
+        /* Regardless if we have real data from the hardware, the emulator
+	 * will only support upto feature 1, which we set in register EAX.
+	 * Registers EBX:EDX:ECX contain a string identifying the CPU.
+	 */
+        M.x86.R_EAX = 1;
+#ifndef X86EMU_HAS_HW_CPUID
+        /* EBX:EDX:ECX = "GenuineIntel" */
+        M.x86.R_EBX = 0x756e6547;
+        M.x86.R_EDX = 0x49656e69;
+        M.x86.R_ECX = 0x6c65746e;
+#endif
+        break;
+    case 1:
+#ifndef X86EMU_HAS_HW_CPUID
+        /* If we don't have x86 compatible hardware, we return values from an
+	 * Intel 486dx4; which was one of the first processors to have CPUID.
+	 */
+        M.x86.R_EAX = 0x00000480;
+        M.x86.R_EBX = 0x00000000;
+        M.x86.R_ECX = 0x00000000;
+        M.x86.R_EDX = 0x00000002;	/* VME */
+#else
+        /* In the case that we have hardware CPUID instruction, we make sure
+	 * that the features reported are limited to TSC and VME.
+	 */
+        M.x86.R_EDX &= 0x00000012;
+#endif
+        break;
+    default:
+        /* Finally, we don't support any additional features.  Most CPUs
+	 * return all zeros when queried for invalid or unsupported feature
+	 * numbers.
+	 */
+        M.x86.R_EAX = 0;
+        M.x86.R_EBX = 0;
+        M.x86.R_ECX = 0;
+        M.x86.R_EDX = 0;
+        break;
+    }
+}
+
diff --git a/hw/xfree86/x86emu/x86emu/prim_ops.h b/hw/xfree86/x86emu/x86emu/prim_ops.h
index bea8357..6ac2a29 100644
--- a/hw/xfree86/x86emu/x86emu/prim_ops.h
+++ b/hw/xfree86/x86emu/x86emu/prim_ops.h
@@ -133,6 +133,7 @@ void    push_word (u16 w);
 void    push_long (u32 w);
 u16     pop_word (void);
 u32		pop_long (void);
+void    cpuid (void);
 
 #ifdef  __cplusplus
 }                       			/* End of "C" linkage for C++   	*/
diff --git a/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h
new file mode 100644
index 0000000..af61e20
--- /dev/null
+++ b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+*
+* Inline helpers for x86emu
+*
+* Copyright (C) 2008 Bart Trojanowski, Symbio Technologies, LLC
+*
+*  ========================================================================
+*
+*  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 the authors not be used
+*  in advertising or publicity pertaining to distribution of the software
+*  without specific, written prior permission.  The authors makes no
+*  representations about the suitability of this software for any purpose.
+*  It is provided "as is" without express or implied warranty.
+*
+*  THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+*  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+*  EVENT SHALL THE AUTHORS 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.
+*
+*  ========================================================================
+*
+* Language:     GNU C
+* Environment:  GCC on i386 or x86-64
+* Developer:    Bart Trojanowski
+*
+* Description:  This file defines a few x86 macros that can be used by the
+*               emulator to execute native instructions.
+*
+*               For PIC vs non-PIC code refer to:
+*               http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inline-assembly-and-pic-mix-well
+*
+****************************************************************************/
+#ifndef __X86EMU_PRIM_X86_GCC_H
+#define __X86EMU_PRIM_X86_GCC_H
+
+#include "x86emu/types.h"
+
+#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__))
+#error This file is intended to be used by gcc on i386 or x86-64 system
+#endif
+
+#if defined(__PIC__) && defined(__i386__)
+
+#define X86EMU_HAS_HW_CPUID 1
+static inline void hw_cpuid (u32 *a, u32 *b, u32 *c, u32 *d)
+{
+    __asm__ __volatile__ ("pushl %%ebx      \n\t"
+                          "cpuid            \n\t"
+                          "movl %%ebx, %1   \n\t"
+                          "popl %%ebx       \n\t"
+                          : "=a" (*a), "=r" (*b),
+                            "=c" (*c), "=d" (*d)
+                          : "a" (*a), "c" (*c)
+                          : "cc");
+}
+
+#else // ! (__PIC__ && __i386__)
+
+#define x86EMU_HAS_HW_CPUID 1
+static inline void hw_cpuid (u32 *a, u32 *b, u32 *c, u32 *d)
+{
+    __asm__ __volatile__ ("cpuid"
+                          : "=a" (*a), "=b" (*b),
+                            "=c" (*c), "=d" (*d)
+                          : "a" (*a), "c" (*c)
+                          : "cc");
+}
+
+#endif // __PIC__ && __i386__
+
+
+#endif // __X86EMU_PRIM_X86_GCC_H
commit de16a8c53046764dbdf26a87acc5c984ef00d818
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 7 20:14:16 2008 -0500

    XACE: Correct some protocol error values in the colormap routines.

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 663bf7d..0bca441 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -2537,7 +2537,7 @@ ProcFreeColormap(ClientPtr client)
     else 
     {
 	client->errorValue = stuff->id;
-	return rc;
+	return (rc == BadValue) ? BadColor : rc;
     }
 }
 
@@ -2566,7 +2566,7 @@ ProcCopyColormapAndFree(ClientPtr client)
     else
     {
 	client->errorValue = stuff->srcCmap;
-	return rc;
+	return (rc == BadValue) ? BadColor : rc;
     }
 }
 
@@ -2658,7 +2658,7 @@ ProcListInstalledColormaps(ClientPtr client)
     xfree(preply);
     rc = client->noClientException;
 out:
-    return (rc == BadValue) ? BadColor : rc;
+    return rc;
 }
 
 int
commit 31934132a490b1b8ae73010c44e0b23217d8dab2
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 7 16:32:06 2008 -0500

    xselinux: Use the device name in debugging output.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 60f0cc8..9acc93c 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -92,6 +92,7 @@ static int audit_fd;
 /* structure passed to auditing callback */
 typedef struct {
     ClientPtr client;	/* client */
+    DeviceIntPtr dev;	/* device */
     char *command;	/* client's executable path */
     unsigned id;	/* resource id, if any */
     int restype;	/* resource type, if any */
@@ -461,11 +462,15 @@ SELinuxAudit(void *auditdata,
     propertyName = audit->property ? NameForAtom(audit->property) : NULL;
     selectionName = audit->selection ? NameForAtom(audit->selection) : NULL;
 
-    return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+    return snprintf(msgbuf, msgbufsize,
+		    "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 		    (major >= 0) ? "request=" : "",
 		    (major >= 0) ? LookupRequestName(major, minor) : "",
 		    audit->command ? " comm=" : "",
 		    audit->command ? audit->command : "",
+		    audit->dev ? " xdevice=\"" : "",
+		    audit->dev ? audit->dev->name : "",
+		    audit->dev ? "\"" : "",
 		    audit->id ? " resid=" : "",
 		    audit->id ? idNum : "",
 		    audit->restype ? " restype=" : "",
@@ -504,7 +509,7 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     XaceDeviceAccessRec *rec = calldata;
     SELinuxSubjectRec *subj;
     SELinuxObjectRec *obj;
-    SELinuxAuditRec auditdata = { .client = rec->client };
+    SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev };
     int rc;
 
     subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
@@ -537,7 +542,7 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     XaceSendAccessRec *rec = calldata;
     SELinuxSubjectRec *subj;
     SELinuxObjectRec *obj, ev_sid;
-    SELinuxAuditRec auditdata = { .client = rec->client };
+    SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev };
     security_class_t class;
     int rc, i, type;
 
commit 6dcb7d732bfeadc214228d68c5a13eef30248eb1
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 7 16:00:52 2008 -0500

    xselinux: Split devPrivate state into subject and object records.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index c7ab8d0..60f0cc8 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -61,7 +61,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /* private state record */
-static DevPrivateKey stateKey = &stateKey;
+static DevPrivateKey subjectKey = &subjectKey;
+static DevPrivateKey objectKey = &objectKey;
 
 /* This is what we store for security state */
 typedef struct {
@@ -69,7 +70,12 @@ typedef struct {
     struct avc_entry_ref aeref;
     char *command;
     int privileged;
-} SELinuxStateRec;
+} SELinuxSubjectRec;
+
+typedef struct {
+    security_id_t sid;
+    int poly;
+} SELinuxObjectRec;
 
 /* selection manager */
 typedef struct {
@@ -155,7 +161,7 @@ static pointer truep = (pointer)1;
  * Looks up the SID corresponding to the given selection atom
  */
 static int
-SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return)
+SELinuxSelectionToSID(Atom selection, SELinuxObjectRec *sid_return)
 {
     const char *name;
     unsigned i, size;
@@ -202,7 +208,7 @@ SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return)
  */
 static int
 SELinuxEventToSID(unsigned type, security_id_t sid_of_window,
-		  SELinuxStateRec *sid_return)
+		  SELinuxObjectRec *sid_return)
 {
     const char *name = LookupEventName(type);
     security_context_t con;
@@ -293,7 +299,7 @@ SELinuxTypeToClass(RESTYPE type)
  * Performs an SELinux permission check.
  */
 static int
-SELinuxDoCheck(SELinuxStateRec *subj, SELinuxStateRec *obj,
+SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj,
 	       security_class_t class, Mask mode, SELinuxAuditRec *auditdata)
 {
     /* serverClient requests OK */
@@ -321,11 +327,14 @@ static void
 SELinuxLabelClient(ClientPtr client)
 {
     XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn;
-    SELinuxStateRec *state;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     security_context_t ctx;
 
-    state = dixLookupPrivate(&client->devPrivates, stateKey);
-    sidput(state->sid);
+    subj = dixLookupPrivate(&client->devPrivates, subjectKey);
+    sidput(subj->sid);
+    obj = dixLookupPrivate(&client->devPrivates, objectKey);
+    sidput(obj->sid);
 
     if (_XSERVTransIsLocal(ci)) {
 	int fd = _XSERVTransGetConnectionNumber(ci);
@@ -354,12 +363,12 @@ SELinuxLabelClient(ClientPtr client)
 	if (bytes <= 0)
 	    goto finish;
 
-	state->command = xalloc(bytes);
-	if (!state->command)
+	subj->command = xalloc(bytes);
+	if (!subj->command)
 	    goto finish;
 
-	memcpy(state->command, path, bytes);
-	state->command[bytes - 1] = 0;
+	memcpy(subj->command, path, bytes);
+	subj->command[bytes - 1] = 0;
     } else
 	/* For remote clients, need to use a default context */
 	if (selabel_lookup(label_hnd, &ctx, NULL, SELABEL_X_CLIENT) < 0)
@@ -368,10 +377,12 @@ SELinuxLabelClient(ClientPtr client)
 
 finish:
     /* Get a SID from the context */
-    if (avc_context_to_sid(ctx, &state->sid) < 0)
+    if (avc_context_to_sid(ctx, &subj->sid) < 0)
 	FatalError("Client %d: context_to_sid(%s) failed\n",
 		   client->index, ctx);
 
+    sidget(subj->sid);
+    obj->sid = subj->sid;
     freecon(ctx);
 }
 
@@ -383,23 +394,27 @@ SELinuxLabelInitial(void)
 {
     int i;
     XaceScreenAccessRec srec;
-    SELinuxStateRec *state;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     security_context_t ctx;
     pointer unused;
 
     /* Do the serverClient */
-    state = dixLookupPrivate(&serverClient->devPrivates, stateKey);
-    state->privileged = 1;
-    sidput(state->sid);
+    subj = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&serverClient->devPrivates, objectKey);
+    subj->privileged = 1;
+    sidput(subj->sid);
 
     /* Use the context of the X server process for the serverClient */
     if (getcon(&ctx) < 0)
 	FatalError("Couldn't get context of X server process\n");
 
     /* Get a SID from the context */
-    if (avc_context_to_sid(ctx, &state->sid) < 0)
+    if (avc_context_to_sid(ctx, &subj->sid) < 0)
 	FatalError("serverClient: context_to_sid(%s) failed\n", ctx);
 
+    sidget(subj->sid);
+    obj->sid = subj->sid;
     freecon(ctx);
 
     srec.client = serverClient;
@@ -487,20 +502,27 @@ static void
 SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceDeviceAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
     int rc;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
-    obj = dixLookupPrivate(&rec->dev->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey);
 
     /* If this is a new object that needs labeling, do it now */
     if (rec->access_mode & DixCreateAccess) {
+	SELinuxSubjectRec *dsubj;
+	dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
+
+	sidput(dsubj->sid);
 	sidput(obj->sid);
 
 	/* Label the device directly with the process SID */
 	sidget(subj->sid);
 	obj->sid = subj->sid;
+	sidget(subj->sid);
+	dsubj->sid = subj->sid;
     }
 
     rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DEVICE, rec->access_mode,
@@ -513,17 +535,18 @@ static void
 SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceSendAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj, ev_sid;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj, ev_sid;
     SELinuxAuditRec auditdata = { .client = rec->client };
     security_class_t class;
     int rc, i, type;
 
     if (rec->dev)
-	subj = dixLookupPrivate(&rec->dev->devPrivates, stateKey);
+	subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
     else
-	subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
+	subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
 
-    obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey);
+    obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
 
     /* Check send permission on window */
     rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess,
@@ -554,13 +577,14 @@ static void
 SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceReceiveAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj, ev_sid;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj, ev_sid;
     SELinuxAuditRec auditdata = { .client = NULL };
     security_class_t class;
     int rc, i, type;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
-    obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
 
     /* Check receive permission on window */
     rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess,
@@ -591,12 +615,13 @@ static void
 SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceExtAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj, *serv;
+    SELinuxSubjectRec *subj, *serv;
+    SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
     int rc;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
-    obj = dixLookupPrivate(&rec->ext->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey);
 
     /* If this is a new object that needs labeling, do it now */
     /* XXX there should be a separate callback for this */
@@ -605,9 +630,9 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	security_context_t con;
 	security_id_t sid;
 
-	serv = dixLookupPrivate(&serverClient->devPrivates, stateKey);
+	serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
 
-	/* Look in the mappings of property names to contexts */
+	/* Look in the mappings of extension names to contexts */
 	if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EXT) < 0) {
 	    ErrorF("SELinux: a property label lookup failed!\n");
 	    rec->status = BadValue;
@@ -645,12 +670,13 @@ static void
 SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XacePropertyAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
     int rc;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
-    obj = dixLookupPrivate(&rec->pProp->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&rec->pProp->devPrivates, objectKey);
 
     /* If this is a new object that needs labeling, do it now */
     if (rec->access_mode & DixCreateAccess) {
@@ -696,13 +722,15 @@ static void
 SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceResourceAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj, *pobj;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj, *sobj, *pobj;
     SELinuxAuditRec auditdata = { .client = rec->client };
     PrivateRec **privatePtr;
     security_class_t class;
     int rc, offset;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    sobj = dixLookupPrivate(&rec->client->devPrivates, objectKey);
 
     /* Determine if the resource object has a devPrivates field */
     offset = dixLookupPrivateOffset(rec->rtype);
@@ -710,12 +738,12 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	/* No: use the SID of the owning client */
 	class = SECCLASS_X_RESOURCE;
 	privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates;
-	obj = dixLookupPrivate(privatePtr, stateKey);
+	obj = dixLookupPrivate(privatePtr, objectKey);
     } else {
 	/* Yes: use the SID from the resource object itself */
 	class = SELinuxTypeToClass(rec->rtype);
 	privatePtr = DEVPRIV_AT(rec->res, offset);
-	obj = dixLookupPrivate(privatePtr, stateKey);
+	obj = dixLookupPrivate(privatePtr, objectKey);
     }
 
     /* If this is a new object that needs labeling, do it now */
@@ -724,10 +752,10 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	    offset = dixLookupPrivateOffset(rec->ptype);
 	if (rec->parent && offset >= 0)
 	    /* Use the SID of the parent object in the labeling operation */
-	    pobj = dixLookupPrivate(DEVPRIV_AT(rec->parent, offset), stateKey);
+	    pobj = dixLookupPrivate(DEVPRIV_AT(rec->parent, offset), objectKey);
 	else
 	    /* Use the SID of the subject */
-	    pobj = subj;
+	    pobj = sobj;
 
 	sidput(obj->sid);
 
@@ -751,13 +779,14 @@ static void
 SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata)
 {
     XaceScreenAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
     Mask access_mode = rec->access_mode;
     int rc;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
-    obj = dixLookupPrivate(&rec->screen->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey);
 
     /* If this is a new object that needs labeling, do it now */
     if (access_mode & DixCreateAccess) {
@@ -784,12 +813,13 @@ static void
 SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceClientAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
     int rc;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
-    obj = dixLookupPrivate(&rec->target->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&rec->target->devPrivates, objectKey);
 
     rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode,
 			&auditdata);
@@ -801,12 +831,13 @@ static void
 SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceServerAccessRec *rec = calldata;
-    SELinuxStateRec *subj, *obj;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     SELinuxAuditRec auditdata = { .client = rec->client };
     int rc;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
-    obj = dixLookupPrivate(&serverClient->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+    obj = dixLookupPrivate(&serverClient->devPrivates, objectKey);
 
     rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode,
 			&auditdata);
@@ -818,11 +849,12 @@ static void
 SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     XaceSelectionAccessRec *rec = (XaceSelectionAccessRec *)calldata;
-    SELinuxStateRec *subj, sel_sid;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec sel_sid;
     SELinuxAuditRec auditdata = { .client = rec->client };
     int rc;
 
-    subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
+    subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
 
     rc = SELinuxSelectionToSID(rec->name, &sel_sid);
     if (rc != Success) {
@@ -869,18 +901,19 @@ static void
 SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     ResourceStateInfoRec *rec = calldata;
-    SELinuxStateRec *state;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     WindowPtr pWin;
 
     if (rec->type != RT_WINDOW)
 	return;
 
     pWin = (WindowPtr)rec->value;
-    state = dixLookupPrivate(&wClient(pWin)->devPrivates, stateKey);
+    subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey);
 
-    if (state->sid) {
+    if (subj->sid) {
 	security_context_t ctx;
-	int rc = avc_sid_to_context(state->sid, &ctx);
+	int rc = avc_sid_to_context(subj->sid, &ctx);
 	if (rc < 0)
 	    FatalError("SELinux: Failed to get security context!\n");
 	rc = dixChangeWindowProperty(serverClient,
@@ -892,11 +925,11 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
     } else
 	FatalError("SELinux: Unexpected unlabeled client found\n");
 
-    state = dixLookupPrivate(&pWin->devPrivates, stateKey);
+    obj = dixLookupPrivate(&pWin->devPrivates, objectKey);
 
-    if (state->sid) {
+    if (obj->sid) {
 	security_context_t ctx;
-	int rc = avc_sid_to_context(state->sid, &ctx);
+	int rc = avc_sid_to_context(obj->sid, &ctx);
 	if (rc < 0)
 	    FatalError("SELinux: Failed to get security context!\n");
 	rc = dixChangeWindowProperty(serverClient,
@@ -913,7 +946,8 @@ static void
 SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     SelectionInfoRec *rec = calldata;
-    SELinuxStateRec *subj, *obj;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
 
     switch (rec->kind) {
     case SelectionSetOwner:
@@ -922,8 +956,8 @@ SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 	rec->selection->alt_window = rec->selection->window;
 
 	/* figure out the new label for the content */
-	subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
-	obj = dixLookupPrivate(&rec->selection->devPrivates, stateKey);
+	subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
+	obj = dixLookupPrivate(&rec->selection->devPrivates, objectKey);
 	sidput(obj->sid);
 
 	if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SELECTION,
@@ -959,27 +993,47 @@ SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
  */
 
 static void
-SELinuxStateInit(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+SELinuxSubjectInit(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     PrivateCallbackRec *rec = calldata;
-    SELinuxStateRec *state = *rec->value;
+    SELinuxSubjectRec *subj = *rec->value;
 
     sidget(unlabeled_sid);
-    state->sid = unlabeled_sid;
+    subj->sid = unlabeled_sid;
+
+    avc_entry_ref_init(&subj->aeref);
+}
+
+static void
+SELinuxSubjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+    PrivateCallbackRec *rec = calldata;
+    SELinuxSubjectRec *subj = *rec->value;
+
+    xfree(subj->command);
 
-    avc_entry_ref_init(&state->aeref);
+    if (avc_active)
+	sidput(subj->sid);
 }
 
 static void
-SELinuxStateFree(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+SELinuxObjectInit(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     PrivateCallbackRec *rec = calldata;
-    SELinuxStateRec *state = *rec->value;
+    SELinuxObjectRec *obj = *rec->value;
 
-    xfree(state->command);
+    sidget(unlabeled_sid);
+    obj->sid = unlabeled_sid;
+}
+
+static void
+SELinuxObjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+    PrivateCallbackRec *rec = calldata;
+    SELinuxObjectRec *obj = *rec->value;
 
     if (avc_active)
-	sidput(state->sid);
+	sidput(obj->sid);
 }
 
 
@@ -1070,7 +1124,8 @@ ProcSELinuxSetDeviceContext(ClientPtr client)
     char *ctx;
     security_id_t sid;
     DeviceIntPtr dev;
-    SELinuxStateRec *state;
+    SELinuxSubjectRec *subj;
+    SELinuxObjectRec *obj;
     int rc;
 
     REQUEST(SELinuxSetContextReq);
@@ -1088,9 +1143,13 @@ ProcSELinuxSetDeviceContext(ClientPtr client)
     if (rc != Success)
 	return BadValue;
 
-    state = dixLookupPrivate(&dev->devPrivates, stateKey);
-    sidput(state->sid);
-    state->sid = sid;
+    subj = dixLookupPrivate(&dev->devPrivates, subjectKey);
+    sidput(subj->sid);
+    subj->sid = sid;
+    obj = dixLookupPrivate(&dev->devPrivates, objectKey);
+    sidput(obj->sid);
+    obj->sid = sid;
+
     return Success;
 }
 
@@ -1099,7 +1158,7 @@ ProcSELinuxGetDeviceContext(ClientPtr client)
 {
     char *ctx;
     DeviceIntPtr dev;
-    SELinuxStateRec *state;
+    SELinuxSubjectRec *subj;
     SELinuxGetContextReply rep;
     int rc;
 
@@ -1110,8 +1169,8 @@ ProcSELinuxGetDeviceContext(ClientPtr client)
     if (rc != Success)
 	return rc;
 
-    state = dixLookupPrivate(&dev->devPrivates, stateKey);
-    rc = avc_sid_to_context(state->sid, &ctx);
+    subj = dixLookupPrivate(&dev->devPrivates, subjectKey);
+    rc = avc_sid_to_context(subj->sid, &ctx);
     if (rc != Success)
 	return BadValue;
 
@@ -1151,7 +1210,7 @@ ProcSELinuxGetPropertyContext(ClientPtr client)
     char *ctx;
     WindowPtr pWin;
     PropertyPtr pProp;
-    SELinuxStateRec *state;
+    SELinuxObjectRec *obj;
     SELinuxGetContextReply rep;
     int rc;
 
@@ -1175,8 +1234,8 @@ ProcSELinuxGetPropertyContext(ClientPtr client)
     if (rc != Success)
 	return rc;
 
-    state = dixLookupPrivate(&pProp->devPrivates, stateKey);
-    rc = avc_sid_to_context(state->sid, &ctx);
+    obj = dixLookupPrivate(&pProp->devPrivates, objectKey);
+    rc = avc_sid_to_context(obj->sid, &ctx);
     if (rc != Success)
 	return BadValue;
 
@@ -1215,7 +1274,7 @@ ProcSELinuxGetWindowContext(ClientPtr client)
 {
     char *ctx;
     WindowPtr pWin;
-    SELinuxStateRec *state;
+    SELinuxObjectRec *obj;
     SELinuxGetContextReply rep;
     int rc;
 
@@ -1226,8 +1285,8 @@ ProcSELinuxGetWindowContext(ClientPtr client)
     if (rc != Success)
 	return rc;
 
-    state = dixLookupPrivate(&pWin->devPrivates, stateKey);
-    rc = avc_sid_to_context(state->sid, &ctx);
+    obj = dixLookupPrivate(&pWin->devPrivates, objectKey);
+    rc = avc_sid_to_context(obj->sid, &ctx);
     if (rc != Success)
 	return BadValue;
 
@@ -1521,7 +1580,8 @@ SELinuxExtensionInit(INITARGS)
 	FatalError("SELinux: Failed to open the system audit log\n");
 
     /* Allocate private storage */
-    if (!dixRequestPrivate(stateKey, sizeof(SELinuxStateRec)))
+    if (!dixRequestPrivate(subjectKey, sizeof(SELinuxSubjectRec)) ||
+	!dixRequestPrivate(objectKey, sizeof(SELinuxObjectRec)))
 	FatalError("SELinux: Failed to allocate private storage.\n");
 
     /* Create atoms for doing window labeling */
@@ -1533,8 +1593,10 @@ SELinuxExtensionInit(INITARGS)
 	FatalError("SELinux: Failed to create atom\n");
 
     /* Register callbacks */
-    ret &= dixRegisterPrivateInitFunc(stateKey, SELinuxStateInit, NULL);
-    ret &= dixRegisterPrivateDeleteFunc(stateKey, SELinuxStateFree, NULL);
+    ret &= dixRegisterPrivateInitFunc(subjectKey, SELinuxSubjectInit, NULL);
+    ret &= dixRegisterPrivateDeleteFunc(subjectKey, SELinuxSubjectFree, NULL);
+    ret &= dixRegisterPrivateInitFunc(objectKey, SELinuxObjectInit, NULL);
+    ret &= dixRegisterPrivateDeleteFunc(objectKey, SELinuxObjectFree, NULL);
 
     ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL);
     ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL);
commit 2259b144f0fd4855085a656111a0c64246733e78
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 7 14:35:02 2008 -0500

    xselinux: Add getattr and setattr to the permission map for properties.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index b3d938b..c7ab8d0 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -127,7 +127,7 @@ static struct security_class_mapping map[] = {
     { "x_gc", { "", "", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_font", { "", "", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_glyph", "remove_glyph", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_colormap", { "read", "write", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_color", "remove_color", "", "", "", "", "", "", "install", "uninstall", "", "", "use", NULL }},
-    { "x_property", { "read", "write", "destroy", "create", NULL }},
+    { "x_property", { "read", "write", "destroy", "create", "getattr", "setattr", NULL }},
     { "x_selection", { "read", "", "", "", "getattr", "setattr", NULL }},
     { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }},
     { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }},
commit 5c30327275509576b7848a5f842e7a1bffabe980
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 5 21:06:05 2008 -0500

    XACE: Push the dix "structure" includes down to the security modules.

diff --git a/Xext/security.c b/Xext/security.c
index 6aab3a3..0696559 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -29,6 +29,9 @@ in this Software without prior written authorization from The Open Group.
 #endif
 
 #include "scrnintstr.h"
+#include "inputstr.h"
+#include "windowstr.h"
+#include "propertyst.h"
 #include "colormapst.h"
 #include "privates.h"
 #include "registry.h"
diff --git a/Xext/xace.c b/Xext/xace.c
index 9ffac45..b2c7e4a 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -23,6 +23,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include <stdarg.h>
 #include "scrnintstr.h"
+#include "extnsionst.h"
+#include "pixmapstr.h"
+#include "regionstr.h"
+#include "gcstruct.h"
 #include "xacestr.h"
 
 CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0};
diff --git a/Xext/xace.h b/Xext/xace.h
index 24b9dce..6f1f267 100644
--- a/Xext/xace.h
+++ b/Xext/xace.h
@@ -25,10 +25,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define XACE_MAJOR_VERSION		2
 #define XACE_MINOR_VERSION		0
 
-#include "pixmap.h"     /* for DrawablePtr */
-#include "regionstr.h"  /* for RegionPtr */
-#include "window.h"  /* for WindowPtr */
-#include "property.h" /* for PropertyPtr */
+#include "pixmap.h"
+#include "region.h"
+#include "window.h"
+#include "property.h"
 
 /* Default window background */
 #define XaceBackgroundNoneState		None
diff --git a/Xext/xacestr.h b/Xext/xacestr.h
index 045f836..e31d424 100644
--- a/Xext/xacestr.h
+++ b/Xext/xacestr.h
@@ -20,13 +20,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef _XACESTR_H
 #define _XACESTR_H
 
-#include "dixstruct.h"
+#include "dix.h"
 #include "resource.h"
 #include "extnsionst.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-#include "inputstr.h"
-#include "propertyst.h"
+#include "window.h"
+#include "input.h"
+#include "property.h"
 #include "selection.h"
 #include "xace.h"
 
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 47383a4..b3d938b 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -22,21 +22,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  * All rights reserved.
  */
 
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <sys/socket.h>
+#include <stdio.h>
+#include <stdarg.h>
+
 #include <selinux/selinux.h>
 #include <selinux/label.h>
 #include <selinux/avc.h>
 
 #include <libaudit.h>
 
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
 #include <X11/Xatom.h>
 #include "resource.h"
 #include "privates.h"
 #include "registry.h"
 #include "dixstruct.h"
+#include "inputstr.h"
+#include "windowstr.h"
+#include "propertyst.h"
 #include "extnsionst.h"
 #include "scrnintstr.h"
 #include "selection.h"
@@ -46,8 +53,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define TRANS_SERVER
 #include <X11/Xtrans/Xtrans.h>
 #include "../os/osdep.h"
-#include <stdio.h>
-#include <stdarg.h>
 #include "modinit.h"
 
 
commit bb1a577a6822f781f1e38d2434a13914e74f89aa
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 5 20:07:08 2008 -0500

    XACE: Move the property access hook to its own function.

diff --git a/Xext/xace.c b/Xext/xace.c
index 0470e44..9ffac45 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -51,6 +51,14 @@ int XaceHookDispatch(ClientPtr client, int major)
     }
 }
 
+int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin,
+			   PropertyPtr pProp, Mask access_mode)
+{
+    XacePropertyAccessRec rec = { client, pWin, pProp, access_mode, Success };
+    CallCallbacks(&XaceHooks[XACE_PROPERTY_ACCESS], &rec);
+    return rec.status;
+}
+
 void XaceHookAuditEnd(ClientPtr ptr, int result)
 {
     XaceAuditRec rec = { ptr, result };
@@ -100,18 +108,6 @@ int XaceHook(int hook, ...)
 	    prv = &rec.status;
 	    break;
 	}
-	case XACE_PROPERTY_ACCESS: {
-	    XacePropertyAccessRec rec = {
-		va_arg(ap, ClientPtr),
-		va_arg(ap, WindowPtr),
-		va_arg(ap, PropertyPtr),
-		va_arg(ap, Mask),
-		Success /* default allow */
-	    };
-	    calldata = &rec;
-	    prv = &rec.status;
-	    break;
-	}
 	case XACE_SEND_ACCESS: {
 	    XaceSendAccessRec rec = {
 		va_arg(ap, ClientPtr),
diff --git a/Xext/xace.h b/Xext/xace.h
index 4100ba1..24b9dce 100644
--- a/Xext/xace.h
+++ b/Xext/xace.h
@@ -27,6 +27,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "pixmap.h"     /* for DrawablePtr */
 #include "regionstr.h"  /* for RegionPtr */
+#include "window.h"  /* for WindowPtr */
+#include "property.h" /* for PropertyPtr */
 
 /* Default window background */
 #define XaceBackgroundNoneState		None
@@ -65,6 +67,8 @@ extern int XaceHook(
 /* Special-cased hook functions
  */
 extern int XaceHookDispatch(ClientPtr ptr, int major);
+extern int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin,
+				  PropertyPtr pProp, Mask access_mode);
 extern void XaceHookAuditEnd(ClientPtr ptr, int result);
 
 /* Register a callback for a given hook.
@@ -101,11 +105,13 @@ extern void XaceCensorImage(
 #ifdef __GNUC__
 #define XaceHook(args...) Success
 #define XaceHookDispatch(args...) Success
+#define XaceHookPropertyAccess(args...) Success
 #define XaceHookAuditEnd(args...) { ; }
 #define XaceCensorImage(args...) { ; }
 #else
 #define XaceHook(...) Success
 #define XaceHookDispatch(...) Success
+#define XaceHookPropertyAccess(...) Success
 #define XaceHookAuditEnd(...) { ; }
 #define XaceCensorImage(...) { ; }
 #endif
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index a6e27e6..47383a4 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -1166,7 +1166,7 @@ ProcSELinuxGetPropertyContext(ClientPtr client)
     if (!pProp)
 	return BadValue;
 
-    rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, DixGetAttrAccess);
+    rc = XaceHookPropertyAccess(client, pWin, pProp, DixGetAttrAccess);
     if (rc != Success)
 	return rc;
 
diff --git a/dix/property.c b/dix/property.c
index 3c0eaf1..ce61169 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -156,8 +156,8 @@ ProcRotateProperties(ClientPtr client)
 	    xfree(props);
 	    return BadMatch;
 	}
-	rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp,
-		      DixReadAccess|DixWriteAccess);
+	rc = XaceHookPropertyAccess(client, pWin, pProp,
+				    DixReadAccess|DixWriteAccess);
 	if (rc != Success) {
 	    xfree(props);
 	    client->errorValue = atoms[i];
@@ -276,8 +276,8 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
 	    memmove((char *)data, (char *)value, totalSize);
 	pProp->size = len;
 	pProp->devPrivates = NULL;
-	rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp,
-		      DixCreateAccess|DixWriteAccess);
+	rc = XaceHookPropertyAccess(pClient, pWin, pProp,
+				    DixCreateAccess|DixWriteAccess);
 	if (rc != Success) {
 	    xfree(data);
 	    xfree(pProp);
@@ -289,8 +289,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
     }
     else
     {
-	rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp,
-		      DixWriteAccess);
+	rc = XaceHookPropertyAccess(pClient, pWin, pProp, DixWriteAccess);
 	if (rc != Success) {
 	    pClient->errorValue = property;
 	    return rc;
@@ -382,8 +381,7 @@ DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName)
     }
     if (pProp) 
     {		    
-	rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp,
-		      DixDestroyAccess);
+	rc = XaceHookPropertyAccess(client, pWin, pProp, DixDestroyAccess);
 	if (rc != Success)
 	    return rc;
 
@@ -502,7 +500,7 @@ ProcGetProperty(ClientPtr client)
     if (stuff->delete)
 	access_mode |= DixDestroyAccess;
 
-    rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, access_mode);
+    rc = XaceHookPropertyAccess(client, pWin, pProp, access_mode);
     if (rc != Success) {
 	client->errorValue = stuff->property;
 	return rc;
commit 019ad5acd20e34dc2aa3b89cc426138db5164c48
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 5 15:44:41 2008 -0500

    XFixes: squash a pointer/integer size mismatch warning.

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 1d122fa..d51251f 100755
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -707,7 +707,8 @@ SProcXFixesChangeCursor (ClientPtr client)
 static Bool
 TestForCursorName (CursorPtr pCursor, pointer closure)
 {
-    return (pCursor->name == (Atom) closure);
+    Atom *pName = closure;
+    return (pCursor->name == *pName);
 }
 
 int
@@ -724,7 +725,7 @@ ProcXFixesChangeCursorByName (ClientPtr client)
     tchar = (char *) &stuff[1];
     name = MakeAtom (tchar, stuff->nbytes, FALSE);
     if (name)
-	ReplaceCursor (pSource, TestForCursorName, (pointer) name);
+	ReplaceCursor (pSource, TestForCursorName, &name);
     return (client->noClientException);
 }
 
commit d3c36fe721edc55636438bc3e0e7a6c03f62784e
Author: liuhong <liuhong at devlinux-hong.sh.intel.com>
Date:   Tue Feb 5 10:54:58 2008 +0800

    validate mode clock for probed modes
    
    Some modes claimed in monitor EDID data may not be supported by
    the monitor. So also validating the max clock for probed modes.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index da035f2..4ecf4b3 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1410,9 +1410,12 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 	/*
 	 * Check default modes against monitor max clock
 	 */
-	if (max_clock)
+	if (max_clock) {
 	    xf86ValidateModesClocks(scrn, default_modes,
 				    &min_clock, &max_clock, 1);
+	    xf86ValidateModesClocks(scrn, output_modes,
+				    &min_clock, &max_clock, 1);
+	}
 	
 	output->probed_modes = NULL;
 	output->probed_modes = xf86ModesAdd (output->probed_modes, config_modes);
commit 4b5b6e7baab58072a983d2ec136965f404c3a74a
Author: liuhong <liuhong at devlinux-hong.sh.intel.com>
Date:   Tue Feb 5 10:54:10 2008 +0800

    fix max clock unit
    
    max clock from EDID data is in MHz, while we need KHz to validate modes.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 10db862..da035f2 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1362,8 +1362,8 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 			if (sync_source == sync_default)
 			    sync_source = sync_edid;
 		    }
-		    if (ranges->max_clock > max_clock)
-			max_clock = ranges->max_clock;
+		    if (ranges->max_clock * 1000 > max_clock)
+			max_clock = ranges->max_clock * 1000;
 		}
 	    }
 	}
commit a56ef7aaa4b6ac13c8181f68fc7dad3ca89e6973
Author: Magnus Vigerlöf <Magnus.Vigerlof at ipbo.se>
Date:   Sat Feb 2 23:04:46 2008 +0100

    dix: Move motion history update until after screen crossing and clipping
    
    Cross screen and clip the coordinates before updating the motion history
    so that it will have the same contents as the events that are reported.

diff --git a/dix/getevents.c b/dix/getevents.c
index bc64d31..3e6fe5a 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -667,15 +667,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
         }
     }
 
-    /* Drop x and y back into the valuators list, if they were originally
-     * present. */
-    if (first_valuator == 0 && num_valuators >= 1)
-        valuators[0] = x;
-    if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
-        valuators[1 - first_valuator] = y;
-
-    updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
-
     pDev->valuator->lastx = x;
     pDev->valuator->lasty = y;
     /* Convert the dev coord back to screen coord if we're
@@ -721,6 +712,15 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
         cp->valuator->lasty = y;
     }
 
+    /* Drop x and y back into the valuators list, if they were originally
+     * present. */
+    if (first_valuator == 0 && num_valuators >= 1)
+        valuators[0] = pDev->valuator->lastx;
+    if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
+        valuators[1 - first_valuator] = pDev->valuator->lasty;
+
+    updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
+
     /* for some reason inputInfo.pointer does not have coreEvents set */
     if (coreOnly || pDev->coreEvents) {
         events->u.u.type = type;
commit a0284d577aabea8406b72dd63773e341430ebe56
Author: Magnus Vigerlöf <Magnus.Vigerlof at ipbo.se>
Date:   Sat Feb 2 23:03:51 2008 +0100

    dix: Skip call to clipAxis for relative core-events
    
    Relative events that generates both core and extention
    events will have its axis cliped and screen changed by
    miPointerSetPosition when the events are processed. For
    absolute and non core-generating relative events the
    axis must be clipped if we shouldn't end up completely
    outside the defined ranges (if any).

diff --git a/dix/getevents.c b/dix/getevents.c
index c2736e4..bc64d31 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -609,6 +609,10 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
                     y = cp->valuator->lasty;
             }
         }
+
+        /* Clip both x and y to the defined limits (usually co-ord space limit). */
+        clipAxis(pDev, 0, &x);
+        clipAxis(pDev, 1, &y);
     }
     else {
         if (flags & POINTER_ACCELERATE)
@@ -647,22 +651,22 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
                 y += valuators[1 - first_valuator];
         }
         else {
+            x = pDev->valuator->lastx;
+            y = pDev->valuator->lasty;
             if (first_valuator == 0 && num_valuators >= 1)
-                x = pDev->valuator->lastx + valuators[0];
-            else
-                x = pDev->valuator->lastx;
-
+                x += valuators[0];
             if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
-                y = pDev->valuator->lasty + valuators[1 - first_valuator];
-            else
-                y = pDev->valuator->lasty;
+                y += valuators[1 - first_valuator];
+
+            if(!coreOnly) {
+                /* Since we're not sending core-events we must clip both x and y
+                 * to the defined limits so we don't run outside the box. */
+                clipAxis(pDev, 0, &x);
+                clipAxis(pDev, 1, &y);
+            }
         }
     }
 
-    /* Clip both x and y to the defined limits (usually co-ord space limit). */
-    clipAxis(pDev, 0, &x);
-    clipAxis(pDev, 1, &y);
-
     /* Drop x and y back into the valuators list, if they were originally
      * present. */
     if (first_valuator == 0 && num_valuators >= 1)
@@ -695,6 +699,24 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
     miPointerSetPosition(pDev, &x, &y, ms);
 
     if (pDev->coreEvents) {
+        /* miPointerSetPosition may have changed screen */
+        scr = miPointerGetScreen(pDev);
+        if(x != cp->valuator->lastx) {
+            int min = pDev->valuator->axes[0].min_value;
+            int max = pDev->valuator->axes[0].max_value;
+            cp->valuator->lastx = pDev->valuator->lastx = x;
+            if(min < max)
+                pDev->valuator->lastx = (int)((float)(x)*(max-min+1)/scr->width)+min;
+        }
+        if(y != cp->valuator->lasty) {
+            int min = pDev->valuator->axes[1].min_value;
+            int max = pDev->valuator->axes[1].max_value;
+            cp->valuator->lasty = pDev->valuator->lasty = y;
+            if(min < max)
+                pDev->valuator->lasty = (int)((float)(y)*(max-min+1)/scr->height)+min;
+        }
+    }
+    else if (coreOnly) {
         cp->valuator->lastx = x;
         cp->valuator->lasty = y;
     }
commit d9e23c4ff1607a62164b34717ef9afd352ce2b94
Author: Magnus Vigerlöf <Magnus.Vigerlof at ipbo.se>
Date:   Sat Feb 2 22:57:32 2008 +0100

    Bug # 10324: dix: Add scaling of X and Y on the reported pointer-events
    
    Restore the rescaling code for x and y axis when generating
    motion events.

diff --git a/dix/getevents.c b/dix/getevents.c
index ea1c764..c2736e4 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -531,6 +531,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
     DeviceIntPtr cp = inputInfo.pointer;
     int x = 0, y = 0;
     Bool coreOnly = (pDev == inputInfo.pointer);
+    ScreenPtr scr = miPointerGetScreen(pDev);
 
     /* Sanity checks. */
     if (type != MotionNotify && type != ButtonPress && type != ButtonRelease)
@@ -574,20 +575,39 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
             x = valuators[0];
         }
         else {
-            if (pDev->coreEvents)
-                x = cp->valuator->lastx;
-            else
-                x = pDev->valuator->lastx;
+            /* If we're sending core events but didn't provide a value,
+             * translate the core value (but use the device coord if
+             * it translates to the same coord to preserve sub-pixel
+             * coord information). If we're not sending core events use
+             * whatever value we have */
+            x = pDev->valuator->lastx;
+            if(pDev->coreEvents) {
+                int min = pDev->valuator->axes[0].min_value;
+                int max = pDev->valuator->axes[0].max_value;
+                if(min < max) {
+                    if((int)((float)(x-min)*scr->width/(max-min+1)) != cp->valuator->lastx)
+                        x = (int)((float)(cp->valuator->lastx)*(max-min+1)/scr->width)+min;
+                }
+                else
+                    x = cp->valuator->lastx;
+            }
         }
 
         if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) {
             y = valuators[1 - first_valuator];
         }
         else {
-            if (pDev->coreEvents)
-                y = cp->valuator->lasty;
-            else
-                y = pDev->valuator->lasty;
+            y = pDev->valuator->lasty;
+            if(pDev->coreEvents) {
+                int min = pDev->valuator->axes[1].min_value;
+                int max = pDev->valuator->axes[1].max_value;
+                if(min < max) {
+                    if((int)((float)(y-min)*scr->height/(max-min+1)) != cp->valuator->lasty)
+                        y = (int)((float)(cp->valuator->lasty)*(max-min+1)/scr->height)+min;
+                }
+                else
+                    y = cp->valuator->lasty;
+            }
         }
     }
     else {
@@ -596,15 +616,35 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
                               valuators);
 
         if (pDev->coreEvents) {
-            if (first_valuator == 0 && num_valuators >= 1)
-                x = cp->valuator->lastx + valuators[0];
+            /* Get and convert the core pointer coordinate space into
+             * device coordinates. Use the device coords if it translates
+             * into the same position as the core to preserve relative sub-
+             * pixel movements from the device. */
+            int min = pDev->valuator->axes[0].min_value;
+            int max = pDev->valuator->axes[0].max_value;
+            if(min < max) {
+                x = pDev->valuator->lastx;
+                if((int)((float)(x-min)*scr->width/(max-min+1)) != cp->valuator->lastx)
+                    x = (int)((float)(cp->valuator->lastx)*(max-min+1)/scr->width)+min;
+            }
             else
                 x = cp->valuator->lastx;
 
-            if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
-                y = cp->valuator->lasty + valuators[1 - first_valuator];
+            min = pDev->valuator->axes[1].min_value;
+            max = pDev->valuator->axes[1].max_value;
+            if(min < max) {
+                y = pDev->valuator->lasty;
+                if((int)((float)(y-min)*scr->height/(max-min+1)) != cp->valuator->lasty)
+                    y = (int)((float)(cp->valuator->lasty)*(max-min+1)/scr->height)+min;
+            }
             else
                 y = cp->valuator->lasty;
+
+            /* Add relative movement */
+            if (first_valuator == 0 && num_valuators >= 1)
+                x += valuators[0];
+            if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
+                y += valuators[1 - first_valuator];
         }
         else {
             if (first_valuator == 0 && num_valuators >= 1)
@@ -623,11 +663,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
     clipAxis(pDev, 0, &x);
     clipAxis(pDev, 1, &y);
 
-    /* This takes care of crossing screens for us, as well as clipping
-     * to the current screen.  Right now, we only have one history buffer,
-     * so we don't set this for both the device and core.*/
-    miPointerSetPosition(pDev, &x, &y, ms);
-
     /* Drop x and y back into the valuators list, if they were originally
      * present. */
     if (first_valuator == 0 && num_valuators >= 1)
@@ -637,12 +672,32 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
 
     updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
 
+    pDev->valuator->lastx = x;
+    pDev->valuator->lasty = y;
+    /* Convert the dev coord back to screen coord if we're
+     * sending core events */
+    if (pDev->coreEvents) {
+        int min = pDev->valuator->axes[0].min_value;
+        int max = pDev->valuator->axes[0].max_value;
+        if(min < max)
+            x = (int)((float)(x-min)*scr->width/(max-min+1));
+        cp->valuator->lastx = x;
+        min = pDev->valuator->axes[1].min_value;
+        max = pDev->valuator->axes[1].max_value;
+        if(min < max)
+            y = (int)((float)(y-min)*scr->height/(max-min+1));
+        cp->valuator->lasty = y;
+    }
+
+    /* This takes care of crossing screens for us, as well as clipping
+     * to the current screen.  Right now, we only have one history buffer,
+     * so we don't set this for both the device and core.*/
+    miPointerSetPosition(pDev, &x, &y, ms);
+
     if (pDev->coreEvents) {
         cp->valuator->lastx = x;
         cp->valuator->lasty = y;
     }
-    pDev->valuator->lastx = x;
-    pDev->valuator->lasty = y;
 
     /* for some reason inputInfo.pointer does not have coreEvents set */
     if (coreOnly || pDev->coreEvents) {
@@ -680,8 +735,8 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
             kbp->detail = pDev->button->map[buttons];
         }
 
-        kbp->root_x = x;
-        kbp->root_y = y;
+        kbp->root_x = pDev->valuator->lastx;
+        kbp->root_y = pDev->valuator->lasty;
 
         events++;
         if (num_valuators) {
commit f04c0838699f1a733735838e74cfbb1677b15dc4
Author: Magnus Vigerlöf <Magnus.Vigerlof at ipbo.se>
Date:   Sat Feb 2 22:45:31 2008 +0100

    Bug # 10324: dix: Allow arbitrary value ranges in GetPointerEvents
    
    Don't use a possitive value as a marker for if a max-value
    is defined on the valuators. Use the existence of a valid
    value range instead. This will also make it possible to
    define arbitrary start and end-values for min and max as
    long as min < max.

diff --git a/dix/getevents.c b/dix/getevents.c
index 94cbd15..ea1c764 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -308,10 +308,13 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val)
 {
     AxisInfoPtr axes = pDev->valuator->axes + axisNum;
 
-    if (*val < axes->min_value)
-        *val = axes->min_value;
-    if (axes->max_value >= 0 && *val > axes->max_value)
-        *val = axes->max_value;
+    /* No clipping if the value-range <= 0 */
+    if(axes->min_value < axes->min_value) {
+        if (*val < axes->min_value)
+            *val = axes->min_value;
+        if (*val > axes->max_value)
+            *val = axes->max_value;
+    }
 }
 
 /**
commit 12e532403210c15a25200ef448bfe9701735ab20
Author: Magnus Vigerlöf <Magnus.Vigerlof at ipbo.se>
Date:   Sat Feb 2 22:44:31 2008 +0100

    dix: Always add valuator information if present
    
    Send valuator information for all event types, not only for
    MotionEvents and absolute button events.

diff --git a/dix/getevents.c b/dix/getevents.c
index 12cb950..94cbd15 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -525,9 +525,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
     int num_events = 0, final_valuator = 0;
     CARD32 ms = 0;
     deviceKeyButtonPointer *kbp = NULL;
-    /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies
-     * with DeviceValuators. */
-    Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE);
     DeviceIntPtr cp = inputInfo.pointer;
     int x = 0, y = 0;
     Bool coreOnly = (pDev == inputInfo.pointer);
@@ -553,7 +550,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
         return 0;
 
     /* Do we need to send a DeviceValuator event? */
-    if (!coreOnly && sendValuators) {
+    if (!coreOnly && num_valuators) {
         if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS)
             num_valuators = MAX_VALUATOR_EVENTS * 6;
         num_events += ((num_valuators - 1) / 6) + 1;
@@ -684,7 +681,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
         kbp->root_y = y;
 
         events++;
-        if (sendValuators) {
+        if (num_valuators) {
             kbp->deviceid |= MORE_EVENTS;
             clipValuators(pDev, first_valuator, num_valuators, valuators);
             events = getValuatorEvents(events, pDev, first_valuator,
commit 41991fb991313202e8e6b513fe928ba14f8fcb87
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Tue Feb 5 16:01:56 2008 +1030

    xkb: when copying sections, make sure num_rows is set too.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 1fb47ed..9f813e5 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1806,6 +1806,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
                         return FALSE;
                     dsection->rows = tmp;
                 }
+                dsection->num_rows = ssection->num_rows;
                 for (j = 0, srow = ssection->rows, drow = dsection->rows;
                      j < ssection->num_rows;
                      j++, srow++, drow++) {
commit 521a7f26e088029707fb9a2bb80c9ddc734a3f8b
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Tue Feb 5 18:34:31 2008 +1030

    mi: Only UpdateSpriteForScreen if we actually changed the screen. (Bug #12650)
    
    X.Org Bug 12650 <http://bugs.freedesktop.org/show_bug.cgi?id=12650>

diff --git a/mi/mipointer.c b/mi/mipointer.c
index 2c3c689..b55e68b 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -231,10 +231,14 @@ miPointerWarpCursor (pScreen, x, y)
     ScreenPtr	pScreen;
     int		x, y;
 {
+    BOOL changedScreen = FALSE;
     SetupScreen (pScreen);
 
     if (miPointer.pScreen != pScreen)
+    {
 	(*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, TRUE);
+        changedScreen = TRUE;
+    }
 
     if (GenerateEvent)
     {
@@ -255,7 +259,9 @@ miPointerWarpCursor (pScreen, x, y)
 	miPointer.y = y;
 	miPointer.pScreen = pScreen;
     }
-    UpdateSpriteForScreen (pScreen) ;
+
+    if (changedScreen)
+        UpdateSpriteForScreen (pScreen) ;
 }
 
 /*
commit 10617dc0fb7166ccd5b2e92fa708390c2d7d0d27
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Fri Feb 1 14:24:04 2008 +1030

    xfree86: stick two more checks in for num_valuators < MAX_VALUATORS

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 3e9a479..eafc0e9 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -507,6 +507,12 @@ xf86PostMotionEventP(DeviceIntPtr	device,
     int index;
     int flags = 0;
 
+    if (num_valuators > MAX_VALUATORS) {
+	xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d"
+	    " is greater than MAX_VALUATORS\n", num_valuators);
+	return;
+    }
+
     if (is_absolute)
         flags = POINTER_ABSOLUTE;
     else
@@ -644,6 +650,12 @@ xf86PostKeyEvent(DeviceIntPtr	device,
            "badly south after this message, then xf86PostKeyEvent is "
            "broken.\n");
 
+    if (num_valuators > MAX_VALUATORS) {
+	xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d"
+	    " is greater than MAX_VALUATORS\n", num_valuators);
+	return;
+    }
+
     if (!xf86Events)
         FatalError("Didn't allocate event store\n");
 
commit c68f063be639f39c2facbb496e8455e8e3771b41
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Fri Feb 1 14:13:29 2008 +1030

    xfree86: don't call xalloc from signal handlers when posting events.
    
    Reviewed-by: Peter Hutterer <peter at cs.unisa.edu.au>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 9a94c04..3e9a479 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -133,6 +133,11 @@ xf86ProcessCommonOptions(LocalDevicePtr local,
 
     /* Backwards compatibility. */
     local->history_size = GetMotionHistorySize();
+    /* Preallocate xEvent store */
+    if (!xf86Events)
+        xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
+    if (!xf86Events)
+        FatalError("Couldn't allocate event store\n");
 }
 
 /***********************************************************************
@@ -461,6 +466,8 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
  * convenient functions to post events
  */
 
+#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */
+
 _X_EXPORT void
 xf86PostMotionEvent(DeviceIntPtr	device,
                     int			is_absolute,
@@ -470,17 +477,12 @@ xf86PostMotionEvent(DeviceIntPtr	device,
 {
     va_list var;
     int i = 0;
-    static int *valuators = NULL;
-    static int n_valuators = 0;
-
-    if (num_valuators > n_valuators) {
-	xfree (valuators);
-	valuators = NULL;
-    }
+    static int valuators[MAX_VALUATORS];
 
-    if (!valuators) {
-	valuators = xcalloc(sizeof(int), num_valuators);
-	n_valuators = num_valuators;
+    if (num_valuators > MAX_VALUATORS) {
+	xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d"
+	    " is greater than MAX_VALUATORS\n", num_valuators);
+	return;
     }
 
     va_start(var, num_valuators);
@@ -529,9 +531,7 @@ xf86PostMotionEventP(DeviceIntPtr	device,
 #endif
 
     if (!xf86Events)
-        xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-    if (!xf86Events)
-        FatalError("Couldn't allocate event store\n");
+        FatalError("Didn't allocate event store\n");
 
     nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0,
                                flags, first_valuator, num_valuators,
@@ -555,9 +555,15 @@ xf86PostProximityEvent(DeviceIntPtr	device,
                        ...)
 {
     va_list var;
-    int i, nevents, *valuators = NULL;
+    int i, nevents;
+    int valuators[MAX_VALUATORS];
 
-    valuators = xcalloc(sizeof(int), num_valuators);
+
+    if (num_valuators > MAX_VALUATORS) {
+	xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d"
+	    " is greater than MAX_VALUATORS\n", num_valuators);
+	return;
+    }
 
     va_start(var, num_valuators);
     for (i = 0; i < num_valuators; i++)
@@ -565,9 +571,7 @@ xf86PostProximityEvent(DeviceIntPtr	device,
     va_end(var);
 
     if (!xf86Events)
-        xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-    if (!xf86Events)
-        FatalError("Couldn't allocate event store\n");
+        FatalError("Didn't allocate event store\n");
 
     nevents = GetProximityEvents(xf86Events, device,
                                  is_in ? ProximityIn : ProximityOut, 
@@ -575,7 +579,6 @@ xf86PostProximityEvent(DeviceIntPtr	device,
     for (i = 0; i < nevents; i++)
         mieqEnqueue(device, xf86Events + i);
 
-    xfree(valuators);
 }
 
 _X_EXPORT void
@@ -588,7 +591,7 @@ xf86PostButtonEvent(DeviceIntPtr	device,
                     ...)
 {
     va_list var;
-    int *valuators = NULL;
+    int valuators[MAX_VALUATORS];
     int i = 0, nevents = 0;
     int index;
 
@@ -599,18 +602,19 @@ xf86PostButtonEvent(DeviceIntPtr	device,
             return;
     }
 #endif
+    if (num_valuators > MAX_VALUATORS) {
+	xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d"
+	    " is greater than MAX_VALUATORS\n", num_valuators);
+	return;
+    }
     
-    valuators = xcalloc(sizeof(int), num_valuators);
-
     va_start(var, num_valuators);
     for (i = 0; i < num_valuators; i++)
         valuators[i] = va_arg(var, int);
     va_end(var);
 
     if (!xf86Events)
-        xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-    if (!xf86Events)
-        FatalError("Couldn't allocate event store\n");
+        FatalError("Didn't allocate event store\n");
 
     nevents = GetPointerEvents(xf86Events, device,
                                is_down ? ButtonPress : ButtonRelease, button,
@@ -620,8 +624,6 @@ xf86PostButtonEvent(DeviceIntPtr	device,
 
     for (i = 0; i < nevents; i++)
         mieqEnqueue(device, xf86Events + i);
-
-    xfree(valuators);
 }
 
 _X_EXPORT void
@@ -634,7 +636,8 @@ xf86PostKeyEvent(DeviceIntPtr	device,
                  ...)
 {
     va_list var;
-    int i = 0, nevents = 0, *valuators = NULL;
+    int i = 0, nevents = 0;
+    static int valuators[MAX_VALUATORS];
 
     /* instil confidence in the user */
     DebugF("this function has never been tested properly.  if things go quite "
@@ -642,12 +645,9 @@ xf86PostKeyEvent(DeviceIntPtr	device,
            "broken.\n");
 
     if (!xf86Events)
-        xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-    if (!xf86Events)
-        FatalError("Couldn't allocate event store\n");
+        FatalError("Didn't allocate event store\n");
 
     if (is_absolute) {
-        valuators = xcalloc(sizeof(int), num_valuators);
         va_start(var, num_valuators);
         for (i = 0; i < num_valuators; i++)
             valuators[i] = va_arg(var, int);
@@ -657,7 +657,6 @@ xf86PostKeyEvent(DeviceIntPtr	device,
                                             is_down ? KeyPress : KeyRelease,
                                             key_code, first_valuator,
                                             num_valuators, valuators);
-        xfree(valuators);
     }
     else {
         nevents = GetKeyboardEvents(xf86Events, device,
@@ -686,9 +685,7 @@ xf86PostKeyboardEvent(DeviceIntPtr      device,
 #endif
 
     if (!xf86Events)
-        xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-    if (!xf86Events)
-        FatalError("Couldn't allocate event store\n");
+        FatalError("Didn't allocate event store\n");
 
     nevents = GetKeyboardEvents(xf86Events, device,
                                 is_down ? KeyPress : KeyRelease, key_code);


More information about the xorg-commit mailing list