[gtk+/wip/wayland-tablet: 1257/1271] 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: 1257/1271] GdkDeviceTool: Add GdkAxisFlags info to tablet tools
- Date: Wed, 21 Oct 2015 18:06:38 +0000 (UTC)
commit 129e3a467a726f2f739ac646297f4a2be10530fb
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 ca667e0..32452ec 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -1959,13 +1959,15 @@ G_DEFINE_BOXED_TYPE (GdkDeviceTool, gdk_device_tool,
GdkDeviceTool *
gdk_device_tool_new (guint 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 bdd8332..c0ef278 100644
--- a/gdk/gdkdeviceprivate.h
+++ b/gdk/gdkdeviceprivate.h
@@ -35,6 +35,7 @@ struct _GdkDeviceTool
{
guint serial;
GdkDeviceToolType type;
+ GdkAxisFlags tool_axes;
gint ref_count;
};
@@ -189,7 +190,8 @@ GdkWindow * _gdk_device_window_at_position (GdkDevice *device,
/* Device tools */
GdkDeviceTool *gdk_device_tool_new (guint serial,
- GdkDeviceToolType type);
+ GdkDeviceToolType type,
+ GdkAxisFlags tool_axes);
GdkDeviceTool *gdk_device_lookup_tool (GdkDevice *device,
guint serial);
void gdk_device_add_tool (GdkDevice *device,
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index dfabbcd..f41945b 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -902,7 +902,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_device_add_tool (device, tool);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]