D28668: [wayland] Fix teardown order

Vlad Zahorodnii noreply at phabricator.kde.org
Tue Apr 14 16:29:35 BST 2020


zzag added inline comments.

INLINE COMMENTS

> wayland_server.cpp:640
>              Registry *registry = new Registry(this);
> -            EventQueue *eventQueue = new EventQueue(this);
> +            EventQueue *eventQueue = new EventQueue(registry);
>              eventQueue->setup(m_internalConnection.client);

Wouldn't it be better to destroy the event queue explicitly in destroyInternalConnection()? It would be a more robust (what if other globals need to access the event queue during tear down too?) and easier solution (a "flat" tear down sequence is much easier to understand than the one where children are destroyed together with their parent implicitly), imho.

[1] In fact, we got a bug or two because of "unexpected" (technically, it was okay; but conceptually it wasn't) tear down order of parents and their children.

REPOSITORY
  R108 KWin

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D28668

To: davidedmundson, #kwin, cblack, apol
Cc: zzag, apol, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200414/b1e38158/attachment.html>


More information about the kwin mailing list