layershellv1window: Check isDeleted before activating it

Opening the user actions menu causes auto-hiding layer-shell windows
(such as Kickoff, KRunner) to hide, closing the menu and having KWin
transfer focus back to the window which is now half-destroyed.

XdgToplevelWindow::acceptsFocus() also checks for isDeleted().
This commit is contained in:
Kai Uwe Broulik 2023-11-21 13:50:10 +01:00
parent ae884dd19e
commit 75935c126c

View file

@ -218,7 +218,7 @@ Layer LayerShellV1Window::belongsToLayer() const
bool LayerShellV1Window::acceptsFocus() const
{
return m_shellSurface->acceptsFocus();
return !isDeleted() && m_shellSurface->acceptsFocus();
}
void LayerShellV1Window::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)