[meego-commits] 5861: Changes to Trunk:Testing/xorg-x11-server

Li Peng peng.li at intel.com
Tue Jul 20 06:51:30 UTC 2010


Hi,
I have made the following changes to xorg-x11-server in project Trunk:Testing. Please review and accept ASAP.

Thank You,
Li Peng

[This message was auto-generated]

---

Request #5861:

  submit:   devel:x11:Trunk/xorg-x11-server(r33) -> Trunk:Testing/xorg-x11-server


Message:
    xserver 1.8.99.905 (1.9 RC5); Fix BMC #3797. Cache XKB comipled file to a proper place; Fix BMC #1384. Lower Server side GLX version for S/W rendering; Rework cache-xkbcomp-output-for-fast-start-up.patch

State:   new          2010-07-19T18:45:29 pli1
Comment: None



changes files:
--------------
--- xorg-x11-server.changes
+++ xorg-x11-server.changes
@@ -0,0 +1,12 @@
+* Tue Jul 20 2010 Li Peng <peng.li at intel.com> - 1.8.99.905
+- xserver 1.8.99.905 (1.9 RC5)
+
+* Tue Jul 20 2010 Liu Xinyun <xinyun.liu at intel.com> - 1.8.99.903
+- Fix BMC #3797. Cache XKB comipled file to a proper place.
+
+* Thu Jul 08 2010 Liu Xinyun <xinyun.liu at intel.com> - 1.8.99.903
+- Fix BMC #1384. Lower Server side GLX version for S/W rendering.
+
+* Thu Jul 08 2010 Liu Xinyun <xinyun.liu at intel.com> - 1.8.99.903
+- Rework cache-xkbcomp-output-for-fast-start-up.patch
+

old:
----
  xorg-server-1.8.99.903.tar.bz2

new:
----
  Lower-server-side-GLX-version.patch
  downgrade-dri2-info-version.patch
  xorg-server-1.8.99.905.tar.bz2

spec files:
-----------
--- xorg-x11-server.spec
+++ xorg-x11-server.spec
@@ -7,7 +7,7 @@
 
 Name:       xorg-x11-server
 Summary:    X.Org X11 X server
-Version:    1.8.99.903
+Version:    1.8.99.905
 Release:    1
 Group:      System/X11
 License:    MIT
@@ -20,6 +20,9 @@
 Patch3:     use-sloppy-heuristic-first-for-initial-mode.patch
 Patch4:     do-not-zap-xserver.patch
 Patch5:     Add-inputclass-section-into-builtin-config.patch
+Patch6:     cache-xkbcomp-output-for-fast-start-up.patch
+Patch7:     Lower-server-side-GLX-version.patch
+Patch8:     downgrade-dri2-info-version.patch
 Requires:   libdrm >= 2.4.0
 BuildRequires:  pkgconfig(xorg-macros)
 BuildRequires:  pkgconfig(scrnsaverproto)
@@ -40,6 +43,7 @@
 BuildRequires:  pkgconfig(evieproto)
 BuildRequires:  pkgconfig(xf86dgaproto)
 BuildRequires:  pkgconfig(xf86vidmodeproto)
+BuildRequires:  pkgconfig(recordproto)
 BuildRequires:  pkgconfig(xkbfile)
 BuildRequires:  pkgconfig(xres)
 BuildRequires:  pkgconfig(xau)
@@ -150,6 +154,12 @@
 %patch4 -p1
 # Add-inputclass-section-into-builtin-config.patch
 %patch5 -p1
+# cache-xkbcomp-output-for-fast-start-up.patch
+%patch6 -p1
+# Lower-server-side-GLX-version.patch
+%patch7 -p1
+# downgrade-dri2-info-version.patch
+%patch8 -p1
 # >> setup
 # << setup
 
@@ -173,8 +183,7 @@
     --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
     --with-module-dir=%{_libdir}/xorg/modules \
     --with-builderstring="Build ID: %{name} %{version}-%{release}" \
-    --with-xkb-output=%{_localstatedir}/lib/xkb \
-    --disable-record \
+    --with-xkb-output=%{_localstatedir}/cache/xkb \
     --disable-xselinux \
     --disable-xinerama \
     --enable-dri2 \
@@ -234,8 +243,8 @@
 %doc %{_mandir}/man1/Xserver.1*
 %{_libdir}/xorg/protocol.txt
 # dir for caching xkb comp results, must be writable by non-root users
-%dir %attr(777,-,-) %{_localstatedir}/lib/xkb
-%attr(644,-,-) %{_localstatedir}/lib/xkb/README.compiled
+%dir %attr(777,-,-) %{_localstatedir}/cache/xkb
+%attr(644,-,-) %{_localstatedir}/cache/xkb/README.compiled
 # << files common
 
 %files Xorg
@@ -253,6 +262,7 @@
 %{_libdir}/xorg/modules/extensions/libdri2.so
 %{_libdir}/xorg/modules/extensions/libdbe.so
 %{_libdir}/xorg/modules/extensions/libextmod.so
+%{_libdir}/xorg/modules/extensions/librecord.so
 %dir %{_libdir}/xorg/modules/multimedia
 %{_libdir}/xorg/modules/multimedia/bt829_drv.so
 %{_libdir}/xorg/modules/multimedia/fi1236_drv.so
@@ -295,6 +305,7 @@
 %{_libdir}/xorg/modules/extensions/libdri2.so
 %{_libdir}/xorg/modules/extensions/libdbe.so
 %{_libdir}/xorg/modules/extensions/libextmod.so
+%{_libdir}/xorg/modules/extensions/librecord.so
 %dir %{_libdir}/xorg/modules/multimedia
 %{_libdir}/xorg/modules/multimedia/bt829_drv.so
 %{_libdir}/xorg/modules/multimedia/fi1236_drv.so

other changes:
--------------

++++++ Lower-server-side-GLX-version.patch (new)
--- Lower-server-side-GLX-version.patch
+++ Lower-server-side-GLX-version.patch
+From 69d8bb0054eabdfc299f9fb02c49f2d384f065c7 Mon Sep 17 00:00:00 2001
+From: Liu Xinyun <xinyun.liu at intel.com>
+Date: Thu, 8 Jul 2010 21:30:05 +0800
+Subject: [PATCH] Lower-server-side-GLX-version.patch
+
+ Fix BMC #1384.
+ Lower GLX version to 1.2 when use software rendering.
+
+---
+ glx/glxdriswrast.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
+index 54f4440..845dc4d 100644
+--- a/glx/glxdriswrast.c
++++ b/glx/glxdriswrast.c
+@@ -510,7 +510,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
+     __glXScreenInit(&screen->base, pScreen);
+ 
+     screen->base.GLXmajor = 1;
+-    screen->base.GLXminor = 4;
++    screen->base.GLXminor = 2;
+ 
+     LogMessage(X_INFO,
+ 	       "AIGLX: Loaded and initialized %s\n", filename);
+-- 
+1.7.0.4
+

++++++ cache-xkbcomp-output-for-fast-start-up.patch
--- cache-xkbcomp-output-for-fast-start-up.patch
+++ cache-xkbcomp-output-for-fast-start-up.patch
@@ -1,12 +1,12 @@
-From d2d3bcc9e23b9a4bea9f67a06cd23aa3ce7f4b59 Mon Sep 17 00:00:00 2001
-Message-Id: <d2d3bcc9e23b9a4bea9f67a06cd23aa3ce7f4b59.1268201183.git.yan.i.li at intel.com>
 From: Yan Li <yan.i.li at intel.com>
 Date: Wed, 10 Mar 2010 14:06:17 +0800
-Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v6 for 1.7.99.901
+Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v7 for 1.8.99.903
 
 xkbcomp outputs will be cached in files with hashed keymap as
 names. This saves boot time for around 1s on commodity netbooks.
 
+V7: reworked Li Yan's patch for v1.8.99.903
+
 v6: rebased to v1.7.99.901
 
 v5: now using a much bigger xkbKeyMapBuf (100k) since the XKB to be
@@ -14,17 +14,12 @@
     gnome-keyboard-properties), rebased to v1.6.1
 
 Signed-off-by: Yan Li <yan.i.li at intel.com>
----
- configure.ac        |    6 +-
- xkb/README.compiled |    8 +-
- xkb/ddxLoad.c       |  187 +++++++++++++++++++++++++++++++++++++++++----------
- 3 files changed, 159 insertions(+), 42 deletions(-)
-
+Signed-off-by: Liu Xinyun <xinyun.liu at intel.com>
 diff --git a/configure.ac b/configure.ac
-index de252f3..54a0327 100644
+index 1a1f2d3..7c3224a 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -527,9 +527,9 @@ AC_MSG_RESULT([$FONTPATH])
+@@ -540,9 +540,9 @@ AC_MSG_RESULT([$FONTPATH])
  AC_ARG_WITH(xkb-path,         AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
  				[ XKBPATH="$withval" ],
  				[ XKBPATH="${datadir}/X11/xkb" ])
@@ -36,7 +31,7 @@
  AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
                                     [Keyboard ruleset (default: base/evdev)]),
                                  [ XKB_DFLT_RULES="$withval" ],
-@@ -1148,7 +1148,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir])
+@@ -1175,7 +1175,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir])
  dnl Make sure XKM_OUTPUT_DIR is an absolute path
  XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
  if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then
@@ -65,7 +60,7 @@
  Unless the X server is modified, sharing this directory between servers on
  different hosts could cause problems.
 diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
-index 4ccddda..63b9f97 100644
+index 5e6ab87..dec3644 100644
 --- a/xkb/ddxLoad.c
 +++ b/xkb/ddxLoad.c
 @@ -30,6 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -153,7 +148,7 @@
  XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
  				XkbComponentNamesPtr	names,
  				unsigned		want,
-@@ -183,7 +217,11 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
+@@ -183,10 +217,14 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
  				int			nameRtrnLen)
  {
      FILE *	out;
@@ -165,7 +160,11 @@
 +    int	ret, result;
  
      const char	*emptystring = "";
-     const char	*xkbbasedirflag = emptystring;
+-    char *xkbbasedirflag = NULL;
++    char	*xkbbasedirflag = NULL;
+     const char	*xkbbindir = emptystring;
+     const char	*xkbbindirsep = emptystring;
+ 
 @@ -194,15 +232,67 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
      /* WIN32 has no popen. The input must be stored in a file which is
         used as input for xkbcomp. xkbcomp does not read from stdin. */
@@ -237,7 +236,7 @@
  #ifdef WIN32
      strcpy(tmpname, Win32TempDir());
      strcat(tmpname, "\\xkb_XXXXXX");
-@@ -225,19 +315,30 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
+@@ -225,14 +315,20 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
  	}
      }
  
@@ -253,14 +252,16 @@
  		  xkbbindir, xkbbindirsep,
  		  ( (xkbDebugFlags < 2) ? 1 :
  		    ((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
--		  xkbbasedirflag, xkmfile,
-+		  xkbbasedirflag, xkbfile,
+-		  xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
++		  xkbbasedirflag ? xkbbasedirflag : "", xkbfile,
  		  PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
 -		  xkm_output_dir, keymap);
 +		  tmpXkmFile);
  
-     if (xkbbasedirflag != emptystring) {
- 	xfree(xkbbasedirflag);
+     free(xkbbasedirflag);
+ 
+@@ -241,6 +337,11 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
+         return FALSE;
      }
      
 +    /* there's a potential race condition between calling tempnam()
@@ -271,7 +272,7 @@
  #ifndef WIN32
      out= Popen(buf,"w");
  #else
-@@ -245,31 +346,41 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
+@@ -248,31 +349,41 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
  #endif
      
      if (out!=NULL) {
@@ -316,7 +317,7 @@
 +                goto _ret;
  	    }
 -            if (buf != NULL)
--                xfree (buf);
+-                free(buf);
 -	    return TRUE;
 +        result = TRUE;
 +        goto _ret;
@@ -327,7 +328,7 @@
  #ifdef WIN32
          /* remove the temporary file */
          unlink(tmpname);
-@@ -284,9 +395,16 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
+@@ -287,9 +398,16 @@ XkbDDXCompileKeymapByNames(	XkbDescPtr		xkb,
      }
      if (nameRtrn)
  	nameRtrn[0]= '\0';
@@ -337,15 +338,16 @@
 +    if (tmpXkmFile)
 +        free(tmpXkmFile);
 +    if (canonicalXkmFileName)
-+        xfree(canonicalXkmFileName);
++        free(canonicalXkmFileName);
      if (buf != NULL)
-         xfree (buf);
+-        free(buf);
 -    return FALSE;
++        free (buf);
 +    return result;
  }
  
  static FILE *
-@@ -370,7 +488,6 @@ unsigned	missing;
+@@ -373,7 +491,6 @@ unsigned	missing;
  	DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
      }
      fclose(file);
@@ -353,6 +355,3 @@
      return (need|want)&(~missing);
  }
  
--- 
-1.5.6.5
-

++++++ downgrade-dri2-info-version.patch (new)
--- downgrade-dri2-info-version.patch
+++ downgrade-dri2-info-version.patch
+diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
+index f9ba8e7..002149c 100644
+--- a/hw/xfree86/dri2/dri2.c
++++ b/hw/xfree86/dri2/dri2.c
+@@ -1079,10 +1079,6 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
+ 	cur_minor = 1;
+     }
+ 
+-    if (info->version >= 5) {
+-        ds->AuthMagic = info->AuthMagic;
+-    }
+-
+     /*
+      * if the driver doesn't provide an AuthMagic function or the info struct
+      * version is too low, it relies on the old method (using libdrm) or fail
+diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
+index fe0bf6c..00ee594 100644
+--- a/hw/xfree86/dri2/dri2.h
++++ b/hw/xfree86/dri2/dri2.h
+@@ -161,7 +161,7 @@ typedef void		(*DRI2InvalidateProcPtr)(DrawablePtr pDraw,
+ /**
+  * Version of the DRI2InfoRec structure defined in this header
+  */
+-#define DRI2INFOREC_VERSION 5
++#define DRI2INFOREC_VERSION 4
+ 
+ typedef struct {
+     unsigned int version;	/**< Version of this struct */

++++++ xorg-server-1.8.99.903.tar.bz2 -> xorg-server-1.8.99.905.tar.bz2
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,693 @@
+commit 0fc02c0bf92f694889589e3648acc08d4684de37
+Merge: 0540c46 9d8ec71
+Author: Keith Packard <keithp at keithp.com>
+Date:   Tue Jul 13 15:05:36 2010 -0700
+
+    Merge remote branch 'jeremyhu/master'
+
+commit 0540c46066f938ad5611c56081cfcd8457a9b718
+Author: Michel Dänzer <daenzer at vmware.com>
+Date:   Tue Jul 13 14:56:53 2010 +0200
+
+    EXA: Finish access to pixmap if it's prepared at destruction time.
+    
+    Previously we assumed every pixmap destroyed during a software fallback was
+    also created during a software fallback and had access prepared, but that's
+    not always true.
+    
+    Fixes a server abort
+    Reported-by: 邓逸昕 <bupt.dengyixin at gmail.com>
+    
+    Signed-off-by: Michel Dänzer <daenzer at vmware.com>
+    Acked-by: Maarten Maathuis <madman2003 at gmail.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b
+Author: Keith Packard <keithp at keithp.com>
+Date:   Mon Jul 12 16:01:34 2010 -0700
+
+    Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998
+    
+    Because some EnterVT code needs to remove it self from the
+    call chain, we need to fix all of the wrappers to correctly
+    unwrap/rewrap during the call chain. This is a follow-on to the fix
+    for bug 27114 in commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e.
+    
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+    Tested-by: Jesse Barnes <jesse.barnes at intel.com>
+    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
+    Reviewed-by: Tiago Vignatti <tiago.vignatti at nokia.com>
+
+commit 9d8ec712a67ce71ea7408f0626cda7e0fa7c3bac
+Author: Jeremy Huddleston <jeremyhu at apple.com>
+Date:   Tue Jul 13 08:56:36 2010 -0700
+
+    XQuartz: Bump bundle version to 2.6.0 for xorg-server-1.9.0 and X11R7.6
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+
+commit b2b9c458a46e9a41c3c76ffe83a2b580a41d0e90
+Author: Jan Hauffa <hauffa at in.tum.de>
+Date:   Wed Jun 16 09:25:41 2010 -0700
+
+    XQuartz: Remove some dead code.
+    
+    Signed-off-by: Jan Hauffa <hauffa at in.tum.de>
+    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
+    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+
+commit 648d189548530fa23d97d1e8737f89d297f1c443
+Author: Jeremy Huddleston <jeremyhu at apple.com>
+Date:   Tue Jul 13 08:25:27 2010 -0700
+
+    XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some configs
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+
+commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f
+Author: Jesse Barnes <jbarnes at virtuousgeek.org>
+Date:   Fri Jul 9 10:36:56 2010 -0700
+
+    DRI2: re-allocate DRI2 drawable if pixmap serial changes
+    
+    If a pixmap header is modified or the drawable serial changes, some
+    aspects of the drawable are likely to have changed so we should
+    re-allocate the corresponding DRI2 drawable in that case.  This is one
+    way of catching when the root window pixmap changes through xrandr.
+    
+    Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=28365.
+    
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+    Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
+    Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 02b11509b25686ff7bd567ecb78a435701edc4c2
+Author: Jesse Barnes <jbarnes at virtuousgeek.org>
+Date:   Fri Jul 9 10:36:12 2010 -0700
+
+    miModifyPixmapHeader: always update serialNumber
+    
+    We should update the serial number even if we just change a single field.
+    
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+    Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
+    Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 2307ab5bc9365ebbe04568edb7c7620a23689b70
+Merge: c65280c fd4f505
+Author: Keith Packard <keithp at keithp.com>
+Date:   Tue Jul 6 23:54:54 2010 -0400
+
+    Merge remote branch 'whot/for-keith'
+
+commit fd4f5059f08165a726071dc9f1ca877038292f6f
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Tue Jul 6 09:19:09 2010 +1000
+
+    dix: purge leftover manual key down bit setting.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
+
+commit a1afe172559aff010e886cfc2a7a922d4a06c697
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Tue Jul 6 09:16:42 2010 +1000
+
+    dix: add aux. functions for button_is_down, set_button_down, set_button_up.
+    
+    Same as the matching key functions. Buttons, like keys, can have two states
+    for down/up - one posted, one processed. Posted is set during event
+    generation (usually in the signal handler). Processed is set during event
+    processing when the event queue is emptied and events are being delivered to
+    the client.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
+
+commit 32473d6bf38c95b2d6d5ddbf583a1e801c6605e4
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Tue Jul 6 08:56:12 2010 +1000
+
+    dix: use BitIsOn/SetBit/ClearBit macros for set_key_down helpers.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
+
+commit c18442908080c9833dfd6bb2ff367945d1892421
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Mon Jul 5 16:47:57 2010 +1000
+
+    Xi: use set_key_up/down instead of manual bit handling.
+    
+    We have the wrappers, use them.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit 10442ce02b5be7f82b373bee1939e2b523e291d9
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Mon Jul 5 16:54:48 2010 +1000
+
+    dix: treat flags as flags, not as value in key_is_down.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
+
+commit b46ffd25d3f211e91c67bc618ecbd58257939388
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Fri Jul 2 15:25:14 2010 +1000
+
+    mi: rename miPointerMoved to miPointerMoveNoEvent.
+    
+    Having miPointerMove and miPointerMoved is confusing, especially since both
+    do the same thing bar the event delivery. Also, miPointerMove calls
+    miPointerMoved which indicates some confusion in the temporal alignment of
+    cause and effect.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Acked-by: Tiago Vignatti <tiago.vignatti at nokia.com>
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+
+commit dbd621705a5211540b353af81c4af83c297b74dc
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Fri Jul 2 14:22:03 2010 +1000
+
+    mi: De-duplicate some code in mipointer.c
+    
+    miPointerMoved already has the same code.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+
+commit c65280ce8df4836bd7424a90482e8aa00ab6f447
+Author: Robert Hooker <sarvatt at ubuntu.com>
+Date:   Sat Jun 12 20:23:09 2010 -0400
+
+    Increase advertised RENDER protocol minor version to 11
+    
+    Support for the blend mode operators was added in
+    0ce42adbf4cff9e7f049d9fc79d588ece5936177
+    and the requirement was bumped but when things were split off into
+    include/protocol-versions.h it defined it to 10. render uses
+    the lower of the client and server advertised versions so it's not
+    using the new blend mode operators.
+    
+    Signed-off-by: Robert Hooker <sarvatt at ubuntu.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 9f0b193acdc29e491b6245390cf9f53b5222e6d3
+Author: Keith Packard <keithp at keithp.com>
+Date:   Thu Jul 1 09:13:43 2010 -0400
+
+    miDbe window priv priv is pre-allocated, don't use dixSetPrivate (bug 28639)
+    
+    miDbeInit pre-allocates space in each DBE window private private for a
+    MiDbeWindowPrivPrivRec. miDbeAllocBackBufferName used the
+    pre-allocated space correctly (simply fetching it instead of
+    allocating a new piece of memory). However, it then called
+    dixSetPrivate anyways, which isn't necessary, and (in the new
+    dixPrivate world) causes an assert failure.
+    
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+    Tested-by: Magnus Kessler <Magnus.Kessler at gmx.net>
+    Reviewed-by: Magnus Kessler <Magnus.Kessler at gmx.net>
+
+commit a94cb400d15b8c78dc04148cbd8db8e5ec8364b5
+Author: Keith Packard <keithp at keithp.com>
+Date:   Thu Jul 1 09:11:36 2010 -0400
+
+    Delete unused miDbe screen private private datatype
+    
+    MiDbeScreenPrivPrivRec is not used in the server. Remove it, along
+    with the MI_DBE_SCREEN_PRIV_PRIV macro that tried to use it.
+    
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+    Reviewed-by: Magnus.Kessler <Magnus.Kessler at gmx.net>
+
+commit f0fcffe55f280add5e4db2f5e9198a48c6f1b015
+Author: Alan Coopersmith <alan.coopersmith at oracle.com>
+Date:   Thu Jun 3 19:00:54 2010 -0700
+
+    Update the sprite immediately when moving it with MouseKeys
+    
+    Fix for OpenSolaris bug 6949755: Mouse Keys are ununusable
+    and possibly https://bugs.freedesktop.org/show_bug.cgi?id=24856
+    
+    Ensures waitForUpdate is False before calling SetCursorPosition.
+    Normally waitForUpdate is False when SilkenMouse is active, True
+    when it's not.   When it's True, the mouse cursor position on
+    screen is not updated immediately.
+    
+    This is more critical on Solaris, since we disabled SigIO, thus in turn
+    disable SilkenMouse, due to the SSE2 vs. signal handler issues described in
+    Sun bugs 6849925, 6859428, and 6879897.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit 3d9079b898c432a87f9b95c1f39a85f660bf0858
+Author: Alan Coopersmith <alan.coopersmith at oracle.com>
+Date:   Thu Jun 3 19:00:53 2010 -0700
+
+    Add API to update setting of waitForUpdate screen private in miPointer
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit 69b2b5c85ec079ef49f84722daa5f148cedc2e1b
+Merge: b90faa7 1432785
+Author: Keith Packard <keithp at keithp.com>
+Date:   Thu Jul 1 23:46:53 2010 -0400
+
+    Merge remote branch 'whot/for-keith'
+
+commit b90faa71567c4461b28515756ba5c1e6286dda16
+Author: Keith Packard <keithp at keithp.com>
+Date:   Thu Jul 1 23:46:27 2010 -0400
+
+    Revert "xkb: merge lockedPtrButtons state from all attached SDs."
+    
+    Preparing to merge Peter's branch.
+    
+    This reverts commit 6052710670953b43b4fff5d101b727163fcb1187.
+
+commit 9fb0785449b287ba1998e08613b3c2102ec24842
+Author: Keith Packard <keithp at keithp.com>
+Date:   Thu Jul 1 23:45:50 2010 -0400
+
+    Revert "Revert "dix: use the event mask of the grab for TryClientEvents.""
+    
+    Preparing to merge Peter's branch.
+    
+    This reverts commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b.
+
+commit 48cac27870992f6bde2c48429ff03c0a7606d5c1
+Author: James Jones <jajones at nvidia.com>
+Date:   Fri Jun 18 17:28:15 2010 -0700
+
+    Cast void* to pointer* to appease some compilers.
+    
+    When this privates.h is included in C++ builds, the compiler
+    complains about implicitly casting void* to void**.  This small
+    patch fixes that up.
+    
+    Signed-off-by: James Jones <jajones at nvidia.com>
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 14327858391ebe929b806efb53ad79e789361883
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Thu Jul 1 12:44:57 2010 +1000
+
+    xkb: release XTEST pointer buttons on physical releases. (#28808)
+    
+    If a button release event is posted for the MD pointer, post a release event
+    through the matching XTEST device. This way, a client who posts a button
+    press through the XTEST extension cannot inadvertedly lock the button.
+    
+    This behaviour is required for historical reasons, until server 1.7 the core
+    pointer would release a button press on physical events, regardless of the
+    XTEST state. Clients seem to rely on this behaviour, causing seemingly stuck
+    grabs.
+    
+    The merged behaviour is kept for multiple keyboard PointerKey events, if two
+    physical keyboards hold the button down as a result of PointerKey actions,
+    the button is not released until the last keyboard releases the button.
+    
+    X.Org Bug 28808 <http://bugs.freedesktop.org/show_bug.cgi?id=28808>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit a71dbc03e65cf7b0654a6eca93ce0bf6a1711ffa
+Author: Keith Packard <keithp at keithp.com>
+Date:   Thu Jul 1 08:27:05 2010 -0400
+
+    Bump to version 1.8.99.904 (1.9 RC4)
+    
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 5ea497fc32202ff19c2b7d8ef4eba08889108a87
+Author: Tiago Vignatti <tiago.vignatti at nokia.com>
+Date:   Tue Jun 29 16:08:02 2010 +0300
+
+    xfree86: configure: remove vendor and card name matching rules
+    
+    Although vendor and board naming are used to create the configure file, the
+    server doesn't actually use it when fetching such file and probing devices.
+    
+    Reported-by: Richard Barnette <jrbarnette at chromium.org>
+    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
+    Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>
+    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
+    Tested-by: Richard Barnette <jrbarnette at chromium.org>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 90fd9e40b59e69333d250a795998f44dc3a5dc0c
+Author: Tiago Vignatti <tiago.vignatti at nokia.com>
+Date:   Tue Jun 29 16:08:01 2010 +0300
+
+    xfree86: pci: remove superfluous vendor and card name logging
+    
+    X server suffers in startup time when relying on the pciaccess's linear search
+    to fetch vendor and video device name from PCI ID file (when existent). Such
+    names are only used to write the log, which may be superfluous. This
+    information often is provided by the drivers or likewise users can get the it
+    using external tools like lspci or scanpci.
+    
+    This patch remove the references of those functions from X start up.
+    
+    Reported-by: Richard Barnette <jrbarnette at chromium.org>
+    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
+    Tested-by: Richard Barnette <jrbarnette at chromium.org>
+    Reviewed-by: James Cloos <cloos at jhcloos.com>
+    Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>
+    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 339f62b1bfadb0ee77d67e351f4e30f5d5e9625f
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Tue Jun 29 15:24:51 2010 +1000
+
+    xkb: emulate PointerKeys events only on the master device.
+    
+    This patch replicates the behaviour for button events. Only generate a
+    PointerKeys motion event on the master device, not on the slave device.
+    Fixes the current issue of PointerKey motion events generating key events as
+    well.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit 69ac909878ef80bb74c4a9ca4150eda66debd754
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Tue Jun 29 12:12:53 2010 +1000
+
+    xkb: merge lockedPtrButtons state from all attached SDs.
+    
+    Problem:
+    lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button
+    press. Unconditionally clearing the bits may cause stuck buttons in this
+    sequence of events:
+    
+    1. type Shift + NumLock to enable PointerKeys
+    2. type 0/Ins on keypad to emulate Button 1 press
+            → button1 press event to client
+    3. press and release button 1 on physical mouse
+            → button1 release event to client
+    
+    Button 1 on the MD is now stuck and cannot be released.
+    
+    Cause:
+    XKB PointerKeys button events are posted through the XTEST pointer device.
+    Once a press is generated, the XTEST device's button is down. The DIX merges
+    the button state of all attached SDs, hence the MD will have a button down
+    while the XTEST device has a button down.
+    
+    PointerKey button events are only generated on the master device to avoid
+    duplicate events (see XkbFakeDeviceButton()). If the MD has the
+    lockedPtrButtons bit cleared by a release event on a physical device, no
+    such event is generated when a keyboard device triggers the PointerKey
+    ButtonRelease trigger. Since the event - if generated - is posted through
+    the XTEST pointer device, lack of a generated ButtonRelease event on the
+    XTEST pointer device means the button is never released, resulting in the
+    stuck button observed above.
+    
+    Solution:
+    This patch merges the MD's lockedPtrButtons with the one of all attached
+    slave devices on release events. Thus, as long as one attached keyboard has
+    a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey
+    button is released on all keyboards, the matching release event is emulated
+    from the MD through the XTEST pointer device, thus also releasing the button
+    in the DIX.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit 09645864f5a52882eee51c801b3e610d683e7147
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Tue Jun 29 13:49:27 2010 +1000
+
+    xkb: Mark switch case fallthrough with comment.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit c7330ecb5d28d7a92d24feb289f7f1812ce055a4
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Wed Jun 30 13:23:14 2010 +1000
+
+    dix: fix up erroneous error message.
+    
+    (WW) Device 'device name' has 36 axes, only using first 36.
+    does seem a bit silly.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit dbf249ec6638f0a8dfa4c2286099845aafc8ac88
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Tue Jun 29 10:43:51 2010 +1000
+
+    xkb: remove now obsolete comment.
+    
+    Looks like nothing broke from removing the hardcoded CoreProcessPointerEvent
+    call. Whoop. Di. Doo.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+commit f028e70ca714f6956e41754f132cb9b8a1e8db63
+Author: Keith Packard <keithp at keithp.com>
+Date:   Wed Jun 30 08:33:55 2010 -0700
+
+    Initialize dev privates before using any
+    
+    Initializing the dev privates code after allocating the server client
+    dev privates would cause the memory leak check to fire at server
+    startup or reset.
+    
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+    Acked-by: Daniel Stone <daniel at fooishbar.org>
+
+commit 433d0851cd3e61d841ff374ee0a0f052d5907029
+Author: Julien Cristau <jcristau at debian.org>
+Date:   Fri Jun 25 11:34:44 2010 +0100
+
+    Xephyr: fix Xv adaptor capability tests
+    
+    Signed-off-by: Julien Cristau <jcristau at debian.org>
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 9626eedebf620559652ffb1fefa82b5d659e57be
+Author: Julien Cristau <jcristau at debian.org>
+Date:   Thu Jun 24 18:45:11 2010 +0100
+
+    configure: bail if Xephyr was requested but its dependencies are missing
+    
+    Signed-off-by: Julien Cristau <jcristau at debian.org>
+    Reviewed-by: Jamey Sharp <jamey at minilop.net>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit e6531ae9d5bdd37775e921268366fb76056e22d5
+Author: Julien Cristau <jcristau at debian.org>
+Date:   Thu Jun 24 18:45:10 2010 +0100
+
+    Xephyr: fix memory leak in XF86DRIOpenConnection
+    
+    The allocated bus id string was not being freed.
+    
+    Signed-off-by: Julien Cristau <jcristau at debian.org>
+    Reviewed-by: Jamey Sharp <jamey at minilop.net>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 390a8466dd1914f4786b811ff8454f6e0c4b6b04
+Author: Ville Syrjälä <ville.syrjala at nokia.com>
+Date:   Mon Jun 28 23:26:48 2010 +0300
+
+    xfree86/modes: Allow the driver to specify initial rotation
+    
+    When the "Rotate" option isn't specified allow the driver to specify
+    the initial rotation mode. This way the driver can choose to retain
+    the same settings that were used by software that was used prior to
+    starting X.
+    
+    Signed-off-by: Ville Syrjälä <ville.syrjala at nokia.com>
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 6052710670953b43b4fff5d101b727163fcb1187
+Author: Keith Packard <keithp at keithp.com>
+Date:   Wed Jun 30 08:21:04 2010 -0700
+
+    xkb: merge lockedPtrButtons state from all attached SDs.
+    
+    Problem:
+    lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button
+    press. Unconditionally clearing the bits may cause stuck buttons in this
+    sequence of events:
+    
+    1. type Shift + NumLock to enable PointerKeys
+    2. type 0/Ins on keypad to emulate Button 1 press
+            → button1 press event to client
+    3. press and release button 1 on physical mouse
+            → button1 release event to client
+    
+    Button 1 on the MD is now stuck and cannot be released.
+    
+    Cause:
+    XKB PointerKeys button events are posted through the XTEST pointer device.
+    Once a press is generated, the XTEST device's button is down. The DIX merges
+    the button state of all attached SDs, hence the MD will have a button down
+    while the XTEST device has a button down.
+    
+    PointerKey button events are only generated on the master device to avoid
+    duplicate events (see XkbFakeDeviceButton()). If the MD has the
+    lockedPtrButtons bit cleared by a release event on a physical device, no
+    such event is generated when a keyboard device triggers the PointerKey
+    ButtonRelease trigger. Since the event - if generated - is posted through
+    the XTEST pointer device, lack of a generated ButtonRelease event on the
+    XTEST pointer device means the button is never released, resulting in the
+    stuck button observed above.
+    
+    Solution:
+    This patch merges the MD's lockedPtrButtons with the one of all attached
+    slave devices on release events. Thus, as long as one attached keyboard has
+    a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey
+    button is released on all keyboards, the matching release event is emulated
+    from the MD through the XTEST pointer device, thus also releasing the button
+    in the DIX.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 28e33ae6f69f716ece5d68e63fc52557236c5f6e
+Author: Jesse Barnes <jbarnes at virtuousgeek.org>
+Date:   Wed Jun 30 07:59:04 2010 -0700
+
+    OS support: fix writeable client vs IgnoreClient behavior
+    
+    When ResetCurrentRequest is called, or IgnoreClient is called when a
+    client has input pending, IgnoredClientsWithInput will be set.  However,
+    a subsequent IgnoreClient request will clear the client fd from that fd
+    set, potentially causing the client to hang.
+    
+    So add an Ignore/Attend count, and only apply the ignore logic on the
+    first ignore and the attend logic on the last attend.  This is
+    consistent with the comments for these functions; callers must pair
+    them.
+    
+    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27035.
+    
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
+    Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Fri Jun 25 09:48:10 2010 +1000
+
+    Revert "dix: use the event mask of the grab for TryClientEvents."
+    
+    Behaviour of earlier X servers was to deliver the ButtonPress event
+    unconditionally, regardless of the actual event mask being set. Thus, a
+    GrabButton event will always deliver the button press event, a GrabKey
+    always the key press event, etc. Same goes for XI and XI2.
+    
+    Reproducible with a simple client requesting a button grab in the form of:
+        XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask,
+                    GrabModeAsync, GrabModeAsync, None, None);
+    
+    On servers before MPX/XI2, the client will receive a button press and
+    release event. On current servers, the client receives only the release.
+    Clients that expect the press event to be delivered unconditionally may
+    leave the user with a stuck grab.
+    
+    XTS test results for XGrabButton are identical with and without this patch.
+    
+    This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc.
+    
+    Conflicts:
+    
+    	dix/events.c
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 1884db430a5680e37e94726dff46686e2218d525
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date:   Thu Jun 24 12:52:53 2010 +1000
+
+    Revert "dix: use the event mask of the grab for TryClientEvents."
+    
+    Behaviour of earlier X servers was to deliver the ButtonPress event
+    unconditionally, regardless of the actual event mask being set. This is
+    documented in the protocol:
+    "This request establishes a passive grab.  In the future, the pointer is
+    actively grabbed as described in GrabPointer, the last-pointer-grab time is
+    set to the time at which the button was pressed (as transmitted in the
+    ButtonPress event), and the ButtonPress event is reported if all of the
+    following conditions are true:
+        <list of conditions, event mask is not one of them>"
+    
+    Thus, a GrabButton event will always deliver the button press event, a
+    GrabKey always the key press event, etc. Same goes for XI and XI2.
+    
+    Reproducible with a simple client requesting a button grab in the form of:
+        XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask,
+                    GrabModeAsync, GrabModeAsync, None, None);
+    
+    On servers before MPX/XI2, the client will receive a button press and
+    release event. On current servers, the client receives only the release.
+    Clients that expect the press event to be delivered unconditionally.
+    
+    XTS Xlib13 XGrabButton 5/39 now passes.
+    
+    This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc.
+    Effectively reverts commit 1c612acca8568fcdf9761d23f112adaf4d496f1b as well,
+    the code introduced with 1c612 is not needed anymore.
+    
+    Conflicts:
+    
+    	dix/events.c
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+    Acked-by: Daniel Stone <daniel at fooishbar.org>
+    Reviewed-by: Keith Packard <keithp at keithp.com>
+
+commit 3b3c77b87070ddcdbb2acb114a81628485e7a129
+Author: Tiago Vignatti <tiago.vignatti at Nokia.com>
+Date:   Wed Jun 23 15:18:04 2010 +0300
+
+    configure: don't check xfont always for each server
+    
+    It's already defined inside REQUIRED_LIBS and all DDX are getting it already.
+    No semantical changes.
+    
+    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
+    Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>
+    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
+commit 75536ee80595c79bba95a1fb6844126ee08486d4
+Author: Tiago Vignatti <tiago.vignatti at nokia.com>
+Date:   Wed Jun 23 15:18:03 2010 +0300
+
+    dix: use one single function to register fpe fonts
+    
+    X server doesn't need to understand fpe internals, so use
+    register_fpe_functions from libXfont.
+    
+    It's required to get new version of libXfont, therefore adjust it to be passed
+    to autoconf.
+    
+    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
+    Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>
+    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Keith Packard <keithp at keithp.com>
+
 commit a68a101a730df7f73421555e381a50b074607c5e
 Author: Keith Packard <keithp at keithp.com>
 Date:   Tue Jun 22 12:13:26 2010 -0700
--- Xi/exevents.c
+++ Xi/exevents.c
@@ -747,7 +747,6 @@
     KeyClassPtr k       = NULL;
     ButtonClassPtr b    = NULL;
     ValuatorClassPtr v  = NULL;
-    BYTE *kptr          = NULL;
 
     /* This event is always the first we get, before the actual events with
      * the data. However, the way how the DDX is set up, "device" will
@@ -814,32 +813,31 @@
         if (!k)
             return DONT_PROCESS;
 
-	kptr = &k->down[key >> 3];
-        /* don't allow ddx to generate multiple downs, but repeats are okay */
-	if ((*kptr & bit) && !event->key_repeat)
+	/* don't allow ddx to generate multiple downs, but repeats are okay */
+	if (key_is_down(device, key, KEY_PROCESSED) && !event->key_repeat)
 	    return DONT_PROCESS;
+
 	if (device->valuator)
 	    device->valuator->motionHintWindow = NullWindow;
-	*kptr |= bit;
+	set_key_down(device, key, KEY_PROCESSED);
     } else if (event->type == ET_KeyRelease) {
         if (!k)
             return DONT_PROCESS;
 
-	kptr = &k->down[key >> 3];
-	if (!(*kptr & bit))	/* guard against duplicates */
+	if (!key_is_down(device, key, KEY_PROCESSED))	/* guard against duplicates */
 	    return DONT_PROCESS;
 	if (device->valuator)
 	    device->valuator->motionHintWindow = NullWindow;
-	*kptr &= ~bit;
+	set_key_up(device, key, KEY_PROCESSED);
     } else if (event->type == ET_ButtonPress) {
         Mask mask;
         if (!b)
             return DONT_PROCESS;
 
-        kptr = &b->down[key >> 3];
-        if ((*kptr & bit) != 0)
+        if (button_is_down(device, key, BUTTON_PROCESSED))
             return DONT_PROCESS;
-        *kptr |= bit;
+
+        set_button_down(device, key, BUTTON_PROCESSED);
 	if (device->valuator)
 	    device->valuator->motionHintWindow = NullWindow;
         if (!b->map[key])
@@ -859,8 +857,7 @@
         if (!b)
             return DONT_PROCESS;
 
-        kptr = &b->down[key>>3];
-        if (!(*kptr & bit))
+        if (!button_is_down(device, key, BUTTON_PROCESSED))
             return DONT_PROCESS;
         if (IsMaster(device)) {
             DeviceIntPtr sd;
@@ -875,11 +872,11 @@
                     continue;
                 if (!sd->button)
                     continue;
-                if ((sd->button->down[key>>3] & bit) != 0)
+                if (button_is_down(sd, key, BUTTON_PROCESSED))
                     return DONT_PROCESS;
             }
         }
-        *kptr &= ~bit;
+        set_button_up(device, key, BUTTON_PROCESSED);
 	if (device->valuator)
 	    device->valuator->motionHintWindow = NullWindow;
         if (!b->map[key])
--- configure
+++ configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for xorg-server 1.8.99.903.
+# Generated by GNU Autoconf 2.65 for xorg-server 1.8.99.905.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
@@ -762,8 +762,8 @@
 # Identity of this package.
 PACKAGE_NAME='xorg-server'
 PACKAGE_TARNAME='xorg-server'
-PACKAGE_VERSION='1.8.99.903'
-PACKAGE_STRING='xorg-server 1.8.99.903'
+PACKAGE_VERSION='1.8.99.905'
+PACKAGE_STRING='xorg-server 1.8.99.905'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 PACKAGE_URL=''
 
@@ -2070,7 +2070,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xorg-server 1.8.99.903 to adapt to many kinds of systems.
+\`configure' configures xorg-server 1.8.99.905 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2140,7 +2140,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xorg-server 1.8.99.903:";;
+     short | recursive ) echo "Configuration of xorg-server 1.8.99.905:";;
    esac
   cat <<\_ACEOF
 
@@ -2526,7 +2526,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xorg-server configure 1.8.99.903
+xorg-server configure 1.8.99.905
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -3225,7 +3225,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by xorg-server $as_me 1.8.99.903, which was
+It was created by xorg-server $as_me 1.8.99.905, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -3572,7 +3572,7 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-RELEASE_DATE="2010-06-22"
+RELEASE_DATE="2010-07-14"
 
 am__api_version='1.11'
 
@@ -4035,7 +4035,7 @@
 
 # Define the identity of the package.
  PACKAGE='xorg-server'
- VERSION='1.8.99.903'
+ VERSION='1.8.99.905'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17968,9 +17968,6 @@
 APPLEWMPROTO="applewmproto >= 1.4"
 
 SDK_REQUIRED_MODULES="xproto >= 7.0.17 randrproto >= 1.2.99.3 renderproto >= 0.11 xextproto >= 7.0.99.3 inputproto >= 1.9.99.902 kbproto >= 1.0.3 fontsproto"
-REQUIRED_MODULES="fixesproto >= 4.1 damageproto >= 1.1 xcmiscproto >= 1.2.0 xtrans >= 1.2.2 bigreqsproto >= 1.1.0 $SDK_REQUIRED_MODULES"
-REQUIRED_LIBS="xfont xau"
-
 # Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
 
 
@@ -17980,6 +17977,7 @@
 LIBDRM="libdrm >= 2.3.0"
 LIBGL="gl >= 7.1.0"
 LIBXEXT="xext >= 1.0.99.4"
+LIBXFONT="xfont >= 1.4.2"
 LIBXI="xi >= 1.2.99.1"
 LIBXTST="xtst >= 1.0.99.2"
 LIBPCIACCESS="pciaccess >= 0.8.0"
@@ -18078,7 +18076,9 @@
 $as_echo "yes" >&6; }
 
 fi
-REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN"
+REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau"
+
+REQUIRED_MODULES="fixesproto >= 4.1 damageproto >= 1.1 xcmiscproto >= 1.2.0 xtrans >= 1.2.2 bigreqsproto >= 1.1.0 $SDK_REQUIRED_MODULES"
 
 if test "x$CONFIG_UDEV" = xyes &&
  { test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then
@@ -20941,12 +20941,12 @@
     pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xfont \$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xfont $LIBXEXT x11 xau $XDMCP_MODULES") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "xfont $LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null`
+  pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -20957,12 +20957,12 @@
     pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xfont \$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xfont $LIBXEXT x11 xau $XDMCP_MODULES") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "xfont $LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null`
+  pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -20982,9 +20982,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xfont $LIBXEXT x11 xau $XDMCP_MODULES" 2>&1`
+	        XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1`
         else
-	        XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xfont $LIBXEXT x11 xau $XDMCP_MODULES" 2>&1`
+	        XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XNESTMODULES_PKG_ERRORS" >&5
@@ -22330,12 +22330,12 @@
     pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau xfont" 2>/dev/null`
+  pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -22346,12 +22346,12 @@
     pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau xfont" 2>/dev/null`
+  pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -22371,14 +22371,14 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xdmcp xau xfont" 2>&1`
+	        XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xdmcp xau" 2>&1`
         else
-	        XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xdmcp xau xfont" 2>&1`
+	        XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xdmcp xau" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$XWINMODULES_PKG_ERRORS" >&5
 
-	as_fn_error "Package requirements (x11 xdmcp xau xfont) were not met:
+	as_fn_error "Package requirements (x11 xdmcp xau) were not met:
 
 $XWINMODULES_PKG_ERRORS
 
@@ -22962,12 +22962,12 @@
     pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 xrender xfixes xfont \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
+  pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -22978,12 +22978,12 @@
     pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 xrender xfixes xfont \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
+  pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -23003,9 +23003,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
+	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
         else
-	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
+	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$DMXMODULES_PKG_ERRORS" >&5
@@ -23887,7 +23887,7 @@
 
     fi
 
-    XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xfont xau xdmcp"
+    XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp"
     if test "x$XV" = xyes; then
         XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
     fi
@@ -23967,6 +23967,9 @@
     if test "x$XEPHYR" = xauto; then
         XEPHYR=$xephyr
     fi
+    if test "x$XEPHYR" = xyes && test "x$xephyr" = xno; then
+        as_fn_error "Xephyr dependencies missing" "$LINENO" 5
+    fi
 
     # Xephyr needs nanosleep() which is in librt on Solaris
     ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
@@ -25132,7 +25135,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xorg-server $as_me 1.8.99.903, which was
+This file was extended by xorg-server $as_me 1.8.99.905, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -25198,7 +25201,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xorg-server config.status 1.8.99.903
+xorg-server config.status 1.8.99.905
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
--- configure.ac
+++ configure.ac
@@ -26,8 +26,8 @@
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.8.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-06-22"
+AC_INIT([xorg-server], 1.8.99.905, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-07-14"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
@@ -794,9 +794,6 @@
 
 dnl Core modules for most extensions, et al.
 SDK_REQUIRED_MODULES="[xproto >= 7.0.17] [randrproto >= 1.2.99.3] [renderproto >= 0.11] [xextproto >= 7.0.99.3] [inputproto >= 1.9.99.902] [kbproto >= 1.0.3] fontsproto"
-REQUIRED_MODULES="[fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] $SDK_REQUIRED_MODULES"
-REQUIRED_LIBS="xfont xau"
-
 # Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
 AC_SUBST(SDK_REQUIRED_MODULES)
 
@@ -807,6 +804,7 @@
 LIBDRM="libdrm >= 2.3.0"
 LIBGL="gl >= 7.1.0"
 LIBXEXT="xext >= 1.0.99.4"
+LIBXFONT="xfont >= 1.4.2"
 LIBXI="xi >= 1.2.99.1"
 LIBXTST="xtst >= 1.0.99.2"
 LIBPCIACCESS="pciaccess >= 0.8.0"
@@ -819,7 +817,9 @@
 dnl Pixman is always required, but we separate it out so we can link
 dnl specific modules against it
 PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN)
-REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN"
+REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau"
+
+REQUIRED_MODULES="[fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] $SDK_REQUIRED_MODULES"
 
 if test "x$CONFIG_UDEV" = xyes &&
  { test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then
@@ -1515,7 +1515,7 @@
 
 dnl Xnest DDX
 
-PKG_CHECK_MODULES(XNESTMODULES, [xfont $LIBXEXT x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no])
+PKG_CHECK_MODULES(XNESTMODULES, [$LIBXEXT x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no])
 AC_MSG_CHECKING([whether to build Xnest DDX])
 if test "x$XNEST" = xauto; then
 	XNEST="$have_xnest"
@@ -1867,7 +1867,7 @@
 	AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
 	AC_CHECK_TOOL(WINDRES, windres)
 
-	PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont])
+	PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau])
 
 	if test "x$WINDOWSWM" = xauto; then
 		PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no])
@@ -1956,7 +1956,7 @@
 dnl DMX DDX
 PKG_CHECK_MODULES(
 	[DMXMODULES],
-	[xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES],
+	[xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES],
 	[PKG_CHECK_MODULES(
 		[XDMXCONFIG_DEP],
 		[xaw7 xmu xt xpm x11],
@@ -2061,7 +2061,7 @@
        AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
     fi
 
-    XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xfont xau xdmcp"
+    XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp"
     if test "x$XV" = xyes; then
         XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
     fi
@@ -2073,6 +2073,9 @@
     if test "x$XEPHYR" = xauto; then
         XEPHYR=$xephyr
     fi
+    if test "x$XEPHYR" = xyes && test "x$xephyr" = xno; then	
+        AC_MSG_ERROR([Xephyr dependencies missing])
+    fi
 
     # Xephyr needs nanosleep() which is in librt on Solaris
     AC_CHECK_FUNC([nanosleep], [],
--- dbe/midbe.c
+++ dbe/midbe.c
@@ -202,12 +202,6 @@
             return (rc == Success) ? BadAlloc : rc;
         }
 
-
-        /* Attach the priv priv to the priv. */
-	dixSetPrivate(&pDbeWindowPriv->devPrivates, miDbeWindowPrivPrivKey,
-		      pDbeWindowPrivPriv);
-
-
         /* Clear the back buffer. */
         pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen);
         if ((*pDbeScreenPriv->SetupBackgroundPainter)(pWin, pGC))
--- dbe/midbestr.h
+++ dbe/midbestr.h
@@ -48,11 +48,6 @@
 #define MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin)\
     MI_DBE_WINDOW_PRIV_PRIV(DBE_WINDOW_PRIV(pWin))
 
-#define MI_DBE_SCREEN_PRIV_PRIV(pDbeScreenPriv) \
-    (!(pDbeScreenPriv) ? NULL : (MiDbeScreenPrivPrivPtr) \
-     dixLookupPrivate(&(pDbeScreenPriv)->devPrivates, miDbeScreenPrivPrivKey))
-
-
 /* TYPEDEFS */
 
 typedef struct _MiDbeWindowPrivPrivRec
@@ -80,16 +75,5 @@
 
 } MiDbeWindowPrivPrivRec, *MiDbeWindowPrivPrivPtr;
 
-typedef struct _MiDbeScreenPrivPrivRec
-{
-    /* Place machine-specific fields in here.
-     * Since this is mi code, we do not really have machine-specific fields.
-     */
-
-    /* Pointer back to our screen private with which we are associated. */
-    DbeScreenPrivPtr	pDbeScreenPriv;
-
-} MiDbeScreenPrivPrivRec, *MiDbeScreenPrivPrivPtr;
-
 #endif /* MIDBE_STRUCT_H */
 
--- dix/devices.c
+++ dix/devices.c
@@ -1239,7 +1239,7 @@
     if (!dev)
         return FALSE;
 
-    if (numAxes >= MAX_VALUATORS)
+    if (numAxes > MAX_VALUATORS)
     {
         LogMessage(X_WARNING,
                    "Device '%s' has %d axes, only using first %d.\n",
--- dix/dixfonts.c
+++ dix/dixfonts.c
@@ -1924,9 +1924,7 @@
 {
     patternCache = MakeFontPatternCache();
 
-    BuiltinRegisterFpeFunctions();
-    FontFileRegisterFpeFunctions();
-    fs_register_fpe_functions();
+    register_fpe_functions();
 }
 
 int
--- dix/events.c
+++ dix/events.c
@@ -3420,7 +3420,6 @@
     {
 	DeviceIntPtr	gdev;
 	XkbSrvInfoPtr	xkbi = NULL;
-	Mask		mask = 0;
 
 	gdev= grab->modifierDevice;
         if (grab->grabtype == GRABTYPE_CORE)
@@ -3535,9 +3534,6 @@
                 }
                 xE = &core;
                 count = 1;
-                mask = grab->eventMask;
-                if (grab->ownerEvents)
-                    mask |= pWin->eventMask;
             } else if (match & XI2_MATCH)
             {
                 rc = EventToXI2((InternalEvent*)event, &xE);
@@ -3549,34 +3545,6 @@
                     continue;
                 }
                 count = 1;
-
-                /* FIXME: EventToXI2 returns NULL for enter events, so
-                 * dereferencing the event is bad. Internal event types are
-                 * aligned with core events, so the else clause is valid.
-                 * long-term we should use internal events for enter/focus
-                 * as well */
-                if (xE)
-                    mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
-                else if (event->type == XI_Enter || event->type == XI_FocusIn)
-                    mask = grab->xi2mask[device->id][event->type/8];
-
-                if (grab->ownerEvents && wOtherInputMasks(grab->window))
-                {
-                    InputClientsPtr icp =
-                        wOtherInputMasks(grab->window)->inputClients;
-
-                    while(icp)
-                    {
-                        if (rClient(icp) == rClient(grab))
-                        {
-                            int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
-                            mask |= icp->xi2mask[device->id][evtype/8];
-                            break;
-                        }
-
-                        icp = icp->next;
-                    }
-                }
             } else
             {
                 rc = EventToXI((InternalEvent*)event, &xE, &count);
@@ -3587,23 +3555,6 @@
                                 "(%d, %d).\n", device->name, event->type, rc);
                     continue;
                 }
-                mask = grab->eventMask;
-                if (grab->ownerEvents && wOtherInputMasks(grab->window))
-                {
-                    InputClientsPtr icp =
-                        wOtherInputMasks(grab->window)->inputClients;
-
-                    while(icp)
-                    {
-                        if (rClient(icp) == rClient(grab))
-                        {
-                            mask |= icp->mask[device->id];
-                            break;
-                        }
-
-                        icp = icp->next;
-                    }
-                }
             }
 
 	    (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
@@ -3612,7 +3563,8 @@
             {
                 FixUpEventFromWindow(device, xE, grab->window, None, TRUE);
 
-                TryClientEvents(rClient(grab), device, xE, count, mask,
+                TryClientEvents(rClient(grab), device, xE, count,
+                                       GetEventFilter(device, xE),
                                        GetEventFilter(device, xE), grab);
             }
 
@@ -3985,13 +3937,7 @@
 void
 FixKeyState (DeviceEvent *event, DeviceIntPtr keybd)
 {
-    int             key, bit;
-    BYTE   *kptr;
-    KeyClassPtr keyc = keybd->key;
-
-    key = event->detail.key;
-    kptr = &keyc->down[key >> 3];
-    bit = 1 << (key & 7);
+    int key = event->detail.key;
 
     if (event->type == ET_KeyPress) {
 	DebugF("FixKeyState: Key %d %s\n",key,
@@ -3999,9 +3945,9 @@
     }
 
     if (event->type == ET_KeyPress)
-	    *kptr |= bit;
+        set_key_down(keybd, key, KEY_PROCESSED);
     else if (event->type == ET_KeyRelease)
-	    *kptr &= ~bit;
+        set_key_up(keybd, key, KEY_PROCESSED);
     else
         FatalError("Impossible keyboard event");
 }
--- dix/getevents.c
+++ dix/getevents.c
@@ -91,21 +91,52 @@
 }
 
 void
+set_button_down(DeviceIntPtr pDev, int button, int type)
+{
+    if (type == BUTTON_PROCESSED)
+        SetBit(pDev->button->down, button);
+    else
+        SetBit(pDev->button->postdown, button);
+}
+
+void
+set_button_up(DeviceIntPtr pDev, int button, int type)
+{
+    if (type == BUTTON_PROCESSED)
+        ClearBit(pDev->button->down, button);
+    else
+        ClearBit(pDev->button->postdown, button);
+}
+
+Bool
+button_is_down(DeviceIntPtr pDev, int button, int type)
+{
+    int ret = 0;
+
+    if (type & BUTTON_PROCESSED)
+        ret |= !!BitIsOn(pDev->button->down, button);
+    if (type & BUTTON_POSTED)
+        ret |= !!BitIsOn(pDev->button->postdown, button);
+
+    return ret;
+}
+
+void
 set_key_down(DeviceIntPtr pDev, int key_code, int type)
 {
     if (type == KEY_PROCESSED)
-        pDev->key->down[key_code >> 3] |= (1 << (key_code & 7));
+        SetBit(pDev->key->down, key_code);
     else
-        pDev->key->postdown[key_code >> 3] |= (1 << (key_code & 7));
+        SetBit(pDev->key->postdown, key_code);
 }
 
 void
 set_key_up(DeviceIntPtr pDev, int key_code, int type)
 {
     if (type == KEY_PROCESSED)
-        pDev->key->down[key_code >> 3] &= ~(1 << (key_code & 7));
+        ClearBit(pDev->key->down, key_code);
     else
-        pDev->key->postdown[key_code >> 3] &= ~(1 << (key_code & 7));
+        ClearBit(pDev->key->postdown, key_code);
 }
 
 Bool
@@ -114,9 +145,9 @@
     int ret = 0;
 
     if (type & KEY_PROCESSED)
-        ret |= !!(pDev->key->down[key_code >> 3] & (1 << (key_code & 7)));
-    else if (type & KEY_POSTED)
-        ret |= !!(pDev->key->postdown[key_code >> 3] & (1 << (key_code & 7)));
+        ret |= !!BitIsOn(pDev->key->down, key_code);
+    if (type & KEY_POSTED)
+        ret |= !!BitIsOn(pDev->key->postdown, key_code);
 
     return ret;
 }
@@ -1123,11 +1154,11 @@
     else {
         if (type == ButtonPress) {
             event->type = ET_ButtonPress;
-            pDev->button->postdown[buttons >> 3] |= (1 << (buttons & 7));
+            set_button_down(pDev, buttons, BUTTON_POSTED);
         }
         else if (type == ButtonRelease) {
             event->type = ET_ButtonRelease;
-            pDev->button->postdown[buttons >> 3] &= ~(1 << (buttons & 7));
+            set_button_up(pDev, buttons, BUTTON_POSTED);
         }
         event->detail.button = buttons;
     }
--- dix/main.c
+++ dix/main.c
@@ -184,6 +184,9 @@
 	clients[0] = serverClient;
 	currentMaxClients = 1;
 
+	/* Initialize privates before first allocation */
+	dixResetPrivates();
+
 	/* Initialize server client devPrivates, to be reallocated as
 	 * more client privates are registered
 	 */
@@ -200,7 +203,6 @@
 	InitEvents();
 	InitSelections();
 	InitGlyphCaching();
-	dixResetPrivates();
 	dixResetRegistry();
 	ResetFontPrivateIndex();
 	InitCallbackManager();
--- exa/exa.c
+++ exa/exa.c
@@ -435,6 +435,29 @@
     (*pExaScr->info->FinishAccess) (pPixmap, i);
 }
 
+
+/**
+ * Helper for things common to all schemes when a pixmap is destroyed
+ */
+void
+exaDestroyPixmap(PixmapPtr pPixmap)
+{
+    ExaScreenPriv(pPixmap->drawable.pScreen);
+    int i;
+
+    /* Finish access if it was prepared (e.g. pixmap created during
+     * software fallback)
+     */
+    for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) {
+	if (pExaScr->access[i].pixmap == pPixmap) {
+	    exaFinishAccess(&pPixmap->drawable, i);
+	    pExaScr->access[i].pixmap = NULL;
+	    break;
+	}
+    }
+}
+
+
 /**
  * Here begins EXA's GC code.
  * Do not ever access the fb/mi layer directly.
--- exa/exa_classic.c
+++ exa/exa_classic.c
@@ -221,9 +221,7 @@
     {
 	ExaPixmapPriv (pPixmap);
 
-	/* During a fallback we must finish access, but we don't know the index. */
-	if (pExaScr->fallback_counter)
-	    exaFinishAccess(&pPixmap->drawable, -1);
+	exaDestroyPixmap(pPixmap);
 
 	if (pExaPixmap->area)
 	{
--- exa/exa_driver.c
+++ exa/exa_driver.c
@@ -193,9 +193,7 @@
     {
 	ExaPixmapPriv (pPixmap);
 
-	/* During a fallback we must finish access, but we don't know the index. */
-	if (pExaScr->fallback_counter)
-	    exaFinishAccess(&pPixmap->drawable, -1);
+	exaDestroyPixmap(pPixmap);
 
 	if (pExaPixmap->driverPriv)
 	    pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv);
--- exa/exa_mixed.c
+++ exa/exa_mixed.c
@@ -245,9 +245,7 @@
     {
 	ExaPixmapPriv (pPixmap);
 
-	/* During a fallback we must finish access, but we don't know the index. */
-	if (pExaScr->fallback_counter)
-	    exaFinishAccess(&pPixmap->drawable, -1);
+	exaDestroyPixmap(pPixmap);
 
 	if (pExaScr->deferred_mixed_pixmap == pPixmap)
 	    pExaScr->deferred_mixed_pixmap = NULL;
--- exa/exa_priv.h
+++ exa/exa_priv.h
@@ -551,6 +551,9 @@
 exaFinishAccess(DrawablePtr pDrawable, int index);
 
 void
+exaDestroyPixmap(PixmapPtr pPixmap);
+
+void
 exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2);
 
 void
--- glx/glxdri.c
+++ glx/glxdri.c
@@ -866,12 +866,21 @@
 static Bool
 glxDRIEnterVT (int index, int flags)
 {
+    ScrnInfoPtr scrn = xf86Screens[index];
+    Bool	ret;
     __GLXDRIscreen *screen = (__GLXDRIscreen *) 
 	glxGetScreen(screenInfo.screens[index]);
 
     LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
 
-    if (!(*screen->enterVT) (index, flags))
+    scrn->EnterVT = screen->enterVT;
+
+    ret = scrn->EnterVT (index, flags);
+
+    screen->enterVT = scrn->EnterVT;
+    scrn->EnterVT = glxDRIEnterVT;
+
+    if (!ret)
 	return FALSE;
     
     glxResumeClients();
@@ -882,6 +891,7 @@
 static void
 glxDRILeaveVT (int index, int flags)
 {
+    ScrnInfoPtr scrn = xf86Screens[index];
     __GLXDRIscreen *screen = (__GLXDRIscreen *)
 	glxGetScreen(screenInfo.screens[index]);
 
@@ -889,7 +899,10 @@
 
     glxSuspendClients();
 
-    return (*screen->leaveVT) (index, flags);
+    scrn->LeaveVT = screen->leaveVT;
+    (*screen->leaveVT) (index, flags);
+    screen->leaveVT = scrn->LeaveVT;
+    scrn->LeaveVT = glxDRILeaveVT;
 }
 
 static void
--- glx/glxdri2.c
+++ glx/glxdri2.c
@@ -605,12 +605,21 @@
 static Bool
 glxDRIEnterVT (int index, int flags)
 {
+    ScrnInfoPtr scrn = xf86Screens[index];
+    Bool	ret;
     __GLXDRIscreen *screen = (__GLXDRIscreen *) 
 	glxGetScreen(screenInfo.screens[index]);
 
     LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
 
-    if (!(*screen->enterVT) (index, flags))
+    scrn->EnterVT = screen->enterVT;
+
+    ret = scrn->EnterVT (index, flags);
+
+    screen->enterVT = scrn->EnterVT;
+    scrn->EnterVT = glxDRIEnterVT;
+
+    if (!ret)
 	return FALSE;
     
     glxResumeClients();
@@ -621,6 +630,7 @@
 static void
 glxDRILeaveVT (int index, int flags)
 {
+    ScrnInfoPtr scrn = xf86Screens[index];
     __GLXDRIscreen *screen = (__GLXDRIscreen *)
 	glxGetScreen(screenInfo.screens[index]);
 
@@ -628,7 +638,10 @@
 
     glxSuspendClients();
 
-    return (*screen->leaveVT) (index, flags);
+    scrn->LeaveVT = screen->leaveVT;
+    (*screen->leaveVT) (index, flags);
+    screen->leaveVT = scrn->LeaveVT;
+    scrn->LeaveVT = glxDRILeaveVT;
 }
 
 static void
--- hw/dmx/input/atKeynames.h
+++ hw/dmx/input/atKeynames.h
@@ -66,8 +66,6 @@
 #define KanaMask	Mod4Mask
 #define ScrollLockMask	Mod5Mask
 
-#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
-
 /*
  * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
  *       sets of scancodes. Set3 can only be generated by a MF keyboard.
--- hw/kdrive/ephyr/ephyr.c
+++ hw/kdrive/ephyr/ephyr.c
@@ -776,13 +776,7 @@
 
       for (key = 0; key < MAP_LENGTH; key++)
         if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
-          int bit;
-          BYTE *kptr;
-
-          kptr = &keyc->down[key >> 3];
-          bit = 1 << (key & 7);
-
-          if (*kptr & bit)
+          if (key_is_down(pDev, key, KEY_PROCESSED))
 	        KdEnqueueKeyboardEvent (ephyrKbd, key, TRUE);
 
           if (--count == 0)
--- hw/kdrive/ephyr/ephyrdriext.c
+++ hw/kdrive/ephyr/ephyrdriext.c
@@ -682,7 +682,7 @@
 {
     xXF86DRIOpenConnectionReply rep;
     drm_handle_t			hSAREA;
-    char*			busIdString;
+    char*			busIdString = NULL;
     REQUEST(xXF86DRIOpenConnectionReq);
     REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq);
 
@@ -716,6 +716,7 @@
     WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *)&rep);
     if (rep.busIdStringLength)
         WriteToClient(client, rep.busIdStringLength, busIdString);
+    free(busIdString);
     EPHYR_LOG ("leave\n") ;
     return Success;
 }
--- hw/kdrive/ephyr/ephyrhostvideo.c
+++ hw/kdrive/ephyr/ephyrhostvideo.c
@@ -380,7 +380,8 @@
 {
     EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
 
-    if (((XvAdaptorInfo*)a_this)->type & XvVideoMask & XvInputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvVideoMask | XvInputMask)) ==
+		    (XvVideoMask | XvInputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
@@ -391,7 +392,8 @@
 ephyrHostXVAdaptorHasGetVideo (const EphyrHostXVAdaptor *a_this,
                                Bool *a_result)
 {
-    if (((XvAdaptorInfo*)a_this)->type & XvVideoMask & XvOutputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvVideoMask | XvOutputMask)) ==
+		    (XvVideoMask | XvOutputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
@@ -404,7 +406,8 @@
 {
     EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
 
-    if (((XvAdaptorInfo*)a_this)->type & XvStillMask && XvInputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvStillMask | XvInputMask)) ==
+		    (XvStillMask | XvInputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
@@ -417,7 +420,8 @@
 {
     EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
 
-    if (((XvAdaptorInfo*)a_this)->type & XvStillMask && XvOutputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvStillMask | XvOutputMask)) ==
+		    (XvStillMask | XvOutputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
@@ -430,7 +434,8 @@
 {
     EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
 
-    if (((XvAdaptorInfo*)a_this)->type & XvImageMask && XvInputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvImageMask | XvInputMask)) ==
+		    (XvImageMask | XvInputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
--- hw/xfree86/common/xf86Configure.c
+++ hw/xfree86/common/xf86Configure.c
@@ -107,8 +107,6 @@
 static void
 bus_pci_newdev_configure(void *busData, int i, int *chipset)
 {
-	const char *VendorName;
-	const char *CardName;
 	char busnum[8];
     struct pci_device * pVideo = NULL;
 
@@ -116,26 +114,6 @@
 
 	DevToConfig[i].pVideo = pVideo;
 
-	VendorName = pci_device_get_vendor_name( pVideo );
-	CardName = pci_device_get_device_name( pVideo );
-
-	if (!VendorName) {
-	    VendorName = xnfalloc(15);
-	    sprintf((char*)VendorName, "Unknown Vendor");
-	}
-
-	if (!CardName) {
-	    CardName = xnfalloc(14);
-	    sprintf((char*)CardName, "Unknown Board");
-	}
-
-	DevToConfig[i].GDev.identifier =
-	    xnfalloc(strlen(VendorName) + strlen(CardName) + 2);
-	sprintf(DevToConfig[i].GDev.identifier, "%s %s", VendorName, CardName);
-
-	DevToConfig[i].GDev.vendor = (char *)VendorName;
-	DevToConfig[i].GDev.board = (char *)CardName;
-
 	DevToConfig[i].GDev.busID = xnfalloc(16);
 	xf86FormatPciBusNumber(pVideo->bus, busnum);
 	sprintf(DevToConfig[i].GDev.busID, "PCI:%s:%d:%d",
@@ -357,9 +335,6 @@
     /* Move device info to parser structure */
     sprintf(identifier, "Card%d", screennum);
     ptr->dev_identifier = strdup(identifier);
-/*    ptr->dev_identifier = DevToConfig[screennum].GDev.identifier;*/
-    ptr->dev_vendor = DevToConfig[screennum].GDev.vendor;
-    ptr->dev_board = DevToConfig[screennum].GDev.board;
     ptr->dev_chipset = DevToConfig[screennum].GDev.chipset;
     ptr->dev_busid = DevToConfig[screennum].GDev.busID;
     ptr->dev_driver = DevToConfig[screennum].GDev.driver;
--- hw/xfree86/common/xf86Events.c
+++ hw/xfree86/common/xf86Events.c
@@ -372,8 +372,6 @@
     xorg_backtrace();
 }
 
-#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
-
 static void
 xf86ReleaseKeys(DeviceIntPtr pDev)
 {
@@ -399,7 +397,7 @@
     for (i = keyc->xkbInfo->desc->min_key_code;
          i < keyc->xkbInfo->desc->max_key_code;
          i++) {
-        if (KeyPressed(i)) {
+        if (key_is_down(pDev, i, KEY_POSTED)) {
             sigstate = xf86BlockSIGIO ();
             nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i);
             for (j = 0; j < nevents; j++)
--- hw/xfree86/common/xf86VGAarbiter.c
+++ hw/xfree86/common/xf86VGAarbiter.c
@@ -523,12 +523,16 @@
 VGAarbiterEnterVT(int index, int flags)
 {
     Bool val;
+    ScrnInfoPtr pScrn = xf86Screens[index];
     ScreenPtr pScreen = screenInfo.screens[index];
     VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
         &pScreen->devPrivates, VGAarbiterScreenKey);
 
     VGAGet();
-    val = (*pScreenPriv->EnterVT)(index, flags);
+    pScrn->EnterVT = pScreenPriv->EnterVT;
+    val = (*pScrn->EnterVT)(index, flags);
+    pScreenPriv->EnterVT = pScrn->EnterVT;
+    pScrn->EnterVT = VGAarbiterEnterVT;
     VGAPut();
     return val;
 }
@@ -536,12 +540,16 @@
 static void
 VGAarbiterLeaveVT(int index, int flags)
 {
+    ScrnInfoPtr pScrn = xf86Screens[index];
     ScreenPtr pScreen = screenInfo.screens[index];
     VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
         &pScreen->devPrivates, VGAarbiterScreenKey);
 
     VGAGet();
+    pScrn->LeaveVT = pScreenPriv->LeaveVT;
     (*pScreenPriv->LeaveVT)(index, flags);
+    pScreenPriv->LeaveVT = pScrn->LeaveVT;
+    pScrn->LeaveVT = VGAarbiterLeaveVT;
     VGAPut();
 }
 
--- hw/xfree86/common/xf86cmap.c
+++ hw/xfree86/common/xf86cmap.c
@@ -466,11 +466,17 @@
 static Bool 
 CMapEnterVT(int index, int flags)
 {
+    ScrnInfoPtr pScrn = xf86Screens[index];
     ScreenPtr pScreen = screenInfo.screens[index];
+    Bool ret;
     CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
 	&pScreen->devPrivates, CMapScreenKey);
 
-    if((*pScreenPriv->EnterVT)(index, flags)) {
+    pScrn->EnterVT = pScreenPriv->EnterVT;
+    ret = (*pScreenPriv->EnterVT)(index, flags);
+    pScreenPriv->EnterVT = pScrn->EnterVT;
+    pScrn->EnterVT = CMapEnterVT;
+    if(ret) {
 	if(GetInstalledmiColormap(pScreen))
 	    CMapReinstallMap(GetInstalledmiColormap(pScreen));
 	return TRUE;
--- hw/xfree86/common/xf86pciBus.c
+++ hw/xfree86/common/xf86pciBus.c
@@ -151,18 +151,13 @@
     
     /* 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))
+	if (!PCIALWAYSPRINTCLASSES(info->device_class))
 	    continue;
 
 	if (xf86IsPrimaryPci(info))
@@ -173,12 +168,6 @@
 		info->vendor_id, info->device_id,
 		info->subvendor_id, info->subdevice_id);
 
-	if (vendorname)
-	    xf86ErrorF("%s ", vendorname);
-
-	if (chipname)
-	    xf86ErrorF("%s ", chipname);
-
 	xf86ErrorF("rev %d", info->revision);
 
 	for (i = 0; i < 6; i++) {
--- hw/xfree86/common/xf86xv.c
+++ hw/xfree86/common/xf86xv.c
@@ -1229,11 +1229,15 @@
 static Bool
 xf86XVEnterVT(int index, int flags)
 {
+    ScrnInfoPtr pScrn = xf86Screens[index];
     ScreenPtr pScreen = screenInfo.screens[index];
     XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
     Bool ret;
 
+    pScrn->EnterVT = ScreenPriv->EnterVT;
     ret = (*ScreenPriv->EnterVT)(index, flags);
+    ScreenPriv->EnterVT = pScrn->EnterVT;
+    pScrn->EnterVT = xf86XVEnterVT;
 
     if(ret) WalkTree(pScreen, xf86XVReputAllVideo, 0);
 
@@ -1243,6 +1247,7 @@
 static void
 xf86XVLeaveVT(int index, int flags)
 {
+    ScrnInfoPtr pScrn = xf86Screens[index];
     ScreenPtr pScreen = screenInfo.screens[index];
     XvScreenPtr pxvs = GET_XV_SCREEN(pScreen);
     XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
@@ -1274,7 +1279,10 @@
 	}
     }
 
+    pScrn->LeaveVT = ScreenPriv->LeaveVT;
     (*ScreenPriv->LeaveVT)(index, flags);
+    ScreenPriv->LeaveVT = pScrn->LeaveVT;
+    pScrn->LeaveVT = xf86XVLeaveVT;
 }
 
 static void
--- hw/xfree86/dri2/dri2.c
+++ hw/xfree86/dri2/dri2.c
@@ -82,6 +82,7 @@
     CARD64		 last_swap_msc; /* msc at completion of most recent swap */
     CARD64		 last_swap_ust; /* ust at completion of most recent swap */
     int			 swap_limit; /* for N-buffering */
+    unsigned long	 serialNumber;
 } DRI2DrawableRec, *DRI2DrawablePtr;
 
 typedef struct _DRI2Screen {
@@ -130,6 +131,19 @@
     }
 }
 
+static unsigned long
+DRI2DrawableSerial(DrawablePtr pDraw)
+{
+    ScreenPtr pScreen = pDraw->pScreen;
+    PixmapPtr pPix;
+
+    if (pDraw->type != DRAWABLE_WINDOW)
+	return pDraw->serialNumber;
+
+    pPix = pScreen->GetWindowPixmap((WindowPtr)pDraw);
+    return pPix->drawable.serialNumber;
+}
+
 static DRI2DrawablePtr
 DRI2AllocateDrawable(DrawablePtr pDraw)
 {
@@ -163,6 +177,7 @@
     pPriv->last_swap_msc = 0;
     pPriv->last_swap_ust = 0;
     list_init(&pPriv->reference_list);
+    pPriv->serialNumber = DRI2DrawableSerial(pDraw);
 
     if (pDraw->type == DRAWABLE_WINDOW) {
 	pWin = (WindowPtr) pDraw;
@@ -326,6 +341,7 @@
 	|| !dimensions_match
 	|| (pPriv->buffers[old_buf]->format != format)) {
 	*buffer = (*ds->CreateBuffer)(pDraw, attachment, format);
+	pPriv->serialNumber = DRI2DrawableSerial(pDraw);
 	return TRUE;
 
     } else {
@@ -384,7 +400,8 @@
     }
 
     dimensions_match = (pDraw->width == pPriv->width)
-	&& (pDraw->height == pPriv->height);
+	&& (pDraw->height == pPriv->height)
+	&& (pPriv->serialNumber == DRI2DrawableSerial(pDraw));
 
     buffers = malloc((count + 1) * sizeof(buffers[0]));
 
--- hw/xfree86/loader/sdksyms.c
+++ hw/xfree86/loader/sdksyms.c
@@ -550,6 +550,9 @@
     (void *) &set_key_down,
     (void *) &set_key_up,
     (void *) &key_is_down,
+    (void *) &set_button_down,
+    (void *) &set_button_up,
+    (void *) &button_is_down,
     (void *) &InitCoreDevices,
     (void *) &InitXTestDevices,
     (void *) &AddInputDevice,
@@ -1486,6 +1489,7 @@
     (void *) &miPointerGetPosition,
     (void *) &miPointerSetPosition,
     (void *) &miPointerUpdateSprite,
+    (void *) &miPointerSetWaitForUpdate,
     (void *) &miPointerPrivKeyRec,
     (void *) &miPointerScreenKeyRec,
     (void *) &xf86InitCursor,
@@ -1951,7 +1955,7 @@
     (void *) &ParseGlyphCachingMode,
     (void *) &InitGlyphCaching,
     (void *) &SetGlyphCachingMode,
-    (void *) &BuiltinRegisterFpeFunctions,
+    (void *) &register_fpe_functions,
     (void *) &client_auth_generation,
     (void *) &DeleteFontClientID,
     (void *) &GetClientResolutions,
@@ -2328,6 +2332,8 @@
     (void *) &XkbCopyDeviceKeymap,
     (void *) &XkbFilterEvents,
     (void *) &XkbGetEffectiveGroup,
+    (void *) &XkbMergeLockedPtrBtns,
+    (void *) &XkbFakeDeviceButton,
     (void *) &XkbDDXList,
     (void *) &XkbDDXLoadKeymapByNames,
     (void *) &XkbDDXNamesFromRules,
--- hw/xfree86/modes/xf86Crtc.c
+++ hw/xfree86/modes/xf86Crtc.c
@@ -572,8 +572,11 @@
 						OPTION_ROTATE);
     int	    i;
 
-    if (!rotate_name)
+    if (!rotate_name) {
+	if (output->initial_rotation)
+	    return output->initial_rotation;
 	return RR_Rotate_0;
+    }
     
     for (i = 0; i < 4; i++)
 	if (xf86nameCompare (direction[i], rotate_name) == 0)
--- hw/xfree86/ramdac/xf86Cursor.c
+++ hw/xfree86/ramdac/xf86Cursor.c
@@ -245,8 +245,6 @@
     ScreenPtr pScreen = screenInfo.screens[index];
     xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
 	&pScreen->devPrivates, xf86CursorScreenKey);
-    miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
-	&pScreen->devPrivates, miPointerScreenKey);
 
     if (ScreenPriv->isUp) {
 	xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
@@ -261,7 +259,7 @@
      * ensure the cursor is repainted by miPointerWarpCursor().
      */
     ScreenPriv->CursorToRestore = ScreenPriv->CurrentCursor;
-    PointPriv->waitForUpdate = FALSE;	/* Force cursor repaint */
+    miPointerSetWaitForUpdate(pScreen, FALSE);	/* Force cursor repaint */
 
     return ret;
 }
@@ -302,9 +300,6 @@
     xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
 	&pScreen->devPrivates, xf86CursorScreenKey);
     xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
-    miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
-    &pScreen->devPrivates, miPointerScreenKey);
-
 
     if (pCurs == NullCursor) {	/* means we're supposed to remove the cursor */
         if (ScreenPriv->SWCursor ||
@@ -355,11 +350,12 @@
 	    xf86SetCursor(pScreen, pCurs, x, y);
 	    ScreenPriv->SWCursor = FALSE;
 	    ScreenPriv->isUp = TRUE;
-	    PointPriv->waitForUpdate = !infoPtr->pScrn->silkenMouse;
+
+	    miPointerSetWaitForUpdate(pScreen, !infoPtr->pScrn->silkenMouse);
 	    return;
 	}
 
-        PointPriv->waitForUpdate = TRUE;
+        miPointerSetWaitForUpdate(pScreen, TRUE);
 
         if (ScreenPriv->isUp) {
             /* Remove the HW cursor, or make it transparent */
--- hw/xfree86/shadowfb/shadow.c
+++ hw/xfree86/shadowfb/shadow.c
@@ -216,9 +216,14 @@
 ShadowEnterVT(int index, int flags)
 {
     ScrnInfoPtr pScrn = xf86Screens[index];
+    Bool ret;
     ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScrn->pScreen);
 
-    if((*pPriv->EnterVT)(index, flags)) {
+    pScrn->EnterVT = pPriv->EnterVT;
+    ret = (*pPriv->EnterVT)(index, flags);
+    pPriv->EnterVT = pScrn->EnterVT;
+    pScrn->EnterVT = ShadowEnterVT;
+    if(ret) {
 	pPriv->vtSema = TRUE;
         return TRUE;
     }
@@ -229,11 +234,15 @@
 static void
 ShadowLeaveVT(int index, int flags)
 {
+    ScrnInfoPtr pScrn = xf86Screens[index];
     ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(xf86Screens[index]->pScreen);
 
     pPriv->vtSema = FALSE;
 
+    pScrn->LeaveVT = pPriv->LeaveVT;
     (*pPriv->LeaveVT)(index, flags);
+    pPriv->LeaveVT = pScrn->LeaveVT;
+    pScrn->LeaveVT = ShadowLeaveVT;
 }
 
 /**********************************************************/
--- hw/xfree86/xaa/xaaInit.c
+++ hw/xfree86/xaa/xaaInit.c
@@ -508,16 +508,23 @@
 static Bool 
 XAAEnterVT(int index, int flags)
 {
+    ScrnInfoPtr pScrn = xf86Screens[index];
+    Bool ret;
     ScreenPtr pScreen = screenInfo.screens[index];
     XAAScreenPtr pScreenPriv = 
 	(XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
 
-    return((*pScreenPriv->EnterVT)(index, flags));
+    pScrn->EnterVT = pScreenPriv->EnterVT;
+    ret = ((*pScreenPriv->EnterVT)(index, flags));
+    pScreenPriv->EnterVT = pScrn->EnterVT;
+    pScrn->EnterVT = XAAEnterVT;
+    return ret;
 }
 
 static void 
 XAALeaveVT(int index, int flags)
 {
+    ScrnInfoPtr pScrn = xf86Screens[index];
     ScreenPtr pScreen = screenInfo.screens[index];
     XAAScreenPtr pScreenPriv = 
 	(XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
@@ -528,7 +535,10 @@
         infoRec->NeedToSync = FALSE;
     }
 
+    pScrn->LeaveVT = pScreenPriv->LeaveVT;
     (*pScreenPriv->LeaveVT)(index, flags);
+    pScreenPriv->LeaveVT = pScrn->LeaveVT;
+    pScrn->LeaveVT = XAALeaveVT;
 }
 
 typedef struct {
--- hw/xnest/Keyboard.c
+++ hw/xnest/Keyboard.c
@@ -231,13 +231,7 @@
 
       for (key = 0; key < MAP_LENGTH; key++)
 	if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
-	  int bit;
-	  BYTE *kptr;
-
-	  kptr = &keyc->down[key >> 3];
-	  bit = 1 << (key & 7);
-
-	  if (*kptr & bit)
+	  if (key_is_down(pDev, key, KEY_PROCESSED))
 	    xnestQueueKeyEvent(KeyRelease, key);
 
 	  if (--count == 0)
--- hw/xquartz/bundle/Info.plist.cpp
+++ hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>2.5.1</string>
+		<string>2.6.0</string>
 	<key>CFBundleVersion</key>
-		<string>2.5.1</string>
+		<string>2.6.0</string>
 	<key>CFBundleSignature</key>
 		<string>x11a</string>
 	<key>CSResourcesFileMapped</key>
--- hw/xquartz/quartz.c
+++ hw/xquartz/quartz.c
@@ -67,12 +67,8 @@
 #define FAKE_RANDR 1
 
 // Shared global variables for Quartz modes
-int                     quartzEventWriteFD = -1;
 int                     quartzUseSysBeep = 0;
-int                     quartzUseAGL = 1;
-int                     quartzEnableKeyEquivalents = 1;
 int                     quartzServerVisible = FALSE;
-int                     quartzServerQuitting = FALSE;
 DevPrivateKeyRec        quartzScreenKeyRec;
 int                     aquaMenuBarHeight = 0;
 QuartzModeProcsPtr      quartzProcs = NULL;
--- hw/xquartz/quartzCocoa.m
+++ hw/xquartz/quartzCocoa.m
@@ -44,17 +44,6 @@
 #include "darwin.h"
 
 /*
- * QuartzFSUseQDCursor
- *  Return whether the screen should use a QuickDraw cursor.
- */
-int QuartzFSUseQDCursor(
-    int depth)  // screen depth
-{
-    return TRUE;
-}
-
-
-/*
  * QuartzBlockHandler
  *  Clean out any autoreleased objects.
  */
--- hw/xquartz/quartzCommon.h
+++ hw/xquartz/quartzCommon.h
@@ -51,20 +51,13 @@
 #define QUARTZ_PRIV(pScreen) \
     ((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey))
 
-// Data stored at startup for Cocoa front end
-extern int              quartzEventWriteFD;
-
 // User preferences used by Quartz modes
 extern int              quartzUseSysBeep;
-extern int              focusOnNewWindow;
-extern int              quartzUseAGL;
-extern int              quartzEnableKeyEquivalents;
 extern int              quartzFullscreenDisableHotkeys;
 extern int              quartzOptionSendsAlt;
 
 // Other shared data
 extern int              quartzServerVisible;
-extern int              quartzServerQuitting;
 extern DevPrivateKeyRec quartzScreenKeyRec;
 #define quartzScreenKey (&quartzScreenKeyRec)
 extern int              aquaMenuBarHeight;
@@ -72,14 +65,6 @@
 // Name of GLX bundle for native OpenGL
 extern const char      *quartzOpenGLBundle;
 
-void QuartzReadPreferences(void);
-void QuartzMessageMainThread(unsigned msg, void *data, unsigned length);
-void QuartzMessageServerThread(int type, int argc, ...);
-void QuartzSetWindowMenu(int nitems, const char **items,
-                         const char *shortcuts);
-void QuartzFSCapture(void);
-void QuartzFSRelease(void);
-int  QuartzFSUseQDCursor(int depth);
 void QuartzBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask);
 void QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask);
 
--- hw/xquartz/xpr/xprCursor.c
+++ hw/xquartz/xpr/xprCursor.c
@@ -67,6 +67,7 @@
 load_cursor(CursorPtr src, int screen)
 {
     uint32_t *data;
+    Bool free_data = FALSE;
     uint32_t rowbytes;
     int width, height;
     int hot_x, hot_y;
@@ -95,6 +96,7 @@
         unsigned i;
         rowbytes = src->bits->width * sizeof (CARD32);
         data = malloc(rowbytes * src->bits->height);
+        free_data = TRUE;
         if(!data) {
             FatalError("Failed to allocate memory in %s\n", __func__);
         }
@@ -121,6 +123,7 @@
         /* round up to 8 pixel boundary so we can convert whole bytes */
         rowbytes = ((src->bits->width * 4) + 31) & ~31;
         data = malloc(rowbytes * src->bits->height);
+        free_data = TRUE;
         if(!data) {
             FatalError("Failed to allocate memory in %s\n", __func__);
         }
@@ -173,7 +176,8 @@
     }
 
     err = xp_set_cursor(width, height, hot_x, hot_y, data, rowbytes);
-    free(data);
+    if(free_data)
+        free(data);
     return err == Success;
 }
 
--- hw/xwin/winkeynames.h
+++ hw/xwin/winkeynames.h
@@ -38,7 +38,6 @@
 #define KanaMask	Mod4Mask
 #define ScrollLockMask	Mod5Mask
 
-#define KeyPressed(k) (keyc->down[k >> 3] & (1 << (k & 7)))
 #define ModifierDown(k) ((keyc->state & (k)) == (k))
 
 /*
--- include/dixfont.h
+++ include/dixfont.h
@@ -141,10 +141,7 @@
 
 extern _X_EXPORT void SetGlyphCachingMode(int /*newmode*/);
 
-/*
- * libXfont/src/builtins/builtin.h
- */
-extern _X_EXPORT void BuiltinRegisterFpeFunctions(void);
+extern _X_EXPORT void register_fpe_functions(void);
 
 /*
  * libXfont stubs.
--- include/dixstruct.h
+++ include/dixstruct.h
@@ -98,6 +98,7 @@
     int         clientGone;
     int         noClientException;	/* this client died or needs to be
 					 * killed */
+    int         ignoreCount;		/* count for Attend/IgnoreClient */
     SaveSetElt	*saveSet;
     int         numSaved;
     int         (**requestVector) (
--- include/input.h
+++ include/input.h
@@ -228,14 +228,19 @@
 #define ATTR_TOUCHPAD (1<<4)
 #define ATTR_TOUCHSCREEN (1<<5)
 
-/* Key has been run through all input processing and events sent to clients. */
+/* Key/Button has been run through all input processing and events sent to clients. */
 #define KEY_PROCESSED 1
-/* Key has not been fully processed, no events have been sent. */
+#define BUTTON_PROCESSED 1
+/* Key/Button has not been fully processed, no events have been sent. */
 #define KEY_POSTED 2
+#define BUTTON_POSTED 2
 
 extern void set_key_down(DeviceIntPtr pDev, int key_code, int type);
 extern void set_key_up(DeviceIntPtr pDev, int key_code, int type);
 extern int key_is_down(DeviceIntPtr pDev, int key_code, int type);
+extern void set_button_down(DeviceIntPtr pDev, int button, int type);
+extern void set_button_up(DeviceIntPtr pDev, int button, int type);
+extern int button_is_down(DeviceIntPtr pDev, int button, int type);
 
 extern void InitCoreDevices(void);
 extern void InitXTestDevices(void);
--- include/privates.h
+++ include/privates.h
@@ -177,7 +177,7 @@
 dixLookupPrivateAddr(PrivatePtr *privates, const DevPrivateKey key)
 {
     assert (key->size == 0);
-    return dixGetPrivateAddr(privates, key);
+    return (pointer *)dixGetPrivateAddr(privates, key);
 }
 
 /*
--- include/protocol-versions.h
+++ include/protocol-versions.h
@@ -73,7 +73,7 @@
 
 /* Render */
 #define SERVER_RENDER_MAJOR_VERSION		0
-#define SERVER_RENDER_MINOR_VERSION		10
+#define SERVER_RENDER_MINOR_VERSION		11
 
 /* RandR Xinerama */
 #define SERVER_RRXINERAMA_MAJOR_VERSION		1
--- include/xkbsrv.h
+++ include/xkbsrv.h
@@ -924,6 +924,15 @@
         XkbStatePtr             /* xkbstate */,
         CARD8                   /* keycode */);
 
+extern void XkbMergeLockedPtrBtns(
+        DeviceIntPtr            /* master */);
+
+extern void XkbFakeDeviceButton(
+        DeviceIntPtr            /* dev */,
+        int                     /* press */,
+        int                     /* button */);
+
+
 #include "xkbfile.h"
 #include "xkbrules.h"
 
--- mi/mipointer.c
+++ mi/mipointer.c
@@ -73,6 +73,7 @@
 static Bool miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
 static void miPointerDeviceCleanup(DeviceIntPtr pDev,
                                    ScreenPtr pScreen);
+static void miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
 
 static EventList* events; /* for WarpPointer MotionNotifies */
 
@@ -305,24 +306,9 @@
     }
 
     if (GenerateEvent)
-    {
 	miPointerMove (pDev, pScreen, x, y);
-    }
     else
-    {
-	/* everything from miPointerMove except the event and history */
-
-    	if (!pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen)
-    	{
-	    pPointer->devx = x;
-	    pPointer->devy = y;
-	    if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask)
-		(*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y);
-    	}
-	pPointer->x = x;
-	pPointer->y = y;
-	pPointer->pScreen = pScreen;
-    }
+        miPointerMoveNoEvent(pDev, pScreen, x, y);
 
     /* Don't call USFS if we use Xinerama, otherwise the root window is
      * updated to the second screen, and we never receive any events.
@@ -452,9 +438,25 @@
     return (pPointer) ? pPointer->pScreen : NULL;
 }
 
+/* Controls whether the cursor image should be updated immediately when
+   moved (FALSE) or if something else will be responsible for updating
+   it later (TRUE).  Returns current setting.
+   Caller is responsible for calling OsBlockSignal first.
+*/
+Bool
+miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait)
+{
+    SetupScreen(pScreen);
+    Bool prevWait = pScreenPriv->waitForUpdate;
+
+    pScreenPriv->waitForUpdate = wait;
+    return prevWait;
+}
+
+
 /* Move the pointer on the current screen,  and update the sprite. */
 static void
-miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen,
+miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen,
                 int x, int y)
 {
     miPointerPtr pPointer;
@@ -530,7 +532,7 @@
             pPointer->pScreen == pScreen) 
         return;
 
-    miPointerMoved(pDev, pScreen, *x, *y);
+    miPointerMoveNoEvent(pDev, pScreen, *x, *y);
 }
 
 void
@@ -552,7 +554,7 @@
     int i, nevents;
     int valuators[2];
 
-    miPointerMoved(pDev, pScreen, x, y);
+    miPointerMoveNoEvent(pDev, pScreen, x, y);
 
     /* generate motion notify */
     valuators[0] = x;
--- mi/mipointer.h
+++ mi/mipointer.h
@@ -139,6 +139,11 @@
 extern _X_EXPORT void miPointerUpdateSprite(
     DeviceIntPtr pDev);
 
+/* Sets whether the sprite should be updated immediately on pointer moves */
+extern _X_EXPORT Bool miPointerSetWaitForUpdate(
+    ScreenPtr pScreen,
+    Bool wait);
+
 extern _X_EXPORT DevPrivateKeyRec miPointerPrivKeyRec;
 #define miPointerPrivKey (&miPointerPrivKeyRec)
 
--- mi/miscrinit.c
+++ mi/miscrinit.c
@@ -76,7 +76,6 @@
 	pPixmap->drawable.depth = depth;
 	pPixmap->drawable.bitsPerPixel = bitsPerPixel;
 	pPixmap->drawable.id = 0;
-	pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
 	pPixmap->drawable.x = 0;
 	pPixmap->drawable.y = 0;
 	pPixmap->drawable.width = width;
@@ -116,6 +115,7 @@
 	if (pPixData)
 	    pPixmap->devPrivate.ptr = pPixData;
     }
+    pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
     return TRUE;
 }
 
--- os/connection.c
+++ os/connection.c
@@ -1147,6 +1147,10 @@
     OsCommPtr oc = (OsCommPtr)client->osPrivate;
     int connection = oc->fd;
 
+    client->ignoreCount++;
+    if (client->ignoreCount > 1)
+	return;
+
     isItTimeToYield = TRUE;
     if (!GrabInProgress || FD_ISSET(connection, &AllClients))
     {
@@ -1181,6 +1185,11 @@
 {
     OsCommPtr oc = (OsCommPtr)client->osPrivate;
     int connection = oc->fd;
+
+    client->ignoreCount--;
+    if (client->ignoreCount)
+	return;
+
     if (!GrabInProgress || GrabInProgress == client->index ||
 	FD_ISSET(connection, &GrabImperviousClients))
     {
--- xkb/xkbAccessX.c
+++ xkb/xkbAccessX.c
@@ -707,27 +707,24 @@
 	    changed |= XkbPointerButtonMask;
     }
     else if (event->type == ET_ButtonRelease) {
-	if (xkbi)
+	if (xkbi) {
 	    xkbi->lockedPtrButtons&= ~(1 << (event->detail.key & 0x7));
+
+            if (IsMaster(dev))
+            {
+                DeviceIntPtr source;
+                int rc;
+                rc = dixLookupDevice(&source, event->sourceid, serverClient, DixWriteAccess);
+                if (rc != Success)
+                    ErrorF("[xkb] bad sourceid '%d' on button release event.\n", event->sourceid);
+                else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER)))
+                    XkbFakeDeviceButton(dev, FALSE, event->detail.key);
+            }
+	}
+
 	changed |= XkbPointerButtonMask;
     }
 
-    /* Guesswork. mostly. 
-     * xkb actuall goes through some effort to transparently wrap the
-     * processInputProcs (see XkbSetExtension). But we all love fun, so the
-     * previous XKB implementation just hardcoded the CPPE call here instead
-     * of unwrapping like anybody with any sense of decency would do. 
-     * I got no clue what the correct thing to do is, but my guess is that
-     * it's not hardcoding. I may be wrong. whatever it is, don't come whining
-     * to me. I just work here. 
-     *
-     * Anyway. here's the old call, if you don't like the wrapping, revert it.
-     *
-     * CoreProcessPointerEvent(xE,mouse,count);
-     *
-     *          see. it's still steaming. told you. (whot)
-     */
-
     UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc);
     mouse->public.processInputProc(ev, mouse);
     COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr,
--- xkb/xkbActions.c
+++ xkb/xkbActions.c
@@ -41,11 +41,12 @@
 #include "xkb.h"
 #include <ctype.h>
 #include "mi.h"
+#include "mipointer.h"
 #define EXTENSION_EVENT_BASE 64
 
 DevPrivateKeyRec xkbDevicePrivateKeyRec;
 
-static void XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button);
+void XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button);
 static void XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y);
 
 void
@@ -500,9 +501,6 @@
 int	x,y;
 Bool	accel;
 
-    if (xkbi->device == inputInfo.keyboard)
-        return 0;
-
     if (filter->keycode==0) {		/* initial press */
 	filter->keycode = keycode;
 	filter->active = 1;
@@ -633,6 +631,16 @@
 		    break;
 		}
 		xkbi->lockedPtrButtons&= ~(1<<button);
+
+		if (IsMaster(xkbi->device))
+		{
+		    XkbMergeLockedPtrBtns(xkbi->device);
+                    /* One SD still has lock set, don't post event */
+		    if ((xkbi->lockedPtrButtons & (1 << button)) != 0)
+			break;
+		}
+
+		/* fallthrough */
 	    case XkbSA_PtrBtn:
 		XkbFakeDeviceButton(xkbi->device, 0, button);
 		break;
@@ -1330,12 +1338,16 @@
     EventListPtr        events;
     int                 nevents, i;
     DeviceIntPtr        ptr;
+    ScreenPtr           pScreen;
+    Bool                saveWait;
     int                 gpe_flags = 0;
 
-    if (!dev->u.master)
+    if (IsMaster(dev))
+        ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER));
+    else if (!dev->u.master)
         ptr = dev;
     else
-        ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER));
+        return;
 
     if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY)
         gpe_flags = POINTER_ABSOLUTE;
@@ -1344,9 +1356,12 @@
 
     events = InitEventList(GetMaximumEventsNum());
     OsBlockSignals();
+    pScreen = miPointerGetScreen(ptr);
+    saveWait = miPointerSetWaitForUpdate(pScreen, FALSE);
     nevents = GetPointerEvents(events, ptr,
                                MotionNotify, 0,
                                gpe_flags, 0, 2, (int[]){x, y});
+    miPointerSetWaitForUpdate(pScreen, saveWait);
     OsReleaseSignals();
 
     for (i = 0; i < nevents; i++)
@@ -1355,7 +1370,7 @@
     FreeEventList(events, GetMaximumEventsNum());
 }
 
-static void
+void
 XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button)
 {
     EventListPtr        events;
--- xkb/xkbUtils.c
+++ xkb/xkbUtils.c
@@ -2094,3 +2094,29 @@
 
     return effectiveGroup;
 }
+
+/* Merge the lockedPtrButtons from all attached SDs for the given master
+ * device into the MD's state.
+ */
+void
+XkbMergeLockedPtrBtns(DeviceIntPtr master)
+{
+    DeviceIntPtr d = inputInfo.devices;
+    XkbSrvInfoPtr xkbi = NULL;
+
+    if (!IsMaster(master))
+        return;
+
+    if (!master->key)
+        return;
+
+    xkbi = master->key->xkbInfo;
+    xkbi->lockedPtrButtons = 0;
+
+    for (; d; d = d->next) {
+        if (IsMaster(d) || GetMaster(d, MASTER_KEYBOARD) != master || !d->key)
+            continue;
+
+        xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons;
+    }
+}

++++++ xorg-x11-server.yaml
--- xorg-x11-server.yaml
+++ xorg-x11-server.yaml
@@ -1,6 +1,6 @@
 Name: xorg-x11-server
 Summary: X.Org X11 X server
-Version: 1.8.99.903
+Version: 1.8.99.905
 Release: 1
 Group: System/X11
 License: MIT
@@ -14,6 +14,9 @@
     - use-sloppy-heuristic-first-for-initial-mode.patch
     - do-not-zap-xserver.patch
     - Add-inputclass-section-into-builtin-config.patch
+    - cache-xkbcomp-output-for-fast-start-up.patch
+    - Lower-server-side-GLX-version.patch 
+    - downgrade-dri2-info-version.patch
 
 Requires:
     - libdrm >= 2.4.0
@@ -40,6 +43,7 @@
     - evieproto
     - xf86dgaproto
     - xf86vidmodeproto
+    - recordproto
     - xkbfile
     - xres
     - xau
@@ -82,8 +86,7 @@
     - --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins"
     - --with-module-dir=%{_libdir}/xorg/modules
     - '--with-builderstring="Build ID: %{name} %{version}-%{release}"'
-    - --with-xkb-output=%{_localstatedir}/lib/xkb
-    - --disable-record
+    - --with-xkb-output=%{_localstatedir}/cache/xkb
     - --disable-xselinux
     - --disable-xinerama
     - --enable-dri2


More information about the MeeGo-commits mailing list