[gnome-shell] workspacesView: Make sure to destroy non-existing workspaces
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Make sure to destroy non-existing workspaces
- Date: Thu, 7 Jan 2021 14:07:07 +0000 (UTC)
commit 57f96b28ab50ec7b1d3ce6ba6e4d36124378c1b9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Sep 29 13:38:40 2020 -0300
workspacesView: Make sure to destroy non-existing workspaces
Even if they're in the end of the list. So far we've managed to not be affected
by this bug because until GNOME 3.38, workspaces didn't have a background, and
there was no way to navigate to these leftover workspaces, but with the proposed
overview changes for GNOME 40 it'll be very much visible.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1560>
js/ui/workspacesView.js | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 1e8faf3490..a7b3b878a9 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -222,6 +222,11 @@ class WorkspacesView extends WorkspacesViewBase {
}
}
+ for (let j = this._workspaces.length - 1; j >= newNumWorkspaces; j--) {
+ this._workspaces[j].destroy();
+ this._workspaces.splice(j, 1);
+ }
+
this._updateScrollPosition();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]