[gnome-settings-daemon] wacom: Make set_current_stylus a no-op if already set
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Make set_current_stylus a no-op if already set
- Date: Wed, 14 Dec 2011 18:56:42 +0000 (UTC)
commit 81190d468d2b8383bd0b8ce5834cbc6fd7f98ee9
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 14 17:52:50 2011 +0000
wacom: Make set_current_stylus a no-op if already set
plugins/wacom/gsd-wacom-device.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index af6f545..33b13d1 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -611,6 +611,13 @@ gsd_wacom_device_set_current_stylus (GsdWacomDevice *device,
g_return_if_fail (GSD_IS_WACOM_DEVICE (device));
+ /* Don't change anything if the stylus is already set */
+ if (device->priv->last_stylus != NULL) {
+ GsdWacomStylus *stylus = device->priv->last_stylus;
+ if (stylus->priv->id == stylus_id)
+ return;
+ }
+
for (l = device->priv->styli; l; l = l->next) {
GsdWacomStylus *stylus = l->data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]