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.
This commit is contained in:
parent
f2873dcd36
commit
fa774230f3
2 changed files with 1 additions and 2 deletions
|
@ -297,7 +297,6 @@ void TransientPlacementTest::testDecorationPosition()
|
||||||
QVERIFY(transient->hasTransientPlacementHint());
|
QVERIFY(transient->hasTransientPlacementHint());
|
||||||
QFETCH(QRect, expectedGeometry);
|
QFETCH(QRect, expectedGeometry);
|
||||||
expectedGeometry.translate(parent->clientPos());
|
expectedGeometry.translate(parent->clientPos());
|
||||||
QEXPECT_FAIL("", "Fix me", Continue);
|
|
||||||
QCOMPARE(transient->geometry(), expectedGeometry);
|
QCOMPARE(transient->geometry(), expectedGeometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -497,7 +497,7 @@ void Placement::placeOnScreenDisplay(AbstractClient* c, QRect& area)
|
||||||
void Placement::placeTransient(AbstractClient *c)
|
void Placement::placeTransient(AbstractClient *c)
|
||||||
{
|
{
|
||||||
// TODO: apply sanity checks?
|
// 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)
|
void Placement::placeDialog(AbstractClient* c, QRect& area, Policy nextPlacement)
|
||||||
|
|
Loading…
Reference in a new issue