[gnome-shell] workspaceThumbnail: Only create thumbnails once
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceThumbnail: Only create thumbnails once
- Date: Thu, 29 Apr 2021 18:02:49 +0000 (UTC)
commit 0e917c3dbf81eecd3d21f9225652eb1ff13e585a
Author: Sebastian Keller <skeller gnome org>
Date: Thu Apr 29 16:07:21 2021 +0200
workspaceThumbnail: Only create thumbnails once
`ThumbnailsBox` listens for the `showing` signal from the `Overview` to
create its thumbnails and destroys them on the `hide` signal. Since the
`showing` signal can be emitted multiple times when switching between
the shown and hidden state without ever fully completing the transition,
this will cause `_createThumbnails` to be called multiple times, each
time adding another set of workspaces.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3819
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1828>
js/ui/workspaceThumbnail.js | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 6c5a2bee4a..3a7d916ca2 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -993,6 +993,9 @@ var ThumbnailsBox = GObject.registerClass({
}
_createThumbnails() {
+ if (this._thumbnails.length > 0)
+ return;
+
let workspaceManager = global.workspace_manager;
this._nWorkspacesNotifyId =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]