From: Peter Hutterer Date: Thu, 19 Dec 2024 03:51:42 +0000 (+1000) Subject: tools/debug-gui: color the fingers with different colors X-Git-Tag: 1.27.1~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e9d8df74e3f84bb15ca6006267694a2ecdf14c4;p=platform%2Fupstream%2Flibinput.git tools/debug-gui: color the fingers with different colors Follow-up to commit 713892c162f0 ("Number the fingers by slot in debug-gui") this changes the colors slightly for each finger, making it easier to track visually. Part-of: --- diff --git a/tools/libinput-debug-gui.c b/tools/libinput-debug-gui.c index 83149b90..858093ba 100644 --- a/tools/libinput-debug-gui.c +++ b/tools/libinput-debug-gui.c @@ -499,7 +499,10 @@ draw_evdev_abs(struct window *w, cairo_t *cr) if (!w->evdev.slots[i].active) continue; - cairo_set_source_rgb(cr, .2, .2, .8); + cairo_set_source_rgb(cr, + .2 + .2 * (i % 5), + .2 + .2 * (i % 5), + .8 - .2 * (i % 5)); x = w->evdev.slots[i].x; y = w->evdev.slots[i].y; x = 1.0 * (x - ax->minimum)/width * outline_width;