GdkDevice: Avoid unnecessary critical

There is no need for a critical warning just because somebody
asked for a property that is not meaningful for the device.
Just document it as not useful for keyboard devices.
This commit is contained in:
Matthias Clasen 2014-10-05 18:21:46 -04:00
parent d1fd8267ef
commit 919bdff7ac

View File

@ -688,6 +688,7 @@ gdk_device_get_name (GdkDevice *device)
* @device: a #GdkDevice
*
* Determines whether the pointer follows device motion.
* This is not meaningful for keyboard devices, which don't have a pointer.
*
* Returns: %TRUE if the pointer follows device motion
*
@ -697,7 +698,6 @@ gboolean
gdk_device_get_has_cursor (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, FALSE);
return device->has_cursor;
}