XdgPopupWindow: Allow position to be set by Plasma
This lets Plasma itself control the position of popup windows such as Plasma tooltips. transientPlacement() now returns the position set by Plasma if available. BUG: 463272
This commit is contained in:
parent
2aba3deca4
commit
539b6bb6ac
1 changed files with 4 additions and 1 deletions
|
@ -1644,9 +1644,12 @@ bool XdgPopupWindow::hasTransientPlacementHint() const
|
|||
QRectF XdgPopupWindow::transientPlacement(const QRectF &bounds) const
|
||||
{
|
||||
const XdgPositioner positioner = m_shellSurface->positioner();
|
||||
|
||||
const QSize desiredSize = positioner.size();
|
||||
|
||||
if (m_plasmaShellSurface && m_plasmaShellSurface->isPositionSet()) {
|
||||
return QRectF(m_plasmaShellSurface->position(), desiredSize);
|
||||
}
|
||||
|
||||
const QPointF parentPosition = transientFor()->framePosToClientPos(transientFor()->pos());
|
||||
|
||||
// returns if a target is within the supplied bounds, optional edges argument states which side to check
|
||||
|
|
Loading…
Reference in a new issue