[kstyle] Change ownership of Wayland objects so that KWin can delete them
ClosedPublic

Authored by graesslin on Jul 8 2017, 1:30 PM.

Details

Summary

KWin has a problem that breeze crashes it on tear down if the shadow was
created. This is due to breeze destroying the Wayland connection after
KWin destroyed it which triggers a crash in libwayland.

D6571 addresses this problem by deleting the ConnectionThread created by
plugins prior to destroying the Wayland server.

By changing the ownership of the registry and the interfaces to be
children and grandchildren of the ConnectionThread we can ensure that
KWin can clean up this area properly. For non KWin cases this doesn't
change anything, everything is still deleted as a child of ShadowHelper.

Test Plan

Ensured that the Registry gets deleted before KWin's own connection

Diff Detail

Repository
R31 Breeze
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Jul 8 2017, 1:30 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 8 2017, 1:30 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hpereiradacosta accepted this revision.Jul 8 2017, 1:51 PM

looks good !

kstyle/breezeshadowhelper.h
187

Just to make sure (I haven't read the other review request): this change is because Registry now returns QPointer and not raw pointers ? Correct ?

This revision is now accepted and ready to land.Jul 8 2017, 1:51 PM
hpereiradacosta added inline comments.Jul 8 2017, 1:53 PM
kstyle/breezeshadowhelper.h
187

... ignore.
I guess this is just to have better test on nullptr in case the object pointed to by QPointer gets deleted elsewhere (e.g. in kwin)

davidedmundson accepted this revision.Jul 8 2017, 2:20 PM
graesslin updated this revision to Diff 16517.Jul 11 2017, 3:19 PM
  • [kstyle] Do not delete the Surface for a QWindow
graesslin updated this revision to Diff 16518.Jul 11 2017, 3:19 PM

Undo arc mess

This revision was automatically updated to reflect the committed changes.