Remove usage of MetaScreen
Remove any usage of MetaScreen, as it has been removed from libmutter in the API version 3. The corresponding functionality has been moved into three different places: MetaDisplay, MetaX11Display (for X11 specific functionality) and MetaWorkspaceManager. https://bugzilla.gnome.org/show_bug.cgi?id=759538
This commit is contained in:
@ -240,7 +240,7 @@ var Background = new Lang.Class({
|
||||
file: null,
|
||||
style: null });
|
||||
|
||||
this.background = new Meta.Background({ meta_screen: global.screen });
|
||||
this.background = new Meta.Background({ meta_display: global.display });
|
||||
this.background._delegate = this;
|
||||
|
||||
this._settings = params.settings;
|
||||
@ -499,12 +499,12 @@ var SystemBackground = new Lang.Class({
|
||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/noise-texture.png');
|
||||
|
||||
if (_systemBackground == null) {
|
||||
_systemBackground = new Meta.Background({ meta_screen: global.screen });
|
||||
_systemBackground = new Meta.Background({ meta_display: global.display });
|
||||
_systemBackground.set_color(DEFAULT_BACKGROUND_COLOR);
|
||||
_systemBackground.set_file(file, GDesktopEnums.BackgroundStyle.WALLPAPER);
|
||||
}
|
||||
|
||||
this.actor = new Meta.BackgroundActor({ meta_screen: global.screen,
|
||||
this.actor = new Meta.BackgroundActor({ meta_display: global.display,
|
||||
monitor: 0,
|
||||
background: _systemBackground });
|
||||
|
||||
@ -538,8 +538,10 @@ var BackgroundSource = new Lang.Class({
|
||||
this._settings = new Gio.Settings({ schema_id: settingsSchema });
|
||||
this._backgrounds = [];
|
||||
|
||||
this._monitorsChangedId = global.screen.connect('monitors-changed',
|
||||
this._onMonitorsChanged.bind(this));
|
||||
let monitorManager = Meta.MonitorManager.get();
|
||||
this._monitorsChangedId =
|
||||
monitorManager.connect('monitors-changed',
|
||||
this._onMonitorsChanged.bind(this));
|
||||
},
|
||||
|
||||
_onMonitorsChanged() {
|
||||
@ -604,7 +606,8 @@ var BackgroundSource = new Lang.Class({
|
||||
},
|
||||
|
||||
destroy() {
|
||||
global.screen.disconnect(this._monitorsChangedId);
|
||||
let monitorManager = Meta.MonitorManager.get();
|
||||
monitorManager.disconnect(this._monitorsChangedId);
|
||||
|
||||
for (let monitorIndex in this._backgrounds) {
|
||||
let background = this._backgrounds[monitorIndex];
|
||||
@ -751,7 +754,7 @@ var BackgroundManager = new Lang.Class({
|
||||
|
||||
_createBackgroundActor() {
|
||||
let background = this._backgroundSource.getBackground(this._monitorIndex);
|
||||
let backgroundActor = new Meta.BackgroundActor({ meta_screen: global.screen,
|
||||
let backgroundActor = new Meta.BackgroundActor({ meta_display: global.display,
|
||||
monitor: this._monitorIndex,
|
||||
background: background.background,
|
||||
vignette: this._vignette,
|
||||
|
Reference in New Issue
Block a user