I waited long enough, time to push the fix for issue #3 (works for me (tm))
This commit is contained in:
parent
bd8b76ce0e
commit
d62524f0ea
|
@ -63,15 +63,15 @@ end
|
||||||
local function cache_pixmap(item)
|
local function cache_pixmap(item)
|
||||||
item._internal.pix_cache = {}
|
item._internal.pix_cache = {}
|
||||||
item.widget._draw = item.widget.draw
|
item.widget._draw = item.widget.draw
|
||||||
item.widget.draw = function(self,wibox, cr, width, height)
|
item.widget.draw = function(self,w, cr, width, height)
|
||||||
if not wibox.visible or item._hidden then return end
|
if not w.visible or item._hidden then return end
|
||||||
if item._internal.pix_cache[10*width+7*height+(item.selected and 8888 or 999)] then
|
if item._internal.pix_cache[10*width+7*height+(item.selected and 8888 or 999)] then
|
||||||
cr:set_source_surface(item._internal.pix_cache[10*width+7*height+(item.selected and 8888 or 999)])
|
cr:set_source_surface(item._internal.pix_cache[10*width+7*height+(item.selected and 8888 or 999)])
|
||||||
cr:paint()
|
cr:paint()
|
||||||
else
|
else
|
||||||
local img5 = cairo.ImageSurface.create(cairo.Format.ARGB32, width, height)
|
local img5 = cairo.ImageSurface.create(cairo.Format.ARGB32, width, height)
|
||||||
local cr5 = cairo.Context(img5)
|
local cr5 = cairo.Context(img5)
|
||||||
item.widget._draw(self,wibox, cr5, width, height)
|
item.widget._draw(self,w, cr5, width, height)
|
||||||
cr:set_source_surface(img5)
|
cr:set_source_surface(img5)
|
||||||
cr:paint()
|
cr:paint()
|
||||||
item._internal.pix_cache[10*width+7*height+(item.selected and 8888 or 999)] = img5
|
item._internal.pix_cache[10*width+7*height+(item.selected and 8888 or 999)] = img5
|
||||||
|
@ -141,7 +141,7 @@ function module:setup_item(data,item,args)
|
||||||
|
|
||||||
item._private_data._fit = wibox.widget.background.fit
|
item._private_data._fit = wibox.widget.background.fit
|
||||||
item._internal.margin_w.fit = function(...)
|
item._internal.margin_w.fit = function(...)
|
||||||
if not data.visible or (item.visible == false or item._filter_out == true or item._hidden == true) then
|
if (item.visible == false or item._filter_out == true or item._hidden == true) then
|
||||||
return 0,0
|
return 0,0
|
||||||
end
|
end
|
||||||
return data._internal.layout.item_fit(data,item,...)
|
return data._internal.layout.item_fit(data,item,...)
|
||||||
|
|
Loading…
Reference in New Issue