summaryrefslogtreecommitdiffstats
path: root/vcl/qt5/QtFrame.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:04 +0000
commiteb358d77291eba677141bab113dc27d7aabb0f3e (patch)
tree2e96f3b5d0c79beaeb536bbf05c3b8564846e65f /vcl/qt5/QtFrame.cxx
parentAdding debian version 4:24.2.1-4. (diff)
downloadlibreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.tar.xz
libreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.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.cxx14
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*) {}