xserver: Branch 'master' - 4 commits
Peter Hutterer
whot at kemper.freedesktop.org
Mon Jun 8 17:59:14 PDT 2009
Xi/chdevhier.c | 10 +++++-----
Xi/extinit.c | 4 ++--
Xi/xiselectev.c | 7 +++++++
configure.ac | 2 +-
4 files changed, 15 insertions(+), 8 deletions(-)
New commits:
commit 2a035600e603117a4dbe668cad50bae2a5609094
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Jun 9 10:14:18 2009 +1000
require inputproto 1.9.99.11
diff --git a/configure.ac b/configure.ac
index fc29bf0..acd9885 100644
--- a/configure.ac
+++ b/configure.ac
@@ -700,7 +700,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la'
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.10] [kbproto >= 1.0.3]"
+REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.11] [kbproto >= 1.0.3]"
REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.13.2]"
dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
commit c5bebca46f63bcd7279f3c73ed1d50e0c1b6051f
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Jun 8 17:54:05 2009 +1000
Xi: hierarchy events have a num_info now instead of num_devices.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c
index e2903f1..3f2bb93 100644
--- a/Xi/chdevhier.c
+++ b/Xi/chdevhier.c
@@ -77,7 +77,7 @@ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
ev->evtype = XI_HierarchyChanged;
ev->time = GetTimeInMillis();
ev->flags = 0;
- ev->num_devices = inputInfo.numDevices;
+ ev->num_info = inputInfo.numDevices;
info = (xXIHierarchyInfo*)&ev[1];
for (dev = inputInfo.devices; dev; dev = dev->next)
@@ -109,12 +109,12 @@ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
info->flags = flags[i];
info->use = 0;
ev->flags |= info->flags;
- ev->num_devices++;
+ ev->num_info++;
info++;
}
}
- ev->length = (ev->num_devices * sizeof(xXIHierarchyInfo))/4;
+ ev->length = (ev->num_info * sizeof(xXIHierarchyInfo))/4;
dummyDev.id = XIAllDevices;
SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), (xEvent*)ev, 1);
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 549c5ca..635afea 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -786,10 +786,10 @@ static void SDeviceHierarchyEvent(xXIHierarchyEvent *from,
swaps(&to->deviceid, n);
swapl(&to->time, n);
swapl(&to->flags, n);
- swaps(&to->num_devices, n);
+ swaps(&to->num_info, n);
info = (xXIHierarchyInfo*)&to[1];
- for (i = 0; i< from->num_devices; i++)
+ for (i = 0; i< from->num_info; i++)
{
swaps(&info->deviceid, n);
swaps(&info->attachment, n);
commit 810b74dbbcc1db3e68e0f95ff5223ddb2032e46d
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Jun 8 13:41:22 2009 +1000
Xi: change from XICreateMaster to XIAddMaster for consistency.
add/remove is used for slave devices and hierarchy flags.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c
index bd3da08..e2903f1 100644
--- a/Xi/chdevhier.c
+++ b/Xi/chdevhier.c
@@ -167,9 +167,9 @@ ProcXIChangeHierarchy(ClientPtr client)
switch(any->type)
{
- case XICreateMaster:
+ case XIAddMaster:
{
- xXICreateMasterInfo* c = (xXICreateMasterInfo*)any;
+ xXIAddMasterInfo* c = (xXIAddMasterInfo*)any;
char* name;
SWAPIF(swaps(&c->name_len, n));
commit 0e66a443a09176b8a875195d5473b953c07aa1d7
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Jun 8 12:24:24 2009 +1000
Xi: return BadValue for XI_HierarchyChangd mask on devices.
This mask may only be selected for XIAllDevices.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
index 9dbdea7..51d9c99 100644
--- a/Xi/xiselectev.c
+++ b/Xi/xiselectev.c
@@ -97,6 +97,13 @@ ProcXISelectEvent(ClientPtr client)
if (rc != Success)
return rc;
+ /* hierarchy event mask is not allowed on devices */
+ if (evmask->deviceid != XIAllDevices && evmask->mask_len >= 1)
+ {
+ unsigned char *bits = (unsigned char*)&evmask[1];
+ if (BitIsOn(bits, XI_HierarchyChanged))
+ return BadValue;
+ }
if ((evmask->mask_len * 4) > XI_LASTEVENT)
{
More information about the xorg-commit
mailing list