Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrongly positioned popups (LP: #1527013).
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Description: lxqtpanel: Fix wrongly positioned popups | ||
Avoid the usage the QWidget::mapToGlobal(), which is unreliable sometimes. | ||
Author: Palo Kisa <palo.kisa@gmail.com> | ||
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); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
clock-and-volume.patch | ||
move-configs.patch | ||
plugin-volume-mixer.patch | ||
|
||
# Ubuntu-specific patches | ||
fix-wrongly-positioned-popups.patch |