[server] Improve the handling when clients disconnect

Authored by graesslin on May 19 2016, 1:17 PM.

Description

[server] Improve the handling when clients disconnect

Summary:
So far the server component performed manual cleanup in some cases
when a client disconnects. But this is not needed: the Wayland library
calls the static unbind methods which do cleanup. If we cleanup ourselves
this can result in double deletes in the worst case, so let's only use
the Wayland functionality.

Adjusted:

  • RegionInterface
  • SurfaceInterface
  • ShellSurfaceInterface (doesn't take a parent anymore)
  • DpmsInterface
  • QtSurfaceExtensionInterface
  • KeyboardInterface
  • PointerInterface
  • TouchInterface
  • DataOfferInterface
  • PlasmaShellSurfaceInterface

For each adjusted case a test case is added to verify that the cleanup
works. Exceptions are DpmsInterface as the actual Resource is not exposed
at all in the Server component and DataOfferInterface as that is server
side created.

Reviewers: Plasma

Subscribers: plasma-devel

Tags: Plasma

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

Details