wayland: Properly update subsurfaces in cached transaction
Cached transaction will be merged with parent transaction when the parent surface is committed, it's not included in the transaction graph.
This commit is contained in:
parent
7e99ab9438
commit
8d3b4a21c8
1 changed files with 13 additions and 0 deletions
|
@ -63,6 +63,12 @@ void SurfaceInterfacePrivate::addChild(SubSurfaceInterface *child)
|
|||
current->subsurface.above.append(child);
|
||||
pending->subsurface.above.append(child);
|
||||
|
||||
if (subsurface.transaction) {
|
||||
subsurface.transaction->amend(q, [child](SurfaceState *state) {
|
||||
state->subsurface.above.append(child);
|
||||
});
|
||||
}
|
||||
|
||||
for (auto transaction = firstTransaction; transaction; transaction = transaction->next(q)) {
|
||||
transaction->amend(q, [child](SurfaceState *state) {
|
||||
state->subsurface.above.append(child);
|
||||
|
@ -90,6 +96,13 @@ void SurfaceInterfacePrivate::removeChild(SubSurfaceInterface *child)
|
|||
pending->subsurface.below.removeAll(child);
|
||||
pending->subsurface.above.removeAll(child);
|
||||
|
||||
if (subsurface.transaction) {
|
||||
subsurface.transaction->amend(q, [child](SurfaceState *state) {
|
||||
state->subsurface.below.removeOne(child);
|
||||
state->subsurface.above.removeOne(child);
|
||||
});
|
||||
}
|
||||
|
||||
for (auto transaction = firstTransaction; transaction; transaction = transaction->next(q)) {
|
||||
transaction->amend(q, [child](SurfaceState *state) {
|
||||
state->subsurface.below.removeOne(child);
|
||||
|
|
Loading…
Reference in a new issue