File: slider-Use-the-sprite-of-the-touch-event-not-the-pointer.patch

package info (click to toggle)
gnome-shell 49.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 22,316 kB
  • sloc: javascript: 74,879; ansic: 66,149; xml: 1,799; sh: 917; python: 666; makefile: 49
file content (37 lines) | stat: -rw-r--r-- 1,402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Daniel van Vugt <daniel.van.vugt@canonical.com>
Date: Tue, 23 Sep 2025 14:12:56 +0800
Subject: slider: Use the sprite of the touch event, not the pointer

startDragging() starts with:

  const sprite = backend.get_sprite(global.stage, event);
  this._sprite = sprite;

but then vfunc_touch_event() would only compare this._sprite to:

  sprite = backend.get_pointer_sprite(global.stage);

which never matched. And so _endDragging() was never called and
the grab was never dismissed, effectively freezing the shell.

Bug: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8660
Fixes: c206ec693 ("slider: Use Clutter.Sprite for pointing focus accounting")
Forwarded: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3887
Origin: upstream, 49.1, commit:e54aa588c1604b63e2f051e20c1ecb3e601beb5c
---
 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 2cf5f14..05861b5 100644
--- a/js/ui/slider.js
+++ b/js/ui/slider.js
@@ -132,7 +132,7 @@ export const Slider = GObject.registerClass({
 
     vfunc_touch_event(event) {
         const backend = global.stage.get_context().get_backend();
-        const sprite = backend.get_pointer_sprite(global.stage);
+        const sprite = backend.get_sprite(global.stage, event);
 
         if (!this._dragging &&
             event.type() === Clutter.EventType.TOUCH_BEGIN) {