xserver: Branch 'master' - 3 commits
Peter Hutterer
whot at kemper.freedesktop.org
Thu Sep 18 16:55:46 PDT 2008
Xi/chdevhier.c | 1 -
Xi/extinit.c | 12 +-----------
dix/devices.c | 2 +-
3 files changed, 2 insertions(+), 13 deletions(-)
New commits:
commit cc20112a65d3f641ce0261c86a541f94fae5215c
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date: Fri Sep 19 08:44:04 2008 +0930
Xi: don't include client-side headers.
Spotted by Mikhail Gusarov.
diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c
index 07bd729..db16349 100644
--- a/Xi/chdevhier.c
+++ b/Xi/chdevhier.c
@@ -42,7 +42,6 @@
#include "windowstr.h" /* window structure */
#include "scrnintstr.h" /* screen structure */
#include <X11/extensions/XI.h>
-#include <X11/extensions/XInput.h>
#include <X11/extensions/XIproto.h>
#include <X11/extensions/geproto.h>
#include "extnsionst.h"
commit e76b5b5e731e2d6c61ff6e6e9b2f42b20ac473d5
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date: Thu Sep 18 14:51:15 2008 +0930
dix: calloc, not malloc, ValuatorClassRec.
For master devices, the ptraccel code could segfault on free since we'd be
dereferencing random memory. Callocing the valuatorClassRec is the easy fix.
diff --git a/dix/devices.c b/dix/devices.c
index 7e1ce35..4f216bd 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1235,7 +1235,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
if (!dev)
return FALSE;
- valc = (ValuatorClassPtr)xalloc(sizeof(ValuatorClassRec) +
+ valc = (ValuatorClassPtr)xcalloc(1, sizeof(ValuatorClassRec) +
numAxes * sizeof(AxisInfo) +
numAxes * sizeof(unsigned int));
if (!valc)
commit f789408f7dbfe57a0111e185ac83d1c70f262ba8
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date: Mon Aug 25 14:52:35 2008 +0930
Xi: remove broken SDeviceEnterNotifyEvent, replace with ...Leave...
The event format is the same for both (bar the type), so one is enough.
diff --git a/Xi/extinit.c b/Xi/extinit.c
index d8714ba..595e358 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -611,16 +611,6 @@ SDevicePropertyNotifyEvent (devicePropertyNotify *from, devicePropertyNotify *to
}
static void
-SDeviceEnterNotifyEvent (deviceEnterNotify *from, deviceEnterNotify *to)
-{
- char n;
-
- *to = *from;
- swaps(&to->sequenceNumber,n);
- swapl(&to->time, n);
-}
-
-static void
SDeviceLeaveNotifyEvent (deviceLeaveNotify *from, deviceLeaveNotify *to)
{
char n;
@@ -1102,7 +1092,7 @@ SEventIDispatch(xEvent * from, xEvent * to)
else if (type == DevicePropertyNotify)
DO_SWAP(SDevicePropertyNotifyEvent, devicePropertyNotify);
else if (type == DeviceEnterNotify)
- DO_SWAP(SDeviceEnterNotifyEvent, deviceEnterNotify);
+ DO_SWAP(SDeviceLeaveNotifyEvent, deviceEnterNotify);
else if (type == DeviceLeaveNotify)
DO_SWAP(SDeviceLeaveNotifyEvent, deviceLeaveNotify);
else {
More information about the xorg-commit
mailing list