summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/eventstr.h9
-rw-r--r--include/inpututils.h4
2 files changed, 12 insertions, 1 deletions
diff --git a/include/eventstr.h b/include/eventstr.h
index cce903d04..4fd846f10 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -25,6 +25,7 @@
#ifndef EVENTSTR_H
#define EVENTSTR_H
+#include "inputstr.h"
#include <events.h>
/**
* @file events.h
@@ -78,6 +79,13 @@ enum EventType {
};
/**
+ * How a DeviceEvent was provoked
+ */
+enum DeviceEventSource {
+ EVENT_SOURCE_NORMAL = 0, /**< Default: from a user action (e.g. key press) */
+};
+
+/**
* Used for ALL input device events internal in the server until
* copied into the matching protocol event.
*
@@ -124,6 +132,7 @@ struct _DeviceEvent {
int key_repeat; /**< Internally-generated key repeat event */
uint32_t flags; /**< Flags to be copied into the generated event */
uint32_t resource; /**< Touch event resource, only for TOUCH_REPLAYING */
+ enum DeviceEventSource source_type; /**< How this event was provoked */
};
/**
diff --git a/include/inpututils.h b/include/inpututils.h
index 4e9081563..48c95c4c1 100644
--- a/include/inpututils.h
+++ b/include/inpututils.h
@@ -30,6 +30,7 @@
#define INPUTUTILS_H
#include "input.h"
+#include "eventstr.h"
#include <X11/extensions/XI2proto.h>
extern Mask event_filters[MAXDEVICES][MAXEVENTS];
@@ -43,7 +44,8 @@ struct _ValuatorMask {
};
extern void verify_internal_event(const InternalEvent *ev);
-extern void init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms);
+extern void init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms,
+ enum DeviceEventSource event_source);
extern int event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd);
extern void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd,
DeviceEvent *event);