Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.5, 5.13.2, 5.14.0 RC1
-
-
7c0833f4bc22d2d947c793f0711e3f1e1a09012c (qt/qtwayland/5.14) 1e1f692dbdb0b1b8a1bbed99b5ff550dc978cdcd (qt/qtwayland/5.12)
Description
// 1. create and show a QWaylandXdgSurfaceV6::Popup (e.g. QMenu), parented to parent. auto pMenu = new QMenu("test", parent); pMenu->show(); // 2. close the parent. QTimer::singleShot(100, [parent]() {parent->close(); }); // 3. Next time a popup is shown it will crash in QWaylandXdgSurfaceV6::setGrabPopup.
It seems a popup has a m_parent pointer to it's parent surface. Assuming the popup is closed first - the code works.
But if the parent surface is closed first - the surface does not seem to have any
knowledge of it's child popup(s) - and does nothing to destroy them first.
In previous QT versions and windowing systems could be expected that closing a parent window will automatically close any child windows (especially without crashing).
It seems to happen also only when the window decorations are disabled.