Avoid deleting ourselves midway through updateShadow
ClosedPublic

Authored by davidedmundson on Dec 6 2018, 12:26 PM.

Details

Summary

If updating a shadow means that there should be no shadow, shadow ends
up deleting itself midway through the method.

It's cleaner and safer to leave that to the caller.

This new change matches the existing documentation for
Shadow::updateShadow which states

In case the Property has been withdrawn the method returns @c false.
In that case the owner should delete the Shadow.

Test Plan

Created an ASAN of kwin
Relevant testMaximised no longer fails

Diff Detail

Repository
R108 KWin
Branch
origin-master (branched from master)
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5744
Build 5762: arc lint + arc unit
davidedmundson created this revision.Dec 6 2018, 12:26 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 6 2018, 12:26 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Dec 6 2018, 12:26 PM
zzag accepted this revision.Dec 6 2018, 12:53 PM
This revision is now accepted and ready to land.Dec 6 2018, 12:53 PM
This revision was automatically updated to reflect the committed changes.