mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
gears.surface: Add a version check for lgi
The cairo bindings are quite new in lgi and thus we depend on a quite new version of lgi. Older versions will fail with lots of weird errors, e.g.: lib/gears/color.lua:61:attempt to call field 'create_rgba' (a nil value) Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
ab7788e2f5
commit
ca2fc7811a
1 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,10 @@ local type = type
|
||||||
local capi = { awesome = awesome }
|
local capi = { awesome = awesome }
|
||||||
local cairo = require("lgi").cairo
|
local cairo = require("lgi").cairo
|
||||||
|
|
||||||
|
if tonumber(require("lgi.version")) <= 0.5 then
|
||||||
|
error("lgi too old, need at least version 0.7 (not yet released?) or recent git")
|
||||||
|
end
|
||||||
|
|
||||||
module("gears.surface")
|
module("gears.surface")
|
||||||
|
|
||||||
--- Try to convert the argument into an lgi cairo surface.
|
--- Try to convert the argument into an lgi cairo surface.
|
||||||
|
|
Loading…
Reference in a new issue