Blame SOURCES/0001-gesture-inhibitor-Put-a-foot-down-with-self-enabling.patch

438cd4
From dfdd10b46d670674d5e0e38f7adcd007f5884822 Mon Sep 17 00:00:00 2001
438cd4
From: rpm-build <rpm-build>
438cd4
Date: Wed, 29 Sep 2021 14:33:25 +0200
438cd4
Subject: [PATCH] gesture-inhibitor: Put a foot down with self-enabling
438cd4
 gestures
438cd4
438cd4
If a gesture (unfullscreen, I'm looking at you) controls its 'enabled'
438cd4
property, it will bypass the will of this extension. Make it sure that
438cd4
gestures are forced-off if the extension says so.
438cd4
---
438cd4
 extensions/gesture-inhibitor/extension.js | 8 +++++++-
438cd4
 1 file changed, 7 insertions(+), 1 deletion(-)
438cd4
438cd4
diff --git a/extensions/gesture-inhibitor/extension.js b/extensions/gesture-inhibitor/extension.js
438cd4
index e74ede2..66c706e 100644
438cd4
--- a/extensions/gesture-inhibitor/extension.js
438cd4
+++ b/extensions/gesture-inhibitor/extension.js
438cd4
@@ -59,13 +59,19 @@ class Extension {
438cd4
     enable() {
438cd4
 	this._map.forEach(m => {
438cd4
 	    this._settings.bind(m.setting, m.action, 'enabled',
438cd4
-				Gio.SettingsBindFlags.DEFAULT);
438cd4
+				Gio.SettingsBindFlags.GET);
438cd4
+            m.handler = m.action.connect('notify::enabled', () => {
438cd4
+                if (m.action.enabled && !this._settings.get_boolean(m.setting))
438cd4
+                    m.action.enabled = this._settings.get_boolean(m.setting);
438cd4
+            });
438cd4
 	});
438cd4
     }
438cd4
 
438cd4
     disable() {
438cd4
 	this._map.forEach(m => {
438cd4
 	    m.action.enabled = true;
438cd4
+            if (m.handler > 0)
438cd4
+                m.action.disconnect(m.handler);
438cd4
 	});
438cd4
     }
438cd4
 }
438cd4
-- 
438cd4
2.31.1
438cd4