qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ui/gtk: Fix mouse wheel on 3.4.0 or later
Date: Wed, 04 Jan 2017 09:48:45 +0100	[thread overview]
Message-ID: <1483519725.5670.44.camel@redhat.com> (raw)
In-Reply-To: <87bmw2vgvy.fsf@mail.parknet.co.jp>

> +#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:

=== 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

cheers,
  Gerd

  reply	other threads:[~2017-01-04  9:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23 14:50 [Qemu-devel] [PATCH] ui/gtk: Fix mouse wheel on 3.4.0 or later OGAWA Hirofumi
2017-01-04  8:48 ` Gerd Hoffmann [this message]
2017-01-04 20:39   ` OGAWA Hirofumi
2017-01-04 20:41     ` [Qemu-devel] [PATCH v2] " OGAWA Hirofumi
2017-01-10 11:43       ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483519725.5670.44.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).