GNOME Bugzilla – Bug 746117
wacom: handle tablets without eraser
Last modified: 2015-04-01 09:17:39 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.
Created attachment 299246 [details] [review] wacom-do-not-redistribute-the-position-of-the-widget.patch
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?
(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 :(
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.
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.
Created attachment 299322 [details] [review] wacom: Update from gnome-settings-daemon
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.
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.
Review of attachment 299321 [details] [review]: Should be merged into "do not bail out if the tablet doesn't have an eraser".
Review of attachment 299322 [details] [review]: I've merged a newer version.
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
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.
Created attachment 299360 [details] [review] wacom: Update from gnome-settings-daemon
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
Review of attachment 299340 [details] [review]: Looks good to commit after 3.16.0 is out.
Review of attachment 299361 [details] [review]: Looks good.
Review of attachment 299360 [details] [review]: Same patch as bug 746182, no need to send those out for review :)
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