Skip to content

Commit 68c6821

Browse files
authored
environment: Use cjs smart GObject GTypeName computation (#12453)
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).
1 parent 8d26d3f commit 68c6821

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/ui/environment.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ function init() {
289289
St.Widget.set_default_direction(St.TextDirection.RTL);
290290
}
291291

292+
GObject.gtypeNameBasedOnJSPath = true;
293+
292294
// Miscellaneous monkeypatching
293295
_patchContainerClass(St.BoxLayout);
294296
_patchContainerClass(St.Table);

0 commit comments

Comments
 (0)