forked from AuroraMiddleware/gtk
gdk: Pass hardware ID on gdk_device_tool_new()
And implement this on wayland, where this information is already obtained. https://bugzilla.gnome.org/show_bug.cgi?id=770026
This commit is contained in:
parent
40f75e74be
commit
942d144d3b
@ -137,11 +137,13 @@ gdk_device_tool_init (GdkDeviceTool *tool)
|
|||||||
|
|
||||||
GdkDeviceTool *
|
GdkDeviceTool *
|
||||||
gdk_device_tool_new (guint64 serial,
|
gdk_device_tool_new (guint64 serial,
|
||||||
|
guint64 hw_id,
|
||||||
GdkDeviceToolType type,
|
GdkDeviceToolType type,
|
||||||
GdkAxisFlags tool_axes)
|
GdkAxisFlags tool_axes)
|
||||||
{
|
{
|
||||||
return g_object_new (GDK_TYPE_DEVICE_TOOL,
|
return g_object_new (GDK_TYPE_DEVICE_TOOL,
|
||||||
"serial", serial,
|
"serial", serial,
|
||||||
|
"hardware-id", hw_id,
|
||||||
"tool-type", type,
|
"tool-type", type,
|
||||||
"axes", tool_axes,
|
"axes", tool_axes,
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -28,6 +28,7 @@ struct _GdkDeviceTool
|
|||||||
{
|
{
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
guint64 serial;
|
guint64 serial;
|
||||||
|
guint64 hw_id;
|
||||||
GdkDeviceToolType type;
|
GdkDeviceToolType type;
|
||||||
GdkAxisFlags tool_axes;
|
GdkAxisFlags tool_axes;
|
||||||
};
|
};
|
||||||
@ -38,6 +39,7 @@ struct _GdkDeviceToolClass
|
|||||||
};
|
};
|
||||||
|
|
||||||
GdkDeviceTool *gdk_device_tool_new (guint64 serial,
|
GdkDeviceTool *gdk_device_tool_new (guint64 serial,
|
||||||
|
guint64 hw_id,
|
||||||
GdkDeviceToolType type,
|
GdkDeviceToolType type,
|
||||||
GdkAxisFlags tool_axes);
|
GdkAxisFlags tool_axes);
|
||||||
|
|
||||||
|
@ -3105,7 +3105,9 @@ tablet_tool_handle_done (void *data,
|
|||||||
{
|
{
|
||||||
GdkWaylandTabletToolData *tool = data;
|
GdkWaylandTabletToolData *tool = data;
|
||||||
|
|
||||||
tool->tool = gdk_device_tool_new (tool->hardware_serial, tool->type, tool->axes);
|
tool->tool = gdk_device_tool_new (tool->hardware_serial,
|
||||||
|
tool->hardware_id_wacom,
|
||||||
|
tool->type, tool->axes);
|
||||||
gdk_seat_tool_added (tool->seat, tool->tool);
|
gdk_seat_tool_added (tool->seat, tool->tool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1030,7 +1030,7 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
|
|||||||
|
|
||||||
if (!tool && serial_id > 0)
|
if (!tool && serial_id > 0)
|
||||||
{
|
{
|
||||||
tool = gdk_device_tool_new (serial_id,
|
tool = gdk_device_tool_new (serial_id, 0,
|
||||||
GDK_DEVICE_TOOL_TYPE_UNKNOWN, 0);
|
GDK_DEVICE_TOOL_TYPE_UNKNOWN, 0);
|
||||||
gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool);
|
gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user