From 75935c126c717b20460998539be7360b2a6fe019 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 21 Nov 2023 13:50:10 +0100 Subject: [PATCH] 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(). --- src/layershellv1window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layershellv1window.cpp b/src/layershellv1window.cpp index 02f5ca32d7..7d6dd0b90b 100644 --- a/src/layershellv1window.cpp +++ b/src/layershellv1window.cpp @@ -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)