From 45195d5bd6fc2f5bf79e64fd66da2c97f3132641 Mon Sep 17 00:00:00 2001 From: Travis McLane Date: Tue, 28 May 2024 11:06:30 -0500 Subject: [PATCH] linux: theme handling bugfix (#3515) * linux: theme handling bugfix * update changelog --- mkdocs-website/docs/en/changelog.md | 1 + v3/pkg/application/application_linux.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 44ad3cf6c..3eae5829e 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- [linux] Fixed theme handling error on NixOS by [tmclane](https://github.com/tmclane) in [#3515)(https://github.com/wailsapp/wails/pull/3515) - Fixed cross volume project install for windows by [atterpac](https://github.com/atterac) in [#3512](https://github.com/wailsapp/wails/pull/3512) - Fixed react template css to show footer by [atterpac](https://github.com/atterpac) in [#3477](https://github.com/wailsapp/wails/pull/3477) - Fixed zombie processes when working in devmode by updating to latest refresh by [Atterpac](https://github.com/atterpac) in [#3320](https://github.com/wailsapp/wails/pull/3320). diff --git a/v3/pkg/application/application_linux.go b/v3/pkg/application/application_linux.go index e7d681692..064b6e00c 100644 --- a/v3/pkg/application/application_linux.go +++ b/v3/pkg/application/application_linux.go @@ -156,10 +156,10 @@ func (a *linuxApp) monitorThemeChanges() { if len(body) < 2 { return "", false } - if body[0].(string) != "org.gnome.desktop.interface" { + if entry, ok := body[0].(string); !ok || entry != "org.gnome.desktop.interface" { return "", false } - if body[1].(string) == "color-scheme" { + if entry, ok := body[1].(string); ok && entry == "color-scheme" { return body[2].(dbus.Variant).Value().(string), true } return "", false