st: Handle emulated scroll events through the ClutterEventFlag

Emulated scroll events no longer get clutter_event_is_pointer_emulated()
set to TRUE, instead this information is propagated through the
ClutterEventFlags 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:08:36 +02:00 committed by Marge Bot
parent b7e8f4a1f8
commit 854191c244
2 changed files with 4 additions and 2 deletions

View File

@ -469,7 +469,8 @@ st_scroll_bar_scroll_event (ClutterActor *actor,
ClutterTextDirection direction;
ClutterScrollDirection scroll_dir;
if (clutter_event_is_pointer_emulated ((ClutterEvent *) event))
if (!!(clutter_event_get_flags ((ClutterEvent *) event) &
CLUTTER_EVENT_FLAG_POINTER_EMULATED))
return TRUE;
direction = clutter_actor_get_text_direction (actor);

View File

@ -770,7 +770,8 @@ st_scroll_view_scroll_event (ClutterActor *self,
if (!priv->mouse_scroll)
return FALSE;
if (clutter_event_is_pointer_emulated ((ClutterEvent *) event))
if (!!(clutter_event_get_flags ((ClutterEvent *) event) &
CLUTTER_EVENT_FLAG_POINTER_EMULATED))
return TRUE;
direction = clutter_actor_get_text_direction (self);