From b0265beafb11cb06ef27510221dfd67d1f06d16c Mon Sep 17 00:00:00 2001 From: JosephMcc Date: Thu, 17 Oct 2024 06:58:54 -0700 Subject: [PATCH] environment: Use cjs smart GObject GTypeName computation Make cjs to compute the GType name for registered GObject-derived classes using the file basename and the first directory name, so that we can avoid name clashing, and ensure that no xlet will break cinnamon by registering a name that is already used (by cinnamon or by any other extension). --- js/ui/environment.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/ui/environment.js b/js/ui/environment.js index d8ae645364..c3def3e2fd 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -289,6 +289,8 @@ function init() { St.Widget.set_default_direction(St.TextDirection.RTL); } + GObject.gtypeNameBasedOnJSPath = true; + // Miscellaneous monkeypatching _patchContainerClass(St.BoxLayout); _patchContainerClass(St.Table);