[gnome-shell/gnome-40] magnifier: Disable desaturation effect when not in use
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-40] magnifier: Disable desaturation effect when not in use
- Date: Sat, 11 Dec 2021 16:25:03 +0000 (UTC)
commit e6fd6cceec845ab108250ef4710a21e74975116e
Author: Sebastian Keller <skeller gnome org>
Date: Mon Nov 8 05:19:32 2021 +0100
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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2026>
(cherry picked from commit 34b6cd0beae9b712fb3f0402d83a45d99198b729)
js/ui/magnifier.js | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index 11fde37e2d..4c2e88f1a7 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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]