ctrlAltTab: Ignore DOCK windows without app

The fallback path broke when we removed support for window icons.

Nowadays we track all windows, and as a result should always have an
associated app (although not necessarily backed by a .desktop file),
so this shouldn't make a difference in practice. Not to mention that
external docks (like cairo-dock) are extremely rare themselves now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3295>
(cherry picked from commit 0d571e9191)
This commit is contained in:
Florian Müllner 2024-05-02 17:59:11 +02:00
parent 03c2941dff
commit 893bcbdc02
No known key found for this signature in database

View file

@ -90,22 +90,14 @@ export class CtrlAltTabManager {
let windows = display.get_tab_list(Meta.TabList.DOCKS,
activeWorkspace);
let windowTracker = Shell.WindowTracker.get_default();
let textureCache = St.TextureCache.get_default();
for (let i = 0; i < windows.length; i++) {
let icon = null;
let iconName = null;
if (windows[i].get_window_type() === Meta.WindowType.DESKTOP) {
iconName = 'shell-focus-desktop-symbolic';
} else {
let app = windowTracker.get_window_app(windows[i]);
if (app) {
icon = app.create_icon_texture(POPUP_APPICON_SIZE);
} else {
icon = new St.Icon({
gicon: textureCache.bind_cairo_surface_property(windows[i], 'icon'),
icon_size: POPUP_APPICON_SIZE,
});
}
const app = windowTracker.get_window_app(windows[i]);
icon = app.create_icon_texture(POPUP_APPICON_SIZE);
}
items.push({