Closed romgrk closed 3 years ago
I've already looked into this a bit, apparently not as straight forward as I'd hoped. But it's high on the list of things to fix.
That would need to be done in workspaceThumbnails.js, right? I'll try to take a look at it later.
Yeah, you'd need to figure out how to load the background image and display it on each thumbnail behind the windows.
Yeah ok so you know what I've looked at this and it's not as easy as it seems.
Ok, I think I got it, see the PR there.
I've been using this with my extension Customised Workspaces https://github.com/blipk/Customised-Workspaces which restores the wallpaper and allows setting a different one for each workspace.
It's enough to change _addWindowClone:
this.addInjection('workspaceThumbnail.ThumbnailsBox.prototype._addWindowClone',
function(win) {
let clone = new workspaceThumbnail.ThumbnailsBox.WindowClone(win);
clone.connect('selected', (o, time) => { this.activate(time); });
clone.connect('drag-begin', () => { Main.overview.beginWindowDrag(clone.metaWindow); });
clone.connect('drag-cancelled', () => { Main.overview.cancelledWindowDrag(clone.metaWindow); });
clone.connect('drag-end', () => { Main.overview.endWindowDrag(clone.metaWindow); });
clone.connect('destroy', () => { this._removeWindowClone(clone.metaWindow); });
this._contents.add_actor(clone);
if (this._windows.length == 0) clone.setStackAbove(this._bgManager.backgroundActor);
else clone.setStackAbove(this._windows[this._windows.length - 1]);
this._windows.push(clone);
return clone;
});
Then something like the following in workspaceThumbnail.ThumbnailsBox.prototype.addThumbnails
_newbg = new Meta.Background({ meta_display: global.screen || global.display });
let bg = extensionUtils.getSettings('org.gnome.desktop.background').get_string('picture-uri').replace("file://", "");
_newbg.set_file(Gio.file_new_for_path(bg), imports.gi.GDesktopEnums.BackgroundStyle.ZOOM);
if (!thumbnailBox._bgManager)
thumbnailBox._bgManager = new background.BackgroundManager({ monitorIndex: Main.layoutManager.primaryIndex,
container: thumbnailBox._contents,
vignette: false });
thumbnailBox._bgManager.backgroundActor.content.background = thumbnailBox._newbg;
Current thumbnails have a grey background instead of the wallpaper.