[gtk+/wip/wayland-tablet: 617/632] GdkDeviceTool: Add GdkAxisFlags info to tablet tools
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/wayland-tablet: 617/632] GdkDeviceTool: Add GdkAxisFlags info to tablet tools
- Date: Tue, 1 Mar 2016 11:46:52 +0000 (UTC)
commit eebeb165b64d897fb9aaf485fafc0034bd88a91a
Author: Stephen Chandler Paul <thatslyude gmail com>
Date: Mon Jun 22 17:19:16 2015 +0200
GdkDeviceTool: Add GdkAxisFlags info to tablet tools
Different tools may have different sets of axes, we should store that
info somewhere.
gdk/gdkdevice.c | 4 +++-
gdk/gdkdeviceprivate.h | 4 +++-
gdk/x11/gdkdevicemanager-xi2.c | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index 1b30d43..14cf75e 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -2045,13 +2045,15 @@ G_DEFINE_BOXED_TYPE (GdkDeviceTool, gdk_device_tool,
GdkDeviceTool *
gdk_device_tool_new (guint64 serial,
- GdkDeviceToolType type)
+ GdkDeviceToolType type,
+ GdkAxisFlags tool_axes)
{
GdkDeviceTool *tool;
tool = g_new0 (GdkDeviceTool, 1);
tool->serial = serial;
tool->type = type;
+ tool->tool_axes = tool_axes;
return tool;
}
diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h
index 37cac78..bf4a41e 100644
--- a/gdk/gdkdeviceprivate.h
+++ b/gdk/gdkdeviceprivate.h
@@ -36,6 +36,7 @@ struct _GdkDeviceTool
{
guint64 serial;
GdkDeviceToolType type;
+ GdkAxisFlags tool_axes;
gint ref_count;
};
@@ -194,7 +195,8 @@ void gdk_device_set_seat (GdkDevice *device,
/* Device tools */
GdkDeviceTool *gdk_device_tool_new (guint64 serial,
- GdkDeviceToolType type);
+ GdkDeviceToolType type,
+ GdkAxisFlags tool_axes);
GdkDeviceTool *gdk_device_tool_ref (GdkDeviceTool *tool);
void gdk_device_tool_unref (GdkDeviceTool *tool);
void gdk_device_update_tool (GdkDevice *device,
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 598b588..c117f5b 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1022,7 +1022,7 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
if (!tool && serial_id > 0)
{
tool = gdk_device_tool_new (serial_id,
- GDK_DEVICE_TOOL_TYPE_UNKNOWN);
+ GDK_DEVICE_TOOL_TYPE_UNKNOWN, 0);
gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]