diff --git a/build-utils/lgi-check.sh b/build-utils/lgi-check.sh index 340eea92..96bab290 100755 --- a/build-utils/lgi-check.sh +++ b/build-utils/lgi-check.sh @@ -25,7 +25,8 @@ die() lua -e 'require("lgi")' || die # Check the version number -lua -e 'if tonumber(string.match(require("lgi.version"), "(%d%.%d)")) <= 0.5 then error("lgi too old, need at least version 0.6.1") end' || die +# Keep this in sync with lib/gears/surface.lua.in! +lua -e 'if tonumber(string.match(require("lgi.version"), "(%d%.%d)")) < 0.7 then error("lgi too old, need at least version 0.7.0") end' || die # Check for the needed gi files lua -e 'l = require("lgi") assert(l.cairo, l.Pango, l.PangoCairo)' || die diff --git a/lib/gears/surface.lua.in b/lib/gears/surface.lua.in index 7ad9e1f3..023703fd 100644 --- a/lib/gears/surface.lua.in +++ b/lib/gears/surface.lua.in @@ -9,11 +9,10 @@ local type = type local capi = { awesome = awesome } local cairo = require("lgi").cairo --- This checks for '<= 0.5' because there are git versions after 0.6 which still --- identify themselves as 0.6 but already have the needed cairo support -local ver_major,ver_minor = string.match(require('lgi.version'),'(%d)%.(%d)') -if ( (tonumber(ver_major)<=0) and (tonumber(ver_minor)<=5) ) then - error("lgi too old, need at least version 0.6.1") +-- Keep this in sync with build-utils/lgi-check.sh! +local ver_major, ver_minor = string.match(require('lgi.version'), '(%d)%.(%d)') +if tonumber(ver_major) <= 0 and tonumber(ver_minor) < 7 then + error("lgi too old, need at least version 0.7.0") end -- gears.surface