fix xorg crash when n.timeout == 0 in arcchart max_value
This commit is contained in:
@@ -161,6 +161,11 @@ naughty.connect_signal(
|
|||||||
widget = naughty.list.actions
|
widget = naughty.list.actions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local arc_start = n.timeout
|
||||||
|
if n.timeout == 0 then
|
||||||
|
arc_start = 10
|
||||||
|
end
|
||||||
|
|
||||||
local w_template = wibox.widget {
|
local w_template = wibox.widget {
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -218,8 +223,8 @@ naughty.connect_signal(
|
|||||||
start_angle = 4.71239,
|
start_angle = 4.71239,
|
||||||
thickness = dpi(2),
|
thickness = dpi(2),
|
||||||
min_value = 0,
|
min_value = 0,
|
||||||
max_value = n.timeout or 10,
|
max_value = arc_start,
|
||||||
value = n.timeout or 10,
|
value = arc_start,
|
||||||
widget = wibox.container.arcchart,
|
widget = wibox.container.arcchart,
|
||||||
id = "arc_chart"
|
id = "arc_chart"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user