From a0352ba312a6781a5a2fcb79e22e0e84138168e9 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 16 Nov 2022 11:41:36 +0100 Subject: [PATCH] keyboard: Bind emoji pager visibility to swipeTracker enabled state The swipeTracker may connect gestures on the stage, so we might end up in the odd situation that the swipeTracker is handling events for an invisible actor. Avoid doing this. Part-of: --- js/ui/keyboard.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 66f35ea83..7e40f62af 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -687,6 +687,10 @@ var EmojiPager = GObject.registerClass({ this._swipeTracker = swipeTracker; this.connect('destroy', () => this._onDestroy()); + + this.bind_property( + 'visible', this._swipeTracker, 'enabled', + GObject.BindingFlags.DEFAULT); } _onDestroy() {