Commit cf408c27b0 changed how the values stored in the "area" key were
calculated in order be compatible with its updated schema. Unfortunately,
it overlooked the fact that updated schema also changed the order of the
values from "left, top, right, bottom" to "left, right, top, bottom".
Because of this, corrections intended to be applied to the top and right
screen edges were swapped. This can cause a noticible cursor offset to
occur after finishing calibration.
https://bugzilla.gnome.org/show_bug.cgi?id=784009
The calibration utility was modified in cf408c27b0 to return unitless
padding measurements instead of axis values for storage in gsettings.
Unfortunately, the code still assumes in some places that it is working
with axes rather than paddings. This causes subtle math errors that
result in undesired cursor offsets after the calibration is applied.
Fortunately, this can be simplified, since tablet area is always reset
to the default state before starting calibration, we are sure that the
value will remain constant. Since both axes are in the same 0..1 scale,
calibration code doesn't need to swap X/Y back and forth to calculate
each axis scale.
Additionally, the code to get the calibrated axis values has been moved
into its own function along with a new function that returns padding
values suitable for consumption by g-c-c. All calculations are performed
internally in the 0..1 range.
https://bugzilla.gnome.org/show_bug.cgi?id=784009
Co-Authored-By: Carlos Garnacho <carlosg@gnome.org>
The "area" setting has a different treatment in the gsettings-desktop-schemas
tablet schema, the 4 double values express the padding (in unitless 0..1
range) on each of the sides of the tablet. It's been done so we don't rely
on input/output units, which we might have not the luxury to access.
Besides that, the dependency on GsdWacomDevice has been cleared.
There's much going on under the hood here:
- Styli and tablets are now in split views, as per the mockups.
- CcWacomDevice and CcWacomTool are now in use, with the subsequent
API use changes. Moreover, using these objects means using the
newer schemas in gsettings-desktop-schemas, so there had to be
changes in the settings we store too.
- We now use CcTabletToolMap, plus listen to tool proximity events,
populating the "Stylus" sub-pane with those.
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.
https://bugzilla.gnome.org/show_bug.cgi?id=746117
We shouldn't be using the old calibration values to create the
new ones, so reset the "area" settings before starting a new
calibration, and re-apply the saved calibration if the calibration
is cancelled or fails.
https://bugzilla.gnome.org/show_bug.cgi?id=707784
The name of the file was also changed to calibratorgui.c/h to avoid
it being inconsistent, this way it is no longer dependent on the
the technology.
https://bugzilla.gnome.org/show_bug.cgi?id=667797
Action type comes from GSettings and may have been changed
to some invalid value, causing a segmentation fault in
control-center if the value is larger than the known action
types. This can also occur when downgrading from a version
with more possible actions.
Adds a sanity check to verify the given action type value
is within the bounds of the known action types.
https://bugzilla.gnome.org/show_bug.cgi?id=689265
The device_added_cb is called once for each tool added. The wacom driver
hotplugs tools in the order stylus, eraser, cursor, pad.
update_current_page will add a new page once a tablet has stylus and
eraser, before cursor and pad exist. priv->pad is thus always NULL,
causing, cc_wacom_page's update_tablet_ui to remove the "Map Buttons..."
button for any device.
Change the code to update the tool list for every new tool we get,
merely triggering the visibility of the button instead of destroying it
completely.
https://bugzilla.gnome.org/show_bug.cgi?id=672691