[PATCH test/xts] Fix XSendEvent tests
Peter Harris
pharris at opentext.com
Wed Aug 1 08:01:18 PDT 2012
XSendEvent of GenericEvent will return a Value error if the extension
field isn't an extension that supports GenericEvent. Even before then,
Xlib suppresses the XSendEvent. Instead of trying to find such an
extension, just skip testing this event.
Leave GenericEvent in the list, so that notmember doesn't generate
GenericEvent.
Signed-off-by: Peter Harris <pharris at opentext.com>
---
xts5/Xlib12/XSendEvent.m | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/xts5/Xlib12/XSendEvent.m b/xts5/Xlib12/XSendEvent.m
index 26eb5a1..48eec0e 100644
--- a/xts5/Xlib12/XSendEvent.m
+++ b/xts5/Xlib12/XSendEvent.m
@@ -180,7 +180,7 @@ int return_value;
propagate = False;
event_mask = NoEventMask;
event = (XAnyEvent *) &event_return;
- for (i = 0; i < NELEM(event_types); i++) {
+ for (i = 0; i < NELEM(event_types) - 1; i++) {
/* Discard all events in the event queue. */
XSync(display, True);
@@ -219,7 +219,7 @@ int return_value;
/* Repeat for each event-type. */
}
- CHECKPASS(3*NELEM(event_types));
+ CHECKPASS(3*(NELEM(event_types)-1));
>>ASSERTION Good A
When
.A w
@@ -1878,7 +1878,7 @@ int return_value;
propagate = False;
event_mask = NoEventMask;
event = (XAnyEvent *) &event_return;
- for (i = 0; i < NELEM(event_types); i++) {
+ for (i = 0; i < NELEM(event_types) - 1; i++) {
char *en = eventname(event_types[i]);
/* Set type member of event to KeyPress. */
@@ -1973,7 +1973,7 @@ int return_value;
/* Repeat for each event-type. */
}
- CHECKPASS(8*NELEM(event_types));
+ CHECKPASS(8*(NELEM(event_types)-1));
>>ASSERTION def
On a call to xname
the
--
1.7.2.5
More information about the xorg-devel
mailing list