From f274b6d9ef7425760f04294fed9ac43722ef8886 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 5 Feb 2018 19:00:41 -0600 Subject: [PATCH] Fix wrongly positioned popups (LP: #1527013). --- debian/changelog | 10 +++++++ .../fix-wrongly-positioned-popups.patch | 30 +++++++++++++++++++ debian/patches/series | 3 ++ 3 files changed, 43 insertions(+) create mode 100644 debian/patches/fix-wrongly-positioned-popups.patch diff --git a/debian/changelog b/debian/changelog index e8ac00e..3d9cab8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +lxqt-panel (0.12.0-8ubuntu1) UNRELEASED; urgency=medium + + * Cherry-pick some upstream commits because the upstream release cycle is + horribly slow (and without this it'll be years before they come in): + - Fix wrongly positioned popups (LP: #1527013). + + fix-wrongly-positioned-popups.patch + + Upstream commit 7391172. + + -- Simon Quigley Mon, 05 Feb 2018 19:00:18 -0600 + lxqt-panel (0.12.0-8build1) bionic; urgency=medium * No change rebuild against libdbusmenu-qt5-2. diff --git a/debian/patches/fix-wrongly-positioned-popups.patch b/debian/patches/fix-wrongly-positioned-popups.patch new file mode 100644 index 0000000..80ae4d3 --- /dev/null +++ b/debian/patches/fix-wrongly-positioned-popups.patch @@ -0,0 +1,30 @@ +Description: lxqtpanel: Fix wrongly positioned popups + Avoid the usage the QWidget::mapToGlobal(), which is unreliable sometimes. +Author: Palo Kisa +Origin: backport +Bug: https://github.com/lxde/lxqt/issues/1076 +Bug-Ubuntu: https://pad.lv/1527013 +Applied-Upstream: commit:7391172 +Last-Update: 2018-02-05 +--- a/panel/lxqtpanel.cpp ++++ b/panel/lxqtpanel.cpp +@@ -987,7 +987,8 @@ void LXQtPanel::setReserveSpace(bool res + ************************************************/ + QRect LXQtPanel::globalGometry() const + { +- return QRect(mapToGlobal(QPoint(0, 0)), this->size()); ++ // panel is the the top-most widget/window, no calculation needed ++ return geometry(); + } + + +@@ -1204,7 +1205,8 @@ QRect LXQtPanel::calculatePopupWindowPos + return QRect(); + } + +- return calculatePopupWindowPos(panel_plugin->mapToGlobal(QPoint(0, 0)), windowSize); ++ // Note: assuming there are not contentMargins around the "BackgroundWidget" (LXQtPanelWidget) ++ return calculatePopupWindowPos(globalGeometry().topLeft() + panel_plugin->geometry().topLeft(), windowSize); + } + + diff --git a/debian/patches/series b/debian/patches/series index a1d206b..77a0720 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,6 @@ clock-and-volume.patch move-configs.patch plugin-volume-mixer.patch + +# Ubuntu-specific patches +fix-wrongly-positioned-popups.patch