From 34b6cd0beae9b712fb3f0402d83a45d99198b729 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Mon, 8 Nov 2021 05:19:32 +0100 Subject: [PATCH] magnifier: Disable desaturation effect when not in use The desaturation effect was always enabled, regardless of the specified factor. This was causing the magnifier to always hit offscreen rendering, even when not necessary. Additionally offscreen rendering is currently also causing glitches in MetaWindowGroup which this helps to avoid in some cases. Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/1678 Part-of: --- js/ui/magnifier.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 180df2546..2443248d3 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -1898,6 +1898,7 @@ var MagShaderEffects = class MagShaderEffects { this._colorDesaturation = new Clutter.DesaturateEffect(); this._inverse.set_enabled(false); this._brightnessContrast.set_enabled(false); + this._colorDesaturation.set_enabled(false); this._magView = uiGroupClone; this._magView.add_effect(this._inverse); @@ -1930,6 +1931,7 @@ var MagShaderEffects = class MagShaderEffects { setColorSaturation(factor) { this._colorDesaturation.set_factor(1.0 - factor); + this._colorDesaturation.set_enabled(factor !== 1.0); } /**