From 1847b0ae1f67c75b18afdee7b45a55535c79bc96 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 23 Mar 2014 21:51:29 +0100 Subject: [PATCH] gears.color.create_opaque_pattern: Fix for SurfacePatterns (FS#1236) Sorry! Signed-off-by: Uli Schlachter --- lib/gears/color.lua.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gears/color.lua.in b/lib/gears/color.lua.in index 8c14b8c1..d3c30135 100644 --- a/lib/gears/color.lua.in +++ b/lib/gears/color.lua.in @@ -219,7 +219,8 @@ function color.create_opaque_pattern(col) end return pattern elseif type == "SURFACE" then - if pattern:get_surface():get_content() ~= "COLOR" then + local status, surface = pattern:get_surface() + if status ~= "SUCCESS" or surface.content ~= "COLOR" then -- The surface has an alpha channel which *might* be non-opaque return end