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 <jad...@gmail.com>
---
 clients/clickdot.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/clients/clickdot.c b/clients/clickdot.c
index 1597e11..130a166 100644
--- a/clients/clickdot.c
+++ b/clients/clickdot.c
@@ -58,6 +58,7 @@ struct clickdot {
                int32_t x, y;
                int32_t old_x, old_y;
        } line;
+       bool clear_lines;
 
        int reset;
 
@@ -206,6 +207,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.4.3

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to