From 0e917c3dbf81eecd3d21f9225652eb1ff13e585a Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Thu, 29 Apr 2021 16:07:21 +0200 Subject: [PATCH] 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: --- js/ui/workspaceThumbnail.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 6c5a2bee4..3a7d916ca 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 =