backport  1d85ab27a7e and ba128eea from cairocanvas branch to remove GIO (possible hotfix release)