aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Ongyerth <ongy@ongy.net>2018-05-19 12:16:11 +0200
committerMarkus Ongyerth <ongy@ongy.net>2018-07-14 09:48:57 +0200
commit2bc09d91c3f9c0afe093e77491521da8ed85b4cf (patch)
tree95c818b3e426b34d6d9538ec464da33ee93b5093
parentdc525a9c5f65c30d67de21a5cfb0315c0997f756 (diff)
Silent conversion from double to int should be illegal
-rw-r--r--include/wlr/types/wlr_tablet_v2.h6
-rw-r--r--types/tablet_v2/wlr_tablet_v2_tool.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/include/wlr/types/wlr_tablet_v2.h b/include/wlr/types/wlr_tablet_v2.h
index 09f7454a..85233813 100644
--- a/include/wlr/types/wlr_tablet_v2.h
+++ b/include/wlr/types/wlr_tablet_v2.h
@@ -123,10 +123,10 @@ void wlr_send_tablet_v2_tablet_tool_motion(
struct wlr_tablet_v2_tablet_tool *tool, double x, double y);
void wlr_send_tablet_v2_tablet_tool_pressure(
- struct wlr_tablet_v2_tablet_tool *tool, uint32_t pressure);
+ struct wlr_tablet_v2_tablet_tool *tool, double pressure);
void wlr_send_tablet_v2_tablet_tool_distance(
- struct wlr_tablet_v2_tablet_tool *tool, uint32_t distance);
+ struct wlr_tablet_v2_tablet_tool *tool, double distance);
void wlr_send_tablet_v2_tablet_tool_tilt(
struct wlr_tablet_v2_tablet_tool *tool, double x, double y);
@@ -135,7 +135,7 @@ void wlr_send_tablet_v2_tablet_tool_rotation(
struct wlr_tablet_v2_tablet_tool *tool, double degrees);
void wlr_send_tablet_v2_tablet_tool_slider(
- struct wlr_tablet_v2_tablet_tool *tool, int32_t position);
+ struct wlr_tablet_v2_tablet_tool *tool, double position);
void wlr_send_tablet_v2_tablet_tool_wheel(
struct wlr_tablet_v2_tablet_tool *tool, double delta, int32_t clicks);
diff --git a/types/tablet_v2/wlr_tablet_v2_tool.c b/types/tablet_v2/wlr_tablet_v2_tool.c
index 954c98c9..9eefaad7 100644
--- a/types/tablet_v2/wlr_tablet_v2_tool.c
+++ b/types/tablet_v2/wlr_tablet_v2_tool.c
@@ -401,20 +401,20 @@ void wlr_send_tablet_v2_tablet_tool_proximity_out(
}
void wlr_send_tablet_v2_tablet_tool_pressure(
- struct wlr_tablet_v2_tablet_tool *tool, uint32_t pressure) {
+ struct wlr_tablet_v2_tablet_tool *tool, double pressure) {
if (tool->current_client) {
zwp_tablet_tool_v2_send_pressure(tool->current_client->resource,
- pressure);
+ pressure * 65535);
queue_tool_frame(tool->current_client);
}
}
void wlr_send_tablet_v2_tablet_tool_distance(
- struct wlr_tablet_v2_tablet_tool *tool, uint32_t distance) {
+ struct wlr_tablet_v2_tablet_tool *tool, double distance) {
if (tool->current_client) {
zwp_tablet_tool_v2_send_distance(tool->current_client->resource,
- distance);
+ distance * 65535);
queue_tool_frame(tool->current_client);
}
@@ -445,13 +445,13 @@ void wlr_send_tablet_v2_tablet_tool_rotation(
}
void wlr_send_tablet_v2_tablet_tool_slider(
- struct wlr_tablet_v2_tablet_tool *tool, int32_t position) {
+ struct wlr_tablet_v2_tablet_tool *tool, double position) {
if (!tool->current_client) {
return;
}
zwp_tablet_tool_v2_send_slider(tool->current_client->resource,
- position);
+ position * 65535);
queue_tool_frame(tool->current_client);
}