Fix regression Awesome git-master with lua 5.1
This commit is contained in:
parent
c9c0516ed5
commit
fb29fa2801
|
@ -70,8 +70,8 @@ local function display_wiboxes(cltbl,geomtbl,float,swap,c)
|
||||||
local same, center = fc == next_clients,k==5
|
local same, center = fc == next_clients,k==5
|
||||||
local geo = center and fc:geometry() or next_clients:geometry()
|
local geo = center and fc:geometry() or next_clients:geometry()
|
||||||
wiboxes[v].visible = true
|
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].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 = (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].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
|
else
|
||||||
wiboxes[v].visible = false
|
wiboxes[v].visible = false
|
||||||
end
|
end
|
||||||
|
|
2
max.lua
2
max.lua
|
@ -64,7 +64,7 @@ local function draw_shape(s,collection,current_idx,icon_f,y,text_height)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Resize the wibox
|
-- 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 img = cairo.ImageSurface(cairo.Format.ARGB32, geo.width,geo.height)
|
||||||
local img3 = cairo.ImageSurface(cairo.Format.ARGB32, geo.width,geo.height)
|
local img3 = cairo.ImageSurface(cairo.Format.ARGB32, geo.width,geo.height)
|
||||||
|
|
|
@ -112,7 +112,7 @@ function module.display(c,toggle)
|
||||||
end
|
end
|
||||||
for k,v in ipairs(values) do
|
for k,v in ipairs(values) do
|
||||||
local w,pos = indicators[v],placement_f[v](c:geometry())
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,8 @@ local function create_shape_bounding(wa)
|
||||||
local w = wibox{}
|
local w = wibox{}
|
||||||
w.width = size
|
w.width = size
|
||||||
w.height = size
|
w.height = size
|
||||||
w.x=wa.x+wa.width/2-size/2
|
w.x= math.floor(wa.x+wa.width/2-size/2)
|
||||||
w.y=wa.y+wa.height/2-size/2
|
w.y= math.floor(wa.y+wa.height/2-size/2)
|
||||||
w.ontop = true
|
w.ontop = true
|
||||||
if not shape then
|
if not shape then
|
||||||
shape = cairo.ImageSurface(cairo.Format.ARGB32, size, size)
|
shape = cairo.ImageSurface(cairo.Format.ARGB32, size, size)
|
||||||
|
|
Loading…
Reference in New Issue