xserver: Branch 'master' - 4 commits

Peter Hutterer whot at kemper.freedesktop.org
Thu Sep 24 16:07:08 PDT 2009


 Xi/queryst.c            |    2 +-
 configure.ac            |   20 +++++++++++---------
 dix/events.c            |    4 +++-
 hw/kdrive/ephyr/ephyr.c |    4 ++++
 hw/kdrive/src/kinfo.c   |    6 ++++++
 5 files changed, 25 insertions(+), 11 deletions(-)

New commits:
commit 9fa73be9fa543a686ea35c861084f5af37d44caa
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Sep 22 20:34:54 2009 +1000

    Require libXext >= 1.0.99.4
    
    Reported-by: Tilman Sauerbeck
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/configure.ac b/configure.ac
index b3acbdd..476173e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -738,6 +738,8 @@ dnl Core modules for most extensions, et al.
 REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]"
 REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]"
 
+LIBXEXT="xext >= 1.0.99.4"
+
 dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
 dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config
 dnl API.
@@ -1360,7 +1362,7 @@ fi
 
 dnl Xnest DDX
 
-PKG_CHECK_MODULES(XNESTMODULES, [xfont xext x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no])
+PKG_CHECK_MODULES(XNESTMODULES, [xfont $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"
@@ -1775,7 +1777,7 @@ AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes])
 dnl DMX DDX
 
 PKG_CHECK_MODULES([DMXMODULES],
-    [xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES],
+    [xmuu $LIBXEXT x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES],
     [have_dmx=yes], [have_dmx=no])
 AC_MSG_CHECKING([whether to build Xdmx DDX])
 if test "x$DMX" = xauto; then
@@ -1810,17 +1812,17 @@ dnl Linux sources in DMX require <linux/keyboard.h>
 	PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11])
 	AC_SUBST(XDMXCONFIG_DEP_CFLAGS)
 	AC_SUBST(XDMXCONFIG_DEP_LIBS)
-	PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx xext x11])
+	PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx $LIBXEXT x11])
 	AC_SUBST(DMXEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [dmx xmu xext x11])
+	PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [dmx xmu $LIBXEXT x11])
 	AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx xi xext x11])
+	PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx xi $LIBXEXT x11])
 	AC_SUBST(DMXXIEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [xtst xext x11])
+	PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [xtst $LIBXEXT x11])
 	AC_SUBST(XTSTEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres xext x11])
+	PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres $LIBXEXT x11])
 	AC_SUBST(XRESEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([X11EXAMPLES_DEP], [xext x11])
+	PKG_CHECK_MODULES([X11EXAMPLES_DEP], [$LIBXEXT x11])
 	AC_SUBST(X11EXAMPLES_DEP_LIBS)
 fi
 AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes])
@@ -1889,7 +1891,7 @@ if test "$KDRIVE" = yes; then
        XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS"
     fi
 
-    XEPHYR_REQUIRED_LIBS="x11 xext xfont xau xdmcp"
+    XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xfont xau xdmcp"
     if test "x$XV" = xyes; then
         XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
     fi
commit a9c274df5c37cb4ece6449e934342d8ff8e61705
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Sep 23 11:43:27 2009 +1000

    kdrive: plug two memory leaks when freeing the KdKeyboard/Pointer.
    
    xkbRules, xkbModel and xkbLayout are strdup'd in KdNewKeyboard, need to be
    freed.
    
    The ephyr driver strdups the name on top of the already allocated
    kdrive-assigned name. Memory must be freed beforehand.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 296284a..254fcbc 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -1074,6 +1074,8 @@ MouseInit (KdPointerInfo *pi)
     ((EphyrPointerPrivate *)pi->driverPrivate)->enabled = FALSE;
     pi->nAxes = 3;
     pi->nButtons = 32;
+    if (pi->name)
+        xfree(pi->name);
     pi->name = strdup("Xephyr virtual mouse");
     ephyrMouse = pi;
     return Success;
@@ -1123,6 +1125,8 @@ EphyrKeyboardInit (KdKeyboardInfo *ki)
   }
   ki->minScanCode = ephyrKeySyms.minKeyCode;
   ki->maxScanCode = ephyrKeySyms.maxKeyCode;
+  if (ki->name)
+      xfree(ki->name);
   ki->name = strdup("Xephyr virtual keyboard");
   ephyrKbd = ki;
   return Success;
diff --git a/hw/kdrive/src/kinfo.c b/hw/kdrive/src/kinfo.c
index cb64613..4551fd7 100644
--- a/hw/kdrive/src/kinfo.c
+++ b/hw/kdrive/src/kinfo.c
@@ -166,6 +166,12 @@ KdFreeKeyboard(KdKeyboardInfo *ki)
         xfree(ki->name);
     if (ki->path)
         xfree(ki->path);
+    if (ki->xkbRules)
+        xfree(ki->xkbRules);
+    if (ki->xkbModel)
+        xfree(ki->xkbModel);
+    if (ki->xkbLayout)
+        xfree(ki->xkbLayout);
     ki->next = NULL;
     xfree(ki);
 }
commit fd913136732ff14a0484ca28f60ac1fbf49be81d
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Sep 23 11:44:12 2009 +1000

    dix: plug memory leak in DeviceEnterLeaveEvents.
    
    'event' must be freed before exiting.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/events.c b/dix/events.c
index a79cf6d..d60b8a5 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4414,10 +4414,12 @@ DeviceEnterLeaveEvent(
                         filter, grab);
     } else {
         if (!GetWindowXI2Mask(mouse, pWin, (xEvent*)event))
-            return;
+            goto out;
         DeliverEventsToWindow(mouse, pWin, (xEvent*)event, 1, filter,
                               NullGrab);
     }
+
+out:
     xfree(event);
 }
 
commit 6ee796e9bb4e46782b50a69c7b4fa5b49576f139
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Sep 24 14:05:52 2009 +1000

    Xi: fix length calculation for ValuatorState in QueryDeviceState reply.
    
    The length field needs to include the bytes required for the valuators
    (INT32) as well.
    
    The reply length has the right value and since the valuator state is always
    last, clients didn't notice the wrong offset.
    
    Tested-by: Thomas Jaeger
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/Xi/queryst.c b/Xi/queryst.c
index 60ec32e..2ba1edb 100644
--- a/Xi/queryst.c
+++ b/Xi/queryst.c
@@ -147,7 +147,7 @@ ProcXQueryDeviceState(ClientPtr client)
     if (v != NULL) {
 	tv = (xValuatorState *) buf;
 	tv->class = ValuatorClass;
-	tv->length = sizeof(xValuatorState);
+	tv->length = sizeof(xValuatorState) + v->numAxes * 4;
 	tv->num_valuators = v->numAxes;
 	tv->mode = v->mode;
 	buf += sizeof(xValuatorState);


More information about the xorg-commit mailing list