ui/slider: Handle emulated scroll events through the Clutter.EventFlags

Emulated scroll events no longer get event.is_pointer_emulated() set to
True, instead this information is propagated through the Clutter.EventFlags
of the event.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2871>
This commit is contained in:
Carlos Garnacho 2023-08-08 16:10:39 +02:00 committed by Marge Bot
parent 854191c244
commit c9741ae3d5

View File

@ -140,7 +140,7 @@ export const Slider = GObject.registerClass({
let direction = event.get_scroll_direction();
let delta;
if (event.is_pointer_emulated())
if (event.get_flags() & Clutter.EventFlags.POINTER_EMULATED)
return Clutter.EVENT_PROPAGATE;
if (direction == Clutter.ScrollDirection.DOWN) {