diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:47 +0000 |
commit | 91fe6b97952aa6f7cef58327fd085a17db38ad95 (patch) | |
tree | 7a4412295bfb80e15a4936fe67d4bd7b96458ce8 /vcl/qt5/QtFrame.cxx | |
parent | Releasing progress-linux version 4:24.2.1-4~progress7.99u1. (diff) | |
download | libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.tar.xz libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.zip |
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vcl/qt5/QtFrame.cxx')
-rw-r--r-- | vcl/qt5/QtFrame.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index 24dcb5ff6f..6aff814aac 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -376,6 +376,20 @@ void QtFrame::SetIcon(sal_uInt16 nIcon) QIcon aIcon = QIcon::fromTheme(appicon); m_pQWidget->window()->setWindowIcon(aIcon); + + if (QGuiApplication::platformName() == "wayland" && m_pQWidget->window()->isVisible()) + { + // Qt currently doesn't provide API to directly set the app_id for a single + // window/toplevel on Wayland, but the one set for the application is picked up + // on hide/show, so do that. + // An alternative would be to use private Qt API and low-level wayland API to set the + // app_id directly, s. discussion in QTBUG-77182. + const QString sOrigDesktopFileName = QGuiApplication::desktopFileName(); + QGuiApplication::setDesktopFileName(appicon); + m_pQWidget->window()->hide(); + m_pQWidget->window()->show(); + QGuiApplication::setDesktopFileName(sOrigDesktopFileName); + } } void QtFrame::SetMenu(SalMenu*) {} |