From da63dc0941c21e4f0a016e0f2f7127a831d0d369 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 5 Nov 2024 17:43:38 +0000 Subject: [PATCH] tabbox: Do not add windows that have modal children This fixes a porting typo. Previously, the modal was therefore added twice, once for itself and once for its parent but we actually do *not* want a window with a modal child at all. (cherry picked from commit ff052c6d9c97b0ac373acaa61ff2f655ccf15af5) Co-authored-by: Kai Uwe Broulik --- src/tabbox/tabbox.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/tabbox/tabbox.cpp b/src/tabbox/tabbox.cpp index 58bffb4294..5393f0a808 100644 --- a/src/tabbox/tabbox.cpp +++ b/src/tabbox/tabbox.cpp @@ -191,12 +191,10 @@ Window *TabBoxHandlerImpl::clientToAddToList(Window *client) const Window *modal = client->findModal(); if (modal == nullptr || modal == client) { ret = client; + } else if (!clientList().contains(modal)) { + ret = modal; } else { - if (clientList().contains(modal)) { - ret = modal; - } else { - // nothing - } + // nothing } } return ret;