linuxmint/cjs

Passing a decimal value to realAlignment parameter of PopupMenu.PopupMenu._init causes repeating error, freezes panels in CJS 3.2.0

Closed this issue · 0 comments

I am maintaining an applet that subclasses the PopupMenu.PopupMenu object, and I have been testing its compatibility with Cinnamon 3.2 in a VM, and there seems to be a breaking change I haven't been able to find anyone cover - if you pass a decimal value (in this case 0.4) to the third parameter to its _init function, in xsession-errors, cjs reports an error that it is NaN.

(cinnamon:2093): Cjs-WARNING **: JS ERROR: Error: can't convert NaN to an integer
Chrome.prototype.updateRegions@/usr/share/cinnamon/js/ui/layout.js:706

If I pass 0 or 1, it is okay and the extension loads, but it messes up the horizontal alignment of the thumbnail popup.

The documentation specifies a range of 0-1, so I am wondering if this is an intentional change, and I should work around it (not sure how yet), or a bug?

Thanks.