summaryrefslogtreecommitdiff
path: root/gdk/gdkdevicemanager.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2010-12-13 12:20:34 +0100
committerCarlos Garnacho <carlosg@gnome.org>2010-12-15 03:17:59 +0100
commitbe7de347bfac28b341aeb25baf1e788c6a333095 (patch)
treed55f8a6c8bcafd7a64d0b55f9d1486de7624c572 /gdk/gdkdevicemanager.c
parent9f41101ccc5d81f748f64752528cc3751f971597 (diff)
downloadgtk+-be7de347bfac28b341aeb25baf1e788c6a333095.tar.gz
xi2: Improve device hierarchy handling
The xi2 device manager now handles slaves being detached and/or attached to a master. gdk_device_list_slaves() has been added so it is possible to know how slaves relate with masters. The other backends (X11 and not) don't neeed to to anything special here since their hierarchy is fully flat.
Diffstat (limited to 'gdk/gdkdevicemanager.c')
-rw-r--r--gdk/gdkdevicemanager.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gdk/gdkdevicemanager.c b/gdk/gdkdevicemanager.c
index fced01ff49..e282036424 100644
--- a/gdk/gdkdevicemanager.c
+++ b/gdk/gdkdevicemanager.c
@@ -183,12 +183,16 @@ gdk_device_manager_class_init (GdkDeviceManagerClass *klass)
* @device_manager: the object on which the signal is emitted
* @device: the #GdkDevice that changed.
*
- * The ::device-changed signal is emitted either when some
- * #GdkDevice has changed the number of either axes or keys.
- * For example In X this will normally happen when the slave
- * device routing events through the master device changes,
- * in that case the master device will change to reflect the
- * new slave device axes and keys.
+ * The ::device-changed signal is emitted whenever a device
+ * has changed in the hierarchy, either slave devices being
+ * disconnected from their master device or connected to
+ * another one, or master devices being added or removed
+ * a slave device.
+ *
+ * If a slave device is detached from all master devices
+ * (gdk_device_get_associated_device() returns %NULL), its
+ * #GdkDeviceType will change to %GDK_DEVICE_TYPE_FLOATING,
+ * if it's attached, it will change to %GDK_DEVICE_TYPE_SLAVE.
*/
signals [DEVICE_CHANGED] =
g_signal_new (g_intern_static_string ("device-changed"),