Skip to content

Commit

Permalink
[Flipper@connerdev] Version 1.0.3 (#712)
Browse files Browse the repository at this point in the history
1. Fix the panels showing up in an incorrect location when animating (or when holing Ctrl+Alt after a workspace switch), but I still see occasional panel painting issues.
2. Added a new setting option to disable showing the panels when animating (as a way to avoid any panel animation issues you might be having)
3. Changed the workspace switch OSD to only show after the animation so that there is no odd OSD artifacts while animating
4. Changed author to myself since the extension has no maintainer currently
  • Loading branch information
klangman authored Aug 21, 2024
1 parent c351938 commit 29b0901
Show file tree
Hide file tree
Showing 19 changed files with 132 additions and 53 deletions.
7 changes: 7 additions & 0 deletions Flipper@connerdev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.0.3

* Fix the panels showing up in an incorrect location when animating (or when holing Ctrl+Alt after a workspace switch), but I still see occasional panel painting issues.
* Added a new setting option to disable showing the panels when animating (as a way to avoid any panel animation issues you might be having)
* Changed the workspace switch OSD to only show after the animation so that there is no odd OSD artifacts while animating
* Changed author to myself since the extension has no maintainer currently

## 1.0.2

* Ask Cinnamon to play the workspace switch sound (if it's enabled) when switching workspaces
Expand Down
70 changes: 34 additions & 36 deletions Flipper@connerdev/files/Flipper@connerdev/5.4/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Cinnamon = imports.gi.Cinnamon;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const Settings = imports.ui.settings;
const Panel = imports.ui.panel;

let settings;
let bindings = ['switch-to-workspace-left',
Expand Down Expand Up @@ -225,7 +226,8 @@ Flipper.prototype = {
});

clone.add_actor(windowClone);
windowClone.lower(deskletClone);
//windowClone.lower(deskletClone);
windowClone.get_parent().set_child_below_sibling(windowClone, deskletClone);
clone.desktopClones.push(windowClone);
}
});
Expand All @@ -239,38 +241,39 @@ Flipper.prototype = {
clone.workspaceWindowActors.push(windowClone);
}
clone.workspaceWindows = workspaceWindows;

let chromeGroup = new St.Group();
Main.getPanels().concat(Main.uiGroup.get_children()).forEach(
function (panel) {
// Is it a non-autohideable panel, or is it a visible, tracked
// chrome object? TODO: Make more human-readable the logic
// below in clone.add_actor().
if ((panel.actor && !panel._hideable) || (panel &&
Main.layoutManager.isTrackingChrome(panel) &&
panel.visible)) {
let chromeClone = new Clutter.Clone(
{source: panel.actor ? panel.actor : panel,
x : panel.actor ? panel.actor.x : panel.x,
y: panel.actor ? (panel.bottomPosition ?
Main.layoutManager.bottomMonitor.y +
Main.layoutManager.bottomMonitor.height -
panel.actor.height :
Main.layoutManager.primaryMonitor.y) : panel.y});
chromeGroup.add_actor(chromeClone);
chromeClone.raise_top();
}
});
clone.add_actor(chromeGroup);
chromeGroup.raise_top();
clone.chromeGroup = chromeGroup;
if (settings.includePanels) {
let chromeGroup = new St.Group();
Main.getPanels().concat(Main.uiGroup.get_children()).forEach(
function (panel) {
// Is it a non-autohideable panel, or is it a visible, tracked
// chrome object? TODO: Make more human-readable the logic
// below in clone.add_actor().
if ((panel.actor && !panel._hideable)
|| (panel && Main.layoutManager.isTrackingChrome(panel) && panel.visible)) {
let chromeClone = new Clutter.Clone({
source: panel.actor ? panel.actor : panel,
x : panel.actor ? panel.actor.x : panel.x,
y : panel.actor ? (panel.panelPosition === Panel.PanelLoc.bottom ?
Main.layoutManager.primaryMonitor.y +
Main.layoutManager.primaryMonitor.height -
panel.actor.height :
Main.layoutManager.primaryMonitor.y) : panel.y});
chromeGroup.add_actor(chromeClone);
//chromeClone.raise_top();
chromeClone.get_parent().set_child_above_sibling(chromeClone, null);
}
});
clone.add_actor(chromeGroup);
//chromeGroup.raise_top();
chromeGroup.get_parent().set_child_above_sibling(chromeGroup, null);
clone.chromeGroup = chromeGroup;
}
clone.index = workspaceIndex;
return clone;
},

cloneMetaWindow: function(metaWindow) {
let compositor =
metaWindow.get_compositor_private();
let compositor = metaWindow.get_compositor_private();

let rect = metaWindow.get_buffer_rect();
let windowClone = new Clutter.Clone(
Expand Down Expand Up @@ -334,7 +337,6 @@ Flipper.prototype = {
startAnimate: function(direction, window) {
this.is_animating = true;

// Main.wm.showWorkspaceOSD();
let active_workspace = global.screen.get_active_workspace();
let new_workspace = active_workspace.get_neighbor(direction);

Expand Down Expand Up @@ -463,7 +465,6 @@ Flipper.prototype = {
to.raise_top();
to.show();
this.new_workspace.activate(global.get_current_time());
Main.wm.showWorkspaceOSD();

if (to.workspaceWindowActors.length > 0) {
let range = this.getTime();
Expand Down Expand Up @@ -593,7 +594,6 @@ Flipper.prototype = {
to.show();
to.raise_top();
this.new_workspace.activate(global.get_current_time());
Main.wm.showWorkspaceOSD();

if (to.workspaceWindowActors.length > 0) {

Expand Down Expand Up @@ -743,7 +743,6 @@ Flipper.prototype = {
from.hide();
to.show();
this.new_workspace.activate(global.get_current_time());
Main.wm.showWorkspaceOSD();
},

flip_start: function(from, to, direction) {
Expand Down Expand Up @@ -833,7 +832,6 @@ Flipper.prototype = {
onCompleteScope: this
});

Main.wm.showWorkspaceOSD();
},

slide_start: function(from, to, direction) {
Expand Down Expand Up @@ -932,7 +930,6 @@ Flipper.prototype = {
});
}

Main.wm.showWorkspaceOSD();
},

deck_start: function(from, to, direction) {
Expand Down Expand Up @@ -1059,7 +1056,6 @@ Flipper.prototype = {
});
}

Main.wm.showWorkspaceOSD();
},

cube_start: function(from, to, direction) {
Expand Down Expand Up @@ -1149,7 +1145,6 @@ Flipper.prototype = {
to.raise_top();
to.show();
this.new_workspace.activate(global.get_current_time());
Main.wm.showWorkspaceOSD();

if (to.workspaceWindowActors.length > 0) {
let range = this.getTime();
Expand Down Expand Up @@ -1287,6 +1282,7 @@ Flipper.prototype = {
//global.log("destroy");
this.onDestroy();
}
Main.wm.showWorkspaceOSD();
},

processKeypress: function(action) {
Expand Down Expand Up @@ -1441,6 +1437,8 @@ FlipperSettings.prototype = {
"transitionEffect", "transitionEffect", function(){});
this.settings.bindProperty(Settings.BindingDirection.IN,
"includeBackground", "includeBackground", function(){});
this.settings.bindProperty(Settings.BindingDirection.IN,
"includePanels", "includePanels", function(){});
this.settings.bindProperty(Settings.BindingDirection.IN,
"dim_factor", "dim_factor", function(){});
// this.settings.bindProperty(Settings.BindingDirection.IN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,10 @@
"type" : "checkbox",
"description" : "Include Background",
"default" : false
},
"includePanels" : {
"type" : "checkbox",
"description" : "Include Panels",
"default" : false
}
}
2 changes: 1 addition & 1 deletion Flipper@connerdev/files/Flipper@connerdev/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"5.0",
"5.4"
],
"version": "1.0.2",
"version": "1.0.3",
"url": "https://github.com/ConnerHansen/Flipper",
"uuid": "Flipper@connerdev",
"name": "Flipper",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Flipper@connerdev 1.0.2\n"
"Project-Id-Version: Flipper@connerdev 1.0.3\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
"extensions/issues\n"
"POT-Creation-Date: 2024-08-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -169,3 +169,7 @@ msgstr ""
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr ""

#. 5.4->settings-schema.json->includePanels->description
msgid "Include Panels"
msgstr ""
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2024-07-25 17:36+0200\n"
"Last-Translator: Odyssey <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -171,3 +171,8 @@ msgstr "Quint"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Incloure el fons"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Incloure el fons"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2017-06-10 17:39+0200\n"
"Last-Translator: Alan Mortensen <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -171,3 +171,8 @@ msgstr "Femte"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Inkludér baggrund"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Inkludér baggrund"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2021-03-02 21:09+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -171,3 +171,8 @@ msgstr "Quintisch"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Hintergrund mit einbeziehen"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Hintergrund mit einbeziehen"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2023-11-03 13:24-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -170,3 +170,8 @@ msgstr "Quint"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Incluir fondo"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Incluir fondo"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/po/eu.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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2024-05-30 9:50+1\n"
"Last-Translator: Muxutruk <[email protected]>\n"
"Language-Team: Basque <[email protected]>\n"
Expand Down Expand Up @@ -170,3 +170,8 @@ msgstr "Kintikoa"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Atzekaldea Erantzi"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Atzekaldea Erantzi"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2021-09-26 08:17+0200\n"
"Last-Translator: Kálmán „KAMI” Szalai <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -170,3 +170,8 @@ msgstr "Quint"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Háttérrel együtt"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Háttérrel együtt"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2022-06-03 11:05+0200\n"
"Last-Translator: Dragone2 <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -171,3 +171,8 @@ msgstr "Quint"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Includi Sfondo"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Includi Sfondo"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2024-04-17 10:16+0200\n"
"Last-Translator: qadzek\n"
"Language-Team: \n"
Expand Down Expand Up @@ -169,3 +169,8 @@ msgstr "Kwint"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Inclusief Achtergrond"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Inclusief Achtergrond"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2021-09-26 21:23-0300\n"
"Last-Translator: Marcelo Aof\n"
"Language-Team: \n"
Expand Down Expand Up @@ -171,3 +171,8 @@ msgstr "Quint"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Incluir o plano de fundo"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Incluir o plano de fundo"
7 changes: 6 additions & 1 deletion Flipper@connerdev/files/Flipper@connerdev/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-17 12:33-0400\n"
"POT-Creation-Date: 2024-08-21 13:16-0400\n"
"PO-Revision-Date: 2022-08-06 01:55+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -172,3 +172,8 @@ msgstr "Quint"
#. 5.4->settings-schema.json->includeBackground->description
msgid "Include Background"
msgstr "Include fundal"

#. 5.4->settings-schema.json->includePanels->description
#, fuzzy
msgid "Include Panels"
msgstr "Include fundal"
Loading

0 comments on commit 29b0901

Please sign in to comment.