[gnome-control-center] wacom: Get monitor tablet has ben mapped to before calibrating
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wacom: Get monitor tablet has ben mapped to before calibrating
- Date: Wed, 18 Jan 2012 23:43:17 +0000 (UTC)
commit 611a91b91f617c7e563751b6870b5a2c80aa5080
Author: Jason Gerecke <killertofu gmail com>
Date: Thu Jan 12 13:02:22 2012 -0800
wacom: Get monitor tablet has ben mapped to before calibrating
More precisely, this patch checks if the tablet *could* be mapped.
gsd_wacom_device_get_display_monitor has a side-effect of
automatically mapping the tablet if it is necessary and possible
to ensure that it *is* mapped.
If the tablet isn't and can't be mapped, calibration is pointless.
https://bugzilla.gnome.org/show_bug.cgi?id=657423
panels/wacom/cc-wacom-page.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-page.c b/panels/wacom/cc-wacom-page.c
index b1fa907..0a4234a 100644
--- a/panels/wacom/cc-wacom-page.c
+++ b/panels/wacom/cc-wacom-page.c
@@ -156,6 +156,16 @@ calibrate_button_clicked_cb (GtkButton *button,
GVariant *variant;
int *current;
gsize ncal;
+ gint monitor;
+
+ monitor = gsd_wacom_device_get_display_monitor (page->priv->stylus);
+ if (monitor < 0) {
+ /* The display the tablet should be mapped to could not be located.
+ * This shouldn't happen if the EDID data is good...
+ */
+ g_critical("Output associated with the tablet is not connected. Unable to calibrate.");
+ return;
+ }
variant = g_settings_get_value (page->priv->wacom_settings, "area");
current = (int *) g_variant_get_fixed_array (variant, &ncal, sizeof (gint32));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]