qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ui/gtk: Fix mouse wheel on 3.4.0 or later


From: OGAWA Hirofumi
Subject: Re: [Qemu-devel] [PATCH] ui/gtk: Fix mouse wheel on 3.4.0 or later
Date: Thu, 05 Jan 2017 05:39:37 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Gerd Hoffmann <address@hidden> writes:

>> +#if GTK_CHECK_VERSION(3, 4, 0)
>> +    } else if (scroll->direction == GDK_SCROLL_SMOOTH) {
>> +        gdouble delta_x, delta_y;
>> +        if (!gdk_event_get_scroll_deltas((GdkEvent*)scroll, &delta_x, 
>> &delta_y))
>> +            return TRUE;
>> +        if (delta_y > 0)
>> +            btn = INPUT_BUTTON_WHEEL_DOWN;
>> +        else
>> +            btn = INPUT_BUTTON_WHEEL_UP;
>> +#endif
>
> Patch looks good, except for some codestyle issues:

will fix

> === checkpatch complains ===
> ERROR: "(foo*)" should be "(foo *)"
> #13: FILE: ui/gtk.c:1024:
> +        if (!gdk_event_get_scroll_deltas((GdkEvent*)scroll, &delta_x,
> &delta_y))
>
> ERROR: braces {} are necessary for all arms of this statement
> #13: FILE: ui/gtk.c:1024:
> +        if (!gdk_event_get_scroll_deltas((GdkEvent*)scroll, &delta_x,
> &delta_y))
> [...]
>
> ERROR: braces {} are necessary for all arms of this statement
> #15: FILE: ui/gtk.c:1026:
> +        if (delta_y > 0)
> [...]
> +        else
> [...]
>
> total: 3 errors, 0 warnings, 16 lines checked
-- 
OGAWA Hirofumi <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]