[gtk+/wip/wayland-tablet: 540/555] 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: 540/555] GdkDeviceTool: Add GdkAxisFlags info to tablet tools
- Date: Tue, 29 Mar 2016 18:20:51 +0000 (UTC)
commit 6573d39188cdb72ce93c9eecd470887c3b56c6fb
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 0e7d0a7..14adfba 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -2044,13 +2044,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 71d014d..310e24e 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1023,7 +1023,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]