mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 03:13:44 +08:00
ui: don't send any event if delta_y == 0
When the user raises their fingers from the touchpad, we may receive a GDK_SMOOTH_SCROLL event with delta_y == 0. Avoid generating a WHEEL_UP event in this situation. Signed-off-by: Sergio Lopez <slp@redhat.com> Message-id: 20190204122043.43007-1-slp@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
09bd7ba9f5
commit
a0fbb9a8bc
4
ui/gtk.c
4
ui/gtk.c
@ -1004,7 +1004,9 @@ static gboolean gd_scroll_event(GtkWidget *widget, GdkEventScroll *scroll,
|
||||
&delta_x, &delta_y)) {
|
||||
return TRUE;
|
||||
}
|
||||
if (delta_y > 0) {
|
||||
if (delta_y == 0) {
|
||||
return TRUE;
|
||||
} else if (delta_y > 0) {
|
||||
btn = INPUT_BUTTON_WHEEL_DOWN;
|
||||
} else {
|
||||
btn = INPUT_BUTTON_WHEEL_UP;
|
||||
|
Loading…
Reference in New Issue
Block a user