Skip to content

Conversation

@Sunderland93
Copy link

Muffin part: linuxmint/muffin#793

@claudiux
Copy link
Member

claudiux commented Feb 8, 2026

Perhaps check the version of Cinnamon before applying the new API?

@claudiux claudiux marked this pull request as draft February 8, 2026 18:21
@fredcw
Copy link
Contributor

fredcw commented Feb 9, 2026

@Sunderland93 This won't work unfortunately, you would need to version the applets. For example with sticky@scollins, you'd need to create a new directory sticky@scollins/files/sticky@scollins/6.8 and copy all the files from sticky@scollins/files/sticky@scollins/3.2 into /6.8 and make the changes to the version in /6.8

An alternative way would be to use version_exceeds() in util.js

For example in sticky@scollins/files/sticky@scollins/3.2/applet.js

allocate(actor, box, flags) { 
    let childBox = new Clutter.ActorBox();

    childBox.x1 = box.x1;
    childBox.x2 = box.x2;
    childBox.y1 = box.y1;
    childBox.y2 = box.y2;

    const CINNAMON_VERSION = imports.misc.config.PACKAGE_VERSION;
    if (Util.version_exceeds(CINNAMON_VERSION, "6.8")) {
        this.textBox.allocate(childBox);
    } else {
        this.textBox.allocate(childBox, flags);
    }
}

The allocate(actor, box, flags) { line should be fine as flags would just be undefined in cinnamon 6.8
also, Util.version_exceeds should really be called version_same_or_exceeds or version_at_least

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants