[PATCH 01/21] include: add GetXI2MaskByte and GetXI2EventFilterMask to headers

Peter Hutterer peter.hutterer at who-t.net
Thu Dec 8 19:36:02 PST 2011


This is needed for touch event processing.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c    |    4 ++--
 include/input.h |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 59caa91..5dfcbf3 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -414,7 +414,7 @@ GetEventFilterMask(DeviceIntPtr dev, int evtype)
     return filters[dev ? dev->id : 0][evtype];
 }
 
-static inline Mask
+inline Mask
 GetXI2EventFilterMask(int evtype)
 {
     return (1 << (evtype % 8));
@@ -452,7 +452,7 @@ GetEventFilter(DeviceIntPtr dev, xEvent *event)
  * Return the single byte of the device's XI2 mask that contains the mask
  * for the event_type.
  */
-static int
+int
 GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type)
 {
     /* we just return the matching filter because that's the only use
diff --git a/include/input.h b/include/input.h
index 8b0c18e..917e92f 100644
--- a/include/input.h
+++ b/include/input.h
@@ -57,6 +57,7 @@ SOFTWARE.
 #include "xkbrules.h"
 #include "events.h"
 #include "list.h"
+#include <X11/extensions/XI2.h>
 
 #define DEVICE_INIT	0
 #define DEVICE_ON	1
@@ -537,6 +538,8 @@ extern _X_EXPORT void FreeInputAttributes(InputAttributes *attrs);
 extern Mask GetEventMask(DeviceIntPtr dev, xEvent* ev, InputClientsPtr clients);
 extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
 extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent* ev);
+extern Mask GetXI2EventFilterMask(int evtype);
+extern int GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type);
 void FixUpEventFromWindow(SpritePtr pSprite,
                           xEvent *xE,
                           WindowPtr pWin,
-- 
1.7.7.1



More information about the xorg-devel mailing list