[PATCH weston v2 19/21] clients/clickdot: Reset motion lines on Backspace
Jonas Ådahl
jadahl at gmail.com
Wed May 13 03:26:40 PDT 2015
Clear the white lines that is drawn by pointer motions. It makes it
easier to debug pointer movements as one won't need to restart clickdot
just to get a clean plate.
Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
---
clients/clickdot.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/clients/clickdot.c b/clients/clickdot.c
index c28a596..f20581f 100644
--- a/clients/clickdot.c
+++ b/clients/clickdot.c
@@ -56,6 +56,7 @@ struct clickdot {
int32_t x, y;
int32_t old_x, old_y;
} line;
+ bool clear_lines;
int reset;
@@ -204,6 +205,11 @@ key_handler(struct window *window, struct input *input, uint32_t time,
case XKB_KEY_Escape:
display_exit(clickdot->display);
break;
+ case XKB_KEY_BackSpace:
+ cairo_surface_destroy(clickdot->buffer);
+ clickdot->buffer = NULL;
+ window_schedule_redraw(clickdot->window);
+ break;
}
}
--
2.1.4
More information about the wayland-devel
mailing list