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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
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.