From 06dd8d3a3949a164525553c5aebeafedea71a15c Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Thu, 22 Sep 2022 17:22:23 +0200 Subject: [PATCH] Fix window content geometry for Qt5 when shadows are enabled --- ...nt-geometry-for-qt5-when-shadows-are-enabled.patch | 11 +++++++++++ qgnomeplatform.spec | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 qgnomeplatform-fix-window-content-geometry-for-qt5-when-shadows-are-enabled.patch diff --git a/qgnomeplatform-fix-window-content-geometry-for-qt5-when-shadows-are-enabled.patch b/qgnomeplatform-fix-window-content-geometry-for-qt5-when-shadows-are-enabled.patch new file mode 100644 index 0000000..10b958c --- /dev/null +++ b/qgnomeplatform-fix-window-content-geometry-for-qt5-when-shadows-are-enabled.patch @@ -0,0 +1,11 @@ +--- a/src/decoration/qgnomeplatformdecoration.cpp ++++ b/src/decoration/qgnomeplatformdecoration.cpp +@@ -620,7 +620,7 @@ bool QGnomePlatformDecoration::handleTouch(QWaylandInputDevice *inputDevice, + + QRect QGnomePlatformDecoration::windowContentGeometry() const + { +-#if QT_VERSION >= 0x060000 ++#if DECORATION_SHADOWS_SUPPORT + return waylandWindow()->windowContentGeometry() + margins(ShadowsOnly); + #else + return waylandWindow()->windowContentGeometry(); diff --git a/qgnomeplatform.spec b/qgnomeplatform.spec index 6166460..470184c 100644 --- a/qgnomeplatform.spec +++ b/qgnomeplatform.spec @@ -1,6 +1,6 @@ Name: qgnomeplatform Version: 0.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Qt Platform Theme aimed to accommodate Gnome settings License: LGPLv2+ @@ -8,6 +8,7 @@ URL: https://github.com/FedoraQt/QGnomePlatform Source0: https://github.com/FedoraQt/QGnomePlatform/archive/%{version}/QGnomePlatform-%{version}.tar.gz # Upstream patches +Patch0: qgnomeplatform-fix-window-content-geometry-for-qt5-when-shadows-are-enabled.patch BuildRequires: make BuildRequires: pkgconfig(gio-2.0) @@ -103,6 +104,9 @@ modifying them - making them fit into the environment as well as possible. %{_qt6_plugindir}/wayland-decoration-client/libqgnomeplatformdecoration.so %changelog +* Thu Sep 22 2022 Jan Grulich - 0.9.0-2 +- Fix window content geometry for Qt5 when shadows are enabled + * Wed Sep 21 2022 Jan Grulich - 0.9.0-1 - 0.9.0