tools/debug-gui: draw the evdev x/y axis with the right color

We were drawing an arc but apparently in white which made it a tad hard
to see on a white background. Draw this with the same color as the
touchpoints so we can debug single-touch and tablet devices too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1011>
This commit is contained in:
Peter Hutterer 2024-06-13 11:11:57 +10:00 committed by Marge Bot
parent 78cb25c2f7
commit 4333845e4c

View file

@ -487,6 +487,7 @@ draw_evdev_abs(struct window *w, cairo_t *cr)
outline_height = 1.0 * height/width * normalized_width;
outline_width = normalized_width;
cairo_set_source_rgb(cr, .2, .2, .8);
x = 1.0 * (w->evdev.x - ax->minimum)/width * outline_width;
y = 1.0 * (w->evdev.y - ay->minimum)/height * outline_height;
x += center_x - outline_width/2;