From 0d571e91912cbadf3c5a0728fea55b01152778ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 2 May 2024 17:59:11 +0200 Subject: [PATCH] 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: --- js/ui/ctrlAltTab.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js index a802501b2..68d491638 100644 --- a/js/ui/ctrlAltTab.js +++ b/js/ui/ctrlAltTab.js @@ -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({