From 390bf049f2dc7e0013a87935fb6c4cf53d75b6d6 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 27 Jul 2025 14:40:01 +0200 Subject: [PATCH] Don't set window icon on Wayland Fixes #1753 --- src/core/mainwindow.cpp | 4 +++- src/main.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/mainwindow.cpp b/src/core/mainwindow.cpp index e10e6fc69..e1248547b 100644 --- a/src/core/mainwindow.cpp +++ b/src/core/mainwindow.cpp @@ -403,7 +403,9 @@ MainWindow::MainWindow(Application *app, // Initialize the UI ui_->setupUi(this); - setWindowIcon(IconLoader::Load(u"strawberry"_s)); + if (QGuiApplication::platformName() != "wayland"_L1) { + setWindowIcon(IconLoader::Load(u"strawberry"_s)); + } QObject::connect(&*app->database(), &Database::Error, this, &MainWindow::ShowErrorDialog); diff --git a/src/main.cpp b/src/main.cpp index dc632b762..e1a3e690b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -206,7 +206,9 @@ int main(int argc, char *argv[]) { QThread::currentThread()->setObjectName(u"Main"_s); - QGuiApplication::setWindowIcon(IconLoader::Load(u"strawberry"_s)); + if (QGuiApplication::platformName() != "wayland"_L1) { + QGuiApplication::setWindowIcon(IconLoader::Load(u"strawberry"_s)); + } #if defined(USE_BUNDLE) qLog(Debug) << "Looking for resources in" << QCoreApplication::libraryPaths();