Fix transient placement for decorated parents

Need to add client pos to the transient's position. The offset is
relative to the parent surface, but the client doesn't know about the
size of the decoration, thus KWin needs to add it.
master
Martin Gräßlin 9 years ago
parent f2873dcd36
commit fa774230f3

@ -297,7 +297,6 @@ void TransientPlacementTest::testDecorationPosition()
QVERIFY(transient->hasTransientPlacementHint());
QFETCH(QRect, expectedGeometry);
expectedGeometry.translate(parent->clientPos());
QEXPECT_FAIL("", "Fix me", Continue);
QCOMPARE(transient->geometry(), expectedGeometry);
}

@ -497,7 +497,7 @@ void Placement::placeOnScreenDisplay(AbstractClient* c, QRect& area)
void Placement::placeTransient(AbstractClient *c)
{
// TODO: apply sanity checks?
c->move(c->transientFor()->pos() + c->transientPlacementHint());
c->move(c->transientFor()->pos() + c->transientFor()->clientPos() + c->transientPlacementHint());
}
void Placement::placeDialog(AbstractClient* c, QRect& area, Policy nextPlacement)

Loading…
Cancel
Save