Commit graph

27 commits

Author SHA1 Message Date
Peter Hutterer
ad63caf442 wacom: Switch to using a dialog for stylus button assignments
This moves the wacom stylus button assignments from a dropdown to an
external dialog, in preparation for adding keyboard shortcuts to this
list.
2024-02-11 08:48:37 +01:00
Maksym Hazevych
08c2e69851 Resolving suggestions 2023-03-29 14:26:55 +13:00
Maksym Hazevych
e00f773b2f Remove unnecessary visibility change 2023-03-29 14:26:55 +13:00
Maksym Hazevych
d831e5cb48 Replace all occurrences of 'gtk_widget_show'
Replace all occurrences of 'gtk_widget_show(smth)' with
'gtk_widget_set_visible(smth, TRUE)'.
2023-03-29 14:26:55 +13:00
Carlos Garnacho
92b784f561 wacom: Use Mutter's input mapping interface to show calibration UI
When the "Automatic" mapping is chosen for a display-attached tablet device,
Mutter is in charge of applying the heuristics to map the tablet device to
its most likely attached display.

When that happens, the Wacom panel does not know better (or anything)
to show the calibration UI than picking a GdkMonitor and hoping for the
best.

To improve this situation, Mutter has been added a D-Bus interface so it
is possible to query it for the output that a tablet device is mapped to.
This commit adds the support for this interface, so that the Wacom panel
does know to pick the right GdkMonitor to fullscreen the calibration UI on.
2022-09-01 23:14:07 +02:00
Carlos Garnacho
7806b88460 wacom: Refresh UI
Use libadwaita widgets, and follow recent mockups for this panel.
2022-02-01 14:18:53 +00:00
Georges Basile Stavracas Neto
816e6203e3 wacom: Port to GTK4
Many part of this commit were made by Carlos
Garnacho <carlosg@gnome.org>

WIP wacom: Port to GTK4

Lots of stuff missing and probably broken.

wacom: Port CcDrawingArea input to gestures

We have a handy GtkGestureStylus to use here, which avoids direct
handling of GdkEvents.

wacom: Update current stylus tracking to GtkGestureStylus

Use the ::proximity signal to notice when we are being hovered with
a tablet stylus, and look up the tool from there.
2021-12-14 22:34:21 -03:00
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
Carlos Garnacho
d51336c2c2 wacom: Port calibrator UI to GTK+
Same dog, different collar. The UI has been ported 1:1 to GTK+, using
GtkBuilder, CSS and event controllers fairly reduced the amount of code
needed for this.

It also allows us to stop initializing clutter-gtk across the several
executables.
2018-11-07 23:02:10 +00:00
Carlos Garnacho
0d402c8338 wacom: Update test to use CcWacomDevice
So it works again.
2016-11-04 23:27:13 +01:00
Debarshi Ray
84b65ddea0 wacom: Use the right API for setting the window width
We should be pairing gtk_window_get_size with
gtk_window_set_default_size to avoid inconsistencies between the size
reading and setting code. eg., in recent GTK+ versions,
gtk_window_get_size and gtk_widget_set_size_request differ in their
interpretation of the CSD chrome.

However, gtk_window_set_default_size didn't work with non-resizable
GtkWindows, until now.

https://bugzilla.gnome.org/show_bug.cgi?id=762548
2016-03-09 13:47:09 +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
Benjamin Tissoires
cf29acae5d wacom: test: add Huion H610 Pro panel
The tablet does not have an eraser, so it's good to have a test for it.

https://bugzilla.gnome.org/show_bug.cgi?id=746117
2015-03-13 17:00:30 +01:00
Carlos Garnacho
fdef36294a wacom: Set several notebooks' show-border property to FALSE
Since GTK+ commit 05b1ea84b, this hint is used in GtkNotebook to add
a GTK_STYLE_CLASS_FRAME when rendering the notebook frame, so the theme
renders those frame-alike. As it's not what we want for the wacom panel,
set show-border to FALSE on all GtkNotebooks.

https://bugzilla.gnome.org/show_bug.cgi?id=710709
2013-12-02 12:29:30 +01:00
Joaquim Rocha
d83e0ff5c1 wacom: Call the OSD window for assigning the tablets' buttons
It falls back to the listbox view in case the OSD cannot be shown.

https://bugzilla.gnome.org/show_bug.cgi?id=704798
2013-07-26 20:04:35 +02:00
Joaquim Rocha
d78bc9772a wacom: Re-write gui_gtk in Clutter to introduce animations
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
2013-05-17 16:36:59 +02:00
Joaquim Rocha
9031c41784 wacom: add a link to the mouse settings panel
Based on previous work by Olivier Fourdan.
2013-04-16 12:33:16 +02:00
Bastien Nocera
472317bc10 wacom: Update test-wacom for API change 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
a9db665dc1 wacom: Add Intuos4 to test app 2012-01-13 17:48:08 +00:00
Bastien Nocera
44865d1082 wacom: Don't use "show_all" in test 2012-01-13 17:48:08 +00:00
Bastien Nocera
fdac29e034 wacom: Add i18n to wacom test app 2012-01-12 19:45:29 +00:00
Bastien Nocera
a54c382377 wacom: Make test app fixed width 2012-01-10 14:32:51 +00:00
Bastien Nocera
9caefabf2d wacom: Make closing the test app work 2012-01-10 14:27:43 +00:00
Bastien Nocera
d5623b731e wacom: Don't crash if created devices don't exist 2011-12-12 18:20:03 +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
da26a8e1cf wacom: Add test program for the pages
No need to carry hardware around, cheers!
2011-11-25 17:04:05 +00:00