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;