From aedcd0c05ce04d25a91889caa17953b82b0acfb5 Mon Sep 17 00:00:00 2001 From: Yauhen Kirylau Date: Sun, 10 Oct 2021 01:36:17 +0200 Subject: [PATCH] test(screenshots, spawn): require exact major gtk/gdk versions (#3460) --- tests/test-screenshot.lua | 9 +++++---- tests/test-spawn.lua | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test-screenshot.lua b/tests/test-screenshot.lua index 34f812f8f..e87446c30 100644 --- a/tests/test-screenshot.lua +++ b/tests/test-screenshot.lua @@ -4,9 +4,9 @@ local wibox = require("wibox") local spawn = require("awful.spawn") local gsurface = require("gears.surface") -local lgi = require 'lgi' +local lgi = require('lgi') local cairo = lgi.cairo -local gdk = lgi.Gdk +local gdk = lgi.require('Gdk', '3.0') -- Dummy blue client for the client.content test -- the lua_executable portion may need to get ironed out. I need to specify 5.3 @@ -16,8 +16,9 @@ if lua_executable == nil or lua_executable == "" then end local client_dim = 250 local tiny_client_code_template = [[ -local Gtk = require('lgi').Gtk -local Gdk = require('lgi').Gdk +local lgi = require('lgi') +local Gdk = lgi.require('Gdk', '3.0') +local Gtk = lgi.require('Gtk', '3.0') local class = 'client' window = Gtk.Window {default_width=%d, default_height=%d, title='title'} window:set_wmclass(class, class) diff --git a/tests/test-spawn.lua b/tests/test-spawn.lua index 6bcf3faf7..71b901929 100644 --- a/tests/test-spawn.lua +++ b/tests/test-spawn.lua @@ -18,7 +18,7 @@ local exit_yay, exit_snd = nil, nil local tiny_client = function(class) return { lua_executable, "-e", [[ local lgi = require 'lgi' -local Gtk = lgi.require('Gtk') +local Gtk = lgi.require('Gtk', '3.0') local class = ']]..class..[[' Gtk.init()