Re-enable non-smooth scrolling. (flutter/engine#26549)
Since 0561c75b4d events are now handled in a GtkEventBox and the duplicate
scroll events no longer occur.
Fixes https://github.com/flutter/flutter/issues/73823
This commit is contained in:
@@ -485,14 +485,14 @@ static gboolean event_box_scroll_event(GtkWidget* widget,
|
||||
if (event->direction == GDK_SCROLL_SMOOTH) {
|
||||
scroll_delta_x = event->delta_x;
|
||||
scroll_delta_y = event->delta_y;
|
||||
} else {
|
||||
// We currently skip non-smooth scroll events due to the X11 events being
|
||||
// delivered directly to the FlView X window and bypassing the GtkWindow
|
||||
// handling.
|
||||
// This causes both smooth and non-smooth events to be received (i.e.
|
||||
// duplication).
|
||||
// https://github.com/flutter/flutter/issues/73823
|
||||
return FALSE;
|
||||
} else if (event->direction == GDK_SCROLL_UP) {
|
||||
scroll_delta_y = -1;
|
||||
} else if (event->direction == GDK_SCROLL_DOWN) {
|
||||
scroll_delta_y = 1;
|
||||
} else if (event->direction == GDK_SCROLL_LEFT) {
|
||||
scroll_delta_x = -1;
|
||||
} else if (event->direction == GDK_SCROLL_RIGHT) {
|
||||
scroll_delta_x = 1;
|
||||
}
|
||||
|
||||
// The multiplier is taken from the Chromium source
|
||||
|
||||
Reference in New Issue
Block a user