* @Title: GdkDevice
* @See_also: #GdkDeviceManager
*
- * The #GdkDevice object represents a single input device.
+ * The #GdkDevice object represents a single input device, such
+ * as a keyboard, a mouse, a touchpad, etc.
*
* See the #GdkDeviceManager documentation for more information
* about the various kinds of master and slave devices, and their
gdouble min_axis;
gdouble max_axis;
-
gdouble min_value;
gdouble max_value;
gdouble resolution;
if (device->associated)
{
- _gdk_device_set_associated_device (device->associated, NULL);
+ if (device->type == GDK_DEVICE_TYPE_MASTER)
+ _gdk_device_set_associated_device (device->associated, NULL);
+
g_object_unref (device->associated);
device->associated = NULL;
}
g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_GRAB_SUCCESS);
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_GRAB_SUCCESS);
- if (_gdk_native_windows)
- native = window;
- else
- native = gdk_window_get_toplevel (window);
+ native = gdk_window_get_toplevel (window);
while (native->window_type == GDK_WINDOW_OFFSCREEN)
{
return NULL;
}
-GdkAxisUse
-_gdk_device_get_axis_use (GdkDevice *device,
- guint index_)
-{
- GdkAxisInfo info;
-
- info = g_array_index (device->axes, GdkAxisInfo, index_);
- return info.use;
-}
-
gboolean
_gdk_device_translate_window_coord (GdkDevice *device,
GdkWindow *window,