Fix regression Awesome git-master with lua 5.1

This commit is contained in:
Emmanuel Lepage Vallee 2015-12-26 06:53:12 -05:00
parent c9c0516ed5
commit fb29fa2801
4 changed files with 6 additions and 6 deletions

View File

@ -70,8 +70,8 @@ local function display_wiboxes(cltbl,geomtbl,float,swap,c)
local same, center = fc == next_clients,k==5
local geo = center and fc:geometry() or next_clients:geometry()
wiboxes[v].visible = true
wiboxes[v].x = (swap and float and (not center)) and (geo.x + (k>2 and (geo.width/2) or 0) + (k==2 and geo.width or 0) - 75/2) or (geo.x + geo.width/2 - 75/2)
wiboxes[v].y = (swap and float and (not center)) and (geo.y + (k<=2 and geo.height/2 or 0) + (k==4 and geo.height or 0) - 75/2) or (geo.y + geo.height/2 - 75/2)
wiboxes[v].x = math.floor((swap and float and (not center)) and (geo.x + (k>2 and (geo.width/2) or 0) + (k==2 and geo.width or 0) - 75/2) or (geo.x + geo.width/2 - 75/2))
wiboxes[v].y = math.floor((swap and float and (not center)) and (geo.y + (k<=2 and geo.height/2 or 0) + (k==4 and geo.height or 0) - 75/2) or (geo.y + geo.height/2 - 75/2))
else
wiboxes[v].visible = false
end

View File

@ -64,7 +64,7 @@ local function draw_shape(s,collection,current_idx,icon_f,y,text_height)
end
-- Resize the wibox
w.x,w.y,w.width,w.height = geo.x,y or (wa.y+wa.height) - margin - height,geo.width,height
w.x,w.y,w.width,w.height = math.floor(geo.x),math.floor(y or (wa.y+wa.height) - margin - height),math.floor(geo.width),math.floor(height)
local img = cairo.ImageSurface(cairo.Format.ARGB32, geo.width,geo.height)
local img3 = cairo.ImageSurface(cairo.Format.ARGB32, geo.width,geo.height)

View File

@ -112,7 +112,7 @@ function module.display(c,toggle)
end
for k,v in ipairs(values) do
local w,pos = indicators[v],placement_f[v](c:geometry())
w.x,w.y,w.visible = pos.x - 20,pos.y - 20,true
w.x,w.y,w.visible = math.floor(pos.x - 20), math.floor(pos.y - 20),true
end
end

View File

@ -60,8 +60,8 @@ local function create_shape_bounding(wa)
local w = wibox{}
w.width = size
w.height = size
w.x=wa.x+wa.width/2-size/2
w.y=wa.y+wa.height/2-size/2
w.x= math.floor(wa.x+wa.width/2-size/2)
w.y= math.floor(wa.y+wa.height/2-size/2)
w.ontop = true
if not shape then
shape = cairo.ImageSurface(cairo.Format.ARGB32, size, size)