Do not take decoration shadows into account when placing popups
This commit is contained in:
parent
58b1ec4bdf
commit
11c7783e95
@ -0,0 +1,28 @@
|
|||||||
|
From a4a41fdb2d116f15d7cec4c3fe9d23ef16deb1aa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Grulich <jgrulich@redhat.com>
|
||||||
|
Date: Fri, 29 Jul 2022 11:47:02 +0200
|
||||||
|
Subject: [PATCH] Client: do not take decoration shadows into account when placing popups
|
||||||
|
|
||||||
|
The anchor rectangle is relative to the window geometry, which according
|
||||||
|
to xdg-shell specs shouldn't include invisible portions like shadows.
|
||||||
|
This causes all popups be wrongly positioned when drop-shadows are used.
|
||||||
|
|
||||||
|
Pick-to: 6.4 6.3 6.2
|
||||||
|
Change-Id: Iac30ab264599f9898f3ddecd7f0c5f2aca824ad6
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
|
||||||
|
index e3dee44..c4b1942 100644
|
||||||
|
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
|
||||||
|
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
|
||||||
|
@@ -410,8 +410,8 @@
|
||||||
|
QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
|
||||||
|
transientPos -= parent->geometry().topLeft();
|
||||||
|
if (parent->decoration()) {
|
||||||
|
- transientPos.setX(transientPos.x() + parent->decoration()->margins().left());
|
||||||
|
- transientPos.setY(transientPos.y() + parent->decoration()->margins().top());
|
||||||
|
+ transientPos.setX(transientPos.x() + parent->decoration()->margins(QWaylandAbstractDecoration::ShadowsExcluded).left());
|
||||||
|
+ transientPos.setY(transientPos.y() + parent->decoration()->margins(QWaylandAbstractDecoration::ShadowsExcluded).top());
|
||||||
|
}
|
||||||
|
positioner->set_anchor_rect(transientPos.x(), transientPos.y(), 1, 1);
|
||||||
|
positioner->set_anchor(QtWayland::xdg_positioner::anchor_top_left);
|
@ -11,7 +11,7 @@
|
|||||||
Summary: Qt6 - Wayland platform support and QtCompositor module
|
Summary: Qt6 - Wayland platform support and QtCompositor module
|
||||||
Name: qt6-%{qt_module}
|
Name: qt6-%{qt_module}
|
||||||
Version: 6.3.1
|
Version: 6.3.1
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
|
|
||||||
License: LGPLv3
|
License: LGPLv3
|
||||||
Url: http://www.qt.io
|
Url: http://www.qt.io
|
||||||
@ -26,6 +26,7 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submod
|
|||||||
|
|
||||||
# Upstream patches
|
# Upstream patches
|
||||||
Patch100: 0100-Keep-toplevel-windows-in-the-top-left-corner-of-the-screen.patch
|
Patch100: 0100-Keep-toplevel-windows-in-the-top-left-corner-of-the-screen.patch
|
||||||
|
Patch101: 0101-client-do-not-take-decoration-shadows-into-account-when-placing-popups.patch
|
||||||
|
|
||||||
# Upstreamable patches
|
# Upstreamable patches
|
||||||
|
|
||||||
@ -174,6 +175,9 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 29 2022 Jan Grulich <jgrulich@redhat.com> - 6.3.1-4
|
||||||
|
- Do not take decoration shadows into account when placing popups
|
||||||
|
|
||||||
* Tue Jul 26 2022 Jan Grulich <jgrulich@redhat.com> - 6.3.1-3
|
* Tue Jul 26 2022 Jan Grulich <jgrulich@redhat.com> - 6.3.1-3
|
||||||
- Keep toplevel windows in the top left corner of the screen
|
- Keep toplevel windows in the top left corner of the screen
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user