QWaylandWindow *QWaylandWindow::transientParent() const { if (window()->transientParent()) { // Take the top level window here, since the transient parent may be a QWidgetWindow // or some other window without a shell surface, which is then not able to get mouse // events, nor set mMouseSerial and mMouseDevice. return static_cast<QWaylandWindow *>(topLevelWindow(window()->transientParent())->handle()); } return 0; }
QWaylandWindow *QWaylandWindow::transientParent() const { if (window()->transientParent()) { // Take the top level window here, since the transient parent may be a QWidgetWindow // or some other window without a shell surface, which is then not able to get mouse // events. return static_cast<QWaylandWindow *>(topLevelWindow(window()->transientParent())->handle()); } // Try with the current focus window. It should be the right one and anyway // better than having no parent at all. return mDisplay->lastInputWindow(); }