Continue using windowactor for the fade on g-s < 3.34

This commit is contained in:
Charles Gagnon
2020-04-02 13:39:19 -04:00
parent 596926c21c
commit 1e16ba2713
3 changed files with 25 additions and 3 deletions

View File

@@ -1077,7 +1077,11 @@ var dtpPanel = Utils.defineClass({
transition: 'easeOutQuad'
};
workspace.list_windows().forEach(w => Utils.animateWindowOpacity(w.get_compositor_private(), tweenOpts));
workspace.list_windows().forEach(w => {
if (!w.minimized) {
Utils.animateWindowOpacity(w.get_compositor_private(), tweenOpts)
}
});
},
_onShowDesktopButtonPress: function() {

View File

@@ -420,7 +420,23 @@ var activateSiblingWindow = function(windows, direction, startWindow) {
};
var animateWindowOpacity = function(window, tweenOpts) {
Tweener.addTween(window.get_first_child(), tweenOpts);
//there currently is a mutter bug with the windowactor opacity on 3.34, so
//until it is fixed, use the windowactor's child for the fade animation
//this leaves a "shadow" on the desktop, so the windowactor needs to be hidden.
//https://gitlab.gnome.org/GNOME/mutter/issues/836
if (Config.PACKAGE_VERSION > '3.33') {
let windowActor = window;
let visible = tweenOpts.opacity > 0;
if (!windowActor.visible && visible) {
windowActor.visible = visible;
}
window = windowActor.get_first_child();
tweenOpts.onComplete = () => windowActor.visible = visible;
}
Tweener.addTween(window, tweenOpts);
};
var getIndicators = function(delegate) {

View File

@@ -652,7 +652,9 @@ var PreviewMenu = Utils.defineClass({
wa.show();
}
Utils.animateWindowOpacity(wa, getTweenOpts({ opacity: isFocused ? 255 : dimOpacity }));
if (!mw.minimized) {
Utils.animateWindowOpacity(wa, getTweenOpts({ opacity: isFocused ? 255 : dimOpacity }));
}
}
});
},