Skip to content

Commit

Permalink
[DesktopCube@yare] Fix animation & dimming issues (#727)
Browse files Browse the repository at this point in the history
* Mint 21+ and/or Cinnamon 5.4+
  • Loading branch information
klangman authored Sep 6, 2024
1 parent 0ffb81f commit b12af45
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 33 deletions.
6 changes: 6 additions & 0 deletions DesktopCube@yare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.1.0

* Fixed the "not animating" issue under Mint 21+
* Fixed the under cube background not dimming issue
* Removed some xsession_errors debugging messages

## 1.0.2

* Added an option to remove the panels from the animation effect
Expand Down
5 changes: 2 additions & 3 deletions DesktopCube@yare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ Compiz Cube-like animation for workspace switching

Using the standard workspace switching hotkeys Ctrl+Alt+Left/Right will show a rotating cube with the workspaces on the cube faces as the workspace switching animation.

# Known Issues

On the two machines I have tested with (Cinnamon 6+), the Cube animation does not seem to animate every well unless I set the pullaway setting value to a large number (i.e 0.3+). Even then I see some flashing some times or a complete failure to animate on occasion. I am not sure what's causing it but it happens on a Intel and a AMD GPU setup so I doubt it's a driver issue. I don't see the same issue using very old Mint versions in a Virtual Machine.
It should now be working perfectly under all versions of Mint21+ without having to set CLUTTER_PAINT environment variable!
I tested: Mint 21 / 21.1 / 21.3 / 22 and Fedora Cinnamon-Spin 40
20 changes: 8 additions & 12 deletions DesktopCube@yare/files/DesktopCube@yare/5.4/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const Tweener = imports.ui.tweener;
const Settings = imports.ui.settings;
const Util = imports.misc.util; // Needed for spawnCommandLine()


let settings;
let bindings = [
['switch-to-workspace-left', '_showWorkspaceSwitcher'],
Expand Down Expand Up @@ -346,6 +347,10 @@ Cube.prototype = {
// Allow Cinnamon to play the switcher sound if it's enabled.
Main.soundManager.play('switch');

// This is a workaround for poor animation, we enable it only during the animation
// sequence so users don't need to set it using export CLUTTER_PAINT...
Meta.add_clutter_debug_flags( 0, 1 << 6, 0 ); // CLUTTER_DEBUG_CONTINUOUS_REDRAW

if (direction === this.last_direction) {
if (this.from != null) {
to_workspace = this.getWorkspaceCloneScaled(new_workspace.index(), direction);
Expand Down Expand Up @@ -564,6 +569,7 @@ Cube.prototype = {
this.isAnimating = false;
if (this.destroy_requested) this.onDestroy();
Main.wm.showWorkspaceOSD();
Meta.remove_clutter_debug_flags( 0, 1 << 6, 0 ); // CLUTTER_DEBUG_CONTINUOUS_REDRAW
},

_keyPressEvent: function(actor, event) {
Expand Down Expand Up @@ -636,7 +642,8 @@ Cube.prototype = {
this._backgroundGroup.show();
let background = this._backgroundGroup.get_children()[0];
Tweener.addTween(background, {
dim_factor: 0.0,
//dim_factor: 0.0,
opacity: 10,
time: settings.animationTime * 0,
transition: 'easeOutQuad'
});
Expand Down Expand Up @@ -707,17 +714,6 @@ CubeSettings.prototype = {

function init(metadata) {
settings = new CubeSettings(metadata.uuid);

log( `animationTime: ${settings.animationTime}` );
log( `pullaway: ${settings.pullaway}` );
log( `scaleEffect: ${settings.newScaleEffect}` );
log( `rotateEffect: ${settings.newRotateEffect}` );
log( `includePanels: ${settings.includePanels}` );

log( `getScaleEffect: ${settings.getScaleEffect()}` );
log( `getUnscaleEffect: ${settings.getUnscaleEffect()}` );
log( `getRotateEffect: ${settings.getRotateEffect()}` );
log( `getUnrotateEffect: ${settings.getUnrotateEffect()}` );
}

function enable() {
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"4.6",
"5.4"
],
"version": "1.0.2",
"version": "1.1.0",
"uuid": "DesktopCube@yare",
"name": "Desktop Cube",
"description": "Compiz Cube-like animation for workspace switching",
Expand Down
4 changes: 2 additions & 2 deletions DesktopCube@yare/files/DesktopCube@yare/po/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: DesktopCube@yare 1.0.2\n"
"Project-Id-Version: DesktopCube@yare 1.1.0\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2024-08-25 22:27+0200\n"
"Last-Translator: \n"
"Language-Team: Odyssey <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/da.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2022-08-07 15:06+0200\n"
"Last-Translator: Alan Mortensen <[email protected]>\n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2021-03-02 22:50+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2024-08-23 21:44-0400\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/eu.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2024-05-30 10:18+0200\n"
"Last-Translator: Muxutruk <[email protected]>\n"
"Language-Team: Basque <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2019-02-13 16:49+0100\n"
"Last-Translator: Claudiux <[email protected]>\n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/hr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: DesktopCube@yare\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2017-04-30 16:57+0200\n"
"Last-Translator: gogo <[email protected]>\n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2021-09-26 08:16+0200\n"
"Last-Translator: Kálmán „KAMI” Szalai <[email protected]>\n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2022-06-03 10:52+0200\n"
"Last-Translator: Dragone2 <[email protected]>\n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2024-04-16 14:08+0200\n"
"Last-Translator: qadzek\n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2021-09-26 21:23-0300\n"
"Last-Translator: Marcelo Aof\n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/ro.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2022-08-06 01:55+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2023-12-03 14:51-0500\n"
"Last-Translator: blogdron\n"
"Language-Team: \n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: 2017-09-01 18:36+0300\n"
"Last-Translator: Gökhan Gökkaya <[email protected]>\n"
"Language-Team: Linux Mint Türkiye\n"
Expand Down
2 changes: 1 addition & 1 deletion DesktopCube@yare/files/DesktopCube@yare/po/zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-23 18:58-0400\n"
"POT-Creation-Date: 2024-09-06 09:45-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down

0 comments on commit b12af45

Please sign in to comment.