[PATCH 1/2] libX11: XWindowEvent/XCheckWindowEvent must not return GenericEvents.

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


GenericEvents have no fixed position for the window, they must be treated
like extension events.

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

diff --git a/src/ChkWinEv.c b/src/ChkWinEv.c
index 42720e4..1fd975c 100644
--- a/src/ChkWinEv.c
+++ b/src/ChkWinEv.c
@@ -60,7 +60,7 @@ Bool XCheckWindowEvent (
 		 qelt;
 		 prev = qelt, qelt = qelt->next) {
 		if ((qelt->event.xany.window == w) &&
-		    (qelt->event.type < LASTEvent) &&
+		    (qelt->event.type < GenericEvent) &&
 		    (_Xevent_to_mask[qelt->event.type] & mask) &&
 		    ((qelt->event.type != MotionNotify) ||
 		     (mask & AllPointers) ||
diff --git a/src/WinEvent.c b/src/WinEvent.c
index 7662609..c6daf2a 100644
--- a/src/WinEvent.c
+++ b/src/WinEvent.c
@@ -62,7 +62,7 @@ XWindowEvent (
 		 qelt;
 		 prev = qelt, qelt = qelt->next) {
 		if ((qelt->event.xany.window == w) &&
-		    (qelt->event.type < LASTEvent) &&
+		    (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