Merge pull request #3297 from actionless/dont-crash-when-gtk4-installed

fix(beautiful: gtk): don't crash when both gtk3 and gtk4 are installed
This commit is contained in:
mergify[bot] 2021-03-29 15:49:37 +00:00 committed by GitHub
commit 95558ac919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,8 @@ function gtk.get_theme_variables()
local result = {} local result = {}
local _gtk_status, Gtk = pcall(function() local _gtk_status, Gtk = pcall(function()
return require('lgi').Gtk local lgi = require('lgi')
return lgi.require('Gtk', '3.0')
end) end)
if not _gtk_status or not Gtk then if not _gtk_status or not Gtk then
gears_debug.print_warning( gears_debug.print_warning(