mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Continue using windowactor for the fade on g-s < 3.34
This commit is contained in:
6
panel.js
6
panel.js
@@ -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() {
|
||||
|
||||
18
utils.js
18
utils.js
@@ -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) {
|
||||
|
||||
@@ -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 }));
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user