After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746117 - wacom: handle tablets without eraser
wacom: handle tablets without eraser
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Wacom
3.15.x
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-12 22:34 UTC by Benjamin Tissoires
Modified: 2015-04-01 09:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wacom-do-not-bail-out-if-the-tablet-doesn-t-have-an-.patch (9.72 KB, patch)
2015-03-12 22:34 UTC, Benjamin Tissoires
none Details | Review
wacom-do-not-redistribute-the-position-of-the-widget.patch (1.31 KB, patch)
2015-03-12 22:34 UTC, Benjamin Tissoires
none Details | Review
wacom: do not bail out if the tablet doesn't have an eraser (10.33 KB, patch)
2015-03-13 14:28 UTC, Benjamin Tissoires
none Details | Review
wacom: do not redistribute the position of the widgets of the stylus (1.35 KB, patch)
2015-03-13 14:28 UTC, Benjamin Tissoires
none Details | Review
wacom: Update from gnome-settings-daemon (1.92 KB, patch)
2015-03-13 14:29 UTC, Benjamin Tissoires
none Details | Review
wacom: test: add Huion H610 Pro panel (857 bytes, patch)
2015-03-13 14:29 UTC, Benjamin Tissoires
committed Details | Review
wacom: do not bail out if the tablet doesn't have an eraser (12.12 KB, patch)
2015-03-13 17:12 UTC, Benjamin Tissoires
committed Details | Review
wacom: Update from gnome-settings-daemon (1.62 KB, patch)
2015-03-13 21:11 UTC, Benjamin Tissoires
committed Details | Review
wacom: add an icon for stylii without an eraser (6.87 KB, patch)
2015-03-13 21:11 UTC, Benjamin Tissoires
committed Details | Review

Description Benjamin Tissoires 2015-03-12 22:34:18 UTC
Created attachment 299245 [details] [review]
wacom-do-not-bail-out-if-the-tablet-doesn-t-have-an-.patch

Generic tablets like Huion do not present an eraser on their
stylii.

While g-s-d handle them properly, g-c-c rejects them. Ignoring
the ersaer xinput device allows g-c-c to configure such tablets.
Comment 1 Benjamin Tissoires 2015-03-12 22:34:48 UTC
Created attachment 299246 [details] [review]
wacom-do-not-redistribute-the-position-of-the-widget.patch
Comment 2 Bastien Nocera 2015-03-13 07:25:18 UTC
Can you add a device without an eraser to the test application, so we can see what the pages look like without the device at hand?
Comment 3 Benjamin Tissoires 2015-03-13 13:56:31 UTC
(In reply to Bastien Nocera from comment #2)
> Can you add a device without an eraser to the test application, so we can
> see what the pages look like without the device at hand?

Sure, though I am not entirely sure if this won't require an update of libwacom first.

Anyway, not sure why, but test-wacom.c uses cc_wacom_page_new() and I changed its parameters, but gcc did not complain yesterday :(
Comment 4 Benjamin Tissoires 2015-03-13 14:28:51 UTC
Created attachment 299320 [details] [review]
wacom: do not bail out if the tablet doesn't have an eraser

Tablets have not always an eraser (most of the generic tablets like Huion,
UC-Logic, etc... don't). We should not reject such tablets.

Commit 54849a9 (wacom: Only the stylus and eraser tools need to exist)
mentioned that we were not sure about eraser, and I think we should not
assume one either.

To do so, we simply ignore the eraser xinput node and rely on
libwacom to actually provide the eraser information.
Comment 5 Benjamin Tissoires 2015-03-13 14:28:55 UTC
Created attachment 299321 [details] [review]
wacom: do not redistribute the position of the widgets of the stylus

If the stylus does not have the eraser tip, we fall in the LAYOUT_OTHER
case. We have a picture of a generic Wacom pen with an eraser, and the
leaders linking the widget to the picture are scrambled.

To prevent that, gray out the eraser pressure slider so that we do not
break the layout.
Comment 6 Benjamin Tissoires 2015-03-13 14:29:00 UTC
Created attachment 299322 [details] [review]
wacom: Update from gnome-settings-daemon
Comment 7 Benjamin Tissoires 2015-03-13 14:29:04 UTC
Created attachment 299323 [details] [review]
wacom: test: add Huion H610 Pro panel

The tablet does not have an eraser, so it's good to have a test for it.
Comment 8 Bastien Nocera 2015-03-13 15:56:12 UTC
Review of attachment 299320 [details] [review]:

You can merge "do not redistribute the position of the widgets of the stylus" into this patch for now, but we'll need a new LAYOUT_...

::: panels/wacom/cc-wacom-panel.c
@@ +298,3 @@
 			tablet->stylus = device;
 			break;
 		case WACOM_TYPE_ERASER:

Move the case above the default: case.

@@ +330,1 @@
 		/* this code is called once the stylus + eraser were set up, but the pad does not exist yet */

This isn't true anymore.
Comment 9 Bastien Nocera 2015-03-13 15:56:38 UTC
Review of attachment 299321 [details] [review]:

Should be merged into "do not bail out if the tablet doesn't have an eraser".
Comment 10 Bastien Nocera 2015-03-13 16:00:24 UTC
Review of attachment 299322 [details] [review]:

I've merged a newer version.
Comment 11 Bastien Nocera 2015-03-13 16:01:25 UTC
Comment on attachment 299323 [details] [review]
wacom: test: add Huion H610 Pro panel

Attachment 299323 [details] pushed as cf29aca - wacom: test: add Huion H610 Pro panel
Comment 12 Benjamin Tissoires 2015-03-13 17:12:13 UTC
Created attachment 299340 [details] [review]
wacom: do not bail out if the tablet doesn't have an eraser

Tablets have not always an eraser (most of the generic tablets like Huion,
UC-Logic, etc... don't). We should not reject such tablets.

Commit 54849a9 (wacom: Only the stylus and eraser tools need to exist)
mentioned that we were not sure about eraser, and I think we should not
assume one either.

To do so, we simply ignore the eraser xinput node and rely on
libwacom to actually provide the eraser information.

If the stylus does not have the eraser tip, we may fall in the
LAYOUT_OTHER case. We have a picture of a generic Wacom pen with an
eraser, and the leaders linking the widget to the picture are scrambled.

To prevent that, gray out the eraser pressure slider so that we do not
break the layout.
Comment 13 Benjamin Tissoires 2015-03-13 21:11:05 UTC
Created attachment 299360 [details] [review]
wacom: Update from gnome-settings-daemon
Comment 14 Benjamin Tissoires 2015-03-13 21:11:09 UTC
Created attachment 299361 [details] [review]
wacom: add an icon for stylii without an eraser

wacom-stylus-no-eraser.svg is an adaptation of wacom-stylus.svg
Comment 15 Bastien Nocera 2015-03-19 14:13:18 UTC
Review of attachment 299340 [details] [review]:

Looks good to commit after 3.16.0 is out.
Comment 16 Bastien Nocera 2015-03-19 14:21:06 UTC
Review of attachment 299361 [details] [review]:

Looks good.
Comment 17 Bastien Nocera 2015-03-19 14:21:41 UTC
Review of attachment 299360 [details] [review]:

Same patch as bug 746182, no need to send those out for review :)
Comment 18 Bastien Nocera 2015-04-01 09:17:26 UTC
Attachment 299340 [details] pushed as 66cb45b - wacom: do not bail out if the tablet doesn't have an eraser
Attachment 299360 [details] pushed as e463a1e - wacom: Update from gnome-settings-daemon
Attachment 299361 [details] pushed as e2a14f4 - wacom: add an icon for stylii without an eraser