layout: Remove redundant background refresh
When using the NVIDIA driver, textures tend to loose their pixels when suspending. In the past we handled this by figuring out when the NVIDIA driver was used, and reload the background whenever we noticed we resumed from suspend. This shouldn't be needed anymore after https://gitlab.gnome.org/GNOME/mutter/merge_requests/600, as it should handle this by listening to video-memory-purged signal. Thus remove our special handling here. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1358
This commit is contained in:

committed by
Robert Mader

parent
de8b43a45d
commit
95bb194356
@ -6,7 +6,6 @@ const Signals = imports.signals;
|
||||
|
||||
const Background = imports.ui.background;
|
||||
const BackgroundMenu = imports.ui.backgroundMenu;
|
||||
const LoginManager = imports.misc.loginManager;
|
||||
|
||||
const DND = imports.ui.dnd;
|
||||
const Main = imports.ui.main;
|
||||
@ -295,18 +294,6 @@ var LayoutManager = GObject.registerClass({
|
||||
monitorManager.connect('monitors-changed',
|
||||
this._monitorsChanged.bind(this));
|
||||
this._monitorsChanged();
|
||||
|
||||
// NVIDIA drivers don't preserve FBO contents across
|
||||
// suspend/resume, see
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=739178
|
||||
if (Shell.util_need_background_refresh()) {
|
||||
LoginManager.getLoginManager().connect('prepare-for-sleep',
|
||||
(lm, suspending) => {
|
||||
if (suspending)
|
||||
return;
|
||||
Meta.Background.refresh_all();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// This is called by Main after everything else is constructed
|
||||
|
Reference in New Issue
Block a user