[PATCH 2/2] XMaskEvent/XCheckMaskedEvents must not check for GenericEvents.

Peter Hutterer peter.hutterer at who-t.net
Wed Jul 1 23:40:33 PDT 2009


GenericEvent cannot be selected for in the core event masks and they must
thus be treated like extension events.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/ChkMaskEv.c |    2 +-
 src/MaskEvent.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ChkMaskEv.c b/src/ChkMaskEv.c
index e19a991..bc1a279 100644
--- a/src/ChkMaskEv.c
+++ b/src/ChkMaskEv.c
@@ -59,7 +59,7 @@ Bool XCheckMaskEvent (
 	    for (qelt = prev ? prev->next : dpy->head;
 		 qelt;
 		 prev = qelt, qelt = qelt->next) {
-		if ((qelt->event.type < LASTEvent) &&
+		if ((qelt->event.type < GenericEvent) &&
 		    (_Xevent_to_mask[qelt->event.type] & mask) &&
 		    ((qelt->event.type != MotionNotify) ||
 		     (mask & AllPointers) ||
diff --git a/src/MaskEvent.c b/src/MaskEvent.c
index 8f0c0d4..acd903f 100644
--- a/src/MaskEvent.c
+++ b/src/MaskEvent.c
@@ -58,7 +58,7 @@ XMaskEvent (
 	    for (qelt = prev ? prev->next : dpy->head;
 		 qelt;
 		 prev = qelt, qelt = qelt->next) {
-		if ((qelt->event.type < LASTEvent) &&
+		if ((qelt->event.type < GenericEvent) &&
 		    (_Xevent_to_mask[qelt->event.type] & mask) &&
 		    ((qelt->event.type != MotionNotify) ||
 		     (mask & AllPointers) ||
-- 
1.6.3.rc1.2.g0164.dirty



More information about the xorg-devel mailing list