[gtk+] GdkDevice: Avoid unnecessary critical
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GdkDevice: Avoid unnecessary critical
- Date: Sun, 5 Oct 2014 23:43:20 +0000 (UTC)
commit 919bdff7ac09dc7ce8c8401684cfae743cc2691a
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 5 18:21:46 2014 -0400
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.
gdk/gdkdevice.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index f30ebcc..0647d9f 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]