From 7ace136e4fce944b16299ee4cfaa4ad3ec419b3f Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 15 Feb 2025 16:55:20 +0100 Subject: [PATCH] :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');