Cleanup wayland resources used in kwindowsystem before they're deleted by QPA

Authored by davidedmundson on May 5 2017, 10:28 PM.



When the Qt QPA closes it deletes the wl_display
deleting wl_display deletes the wl_registry
when we destroy the kwayland wrapper we double delete
as the windowsystem integration is a singleton we're not deleted till
after qApp.

By manually releasing the wayland parts early we avoid that problem,
whilst still being safe if any app did make a KWindowSystem call during

BUG: 374665

Test Plan

Locked screen, no longer crashed when typing in password
Opened system settings, created a blurred tooltip then closed. No longer crashed

Making a unit test that runs during qApp shutdown will be incredibly difficult.

Diff Detail

R130 Frameworks integration plugin using KWayland
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.May 5 2017, 10:28 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 5 2017, 10:28 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
cfeck added a subscriber: cfeck.May 5 2017, 10:55 PM

We are tracking the wl_map_insert_at crashes at bug 372597.

add bug mentioned by cfeck

graesslin accepted this revision.May 6 2017, 4:56 AM
graesslin added a subscriber: graesslin.

This is genius, using release! I spent hours on thinking how to properly clean that up and always came to the conclusion it's not possible as we cannot properly clean up because we don't get informed when the connection is destroyed.


nitpick: indentation

This revision is now accepted and ready to land.May 6 2017, 4:56 AM
This revision was automatically updated to reflect the committed changes.
cfeck added a comment.May 6 2017, 12:28 PM

add bug mentioned by cfeck

Uhm, where did you add it?