Adapt to Mutter background changes
The rewrite of Mutter's background code (see bug 735637) requires corresponding changes here - we no longer need to layer multiple MetaBackgroundActors together. The general strategy is that a BackgroundSource object is created per GSettings schema, and keeps either one Background/MetaBackground pair, or, for animation, a Background/Metabackground pair for each monitor. https://bugzilla.gnome.org/show_bug.cgi?id=735638
This commit is contained in:
parent
70099872ab
commit
650dea017b
File diff suppressed because it is too large
Load Diff
@ -361,7 +361,7 @@ const LayoutManager = new Lang.Class({
|
||||
},
|
||||
|
||||
_addBackgroundMenu: function(bgManager) {
|
||||
BackgroundMenu.addBackgroundMenu(bgManager.background.actor, this);
|
||||
BackgroundMenu.addBackgroundMenu(bgManager.backgroundActor, this);
|
||||
},
|
||||
|
||||
_createBackgroundManager: function(monitorIndex) {
|
||||
@ -378,10 +378,10 @@ const LayoutManager = new Lang.Class({
|
||||
_showSecondaryBackgrounds: function() {
|
||||
for (let i = 0; i < this.monitors.length; i++) {
|
||||
if (i != this.primaryIndex) {
|
||||
let background = this._bgManagers[i].background;
|
||||
background.actor.show();
|
||||
background.actor.opacity = 0;
|
||||
Tweener.addTween(background.actor,
|
||||
let backgroundActor = this._bgManagers[i].backgroundActor;
|
||||
backgroundActor.show();
|
||||
backgroundActor.opacity = 0;
|
||||
Tweener.addTween(backgroundActor,
|
||||
{ opacity: 255,
|
||||
time: BACKGROUND_FADE_ANIMATION_TIME,
|
||||
transition: 'easeOutQuad' });
|
||||
@ -404,7 +404,7 @@ const LayoutManager = new Lang.Class({
|
||||
this._bgManagers.push(bgManager);
|
||||
|
||||
if (i != this.primaryIndex && this._startingUp)
|
||||
bgManager.background.actor.hide();
|
||||
bgManager.backgroundActor.hide();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -185,7 +185,7 @@ const Overview = new Lang.Class({
|
||||
for (let i = 0; i < Main.layoutManager.monitors.length; i++) {
|
||||
let bgManager = new Background.BackgroundManager({ container: this._backgroundGroup,
|
||||
monitorIndex: i,
|
||||
effects: Meta.BackgroundEffects.VIGNETTE });
|
||||
vignette: true });
|
||||
this._bgManagers.push(bgManager);
|
||||
}
|
||||
},
|
||||
@ -193,11 +193,9 @@ const Overview = new Lang.Class({
|
||||
_unshadeBackgrounds: function() {
|
||||
let backgrounds = this._backgroundGroup.get_children();
|
||||
for (let i = 0; i < backgrounds.length; i++) {
|
||||
let background = backgrounds[i]._delegate;
|
||||
|
||||
Tweener.addTween(background,
|
||||
Tweener.addTween(backgrounds[i],
|
||||
{ brightness: 1.0,
|
||||
vignetteSharpness: 0.0,
|
||||
vignette_sharpness: 0.0,
|
||||
time: SHADE_ANIMATION_TIME,
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
@ -207,11 +205,9 @@ const Overview = new Lang.Class({
|
||||
_shadeBackgrounds: function() {
|
||||
let backgrounds = this._backgroundGroup.get_children();
|
||||
for (let i = 0; i < backgrounds.length; i++) {
|
||||
let background = backgrounds[i]._delegate;
|
||||
|
||||
Tweener.addTween(background,
|
||||
Tweener.addTween(backgrounds[i],
|
||||
{ brightness: Lightbox.VIGNETTE_BRIGHTNESS,
|
||||
vignetteSharpness: Lightbox.VIGNETTE_SHARPNESS,
|
||||
vignette_sharpness: Lightbox.VIGNETTE_SHARPNESS,
|
||||
time: SHADE_ANIMATION_TIME,
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
|
@ -306,7 +306,7 @@ const WorkspaceThumbnail = new Lang.Class({
|
||||
_createBackground: function() {
|
||||
this._bgManager = new Background.BackgroundManager({ monitorIndex: Main.layoutManager.primaryIndex,
|
||||
container: this._contents,
|
||||
effects: Meta.BackgroundEffects.NONE });
|
||||
vignette: false });
|
||||
},
|
||||
|
||||
setPorthole: function(x, y, width, height) {
|
||||
@ -332,7 +332,7 @@ const WorkspaceThumbnail = new Lang.Class({
|
||||
let clone = this._windows[i];
|
||||
let metaWindow = clone.metaWindow;
|
||||
if (i == 0) {
|
||||
clone.setStackAbove(this._bgManager.background.actor);
|
||||
clone.setStackAbove(this._bgManager.backgroundActor);
|
||||
} else {
|
||||
let previousClone = this._windows[i - 1];
|
||||
clone.setStackAbove(previousClone.actor);
|
||||
@ -531,7 +531,7 @@ const WorkspaceThumbnail = new Lang.Class({
|
||||
this._contents.add_actor(clone.actor);
|
||||
|
||||
if (this._windows.length == 0)
|
||||
clone.setStackAbove(this._bgManager.background.actor);
|
||||
clone.setStackAbove(this._bgManager.backgroundActor);
|
||||
else
|
||||
clone.setStackAbove(this._windows[this._windows.length - 1].actor);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user