From d9c918c14a75d8ad837037b9616960ed018a47da Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 27 Mar 2016 11:29:28 +0200 Subject: [PATCH] wibox.drawable: Stop caching the wallpaper The C code now does this for us. Signed-off-by: Uli Schlachter --- lib/wibox/drawable.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/wibox/drawable.lua b/lib/wibox/drawable.lua index 341505e6..cf6682e2 100644 --- a/lib/wibox/drawable.lua +++ b/lib/wibox/drawable.lua @@ -24,7 +24,6 @@ local hierarchy = require("wibox.hierarchy") local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1) local drawables = setmetatable({}, { __mode = 'k' }) -local wallpaper = nil -- This is awful.screen.getbycoord() which we sadly cannot use from here (cyclic -- dependencies are bad!) @@ -113,9 +112,7 @@ local function do_redraw(self) if not capi.awesome.composite_manager_running then -- This is pseudo-transparency: We draw the wallpaper in the background - if not wallpaper then - wallpaper = surface.load_silently(capi.root.wallpaper(), false) - end + local wallpaper = surface.load_silently(capi.root.wallpaper(), false) if wallpaper then cr.operator = cairo.Operator.SOURCE cr:set_source_surface(wallpaper, -x, -y) @@ -426,7 +423,6 @@ end -- Redraw all drawables when the wallpaper changes capi.awesome.connect_signal("wallpaper_changed", function() - wallpaper = nil for k in pairs(drawables) do k() end