[server] Improve the handling when clients disconnect
ClosedPublic

Authored by graesslin on May 19 2016, 2:21 PM.

Details

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.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 3883.May 19 2016, 2:21 PM
graesslin retitled this revision from to [server] Improve the handling when clients disconnect.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptMay 19 2016, 2:21 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
bshah accepted this revision.May 20 2016, 9:44 AM
bshah added a reviewer: bshah.
This revision is now accepted and ready to land.May 20 2016, 9:44 AM
This revision was automatically updated to reflect the committed changes.