[gnome-shell/gnome-42] keyboard: Also fill suggestions on touch



commit d636ea336362067001e38f12b501cf8a16cba5a4
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Aug 11 13:29:45 2022 +0200

    keyboard: Also fill suggestions on touch
    
    Since commit 73b695f845, suggestions use the raw ::button-press-event
    signal rather than the higher-level ::clicked; that means we no
    longer get touch handling for free, so connect to ::touch-event as
    well.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2421>

 js/ui/keyboard.js | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 810639c783..e9f8544c68 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -224,6 +224,13 @@ class Suggestions extends St.BoxLayout {
             callback();
             return Clutter.EVENT_STOP;
         });
+        button.connect('touch-event', (actor, event) => {
+            if (event.type() !== Clutter.EventType.TOUCH_BEGIN)
+                return Clutter.EVENT_PROPAGATE;
+
+            callback();
+            return Clutter.EVENT_STOP;
+        });
         this.add_child(button);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]