From aae007193f974b13102696944414eaa6e5e55c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 27 Oct 2016 16:21:15 +0200 Subject: [PATCH] shaped-texture: Only mask alpha channel We currently apply the mask texture to any channel, which means elements drawn outside the actual decorations are blended with gray. This should hardly matter in practice where shadows can be expected to be some shade of gray, but let's still make sure the odd theme with pink shadows or the like works correctly by applying the alpha mask to the alpha channel only. https://bugzilla.gnome.org/show_bug.cgi?id=744667 --- src/compositor/meta-shaped-texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index 5b2630b87..76dc1f168 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -216,7 +216,8 @@ get_masked_pipeline (CoglContext *ctx) { template = cogl_pipeline_copy (get_base_pipeline (ctx)); cogl_pipeline_set_layer_combine (template, 1, - "RGBA = MODULATE (PREVIOUS, TEXTURE[A])", + "RGB = REPLACE (PREVIOUS)" + "A = MODULATE (PREVIOUS, TEXTURE)", NULL); }