[PATCH libinput 5/5] tablet: Include axes with all events
Stephen Chandler Paul
thatslyude at gmail.com
Wed Jun 25 23:31:22 PDT 2014
Signed-off-by: Stephen Chandler Paul <thatslyude at gmail.com>
---
src/evdev-tablet.c | 11 +++++++++--
src/libinput-private.h | 7 +++++--
src/libinput.c | 10 ++++++++--
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index c754060..de8d8cb 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -314,6 +314,7 @@ tablet_notify_button_mask(struct tablet_dispatch *tablet,
tablet_notify_button(base,
time,
tool,
+ tablet->axes,
num_button + button_base - 1,
state);
}
@@ -390,7 +391,10 @@ tablet_flush(struct tablet_dispatch *tablet,
tablet->button_state.stylus_buttons = 0;
tablet_set_status(tablet, TABLET_BUTTONS_RELEASED);
} else if (tablet_has_status(tablet, TABLET_TOOL_ENTERING_PROXIMITY)) {
- tablet_notify_proximity_in(&device->base, time, tool);
+ tablet_notify_proximity_in(&device->base,
+ time,
+ tool,
+ tablet->axes);
tablet_unset_status(tablet, TABLET_TOOL_ENTERING_PROXIMITY);
}
@@ -419,7 +423,10 @@ tablet_flush(struct tablet_dispatch *tablet,
}
if (tablet_has_status(tablet, TABLET_TOOL_LEAVING_PROXIMITY)) {
- tablet_notify_proximity_out(&device->base, time, tool);
+ tablet_notify_proximity_out(&device->base,
+ time,
+ tool,
+ tablet->axes);
tablet_set_status(tablet, TABLET_TOOL_OUT_OF_PROXIMITY);
tablet_unset_status(tablet, TABLET_TOOL_LEAVING_PROXIMITY);
}
diff --git a/src/libinput-private.h b/src/libinput-private.h
index d429ad3..4efbdfe 100644
--- a/src/libinput-private.h
+++ b/src/libinput-private.h
@@ -220,17 +220,20 @@ tablet_notify_axis(struct libinput_device *device,
void
tablet_notify_proximity_in(struct libinput_device *device,
uint32_t time,
- struct libinput_tool *tool);
+ struct libinput_tool *tool,
+ double *axes);
void
tablet_notify_proximity_out(struct libinput_device *device,
uint32_t time,
- struct libinput_tool *tool);
+ struct libinput_tool *tool,
+ double *axes);
void
tablet_notify_button(struct libinput_device *device,
uint32_t time,
struct libinput_tool *tool,
+ double *axes,
int32_t button,
enum libinput_button_state state);
void
diff --git a/src/libinput.c b/src/libinput.c
index d7adfac..f9bb2ce 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1237,7 +1237,8 @@ tablet_notify_axis(struct libinput_device *device,
void
tablet_notify_proximity_in(struct libinput_device *device,
uint32_t time,
- struct libinput_tool *tool)
+ struct libinput_tool *tool,
+ double *axes)
{
struct libinput_event_tablet *proximity_in_event;
@@ -1248,6 +1249,7 @@ tablet_notify_proximity_in(struct libinput_device *device,
*proximity_in_event = (struct libinput_event_tablet) {
.time = time,
.tool = tool,
+ .axes = axes,
};
post_device_event(device,
@@ -1258,7 +1260,8 @@ tablet_notify_proximity_in(struct libinput_device *device,
void
tablet_notify_proximity_out(struct libinput_device *device,
uint32_t time,
- struct libinput_tool *tool)
+ struct libinput_tool *tool,
+ double *axes)
{
struct libinput_event_tablet *proximity_out_update_event;
@@ -1269,6 +1272,7 @@ tablet_notify_proximity_out(struct libinput_device *device,
*proximity_out_update_event = (struct libinput_event_tablet) {
.time = time,
.tool = tool,
+ .axes = axes,
};
post_device_event(device,
@@ -1280,6 +1284,7 @@ void
tablet_notify_button(struct libinput_device *device,
uint32_t time,
struct libinput_tool *tool,
+ double *axes,
int32_t button,
enum libinput_button_state state)
{
@@ -1297,6 +1302,7 @@ tablet_notify_button(struct libinput_device *device,
*button_event = (struct libinput_event_tablet) {
.time = time,
.tool = tool,
+ .axes = axes,
.button = button,
.state = state,
.seat_button_count = seat_button_count,
--
1.8.5.5
More information about the wayland-devel
mailing list