summaryrefslogtreecommitdiff
path: root/tools/libinput-debug-gui.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-03-10 14:54:19 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-03-11 10:40:00 +1000
commit1926a66fab66b00977e87dc3d2d0a697659f979c (patch)
treee2a20e0287c678ae6aebf60c52910ee8ec41fd3a /tools/libinput-debug-gui.c
parente99f59422c67bcd6102e437d8aa3de0b33cde5ba (diff)
downloadlibinput-1926a66fab66b00977e87dc3d2d0a697659f979c.tar.gz
tools/debug-gui: move the abs pointer position into a struct point
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools/libinput-debug-gui.c')
-rw-r--r--tools/libinput-debug-gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libinput-debug-gui.c b/tools/libinput-debug-gui.c
index 4c346499..4f7feafc 100644
--- a/tools/libinput-debug-gui.c
+++ b/tools/libinput-debug-gui.c
@@ -95,7 +95,7 @@ struct window {
struct point deltas[64];
/* abs position */
- int absx, absy;
+ struct point abs;
/* scroll bar positions */
struct {
@@ -396,7 +396,7 @@ draw_abs_pointer(struct window *w, cairo_t *cr)
cairo_save(cr);
cairo_set_source_rgb(cr, .2, .4, .8);
- cairo_arc(cr, w->absx, w->absy, 10, 0, 2 * M_PI);
+ cairo_arc(cr, w->abs.x, w->abs.y, 10, 0, 2 * M_PI);
cairo_fill(cr);
cairo_restore(cr);
}
@@ -1096,8 +1096,8 @@ handle_event_absmotion(struct libinput_event *ev, struct window *w)
double x = libinput_event_pointer_get_absolute_x_transformed(p, w->width),
y = libinput_event_pointer_get_absolute_y_transformed(p, w->height);
- w->absx = x;
- w->absy = y;
+ w->abs.x = x;
+ w->abs.y = y;
}
static void