diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2010-06-08 15:16:59 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2010-06-24 02:30:53 +0200 |
commit | 6cde835acd0174d355a23d0efd398f8b35240f4a (patch) | |
tree | 2ecb86fb9c33a9ba40799bba4cfbec4e25959d37 /gdk/gdkdevicemanager.c | |
parent | 009e26f32f27dacb907aa9917fbfac799c2f3247 (diff) | |
download | gtk+-6cde835acd0174d355a23d0efd398f8b35240f4a.tar.gz |
GdkDeviceManager: Add gdk_device_manager_get_client_pointer().
This function makes a better replacement for
gdk_display_get_core_pointer(), wherever it might yet be needed, for
XI2 resorts to XIGetClientPointer(), for the others return the only
core pointer.
https://bugzilla.gnome.org/show_bug.cgi?id=621685
Diffstat (limited to 'gdk/gdkdevicemanager.c')
-rw-r--r-- | gdk/gdkdevicemanager.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gdk/gdkdevicemanager.c b/gdk/gdkdevicemanager.c index 5bce0fcf91..b93e8a3cd8 100644 --- a/gdk/gdkdevicemanager.c +++ b/gdk/gdkdevicemanager.c @@ -298,5 +298,29 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager, return GDK_DEVICE_MANAGER_GET_CLASS (device_manager)->list_devices (device_manager, type); } +/** + * gdk_device_manager_get_client_pointer: + * @device_manager: a #GdkDeviceManager + * + * Returns the client pointer, that is, the master pointer that acts as the core pointer + * for this application. In X11, window managers may change this depending on the interaction + * pattern under the presence of several pointers. + * + * You should use this function sheldomly, only in code that isn't triggered by a #GdkEvent + * and there aren't other means to get a meaningful #GdkDevice to operate on. + * + * Returns: The client pointer. + * + * Since: 3.0 + **/ +GdkDevice * +gdk_device_manager_get_client_pointer (GdkDeviceManager *device_manager) +{ + g_return_val_if_fail (GDK_IS_DEVICE_MANAGER (device_manager), NULL); + + return GDK_DEVICE_MANAGER_GET_CLASS (device_manager)->get_client_pointer (device_manager); +} + + #define __GDK_DEVICE_MANAGER_C__ #include "gdkaliasdef.c" |