forked from rpms/gnome-shell
80 lines
2.7 KiB
Diff
80 lines
2.7 KiB
Diff
From 854191c2444cdc90e92bcb6684893148dd007798 Mon Sep 17 00:00:00 2001
|
|
From: Carlos Garnacho <carlosg@gnome.org>
|
|
Date: Tue, 8 Aug 2023 16:08:36 +0200
|
|
Subject: [PATCH 1/2] 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>
|
|
---
|
|
src/st/st-scroll-bar.c | 3 ++-
|
|
src/st/st-scroll-view.c | 3 ++-
|
|
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/st/st-scroll-bar.c b/src/st/st-scroll-bar.c
|
|
index d5d5264943..e2c09203e1 100644
|
|
--- a/src/st/st-scroll-bar.c
|
|
+++ b/src/st/st-scroll-bar.c
|
|
@@ -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);
|
|
diff --git a/src/st/st-scroll-view.c b/src/st/st-scroll-view.c
|
|
index 9f667e5459..764065b606 100644
|
|
--- a/src/st/st-scroll-view.c
|
|
+++ b/src/st/st-scroll-view.c
|
|
@@ -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);
|
|
--
|
|
GitLab
|
|
|
|
|
|
From c9741ae3d5f661b2aee352c50ce21fab16694fbe Mon Sep 17 00:00:00 2001
|
|
From: Carlos Garnacho <carlosg@gnome.org>
|
|
Date: Tue, 8 Aug 2023 16:10:39 +0200
|
|
Subject: [PATCH 2/2] 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>
|
|
---
|
|
js/ui/slider.js | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/js/ui/slider.js b/js/ui/slider.js
|
|
index 6653898b0c..4f60556aea 100644
|
|
--- a/js/ui/slider.js
|
|
+++ b/js/ui/slider.js
|
|
@@ -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) {
|
|
--
|
|
GitLab
|
|
|