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

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

Description

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

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

Reviewers: KWin, Plasma

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D6572