Commit graph

74 commits

Author SHA1 Message Date
Rui Matos
205a0cd4bd wacom: Drop deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +01:00
Carlos Garnacho
b1ae5c734a wacom: Fix x/y ranges' swapping when calibrating on rotated screens
The previous axis swapping code would oddly rely on the input coordinates
remaining on untransformed device coordinates, while those are gotten on
screen coordinates (hence rotated), this would cause swapping not to kick
in, and result in swapped X/Y scaling to be applied to X/Y ranges.

So make the axis swapping code be calculated upon screen coordinates, as
the collected points already are, and swap the applied scalings if
necessary.

Also, the code that swapped coordinates before returning to the caller
would scramble min/max values when swapping x/y. Fix that too, minimum
and maximum should stay like that when swapping axes.

https://bugzilla.gnome.org/show_bug.cgi?id=732442
2014-07-01 18:38:22 +02:00
Carlos Garnacho
4a9bde0679 calibrator: Use G_STMT_START/END on SWAP define
And let it pass the type, so it can be used on other than integers.

https://bugzilla.gnome.org/show_bug.cgi?id=732442
2014-07-01 18:38:22 +02:00
Christophe Fergeau
2096cacaf5 wacom: Use AM_CPPFLAGS rather than INCLUDES
This is deprecated in newer automake versions, and this causes warnings
with automake 1.14:
panels/printers/Makefile.am:3: warning: 'INCLUDES' is the old name for
AM_CPPFLAGS' (or '*_CPPFLAGS')

https://bugzilla.gnome.org/show_bug.cgi?id=732189
2014-06-25 12:46:43 +02:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Carlos Garnacho
c78e22b911 wacom: Fix first animation of calibration UI
The "target" was seen moving from 0,0 to the first calibration
point, so 1) avoid target relayouts when the window is still
being positioned and 2) start the "target" actor as hidden so
it isn't seen moving from anywhere when first shown.

https://bugzilla.gnome.org/show_bug.cgi?id=719698
2013-12-16 12:58:35 +01:00
Carlos Garnacho
ee2afb9bd4 wacom: Protect calibrator UI to spawn animations multiple times
The window state may be updated more than once, so only initiate
the UI and animations when it's first called.

https://bugzilla.gnome.org/show_bug.cgi?id=719698
2013-12-16 12:58:29 +01:00
Carlos Garnacho
911518d683 wacom: Don't leave stray timelines on the calibration UI
Keep the reference for the error/helper messages animations in
the CalibArea struct, so those are destroyed and not leaked, or
possibly crashing when running on already destroyed actors if
the dialog gets cancelled at the right time.

https://bugzilla.gnome.org/show_bug.cgi?id=719698
2013-12-16 12:58:07 +01:00
Carlos Garnacho
e97143e025 wacom: Forgive inconspicuous double clicks when calibrating
Those were likely not meant, and will surely make you start over
again on the calibration process.

https://bugzilla.gnome.org/show_bug.cgi?id=719705
2013-12-16 12:44:42 +01:00
Carlos Garnacho
e2464ee773 wacom: Don't use monitor geometry X/Y when calculating calibration
Calibration must be performed based on the device w/h ranges and the
screen size, so in which coordinates the monitor is virtually mapped
matters little on device coordinates. This fixes calibration of devices
attached to a monitor elsewhere than (0,0) in the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=719574
2013-12-16 12:42:01 +01:00
Carlos Garnacho
71945b8156 wacom: Clear background on "target" actor in calibration UI
the actor's draw() method isn't guaranteed to get a pristine surface,
which may cause artifacts if the background is left untouched, so
clear the background each time the actor has to be drawn.

https://bugzilla.gnome.org/show_bug.cgi?id=719701
2013-12-16 12:30:24 +01:00
Bastien Nocera
95f613bee1 wacom: Fix ~100 pixel offset when calibrating
The calibration gui code moved the targets to x,y, instead of
placing the centre of the target at x,y, leading to a 47 pixel
(half the target's size) offset in both directions (thus 67 pixels
deviation as Pythagorus would tell us).
2013-10-09 12:55:29 +02:00
Bastien Nocera
bf68dfb62d wacom: Fix comment for timeout duration
The comment mentioned 5 seconds, but we use 15 seconds.
2013-10-09 12:18:48 +02:00
Bastien Nocera
18dd6ff04f wacom: Fix incorrect default window information
The window isn't 1x1...
2013-10-08 20:15:55 +02:00
Bastien Nocera
c9864b1ebc wacom: Fix event filtering in the calibrator
We were always getting the events from the core pointer instead
of the device itself, so threw all of them away.
We need to get the real source device from the event.

https://bugzilla.gnome.org/show_bug.cgi?id=707784
2013-10-08 11:48:13 +02:00
Bastien Nocera
054538c292 wacom: Add some more debug to the calibrator tool 2013-10-04 11:16:45 +02:00
Bastien Nocera
55744f6544 wacom: Fix device filtering in calibration UI
We receive ClutterEvents, not GdkEvents for button presses on
ClutterActors, so use the correct functions to filter devices.

This also fixes the offset used to access the coordinates of the
events. We were actually using the pointer to the source and x
struct members instead of x and y.

https://bugzilla.gnome.org/show_bug.cgi?id=707784
2013-10-04 11:16:45 +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
2b34736ea8 wacom: Set the last-calibrated-resolution key after calibrating
So g-s-d will know if calibration is needed when the monitor resolution
changes.

This is related to https://bugzilla.gnome.org/show_bug.cgi?id=677095
2013-05-16 11:26:29 +02:00
Joaquim Rocha
3702a56793 wacom: Show the cursor in the calibrator UI when used from test_wacom
This functionality is dictated by the definition of FAKE_AREA in the
CPPFLAGS.
2013-04-16 14:44:08 +02:00
Joaquim Rocha
19876f84d9 wacom: Create a similar calibrator library for testing purposes
This is so we can e.g. add different parameters when creating it
2013-04-16 14:44:08 +02:00
Ángel Guzmán Maeso
1f57add30f wacom: Fix deprecated functions in gui_gtk.c
From gtk_icon_info_free() to g_object_unref()
gtk_window_set_opacity() to gtk_widget_set_opacity()

https://mail.gnome.org/archives/commits-list/2013-February/msg02049.html

https://bugzilla.gnome.org/show_bug.cgi?id=694362
2013-02-21 17:08:26 +01:00
Cosimo Cecchi
82f8c136c0 wacom: use a GResource for GtkBuilder UI definition and icons
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:17 +01:00
Olivier Fourdan
06554439b7 wacom: Do calibration for the selected tool only
As different tools may have different resolutions (e.g.
touch vs. stylus on tablets which support both).

https://bugzilla.gnome.org/show_bug.cgi?id=680114
2012-07-19 16:39:36 +01:00
Olivier Fourdan
1fdfa6bc32 wacom: show calibration success
by drawing an "emblem-ok-symbolic" icon when calibration is
successful

https://bugzilla.gnome.org/show_bug.cgi?id=668610
2012-07-16 17:25:13 +01:00
Olivier Fourdan
978aa81a2c wacom: Cancel calibration if window loses focus
Make the calibrator window stay above other windows and cancel
calibration if/when the calibrator loses input focus.

https://bugzilla.gnome.org/show_bug.cgi?id=675354
2012-06-14 18:09:52 +01:00
Bastien Nocera
f1775d373d wacom: Hide cursor when calibrating
Otherwise the cursor might get in the way.

https://bugzilla.gnome.org/show_bug.cgi?id=668609
2012-01-24 20:23:31 +00:00
Jason Gerecke
bb38492e52 wacom: Have calibrator take into account window geometry
Current calculations assume the window is anchored at 0,0. This
obviously poses a problem in a multi-monitor setup.
2012-01-16 11:55:00 +00:00
Bastien Nocera
54ec95051e wacom: Update for new calibrator API 2012-01-12 18:57:45 +00:00
Bastien Nocera
705287d5c7 wacom: Fix insane Calibrator API
So that we don't have to run gtk_main() in it.
2012-01-12 18:57:20 +00:00
Bastien Nocera
a227cd7ca9 wacom: Add more padding around the clock 2012-01-12 17:38:05 +00:00
Bastien Nocera
aec7039858 wacom: Remove rectangle around main text 2012-01-12 15:04:05 +00:00
Bastien Nocera
956590dd8b wacom: Remove unused geometry struct member 2012-01-11 20:09:40 +00:00
Bastien Nocera
6c215019db wacom: Remove geometry option from test app 2012-01-11 20:09:20 +00:00
Bastien Nocera
6ff3fc49db wacom: Fix frame around error message 2012-01-11 19:55:10 +00:00
Bastien Nocera
1d6ce52ad7 wacom: Text is white 2012-01-11 19:54:42 +00:00
Bastien Nocera
80f78151f8 wacom: Translate error message 2012-01-11 19:46:25 +00:00
Bastien Nocera
da3080d910 wacom: Avoid confusing debug message
Don't print bogus values if the calibration didn't finish
2012-01-11 19:26:58 +00:00
Bastien Nocera
ea0410764a wacom: Move window creation to _new() 2012-01-11 19:23:06 +00:00
Bastien Nocera
9845e4d582 wacom: Hide the CalibArea structure
And typedef it
2012-01-11 19:17:14 +00:00
Bastien Nocera
6e179b433e wacom: Make the window a tiny bit transparent 2012-01-11 19:16:10 +00:00
Bastien Nocera
5feefb444d wacom: Remove the use of a drawing area
We don't need one, we can draw on the window directly.
2012-01-11 19:02:37 +00:00
Bastien Nocera
f6fa0ee689 wacom: Fix memory leak 2012-01-11 18:56:09 +00:00
Bastien Nocera
8843ad8fb2 wacom: Make escape key exit
And nothing else
2012-01-11 18:39:09 +00:00
Bastien Nocera
90c7881b5f wacom: More space between clock and help text 2012-01-11 18:38:49 +00:00
Bastien Nocera
420a068209 wacom: Match help text with mockups 2012-01-11 18:38:30 +00:00
Bastien Nocera
30536b4ec0 wacom: Defuzz lines and circles
By lining them up with the pixels.
2012-01-11 18:21:51 +00:00
Bastien Nocera
f958f8c713 wacom: Remove unneeded cairo_save()/restore() 2012-01-11 18:21:21 +00:00
Bastien Nocera
4d7bb61411 wacom: Set the text frame colour to be white 2012-01-11 18:20:27 +00:00
Bastien Nocera
ce61526b41 wacom: Black background by default 2012-01-11 18:19:49 +00:00