From 46403feaf0a679792eb32d6d58613b7abb4da5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 2 May 2024 23:26:24 +0200 Subject: [PATCH] Don't use window icons in overview Upstream removed support for window icons in mutter, so if we want to add them back, we will need something more involved than the RHEL 9 downstream patches. Resolves: RHEL-35275 --- ...erride-with-window-icon-if-available.patch | 46 ------------------- gnome-shell.spec | 1 - 2 files changed, 47 deletions(-) delete mode 100644 0001-windowPreview-Override-with-window-icon-if-available.patch diff --git a/0001-windowPreview-Override-with-window-icon-if-available.patch b/0001-windowPreview-Override-with-window-icon-if-available.patch deleted file mode 100644 index b1ab9ef..0000000 --- a/0001-windowPreview-Override-with-window-icon-if-available.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 4a18727ea97fbb676b90183c2154d4cc316133a4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Thu, 7 Mar 2024 18:22:32 +0100 -Subject: [PATCH] windowPreview: Override with window icon if available - ---- - js/ui/windowPreview.js | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js -index d865e6e25b..889dc18797 100644 ---- a/js/ui/windowPreview.js -+++ b/js/ui/windowPreview.js -@@ -133,6 +133,12 @@ export const WindowPreview = GObject.registerClass({ - const tracker = Shell.WindowTracker.get_default(); - const app = tracker.get_window_app(this.metaWindow); - this._icon = app.create_icon_texture(ICON_SIZE); -+ // Override with window icon if available -+ if (this._hasWindowIcon()) { -+ const textureCache = St.TextureCache.get_default(); -+ this._icon.gicon = textureCache.bind_cairo_surface_property( -+ this.metaWindow, 'icon'); -+ } - this._icon.add_style_class_name('icon-dropshadow'); - this._icon.set({ - reactive: true, -@@ -234,6 +240,16 @@ export const WindowPreview = GObject.registerClass({ - }); - } - -+ _hasWindowIcon() { -+ // HACK: GI cannot handle CairoSurface, so this -+ // will throw if the icon property is non-null -+ try { -+ return this.metaWindow.icon !== null; -+ } catch (e) { -+ return true; -+ } -+ } -+ - _updateIconScale() { - const {ControlsState} = OverviewControls; - const {currentState, initialState, finalState} = --- -2.44.0 - diff --git a/gnome-shell.spec b/gnome-shell.spec index 9047a43..50caac8 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -34,7 +34,6 @@ Patch: 0001-extensionDownloader-Refuse-to-override-system-extens.patch # Misc. Patch: 0001-app-Fall-back-to-window-title-instead-of-WM_CLASS.patch -Patch: 0001-windowPreview-Override-with-window-icon-if-available.patch Patch: 0001-windowMenu-Bring-back-workspaces-submenu-for-static-.patch Patch: 0001-main-Dump-stack-on-segfaults-by-default.patch Patch: 0001-st-texture-cache-purge-on-resume.patch