summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2024-01-04 21:02:33 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-01-10 17:58:19 +0000
commit60fff186b71d275daf14279de2e7a44353c9ead8 (patch)
treeb999e36b2eb190c3a8ef75e9a4613aa0d8f0cd93
parentad66549af6e19fabd48f7517c0c9f18cfb2332ec (diff)
QWaylandWindow: Update decoration when application palette/font changes
Ensures the decoration can redraw to adjust for the new colors/font. Pick-to: 6.6 6.5 Change-Id: Ib46acde1d14baafda49f379f8279c396bc976bdc Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit 48305b653580f60adfc9d8b9460a9d150769c834) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylandwindow.cpp11
-rw-r--r--src/client/qwaylandwindow_p.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index a6c0b97b7..b34e448b6 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -1788,6 +1788,17 @@ void QWaylandWindow::reinit()
}
}
+bool QWaylandWindow::windowEvent(QEvent *event)
+{
+ if (event->type() == QEvent::ApplicationPaletteChange
+ || event->type() == QEvent::ApplicationFontChange) {
+ if (mWindowDecorationEnabled && window()->isVisible())
+ mWindowDecoration->update();
+ }
+
+ return QPlatformWindow::windowEvent(event);
+}
+
}
QT_END_NAMESPACE
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 2f6d2921b..c2815cb8e 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -238,6 +238,8 @@ public:
virtual void reinit();
void reset();
+ bool windowEvent(QEvent *event) override;
+
public Q_SLOTS:
void applyConfigure();