diff options
author | Florian Müllner <fmuellner@gnome.org> | 2022-09-12 16:44:27 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2022-10-22 17:20:35 +0200 |
commit | 3761dfad50f58033cc0bc8f59c00be639e91721c (patch) | |
tree | afce3983460e8a79ae46cb56897ab16d8b8f44ef | |
parent | ca5708299eaf7f36931141b758c8e00dbea4acf2 (diff) | |
download | gnome-shell-3761dfad50f58033cc0bc8f59c00be639e91721c.tar.gz |
altTab: Always include label in thumbnail
We currently special-case the no-window-title case when creating
items, but not when accessing labels later, for example during
allocation.
The easiest option it to create the label unconditionally, so do
that.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5851
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2483>
(cherry picked from commit 022c64961c22afcfe865186b5e190a7c9446ff15)
-rw-r--r-- | js/ui/altTab.js | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 95dc75f02..a3daebc20 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -917,20 +917,16 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList { box.add_actor(bin); this._thumbnailBins.push(bin); - let title = windows[i].get_title(); - if (title) { - let name = new St.Label({ - text: title, - // St.Label doesn't support text-align - x_align: Clutter.ActorAlign.CENTER, - }); - this._labels.push(name); - box.add_actor(name); + const title = windows[i].get_title(); + const name = new St.Label({ + text: title, + // St.Label doesn't support text-align + x_align: Clutter.ActorAlign.CENTER, + }); + this._labels.push(name); + box.add_actor(name); - this.addItem(box, name); - } else { - this.addItem(box, null); - } + this.addItem(box, name); } this.connect('destroy', this._onDestroy.bind(this)); |