From 5195cb6981e8570ab6cbe0fcb18f2fe256101613 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 15 Feb 2025 16:29:00 +0100 Subject: [PATCH 1/5] :tada: Claim support for GNOME 48 --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index db6b0cf..8d7ef22 100644 --- a/metadata.json +++ b/metadata.json @@ -9,7 +9,7 @@ }, "gettext-domain": "burn-my-windows", "settings-schema": "org.gnome.shell.extensions.burn-my-windows", - "shell-version": ["45", "46", "47"], + "shell-version": ["45", "46", "47", "48"], "url": "https://github.com/Schneegans/Burn-My-Windows", "version": 45 } From 7ace136e4fce944b16299ee4cfaa4ad3ec419b3f Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 15 Feb 2025 16:55:20 +0100 Subject: [PATCH 2/5] :wrench: Use global.compositor.enable_unredirect on GNOME 48 --- src/Shader.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Shader.js b/src/Shader.js index 3617622..e454345 100644 --- a/src/Shader.js +++ b/src/Shader.js @@ -115,8 +115,14 @@ export var Shader = GObject.registerClass({ this._timeline.set_duration(duration); this._timeline.start(); - // Make sure that no fullscreen window is drawn over our animations. - Meta.disable_unredirect_for_display(global.display); + // Make sure that no fullscreen window is drawn over our animations. Since GNOME 48 this is a + // "global" method. + if (Meta.disable_unredirect_for_display) { + Meta.disable_unredirect_for_display(global.display); + } else { + global.compositor.disable_unredirect(); + } + global.begin_work(); // Reset progress value. @@ -156,8 +162,13 @@ export var Shader = GObject.registerClass({ return; } - // Restore unredirecting behavior for fullscreen windows. - Meta.enable_unredirect_for_display(global.display); + // Restore unredirecting behavior for fullscreen windows. Since GNOME 48 this is a + // "global" method. + if (Meta.disable_unredirect_for_display) { + Meta.enable_unredirect_for_display(global.display); + } else { + global.compositor.enable_unredirect(); + } global.end_work(); this.emit('end-animation'); From 15ac37f746b56778871325f3027f4b50975db5d2 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 15 Feb 2025 16:55:44 +0100 Subject: [PATCH 3/5] :wrench: Use Cogl.SnippetHook on GNOME 48 --- src/Shader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Shader.js b/src/Shader.js index e454345..4b2af0c 100644 --- a/src/Shader.js +++ b/src/Shader.js @@ -16,6 +16,7 @@ import Gio from 'gi://Gio'; import Shell from 'gi://Shell'; +import Cogl from 'gi://Cogl'; import GObject from 'gi://GObject'; import Clutter from 'gi://Clutter'; import Meta from 'gi://Meta'; @@ -189,7 +190,7 @@ export var Shader = GObject.registerClass({ const declarations = code.substr(0, match.index); const main = match[1]; - this.add_glsl_snippet(Shell.SnippetHook.FRAGMENT, declarations, main, true); + this.add_glsl_snippet(Cogl.SnippetHook ? Cogl.SnippetHook.FRAGMENT : Shell.SnippetHook.FRAGMENT, declarations, main, true); } // We use this vfunc to trigger the update as it allows calling this.get_pipeline() in From b6dc234d3f1ff9c033e93f55d63b2e481c250296 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 15 Feb 2025 16:59:17 +0100 Subject: [PATCH 4/5] :sparkles: Apply clang-format --- src/Shader.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Shader.js b/src/Shader.js index 4b2af0c..fa5ba48 100644 --- a/src/Shader.js +++ b/src/Shader.js @@ -116,8 +116,8 @@ export var Shader = GObject.registerClass({ this._timeline.set_duration(duration); this._timeline.start(); - // Make sure that no fullscreen window is drawn over our animations. Since GNOME 48 this is a - // "global" method. + // Make sure that no fullscreen window is drawn over our animations. Since GNOME 48 + // this is a "global" method. if (Meta.disable_unredirect_for_display) { Meta.disable_unredirect_for_display(global.display); } else { @@ -190,7 +190,9 @@ export var Shader = GObject.registerClass({ const declarations = code.substr(0, match.index); const main = match[1]; - this.add_glsl_snippet(Cogl.SnippetHook ? Cogl.SnippetHook.FRAGMENT : Shell.SnippetHook.FRAGMENT, declarations, main, true); + this.add_glsl_snippet( + Cogl.SnippetHook ? Cogl.SnippetHook.FRAGMENT : Shell.SnippetHook.FRAGMENT, + declarations, main, true); } // We use this vfunc to trigger the update as it allows calling this.get_pipeline() in From 79101847e1ce71b27ef404f23a28d69d3084e991 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 15 Feb 2025 17:32:37 +0100 Subject: [PATCH 5/5] :memo: Add changelog entry --- docs/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.md b/docs/changelog.md index b3c3844..0f21e2a 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -11,6 +11,7 @@ SPDX-License-Identifier: CC-BY-4.0 #### New Features +- **Support for GNOME 48!** The extension has been updated to work with GNOME 48. - **New Effect: Aura Glow!** This effect adds a glowing aura to your windows. Thanks to [@jgarza9788](https://github.com/jgarza9788) for this contribution! - **New Effect: Mushroom!** This overly ridiculous effect is inspired by the animation of Super Mario when he eats a mushroom. Thanks again to [@jgarza9788](https://github.com/jgarza9788) for this contribution! - **New Effect: RGB Warp!** This effect warps the colors of your windows separating the color channels. Thanks once more to [@jgarza9788](https://github.com/jgarza9788) for this contribution!