On 05/14/2012 12:29 AM, Peter Hutterer wrote:
> Signed-off-by: Peter Hutterer <[email protected]>
> ---
> I got sick of typing 'xinput set-prop "foo" "Device Enabled" 0'
>
> src/property.c | 14 ++++++++++++++
> src/xinput.c | 10 ++++++++++
> src/xinput.h | 2 ++
> 3 files changed, 26 insertions(+)
>
> diff --git a/src/property.c b/src/property.c
> index 3ab2cb0..a4d07f6 100644
> --- a/src/property.c
> +++ b/src/property.c
> @@ -824,3 +824,17 @@ int set_prop(Display *display, int argc, char *argv[],
> char *name,
>
> return do_set_prop(display, type, format, argc, argv, name, desc);
> }
> +
> +int disable(Display *display, int argc, char *argv[], char *name, char *desc)
> +{
> + char *new_argv[3] = { NULL, "Device Enabled", "0" };
> + new_argv[0] = argv[0];
Why can't this be:
char *new_argv[3] = { argv[0], "Device Enabled", "0" };
Does it fail to compile?
Otherwise:
Reviewed-by: Chase Douglas <[email protected]>
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel