wayland: Use wl_fixed_t for angle arguments in wp_tablet_tool
This is a change in tablet protocol v2
This commit is contained in:
parent
3d9bb1cc09
commit
72ee6b8b65
@ -42,9 +42,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TABLET_AXIS_MAX 65535
|
#define TABLET_AXIS_MAX 65535
|
||||||
#define DEGREES_PRECISION 100 /* wl_tablet_tool.tilt and .rotation define
|
|
||||||
* angles in hundreths of a degree
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
unbind_resource (struct wl_resource *resource)
|
unbind_resource (struct wl_resource *resource)
|
||||||
@ -739,8 +736,8 @@ broadcast_tilt (MetaWaylandTabletTool *tool,
|
|||||||
wl_resource_for_each (resource, &tool->focus_resource_list)
|
wl_resource_for_each (resource, &tool->focus_resource_list)
|
||||||
{
|
{
|
||||||
zwp_tablet_tool_v2_send_tilt (resource,
|
zwp_tablet_tool_v2_send_tilt (resource,
|
||||||
(int32_t) (xtilt * DEGREES_PRECISION),
|
wl_fixed_from_double (xtilt),
|
||||||
(int32_t) (ytilt * DEGREES_PRECISION));
|
wl_fixed_from_double (ytilt));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -762,7 +759,7 @@ broadcast_rotation (MetaWaylandTabletTool *tool,
|
|||||||
wl_resource_for_each (resource, &tool->focus_resource_list)
|
wl_resource_for_each (resource, &tool->focus_resource_list)
|
||||||
{
|
{
|
||||||
zwp_tablet_tool_v2_send_rotation (resource,
|
zwp_tablet_tool_v2_send_rotation (resource,
|
||||||
(int32_t) rotation * DEGREES_PRECISION);
|
wl_fixed_from_double (rotation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user