From ff052c6d9c97b0ac373acaa61ff2f655ccf15af5 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 5 Nov 2024 18:08:29 +0100 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. --- 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 42d80f77d3..92bc0437df 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;