Avoid deleting ourselves midway through updateShadow
ClosedPublic

Authored by davidedmundson on Thu, Dec 6, 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.Thu, Dec 6, 12:26 PM
Restricted Application added a project: KWin. · View Herald TranscriptThu, Dec 6, 12:26 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Thu, Dec 6, 12:26 PM
zzag accepted this revision.Thu, Dec 6, 12:53 PM
This revision is now accepted and ready to land.Thu, Dec 6, 12:53 PM
This revision was automatically updated to reflect the committed changes.