naughty: Use oocairo instead of image
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
6f5862a2de
commit
f4d37f74d3
|
@ -15,7 +15,7 @@ local capi = { screen = screen,
|
||||||
dbus = dbus,
|
dbus = dbus,
|
||||||
widget = widget,
|
widget = widget,
|
||||||
wibox = wibox,
|
wibox = wibox,
|
||||||
image = image,
|
oocairo = oocairo,
|
||||||
timer = timer }
|
timer = timer }
|
||||||
local button = require("awful.button")
|
local button = require("awful.button")
|
||||||
local util = require("awful.util")
|
local util = require("awful.util")
|
||||||
|
@ -385,7 +385,7 @@ function notify(args)
|
||||||
iconbox:buttons(util.table.join(button({ }, 1, run), button({ }, 3, die)))
|
iconbox:buttons(util.table.join(button({ }, 1, run), button({ }, 3, die)))
|
||||||
local img
|
local img
|
||||||
if type(icon) == "string" then
|
if type(icon) == "string" then
|
||||||
img = capi.image(icon)
|
img = capi.oocairo.image_surface_create_from_png(icon)
|
||||||
else
|
else
|
||||||
img = icon
|
img = icon
|
||||||
end
|
end
|
||||||
|
@ -516,7 +516,7 @@ if capi.dbus then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if imgdata then
|
if imgdata then
|
||||||
args.icon = capi.image.argb32(hints.icon_data[1], hints.icon_data[2], imgdata)
|
args.icon = capi.oocairo.image.surface_create_from_data(imgdata, "argb32", hints.icon_data[1], hints.icon_data[2], hints.icon_data[1] * 4)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if replaces_id and replaces_id ~= "" and replaces_id ~= 0 then
|
if replaces_id and replaces_id ~= "" and replaces_id ~= 0 then
|
||||||
|
|
Loading…
Reference in New Issue