🔀 Merge pull request #496 from Schneegans/feature/gnome-48

This commit is contained in:
Simon Schneegans
2025-02-16 07:10:35 +01:00
committed by GitHub
3 changed files with 21 additions and 6 deletions
+1
View File
@@ -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!
+1 -1
View File
@@ -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
}
+19 -5
View File
@@ -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';
@@ -115,8 +116,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 +163,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');
@@ -178,7 +190,9 @@ 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