Adapt for MetaBackgroundActor API changes

MetaBackgroundActor can now be constructed as a standard GObject, and
accepts a GnomeBG settings object, which we retrieve from the default
one to share textures.

https://bugzilla.gnome.org/show_bug.cgi?id=688210
This commit is contained in:
Giovanni Campagna 2012-12-17 19:31:45 +01:00
parent f91671498b
commit b0e22a795e
4 changed files with 10 additions and 3 deletions

View File

@ -63,6 +63,7 @@ let magnifier = null;
let xdndHandler = null;
let keyboard = null;
let layoutManager = null;
let background = null;
let _startDate;
let _defaultCssStylesheet = null;
let _cssStylesheet = null;
@ -142,6 +143,9 @@ function start() {
global.overlay_group.reparent(uiGroup);
global.stage.add_actor(uiGroup);
let backgroundActor = global.window_group.background;
background = backgroundActor.settings;
layoutManager = new Layout.LayoutManager();
xdndHandler = new XdndHandler.XdndHandler();
ctrlAltTabManager = new CtrlAltTab.CtrlAltTabManager();

View File

@ -122,7 +122,8 @@ const Overview = new Lang.Class({
// one. Instances of this class share a single CoglTexture behind the
// scenes which allows us to show the background with different
// rendering options without duplicating the texture data.
this._background = Meta.BackgroundActor.new_for_screen(global.screen);
this._background = new Meta.BackgroundActor({ screen: global.screen,
settings: Main.background });
this._background.add_glsl_snippet(Meta.SnippetHook.FRAGMENT,
GLSL_DIM_EFFECT_DECLARATIONS,
GLSL_DIM_EFFECT_CODE,

View File

@ -467,7 +467,8 @@ const ScreenShield = new Lang.Class({
name: 'lockScreenContents' });
this._lockScreenContents.add_constraint(new Layout.MonitorConstraint({ primary: true }));
let backgroundActor = Meta.BackgroundActor.new_for_screen(global.screen);
let backgroundActor = new Meta.BackgroundActor({ screen: global.screen,
settings: Main.background });
backgroundActor.add_glsl_snippet(Meta.SnippetHook.TEXTURE_LOOKUP,
GLSL_BLUR_EFFECT_DECLARATIONS,
GLSL_BLUR_EFFECT_CODE,

View File

@ -170,7 +170,8 @@ const WorkspaceThumbnail = new Lang.Class({
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
this._background = Meta.BackgroundActor.new_for_screen(global.screen);
this._background = new Meta.BackgroundActor({ screen: global.screen,
settings: Main.background });
this._contents.add_actor(this._background);
let monitor = Main.layoutManager.primaryMonitor;