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>
This commit is contained in:
parent
c30aaf35ad
commit
022c64961c
@ -917,9 +917,8 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
|
|||||||
box.add_actor(bin);
|
box.add_actor(bin);
|
||||||
this._thumbnailBins.push(bin);
|
this._thumbnailBins.push(bin);
|
||||||
|
|
||||||
let title = windows[i].get_title();
|
const title = windows[i].get_title();
|
||||||
if (title) {
|
const name = new St.Label({
|
||||||
let name = new St.Label({
|
|
||||||
text: title,
|
text: title,
|
||||||
// St.Label doesn't support text-align
|
// St.Label doesn't support text-align
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
@ -928,9 +927,6 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
|
|||||||
box.add_actor(name);
|
box.add_actor(name);
|
||||||
|
|
||||||
this.addItem(box, name);
|
this.addItem(box, name);
|
||||||
} else {
|
|
||||||
this.addItem(box, null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connect('destroy', this._onDestroy.bind(this));
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
Loading…
Reference in New Issue
Block a user