[PATCH weston v4 17/20] clients/clickdot: Reset motion lines on Backspace

Peter Hutterer peter.hutterer at who-t.net
Thu Nov 19 20:24:09 PST 2015


On Tue, Nov 17, 2015 at 06:11:03PM +0800, Jonas Ådahl wrote:
> 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 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;

you don't seem to be using this one anywhere?

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> if the other hunk is
enough.

Cheers,
   Peter

>  
>  	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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


More information about the wayland-devel mailing list