[gnome-settings-daemon] wacom: Update for input helper changes



commit 3c0bbf5b514159f19d5294246b8e7525d2f2ab43
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 31 16:00:54 2012 +0000

    wacom: Update for input helper changes

 plugins/wacom/gsd-wacom-device.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index db60469..ba75588 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -315,6 +315,10 @@ filter_events (XEvent         *xevent,
 	XFree (name);
 
 	tool_id = xdevice_get_last_tool_id (device->priv->device_id);
+	if (tool_id == -1) {
+		g_warning ("Failed to get value for changed stylus ID on device '%d", device->priv->device_id);
+		return GDK_FILTER_CONTINUE;
+	}
 	gsd_wacom_device_set_current_stylus (device, tool_id);
 
 	return GDK_FILTER_CONTINUE;
@@ -342,6 +346,10 @@ setup_property_notify (GsdWacomDevice *device)
 			       device);
 
 	tool_id = xdevice_get_last_tool_id (device->priv->device_id);
+	if (tool_id == -1) {
+		g_warning ("Failed to get value for changed stylus ID on device '%d", device->priv->device_id);
+		return TRUE;
+	}
 	gsd_wacom_device_set_current_stylus (device, tool_id);
 
 	return TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]