[gtk+/wip/wayland-tablet: 1850/1865] GdkDeviceTool: Add GdkAxisFlags info to tablet tools



commit 251b956e312e34c670af6b00e2bc5fd1f76c2647
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 0b64f7f..4a8d1c6 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -2027,13 +2027,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 ee6d506..8f2c8be 100644
--- a/gdk/gdkdeviceprivate.h
+++ b/gdk/gdkdeviceprivate.h
@@ -36,6 +36,7 @@ struct _GdkDeviceTool
 {
   guint 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    (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 13d5923..d2755b2 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1017,7 +1017,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]