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.
icc-effect-5.14.5
Martin Gräßlin 2016-03-03 13:36:01 +01:00
parent f2873dcd36
commit fa774230f3
2 changed files with 1 additions and 2 deletions

View File

@ -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);
}

View File

@ -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)