Forgot to update the documentation for libinput_event_tablet_get_axis(), fixed

Signed-off-by: Stephen Chandler Paul <[email protected]>
---
 src/evdev-tablet.c     | 11 +++++++++--
 src/libinput-private.h |  7 +++++--
 src/libinput.c         | 10 ++++++++--
 src/libinput.h         |  3 ---
 4 files changed, 22 insertions(+), 9 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,
diff --git a/src/libinput.h b/src/libinput.h
index f454af1..47f8fc4 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -876,9 +876,6 @@ libinput_event_tablet_axis_has_changed(struct 
libinput_event_tablet *event,
  *   that indicates the tilt vertical or horizontal tilt of the tool
  *   respectively
  *
- * For tablet events that are not of type @ref LIBINPUT_EVENT_TABLET_AXIS, this
- * function returns 0.
- *
  * @param event The libinput tablet event
  * @param axis The axis to retrieve the value of
  * @return The current value of the the axis
-- 
1.8.5.5

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to