[gnome-settings-daemon] wacom: Setup a nice default stylus
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Setup a nice default stylus
- Date: Wed, 14 Dec 2011 18:57:07 +0000 (UTC)
commit 4214eddf01e19ed9e89c5b32f0989f298b884508
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 14 18:26:21 2011 +0000
wacom: Setup a nice default stylus
If we haven't had a tool touch the tablet yet.
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 955bf82..83f9400 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -623,6 +623,13 @@ gsd_wacom_device_set_current_stylus (GsdWacomDevice *device,
for (l = device->priv->styli; l; l = l->next) {
GsdWacomStylus *stylus = l->data;
+ /* Set a nice default if 0x0 */
+ if (stylus_id == 0x0 &&
+ stylus->priv->type == WSTYLUS_GENERAL) {
+ g_object_set (device, "last-stylus", stylus, NULL);
+ return;
+ }
+
if (stylus->priv->id == stylus_id) {
g_object_set (device, "last-stylus", stylus, NULL);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]