Skip to content

Commit

Permalink
[WPE] Do not skip generic touch event handling for axis event gesturing
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=247975

Reviewed by Michael Catanzaro.

touchmove events are not sent anymore if the TouchGestureController
is activated. This is wrong. Drop the short cut to make them work again.

* Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): Drop special wheel event
handling.
* Source/WebKit/UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_backend): Do not skip touch event handling on axis event
gesturing.

Canonical link: https://commits.webkit.org/262970@main
  • Loading branch information
Bastian-Krause authored and mcatanzaro committed Apr 14, 2023
1 parent 9da2b02 commit 0c5bcea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
13 changes: 1 addition & 12 deletions Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
Expand Up @@ -234,18 +234,7 @@ void PageClientImpl::doneWithTouchEvent(const NativeWebTouchEvent& touchEvent, b
event->modifiers &= ~wpe_input_pointer_modifier_button1;
page.handleMouseEvent(NativeWebMouseEvent(event, page.deviceScaleFactor()));
},
[&](TouchGestureController::AxisEvent& axisEvent)
{
#if WPE_CHECK_VERSION(1, 5, 0)
auto* event = &axisEvent.event.base;
#else
auto* event = &axisEvent.event;
#endif
if (event->type != wpe_input_axis_event_type_null) {
page.handleNativeWheelEvent(WebKit::NativeWebWheelEvent(event, page.deviceScaleFactor(),
axisEvent.phase, WebWheelEvent::Phase::PhaseNone));
}
});
[](TouchGestureController::AxisEvent&) { });
}
#endif

Expand Down
6 changes: 0 additions & 6 deletions Source/WebKit/UIProcess/API/wpe/WPEView.cpp
Expand Up @@ -261,12 +261,6 @@ View::View(struct wpe_view_backend* backend, const API::PageConfiguration& baseC
handledThroughGestureController = true;
}
});

// In case of the axis event gesturing, the generic touch event handling should be skipped.
// Exception to this are touch-up events that should still be handled just like the corresponding
// touch-down events were.
if (handledThroughGestureController && event->type != wpe_input_touch_event_type_up)
return;
}

page.handleTouchEvent(touchEvent);
Expand Down

0 comments on commit 0c5bcea

Please sign in to comment.