Commit graph

14 commits

Author SHA1 Message Date
Carlos Garnacho
e50f27a96b wacom: Let CcWacomPage track pad devices
This puts stylus/pad tracking on 2 separate levels. The CcWacomPanel
will look for styli, and treat them as "device leaders", adding a
CcWacomPage for them.

The CcWacomPage will then track the related pad, and update the
"Map buttons..." action visibility according to it.

This simplifies tablet page creation (eg. have it completed in one
step), and decouples the device grouping logic from CcWacomPanel,
which will be useful in future commits.
2020-09-04 21:46:19 +00:00
Robert Ancell
b51af0fc58 wacom: Replace ifdefs with #pragma once 2018-08-02 21:48:03 +00:00
Robert Ancell
aeca65c729 wacom: Replace GObject boilerplate with G_DECLARE_TYPE 2018-08-02 21:48:02 +00:00
Carlos Garnacho
4743770832 wacom: Update to the new data model
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.
2016-11-04 23:26:41 +01:00
Benjamin Tissoires
66cb45bdad 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.

https://bugzilla.gnome.org/show_bug.cgi?id=746117
2015-04-01 11:15:29 +02:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Joaquim Rocha
ed3c9badff wacom: Add cc_wacom_page_calibrate and cc_wacom_page_can_calibrate functions
https://bugzilla.gnome.org/show_bug.cgi?id=692816
2013-06-05 18:29:40 +02:00
Peter Hutterer
ff31b771bb wacom: update the UI if a new tool comes in
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
2012-04-12 14:43:34 +01:00
Bastien Nocera
9df8c7cf62 wacom: Add "pad" argument to cc_wacom_page_new() 2012-02-14 19:37:53 +00:00
Bastien Nocera
289d1e90c5 wacom: Implement switching to Display settings 2012-01-26 19:10:11 +00:00
Bastien Nocera
ce8186dba1 wacom: Add navigation button to navigate between styli
Looks a bit rough, but functionality is present.
2011-11-28 18:24:15 +00:00
Bastien Nocera
54849a9e97 wacom: Only the stylus and eraser tools need to exist
And then again, not even sure about the eraser. But there
are devices we support that don't need the pad tool, such as the
Thinkpad X201 tablet.
2011-11-25 17:04:05 +00:00
Bastien Nocera
8f6fc0e317 wacom: Create CcWacomPage from GsdWacomDevices
Instead of hard-coding the location of settings.
2011-11-24 19:15:13 +00:00
Bastien Nocera
46bfcd1bc3 wacom: Split out the tablet page
So we can reuse it for separate tablet configurations.
2011-11-24 19:15:13 +00:00