gears.color.create_opaque_pattern: Fix for SurfacePatterns (FS#1236)

Sorry!

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-03-23 21:51:29 +01:00
parent b4c83d0e70
commit 1847b0ae1f
1 changed files with 2 additions and 1 deletions

View File

@ -219,7 +219,8 @@ function color.create_opaque_pattern(col)
end end
return pattern return pattern
elseif type == "SURFACE" then 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 -- The surface has an alpha channel which *might* be non-opaque
return return
end end